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");
// 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 });

View File

@@ -13,5 +13,5 @@
<choice id="tf.matt.fx_cast_bridge" visible="false">
<pkg-ref id="tf.matt.fx_cast_bridge"/>
</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>