Skip to content

Commit

Permalink
[pkg] implement least-preferred plan for exe build...
Browse files Browse the repository at this point in the history
see vercel/pkg#1319 <-- tried making a pkg
property in package.json specifying assets, resolving prebuild-install
for npm to no avail. There's no way to stop pkg packaging the macos
binary, so patch in the windows iconv node file before build, and
put the macos iconv node file back again once compiling completes (for
dev). There is another node file for expat, but this doesn't pick up and
the old behaviour of expecting it in the destination folder is
maintained - is this due to an obfuscated require? If so, that could be
a more elegant sloution?
  • Loading branch information
tonywoode committed Sep 27, 2021
1 parent b52f977 commit dde848a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -21,8 +21,11 @@
"fulldebug": "trash $npm_package_directories_outputDir && npm run debug --",
"test": "mocha -- ./specs/init.js $(eval $npm_package_config_getSpecs)",
"test-synctool": "mocha -- ./specs/init.js $(eval $npm_package_config_getSpecsSynctool)",
"monkeyPatchIconv": "mv node_modules/iconv/build/Release/iconv.node node_modules/iconv/build/Release/iconv.node_MACOS && cp /Volumes/[C]\\ My\\ Boot\\ Camp/Emulators/QUICKPLAY/QuickPlayFrontend/qp/bin/iconv.node node_modules/iconv/build/Release/iconv.node",
"unMonkeyPatchIconv": "cp -f node_modules/iconv/build/Release/iconv.node_MACOS node_modules/iconv/build/Release/iconv.node",
"package": "pkg src/QPNode.js -t win --out-path $npm_package_directories_binOutputDir",
"packageParallels": "pkg src/QPNode.js -t win --out-path /Volumes/[C]\\ My\\ Boot\\ Camp/Emulators/QUICKPLAY/QuickPlayFrontend/qp/bin",
"packageParallelsWithPatch": "npm run monkeyPatchIconv && npm run packageParallels && npm run unMonkeyPatchIconv",
"dist": "electron-builder --win --x64; \\cp -f -R dist/win-unpacked/ /Volumes/[C]\\ My\\ Boot\\ Camp/Emulators/QUICKPLAY/QuickPlayFrontend/qp/bin/QPElectron"
},
"build": {
Expand Down

0 comments on commit dde848a

Please sign in to comment.