mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-13 02:10:04 +00:00
Consolidate afterPack scripts into one file
This commit is contained in:
parent
101de9d68b
commit
5da0da1981
@ -1,19 +0,0 @@
|
||||
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;
|
||||
}
|
||||
});
|
||||
}
|
28
build/afterpack.js
Normal file
28
build/afterpack.js
Normal file
@ -0,0 +1,28 @@
|
||||
const fs = require('fs');
|
||||
const dir = './dist/win-ia32-unpacked/resources/default_app'
|
||||
const exefile = './dist/win-ia32-unpacked/OpenFusionClient.exe'
|
||||
|
||||
exports.default = function() {
|
||||
// remove leftover files from default electron app
|
||||
fs.rm(dir, { recursive: true }, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
// patch executable for large address awareness
|
||||
fs.open(exefile, "r+", (err, fd) => {
|
||||
if(!err) {
|
||||
fs.write(
|
||||
fd, new Uint8Array([0x22]), 0, 1, 0x166,
|
||||
(err) => {
|
||||
if(err) {
|
||||
throw err;
|
||||
}
|
||||
fs.closeSync(fd);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const dir = './dist/win-ia32-unpacked/resources/default_app'
|
||||
|
||||
exports.default = async function() {
|
||||
fs.rm(dir, { recursive: true }, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
@ -67,10 +67,7 @@
|
||||
"to": "utils"
|
||||
}
|
||||
],
|
||||
"afterPack": [
|
||||
"./build/4gb-patch.js",
|
||||
"./build/delete-default-app.js"
|
||||
]
|
||||
"afterPack": "./build/afterpack.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": "^0.30.0"
|
||||
|
Loading…
Reference in New Issue
Block a user