-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25347 from martyngigg/macos-gatekeeper-workbench
Fix workbench startup script on macOS under Gatekeeper
- Loading branch information
Showing
5 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
buildconfig/CMake/Packaging/osx/MantidWorkbench_osx_launcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
INSTALLDIR=$(cd "$(dirname "$0")"; pwd) | ||
PLUGIN_DIR=$INSTALLDIR/../PlugIns | ||
cd $INSTALLDIR | ||
QT_PLUGIN_PATH=$PLUGIN_DIR ./workbench-script $* || /usr/bin/python ../../scripts/ErrorReporter/error_dialog_app.py --exitcode=$? --directory=$INSTALLDIR --qtdir=$PLUGIN_DIR --application=workbench | ||
|
||
# On first launch of quarantined apps launchd passes a command line parameter of the form -psn_0_XXXXXX | ||
# to the application. We discard this otherwise workbench's argparse will choke on it. | ||
# https://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder | ||
if [[ "${1}" == -psn_* ]]; then | ||
shift 1 | ||
fi | ||
env PYTHONPATH=${INSTALLDIR}:${PYTHONPATH} env QT_PLUGIN_PATH=$PLUGIN_DIR ${INSTALLDIR}/workbench-script $* || /usr/bin/python $INSTALLDIR/../../scripts/ErrorReporter/error_dialog_app.py --exitcode=$? --directory=$INSTALLDIR --qtdir=$PLUGIN_DIR --application=workbench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters