From b6a3145cfafadce27e05f9a2625c1bcfc1c353d6 Mon Sep 17 00:00:00 2001 From: hensm Date: Wed, 28 Nov 2018 03:25:54 +0000 Subject: [PATCH] Fix productbuild --package-path location --- app/bin/build.js | 7 +++++-- app/distribution.xml | 2 +- ext/build.js | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/bin/build.js b/app/bin/build.js index b9ebb81..ebdb997 100644 --- a/app/bin/build.js +++ b/app/bin/build.js @@ -17,6 +17,9 @@ const argv = require("minimist")(process.argv.slice(2)); const BUILD_DIR_PATH = path.join(__dirname, "../build"); +// Clean +fs.removeSync(DIST_DIR_PATH); + // Make directories fs.ensureDirSync(BUILD_DIR_PATH); fs.ensureDirSync(DIST_DIR_PATH, { recursive: true }); @@ -84,7 +87,7 @@ async function build () { } // Remove build directory - fs.removeSync(BUILD_DIR_PATH); + fs.removeSync(BUILD_DIR_PATH); } async function buildInstaller (platform) { @@ -126,7 +129,7 @@ async function buildInstaller (platform) { // Build installer package spawnSync( `productbuild --distribution ${distFilePath} ` - + `--package-path ${componentPath} ` + + `--package-path ${BUILD_DIR_PATH} ` + `${installerPath}` , { shell: true }); diff --git a/app/distribution.xml b/app/distribution.xml index cf42dff..cec0ecb 100644 --- a/app/distribution.xml +++ b/app/distribution.xml @@ -13,5 +13,5 @@ - fx_cast_bridge.pkg + fx_cast_bridge_default.pkg diff --git a/ext/build.js b/ext/build.js index 525d8cf..c1b49c8 100644 --- a/ext/build.js +++ b/ext/build.js @@ -18,6 +18,9 @@ if (argv.package) { const { mirroringAppId = "19A6F4AE" , mode = "development" } = argv; +// Clean +fs.removeSync(path.join(__dirname, "../dist/ext/")); + const child = spawn( `webpack --env.extensionName=${extensionName} ` + `--env.extensionId=${extensionId} `