Commits

Aleš Erjavec committed a0eb042

Changed Orange Canvas startup scripts to launch the new interface.

  • Participants
  • Parent commits 68ae91b

Comments (0)

Files changed (3)

File install-scripts/install3.nsi

 	CreateShortCut "$SMPROGRAMS\Orange\Uninstall Orange.lnk" "$INSTDIR\uninst.exe"
 
 	SetOutPath $INSTDIR\OrangeCanvas
-	CreateShortCut "$DESKTOP\Orange Canvas.lnk" "$PythonDir\pythonw.exe" "$INSTDIR\OrangeCanvas\orngCanvas.pyw" $INSTDIR\OrangeCanvas\icons\orange.ico 0
-	CreateShortCut "$SMPROGRAMS\Orange\Orange Canvas.lnk" "$PythonDir\pythonw.exe" "$INSTDIR\OrangeCanvas\orngCanvas.pyw" $INSTDIR\OrangeCanvas\icons\orange.ico 0
+	CreateShortCut "$DESKTOP\Orange Canvas.lnk" "$PythonDir\pythonw.exe" "-m Orange.OrangeCanvas.main" $INSTDIR\OrangeCanvas\icons\orange.ico 0
+	CreateShortCut "$SMPROGRAMS\Orange\Orange Canvas.lnk" "$PythonDir\pythonw.exe" "-m Orange.OrangeCanvas.main" $INSTDIR\OrangeCanvas\icons\orange.ico 0
 
 	WriteRegStr SHELL_CONTEXT "SOFTWARE\Python\PythonCore\${NPYVER}\PythonPath\Orange" "" "$INSTDIR\orng"
 	WriteRegStr SHELL_CONTEXT "Software\Microsoft\Windows\CurrentVersion\Uninstall\Orange" "DisplayName" "Orange (remove only)"
 
 	WriteRegStr HKEY_CLASSES_ROOT ".ows" "" "OrangeCanvas"
 	WriteRegStr HKEY_CLASSES_ROOT "OrangeCanvas\DefaultIcon" "" "$INSTDIR\OrangeCanvas\icons\OrangeOWS.ico"
-	WriteRegStr HKEY_CLASSES_ROOT "OrangeCanvas\Shell\Open\Command\" "" '$PythonDir\python.exe $INSTDIR\OrangeCanvas\orngCanvas.pyw "%1"'
+	WriteRegStr HKEY_CLASSES_ROOT "OrangeCanvas\Shell\Open\Command\" "" '$PythonDir\python.exe -m Orange.OrangeCanvas.main "%1"'
 
 	WriteUninstaller "$INSTDIR\uninst.exe"
 

File install-scripts/mac/bundle-build-hg.sh

 echo "Preaparing the bundle template"
 TEMPLATE_VERSION=`curl --silent http://orange.biolab.si/download/bundle-templates/CURRENT.txt`
 curl --silent http://orange.biolab.si/download/bundle-templates/Orange-template-${TEMPLATE_VERSION}.tar.gz | tar -xz -C $WORK_DIR
-#svn export --non-interactive http://orange.biolab.si/svn/orange/externals/trunk/install-scripts/mac/bundle/ $TMP_BUNDLE_DIR
 
 # Make repos dir if it does not yet exist
 if [ ! -e $REPOS_DIR ]; then
 	mkdir $REPOS_DIR
 fi
 
+# Create bundle startup script
+cat <<-'EOF' > ${TMP_BUNDLE_DIR}/Orange.app/Contents/MacOS/Orange
+	#!/bin/bash
+
+	source `dirname "$0"`/ENV
+
+	# LaunchServices passes the Carbon process identifier to the application with
+	# -psn parameter - we do not want it
+	if [[ $1 == -psn_* ]]; then
+	    shift 1
+	fi
+
+	exec -a "$0" "$PYTHONEXECUTABLE" -m Orange.OrangeCanvas.main "$@"
+EOF
+
+chmod +x ${TMP_BUNDLE_DIR}/Orange.app/Contents/MacOS/Orange
+
 # Python interpreter in the bundle
 PYTHON=${TMP_BUNDLE_DIR}/Orange.app/Contents/MacOS/python
 
 )
 
 ENTRY_POINTS = {
-#    'gui_scripts': (
-#            'orange-canvas = Orange.OrangeCanvas.main:main',
-#    ),
+    'gui_scripts': (
+            'orange-canvas = Orange.OrangeCanvas.main:main',
+    ),
     'orange.canvas.help': (
             'intersphinx = Orange.OrangeWidgets:intersphinx',
     )
 
         cmdclass = cmdclass,
         ext_modules = ext_modules,
-        scripts = (
-            'bin/orange-canvas',
-        ),
     )
 
 if __name__ == '__main__':