From e5aee20a08d669d471fd08b946eba4ef232c4c73 Mon Sep 17 00:00:00 2001 From: hensm Date: Wed, 12 Aug 2020 10:53:18 +0100 Subject: [PATCH] Add usePkg option to restore previous build behavior --- app/bin/build.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/bin/build.js b/app/bin/build.js index 35ec10c..6a4bb61 100644 --- a/app/bin/build.js +++ b/app/bin/build.js @@ -32,7 +32,7 @@ const { executableName // Command line args const argv = minimist(process.argv.slice(2), { - boolean: [ "package", "skipNativeBuilds" ] + boolean: [ "usePkg", "package", "skipNativeBuilds" ] , string: [ "arch", "packageType" ] , default: { arch: os.arch() @@ -114,7 +114,7 @@ async function build () { * If packaging, add the installed executable path, otherwise * add the path to the built executable in the dist folder. */ - if (argv.package) { + if (argv.package || argv.usePkg) { // Need a minimal package.json for pkg. const pkgManifest = { bin: "main.js" @@ -143,10 +143,10 @@ async function build () { fs.removeSync(path.join(BUILD_PATH, "src")); - - manifest.path = path.join(executablePath[process.platform] - , executableName[process.platform]); - + manifest.path = argv.usePkg + ? path.join(DIST_PATH, executableName[process.platform]) + : path.join(executablePath[process.platform] + , executableName[process.platform]); } else { let launcherPath = path.join(BUILD_PATH , meta.__applicationExecutableName);