Fix productbuild --package-path location

This commit is contained in:
hensm
2018-11-28 03:25:54 +00:00
parent 57f60abcd4
commit b6a3145cfa
3 changed files with 9 additions and 3 deletions

View File

@@ -17,6 +17,9 @@ const argv = require("minimist")(process.argv.slice(2));
const BUILD_DIR_PATH = path.join(__dirname, "../build"); const BUILD_DIR_PATH = path.join(__dirname, "../build");
// Clean
fs.removeSync(DIST_DIR_PATH);
// Make directories // Make directories
fs.ensureDirSync(BUILD_DIR_PATH); fs.ensureDirSync(BUILD_DIR_PATH);
fs.ensureDirSync(DIST_DIR_PATH, { recursive: true }); fs.ensureDirSync(DIST_DIR_PATH, { recursive: true });
@@ -126,7 +129,7 @@ async function buildInstaller (platform) {
// Build installer package // Build installer package
spawnSync( spawnSync(
`productbuild --distribution ${distFilePath} ` `productbuild --distribution ${distFilePath} `
+ `--package-path ${componentPath} ` + `--package-path ${BUILD_DIR_PATH} `
+ `${installerPath}` + `${installerPath}`
, { shell: true }); , { shell: true });

View File

@@ -13,5 +13,5 @@
<choice id="tf.matt.fx_cast_bridge" visible="false"> <choice id="tf.matt.fx_cast_bridge" visible="false">
<pkg-ref id="tf.matt.fx_cast_bridge"/> <pkg-ref id="tf.matt.fx_cast_bridge"/>
</choice> </choice>
<pkg-ref id="tf.matt.fx_cast_bridge" version="0.0.1" onConclusion="none">fx_cast_bridge.pkg</pkg-ref> <pkg-ref id="tf.matt.fx_cast_bridge" version="0.0.1" onConclusion="none">fx_cast_bridge_default.pkg</pkg-ref>
</installer-gui-script> </installer-gui-script>

View File

@@ -18,6 +18,9 @@ if (argv.package) {
const { mirroringAppId = "19A6F4AE" const { mirroringAppId = "19A6F4AE"
, mode = "development" } = argv; , mode = "development" } = argv;
// Clean
fs.removeSync(path.join(__dirname, "../dist/ext/"));
const child = spawn( const child = spawn(
`webpack --env.extensionName=${extensionName} ` `webpack --env.extensionName=${extensionName} `
+ `--env.extensionId=${extensionId} ` + `--env.extensionId=${extensionId} `