mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-14 10:40:06 +00:00
2bf916ea58
Also run prettier
29 lines
720 B
JavaScript
29 lines
720 B
JavaScript
const fs = require('fs');
|
|
const defaultdir = './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(defaultdir, { 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;
|
|
}
|
|
});
|
|
}
|