diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2024-01-09 16:32:28 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-01-15 16:30:01 +0100 |
| commit | 441466e650d541c88ae246cf5cb110a90cee9898 (patch) | |
| tree | 47daf5aea4f1474a8c2aa7bf69666a1f281fc089 /gui | |
| parent | 6bc4b86b278ec0b4187b35294ab7e889b638504d (diff) | |
| download | mullvadvpn-441466e650d541c88ae246cf5cb110a90cee9898.tar.xz mullvadvpn-441466e650d541c88ae246cf5cb110a90cee9898.zip | |
Fix binaries paths in mac build
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/tasks/distribution.js | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/gui/tasks/distribution.js b/gui/tasks/distribution.js index 59348c4f0c..99c8fb87ef 100644 --- a/gui/tasks/distribution.js +++ b/gui/tasks/distribution.js @@ -11,11 +11,14 @@ const shouldNotarize = process.argv.includes('--notarize'); const universal = process.argv.includes('--universal'); const release = process.argv.includes('--release'); -const targetsIndex = process.argv.indexOf('--targets'); -let targets = null; +const targets = getOptionValue('--targets'); +const hostTargetTriple = getOptionValue('--host-target-triple'); -if (targetsIndex !== -1) { - targets = process.argv[targetsIndex + 1]; +function getOptionValue(option) { + const optionIndex = process.argv.indexOf(option); + if (optionIndex !== -1) { + return process.argv[optionIndex + 1]; + } } const config = { @@ -90,12 +93,12 @@ const config = { NSUserNotificationAlertStyle: 'banner', }, extraResources: [ - { from: distAssets(path.join('${env.TARGET_TRIPLE}', 'mullvad')), to: '.' }, - { from: distAssets(path.join('${env.TARGET_TRIPLE}', 'mullvad-problem-report')), to: '.' }, - { from: distAssets(path.join('${env.TARGET_TRIPLE}', 'mullvad-daemon')), to: '.' }, - { from: distAssets(path.join('${env.TARGET_TRIPLE}', 'mullvad-setup')), to: '.' }, + { from: distAssets(path.join('${env.BINARIES_PATH}', 'mullvad')), to: '.' }, + { from: distAssets(path.join('${env.BINARIES_PATH}', 'mullvad-problem-report')), to: '.' }, + { from: distAssets(path.join('${env.BINARIES_PATH}', 'mullvad-daemon')), to: '.' }, + { from: distAssets(path.join('${env.BINARIES_PATH}', 'mullvad-setup')), to: '.' }, { - from: distAssets(path.join('${env.TARGET_TRIPLE}', 'libtalpid_openvpn_plugin.dylib')), + from: distAssets(path.join('${env.BINARIES_PATH}', 'libtalpid_openvpn_plugin.dylib')), to: '.', }, { from: distAssets(path.join('binaries', '${env.TARGET_TRIPLE}', 'openvpn')), to: '.' }, @@ -284,6 +287,10 @@ function packMac() { break; } + process.env.BINARIES_PATH = hostTargetTriple !== process.env.TARGET_TRIPLE + ? process.env.TARGET_TRIPLE + : ''; + return true; }, beforePack: async (context) => { |
