Mercurial > mxe-octave
comparison makeinst-script.sh @ 3717:70480095b6ed
Use a bat file to run octave in windows (Bug #43164)
* binary-dist-rules.mk: copy octave.bat to dist folder
* dist-files.mk: add octave.bat
* installer-files/octave.bat: new file
* makeinst-script.sh: use octave.bat instead of octave-xxxx.exe in script and registry.
author | John Donoghue |
---|---|
date | Thu, 25 Sep 2014 14:15:41 -0400 |
parents | 1e623b4ce67b |
children | 8c11c5a1a939 |
comparison
equal
deleted
inserted
replaced
3716:023f392ce053 | 3717:70480095b6ed |
---|---|
39 !define OCTAVE_VERSION "$OCTAVE_VERSION" | 39 !define OCTAVE_VERSION "$OCTAVE_VERSION" |
40 !define COPYRIGHT "Copyright © 2013 John W. Eaton and others." | 40 !define COPYRIGHT "Copyright © 2013 John W. Eaton and others." |
41 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations." | 41 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations." |
42 !define INSTALLER_FILES "../installer-files" | 42 !define INSTALLER_FILES "../installer-files" |
43 !define INSTALLER_NAME "octave-$OCTAVE_VERSION-installer.exe" | 43 !define INSTALLER_NAME "octave-$OCTAVE_VERSION-installer.exe" |
44 !define MAIN_APP_EXE "octave-gui.exe" | 44 !define MAIN_APP_EXE "octave.bat" |
45 !define INSTALL_TYPE "SetShellVarContext current" | 45 !define INSTALL_TYPE "SetShellVarContext current" |
46 !define PRODUCT_ROOT_KEY "HKLM" | 46 !define PRODUCT_ROOT_KEY "HKLM" |
47 !define PRODUCT_KEY "Software\\Octave-$VERSION" | 47 !define PRODUCT_KEY "Software\\Octave-$VERSION" |
48 | 48 |
49 ###################################################################### | 49 ###################################################################### |
107 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckPrevInstall | 107 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckPrevInstall |
108 !insertmacro MUI_PAGE_DIRECTORY | 108 !insertmacro MUI_PAGE_DIRECTORY |
109 | 109 |
110 !insertmacro MUI_PAGE_INSTFILES | 110 !insertmacro MUI_PAGE_INSTFILES |
111 | 111 |
112 !define MUI_FINISHPAGE_RUN "\$INSTDIR\\bin\\\${MAIN_APP_EXE}" | 112 !define MUI_FINISHPAGE_RUN "\$INSTDIR\\\${MAIN_APP_EXE}" |
113 !define MUI_FINISHPAGE_RUN_PARAMETERS "--force-gui" | |
113 !define MUI_FINISHPAGE_SHOWREADME "\$INSTDIR\\README.html" | 114 !define MUI_FINISHPAGE_SHOWREADME "\$INSTDIR\\README.html" |
114 !insertmacro MUI_PAGE_FINISH | 115 !insertmacro MUI_PAGE_FINISH |
115 | 116 |
116 !insertmacro MUI_UNPAGE_CONFIRM | 117 !insertmacro MUI_UNPAGE_CONFIRM |
117 | 118 |
212 \${Endif} | 213 \${Endif} |
213 | 214 |
214 ; include the README | 215 ; include the README |
215 SetOutPath "\$INSTDIR" | 216 SetOutPath "\$INSTDIR" |
216 File "$OCTAVE_SOURCE/README.html" | 217 File "$OCTAVE_SOURCE/README.html" |
218 | |
219 ; include the octave.bat file | |
220 SetOutPath "\$INSTDIR" | |
221 File "$OCTAVE_SOURCE/octave.bat" | |
217 | 222 |
218 ; distro files | 223 ; distro files |
219 EOF | 224 EOF |
220 | 225 |
221 # insert the files | 226 # insert the files |
255 Section "Shortcuts" | 260 Section "Shortcuts" |
256 | 261 |
257 CreateDirectory "\$SMPROGRAMS\\Octave-$VERSION" | 262 CreateDirectory "\$SMPROGRAMS\\Octave-$VERSION" |
258 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0 | 263 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Uninstall.lnk" "\$INSTDIR\\uninstall.exe" "" "\$INSTDIR\\uninstall.exe" 0 |
259 SetOutPath "%USERPROFILE%" | 264 SetOutPath "%USERPROFILE%" |
260 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Command Line).lnk" "\$INSTDIR\\bin\\octave-cli.exe" "" "\$INSTDIR\\$ICON" 0 | 265 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Command Line).lnk" "\$INSTDIR\\octave.bat" "--no-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED |
261 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Experimental GUI).lnk" "\$INSTDIR\\bin\\octave-gui.exe" "" "\$INSTDIR\\$ICON" 0 | 266 CreateShortCut "\$SMPROGRAMS\\Octave-$VERSION\\Octave (Experimental GUI).lnk" "\$INSTDIR\\octave.bat" "--force-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED |
262 SetOutPath "\$INSTDIR" | 267 SetOutPath "\$INSTDIR" |
263 EOF | 268 EOF |
264 # if we have documentation files, create shortcuts | 269 # if we have documentation files, create shortcuts |
265 if [ -d $OCTAVE_SOURCE/share/doc/octave ]; then | 270 if [ -d $OCTAVE_SOURCE/share/doc/octave ]; then |
266 cat >> $OUTFILE << EOF | 271 cat >> $OUTFILE << EOF |
274 | 279 |
275 cat >> $OUTFILE << EOF | 280 cat >> $OUTFILE << EOF |
276 | 281 |
277 \${If} \$InstallShortcuts == \${BST_CHECKED} | 282 \${If} \$InstallShortcuts == \${BST_CHECKED} |
278 SetOutPath "%USERPROFILE%" | 283 SetOutPath "%USERPROFILE%" |
279 CreateShortCut "\$desktop\\Octave-$VERSION (Command Line).lnk" "\$INSTDIR\\bin\\octave-cli.exe" "" "\$INSTDIR\\$ICON" 0 | 284 CreateShortCut "\$desktop\\Octave-$VERSION (Command Line).lnk" "\$INSTDIR\\octave.bat" "--no-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED |
280 CreateShortCut "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" "\$INSTDIR\\bin\\octave-gui.exe" "" "\$INSTDIR\\$ICON" 0 | 285 CreateShortCut "\$desktop\\Octave-$VERSION (Experimental GUI).lnk" "\$INSTDIR\\octave.bat" "--force-gui" "\$INSTDIR\\$ICON" 0 SW_SHOWMINIMIZED |
281 \${Endif} | 286 \${Endif} |
282 | 287 |
283 ; BLAS set up | 288 ; BLAS set up |
284 \${If} \$InstallBlasLib == 1 | 289 \${If} \$InstallBlasLib == 1 |
285 ; Reference BLAS | 290 ; Reference BLAS |
294 Section "FileTypeRego" | 299 Section "FileTypeRego" |
295 ; Octave document | 300 ; Octave document |
296 WriteRegStr HKCR "Octave.Document.$VERSION" "" "GNU Octave Script" | 301 WriteRegStr HKCR "Octave.Document.$VERSION" "" "GNU Octave Script" |
297 WriteRegStr HKCR "Octave.Document.$VERSION\\DefaultIcon" "" "\$INSTDIR\\$ICON" | 302 WriteRegStr HKCR "Octave.Document.$VERSION\\DefaultIcon" "" "\$INSTDIR\\$ICON" |
298 ; document actions | 303 ; document actions |
299 WriteRegStr HKCR "Octave.Document.$VERSION\\shell\\open\\command" "" "\$\\"\$INSTDIR\\bin\\octave-gui.exe\$\\" --force-gui --persist --eval \$\\"edit '%1'\$\\"" | 304 WriteRegStr HKCR "Octave.Document.$VERSION\\shell\\open\\command" "" "\$\\"\$INSTDIR\\octave.bat\$\\" --force-gui --persist --eval \$\\"edit '%1'\$\\"" |
300 | 305 |
301 \${If} \$RegisterOctaveFileType == \${BST_CHECKED} | 306 \${If} \$RegisterOctaveFileType == \${BST_CHECKED} |
302 ReadRegStr \$0 HKCR ".m" "" | 307 ReadRegStr \$0 HKCR ".m" "" |
303 StrCmp "\$0" "" no_back_type | 308 StrCmp "\$0" "" no_back_type |
304 WriteRegStr HKCR ".m" "backup_val" "\$0" | 309 WriteRegStr HKCR ".m" "backup_val" "\$0" |