diff --git a/build/4gb-patch.js b/build/4gb-patch.js new file mode 100644 index 0000000..203ddaf --- /dev/null +++ b/build/4gb-patch.js @@ -0,0 +1,19 @@ +const fs = require('fs'); +const file = './dist/win-ia32-unpacked/OpenFusionClient.exe' + +exports.default = async function() { + fs.open(file, "r+", (err, fd) => { + if(!err) { + fs.write( + fd, new Uint8Array([0x22]), 0, 1, 0x166, + (err) => { + if(err) { + throw err; + } + } + ); + } else { + throw err; + } + }); +} diff --git a/build/delete-default-app.js b/build/delete-default-app.js index b600415..4594616 100644 --- a/build/delete-default-app.js +++ b/build/delete-default-app.js @@ -1,10 +1,10 @@ const fs = require('fs'); const dir = './dist/win-ia32-unpacked/resources/default_app' -exports.default = async function(context) { - fs.rmdir(dir, { recursive: true }, (err) => { +exports.default = async function() { + fs.rm(dir, { recursive: true }, (err) => { if (err) { throw err; } }); -} \ No newline at end of file +} diff --git a/package.json b/package.json index 161bdb0..bc976c7 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,10 @@ "to": "utils" } ], - "afterPack": "./build/delete-default-app.js" + "afterPack": [ + "./build/4gb-patch.js", + "./build/delete-default-app.js" + ] }, "dependencies": { "fs-extra": "^0.30.0"