diff --git a/package-lock.json b/package-lock.json index 7e64a5947..cd3db68e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flashpoint-launcher", - "version": "12.2.1", + "version": "13.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "flashpoint-launcher", - "version": "12.2.1", + "version": "13.0.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -14,7 +14,7 @@ "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "0.1.18", - "@fparchive/flashpoint-archive": "^0.3.0", + "@fparchive/flashpoint-archive": "^0.4.3", "@types/react-virtualized": "^9.21.21", "axios": "1.3.4", "connected-react-router": "6.9.2", @@ -880,23 +880,39 @@ } }, "node_modules/@fparchive/flashpoint-archive": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive/-/flashpoint-archive-0.3.0.tgz", - "integrity": "sha512-2Ki//0zzrDDbk1Fm7x4hamDGaQhcOkgLDAjTD6v5A9umjkaUQ4DspgNEtvGzzFBFnGzxL4i+wttHpOn6MHbx7w==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive/-/flashpoint-archive-0.4.3.tgz", + "integrity": "sha512-LD0YDIwrXhL+Nw+IPMVmvXMQOvZOGDeYEt1MawMSc94CViUSwGototUyMptKFMWlb4JdOzQvyjRRiHKCDW8ekw==", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@fparchive/flashpoint-archive-darwin-arm64": "0.3.0", - "@fparchive/flashpoint-archive-darwin-x64": "0.3.0", - "@fparchive/flashpoint-archive-linux-x64-gnu": "0.3.0", - "@fparchive/flashpoint-archive-win32-x64-msvc": "0.3.0" + "@fparchive/flashpoint-archive-darwin-arm64": "0.4.3", + "@fparchive/flashpoint-archive-darwin-x64": "0.4.3", + "@fparchive/flashpoint-archive-linux-x64-gnu": "0.4.3", + "@fparchive/flashpoint-archive-win32-ia32-msvc": "0.4.3", + "@fparchive/flashpoint-archive-win32-x64-msvc": "0.4.3" + } + }, + "node_modules/@fparchive/flashpoint-archive-darwin-arm64": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-arm64/-/flashpoint-archive-darwin-arm64-0.4.3.tgz", + "integrity": "sha512-zvYnyyeZRFWW9zIeuxIbL3jV+7RKAr6jrCildTlYNw9D/N0wBhBU8eA95jYUcE4tSNG8MgGM5nDR3Xpk3XPKYQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" } }, "node_modules/@fparchive/flashpoint-archive-darwin-x64": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-x64/-/flashpoint-archive-darwin-x64-0.3.0.tgz", - "integrity": "sha512-hUqN2MnEjiGClXbzGPkwQbpPqOgsco1dfOJw1sGt1SObteF+7II3vYvXgGo/JdVOkmeM8ZiTtIq1MfmZANS6wg==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-x64/-/flashpoint-archive-darwin-x64-0.4.3.tgz", + "integrity": "sha512-vZEy0gRvsE44Oo7SgebnWQkP8jCnjlnj9lwA/KP0Is+lKAJ1YLnDUQa0ANX++CJOBvEx8NNnE00hUxFQ/EkQDw==", "cpu": [ "x64" ], @@ -909,9 +925,9 @@ } }, "node_modules/@fparchive/flashpoint-archive-linux-x64-gnu": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-linux-x64-gnu/-/flashpoint-archive-linux-x64-gnu-0.3.0.tgz", - "integrity": "sha512-cBZX0CgWpyP0kD/OGKXecPelO8Nts8pCNyfzbhvTFEObl1hBrOk/Dg7vmjAfyHoWJTsbm2IiPMZ0yVMkhxhidA==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-linux-x64-gnu/-/flashpoint-archive-linux-x64-gnu-0.4.3.tgz", + "integrity": "sha512-HlbQ/iMLqHppIqbwOJQ025lNjGlHlY632P10yYkBm+HXLmAXh3QomRi0nww+r4No7Hs4/Wy0t/hTJ7P6Zvmq7A==", "cpu": [ "x64" ], @@ -923,10 +939,25 @@ "node": ">= 10" } }, + "node_modules/@fparchive/flashpoint-archive-win32-ia32-msvc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-ia32-msvc/-/flashpoint-archive-win32-ia32-msvc-0.4.3.tgz", + "integrity": "sha512-rw45d16P6FwnWfT6UUKzL6b8q5aVZqI0SX4DslMg+y2nCxZqPUa5gx9gEnjEEnMhW5/3lJMmQwqToKkQO6zcKA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@fparchive/flashpoint-archive-win32-x64-msvc": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-x64-msvc/-/flashpoint-archive-win32-x64-msvc-0.3.0.tgz", - "integrity": "sha512-0jId+OECM91hkhcV58s852OqXay+YQsCSwb12TsdLjk35Rxe3wWTu2N6tY3W0rnAPQV0Fg/tk70GQQQqB3d3xg==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-x64-msvc/-/flashpoint-archive-win32-x64-msvc-0.4.3.tgz", + "integrity": "sha512-LHJ0kzAAiCKjBS1U5fx8pAD1tScQFLmZ2+Fx4tnmhNWPtGjyjN6heBqWmz1B4Ks/Zqg+bkRfHLCTbHSmkT09wQ==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index e0644ee68..781466ccb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "release:win32": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:win32\"", "release:darwin": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:darwin\"", "release:all": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:all\"", - "postinstall": "electron-builder install-app-deps & gulp extInstall", + "postinstall": "electron-builder install-app-deps & gulp extInstall & node postinstall.mjs", "clean": "gulp clean" }, "author": { @@ -39,7 +39,7 @@ "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "0.1.18", - "@fparchive/flashpoint-archive": "^0.3.0", + "@fparchive/flashpoint-archive": "0.4.3", "@types/react-virtualized": "^9.21.21", "axios": "1.3.4", "connected-react-router": "6.9.2", diff --git a/postinstall.mjs b/postinstall.mjs new file mode 100644 index 000000000..6781bea87 --- /dev/null +++ b/postinstall.mjs @@ -0,0 +1,32 @@ +import { exec } from 'child_process'; +import { platform } from 'os'; + +// Function to check if the current platform is Windows +function isWindows() { + return platform() === 'win32'; +} + +// Function to run npm install with specific architecture and force flag +function runNpmInstall() { + // Command to run npm install with architecture and force flag + const command = 'npm install --arch=ia32 --force --package-lock-only --ignore-scripts'; + + // Execute the command + exec(command, (error, stdout, stderr) => { + if (error) { + console.error(`Error running npm install: ${error.message}`); + return; + } + if (stderr) { + console.error(`stderr: ${stderr}`); + return; + } + console.log(`npm install output: ${stdout}`); + }); +} + +// Check if the platform is Windows and run npm install if true +if (isWindows()) { + console.log('Installing additional ia32 Windows libraries...'); + runNpmInstall(); +}