mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 10:39:57 +00:00
macOS installer postinstall fix manifest path
This commit is contained in:
@@ -98,6 +98,8 @@ async function buildInstaller (platform) {
|
|||||||
const installerPath = path.join(BUILD_DIR_PATH, installerName);
|
const installerPath = path.join(BUILD_DIR_PATH, installerName);
|
||||||
const componentPath = path.join(BUILD_DIR_PATH, componentName);
|
const componentPath = path.join(BUILD_DIR_PATH, componentName);
|
||||||
|
|
||||||
|
const packagingDir = path.join(__dirname, "../packaging/macos/");
|
||||||
|
|
||||||
// Create pkgbuild root
|
// Create pkgbuild root
|
||||||
const rootPath = path.join(BUILD_DIR_PATH, "root");
|
const rootPath = path.join(BUILD_DIR_PATH, "root");
|
||||||
const rootExecutablePath = path.join(rootPath
|
const rootExecutablePath = path.join(rootPath
|
||||||
@@ -120,11 +122,12 @@ async function buildInstaller (platform) {
|
|||||||
`pkgbuild --root ${rootPath} `
|
`pkgbuild --root ${rootPath} `
|
||||||
+ `--identifier "tf.matt.fx_cast_bridge" `
|
+ `--identifier "tf.matt.fx_cast_bridge" `
|
||||||
+ `--version "0.0.1" `
|
+ `--version "0.0.1" `
|
||||||
|
+ `--scripts ${path.join(packagingDir, "scripts")} `
|
||||||
+ `${componentPath}`
|
+ `${componentPath}`
|
||||||
, { shell: true });
|
, { shell: true });
|
||||||
|
|
||||||
// Distribution XML file
|
// Distribution XML file
|
||||||
const distFilePath = path.join(__dirname, "../distribution.xml");
|
const distFilePath = path.join(packagingDir, "distribution.xml");
|
||||||
|
|
||||||
// Build installer package
|
// Build installer package
|
||||||
spawnSync(
|
spawnSync(
|
||||||
|
|||||||
10
app/packaging/macos/scripts/postinstall
Executable file
10
app/packaging/macos/scripts/postinstall
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$2" != "/" ]
|
||||||
|
then
|
||||||
|
manifestPath=$2"/Library/Application Support/Mozilla/NativeMessagingHosts/fx_cast_bridge.json"
|
||||||
|
sed -i.bak 's,"path": "/Library,"path": "'$2'/Library,g' "$manifestPath"
|
||||||
|
rm "$manifestPath.bak"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user