Skip to content
Snippets Groups Projects
Commit 39cb7b4e authored by Keith Butler's avatar Keith Butler
Browse files

Refs #22293 add MacOSX launcher with packaging

parent 7aff9e66
No related merge requests found
......@@ -91,7 +91,6 @@ set ( ETC_DIR etc )
set ( LIB_DIR lib )
set ( PLUGINS_DIR plugins )
###########################################################################
# Mac-specific installation setup
###########################################################################
......@@ -100,6 +99,17 @@ set ( CMAKE_INSTALL_PREFIX "" )
set ( CPACK_PACKAGE_EXECUTABLES MantidPlot )
set ( INBUNDLE MantidPlot.app/ )
# Copy the launcher script to the correct location
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/osx/Mantid_osx_launcher
${CMAKE_BINARY_DIR}/bin/MantidPlot.app/Contents/MacOS/Mantid_osx_launcher COPYONLY )
# Copy the error dialog launcher script to the correct location
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/osx/launch_error_report.sh.in
${CMAKE_BINARY_DIR}/bin/MantidPlot.app/Contents/MacOS/launch_error_report.sh COPYONLY )
# Copy the error dialog script to the correct location
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/osx/error_dialog_app.py.in
${CMAKE_BINARY_DIR}/bin/MantidPlot.app/Contents/MacOS/error_dialog_app.py COPYONLY )
# We know exactly where this has to be on Darwin, but separate whether we have
# kit build or a regular build.
if ( ENABLE_CPACK AND MAKE_VATES )
......@@ -200,6 +210,7 @@ install ( FILES ${CMAKE_MODULE_PATH}/Packaging/osx/mantidnotebook_Info.plist
install ( FILES ${CMAKE_SOURCE_DIR}/images/MantidNotebook.icns
DESTINATION MantidNotebook\ \(optional\).app/Contents/Resources/ )
set ( CPACK_DMG_BACKGROUND_IMAGE ${CMAKE_SOURCE_DIR}/images/osx-bundle-background.png )
set ( CPACK_DMG_DS_STORE_SETUP_SCRIPT ${CMAKE_SOURCE_DIR}/installers/MacInstaller/CMakeDMGSetup.scpt )
set ( MACOSX_BUNDLE_ICON_FILE MantidPlot.icns )
......@@ -207,4 +218,5 @@ set ( MACOSX_BUNDLE_ICON_FILE MantidPlot.icns )
string (REPLACE " " "" CPACK_SYSTEM_NAME ${OSX_CODENAME})
set ( CPACK_GENERATOR DragNDrop )
endif ()
\ No newline at end of file
endif ()
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Get the location that the script was called from
cd $DIR
./MantidPlot || sh launch_error_report.sh $?
import sys
# Find the Mantid modules
sys.path.append('../../../')
from PyQt4 import QtGui, QtCore
import mantid
from ErrorReporter.error_report_presenter import ErrorReporterPresenter
from ErrorReporter.error_report_outside import CrashReportPage
import argparse
def main():
parser = argparse.ArgumentParser(description='Pass in exit_code')
parser.add_argument('--exitcode', dest='exit_code')
command_line_args = parser.parse_args()
app = QtGui.QApplication(sys.argv)
form = CrashReportPage()
presenter = ErrorReporterPresenter(form, command_line_args.exit_code)
app.exec_()
if __name__ == '__main__': # if we're running file directly and not importing it
main() # run the main function
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Get the location that the script was called from
/usr/bin/python $DIR/error_dialog_app.py --exitcode=$1
......@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>MantidPlot</string>
<string>Mantid_osx_launcher</string>
<key>CFBundleGetInfoString</key>
<string>@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@</string>
<key>CFBundleIconFile</key>
......
from mantid.kernel import ErrorReporter, UsageService
from mantid.kernel import UsageService
#from mantid.kernel import ErrorReporter, UsageService
from ErrorReporter.errorreport import CrashReportPage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment