changeset 4258:a45374f7d9a3

Use 8.3 format for octave path * installer-files/octave-firsttime.vbs: convert OctavePath to shortpath * installer-files/octave.vbs: convert OctavePath to shortpath * installer-files/octave.bat: convert OCT_HOME to 8.3 path * tools/makeinst-script.sh.in: call pkg rbuild and fc_cache with 8.3 pathname
author John D
date Tue, 06 Dec 2016 02:27:58 -0500
parents 8f71549f53b9
children c5723e39a80e
files installer-files/octave-firsttime.vbs installer-files/octave.bat installer-files/octave.vbs tools/makeinst-script.sh.in
diffstat 4 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/installer-files/octave-firsttime.vbs	Mon Dec 05 17:46:56 2016 -0500
+++ b/installer-files/octave-firsttime.vbs	Tue Dec 06 02:27:58 2016 -0500
@@ -5,6 +5,10 @@
 ' get the directory that script resides in
 Set fso = CreateObject("Scripting.FileSystemObject")
 OctavePath = fso.GetParentFolderName(WScript.ScriptFullName)
+' get path as a 8.3 path
+Set fo = fso.GetFolder(OctavePath)
+OctavePath = fo.ShortPath
+Set fo = Nothing
 Set fso = Nothing
 
 ' set up path to ensure octave bin comes first
--- a/installer-files/octave.bat	Mon Dec 05 17:46:56 2016 -0500
+++ b/installer-files/octave.bat	Tue Dec 06 02:27:58 2016 -0500
@@ -5,6 +5,8 @@
 Rem   This trick finds the location where the batch file resides.
 Rem   Note: the result ends with a backslash
 set OCT_HOME=%~dp0
+Rem Coonvert to 8.3 format so dont have to worry about spaces
+for %%I in ("%OCT_HOME%") do set OCT_HOME=%%~sI
 
 Rem   Set up PATH. Make sure the octave bin dir
 Rem   comes first.
--- a/installer-files/octave.vbs	Mon Dec 05 17:46:56 2016 -0500
+++ b/installer-files/octave.vbs	Tue Dec 06 02:27:58 2016 -0500
@@ -5,6 +5,10 @@
 ' get the directory that script resides in
 Set fso = CreateObject("Scripting.FileSystemObject")
 OctavePath = fso.GetParentFolderName(WScript.ScriptFullName)
+' get path as a 8.3 path
+Set fo = fso.GetFolder(OctavePath)
+OctavePath = fo.ShortPath
+Set fo = Nothing
 Set fso = Nothing
 
 ' set up path to ensure octave bin comes first
--- a/tools/makeinst-script.sh.in	Mon Dec 05 17:46:56 2016 -0500
+++ b/tools/makeinst-script.sh.in	Tue Dec 06 02:27:58 2016 -0500
@@ -255,8 +255,9 @@
  Pop \$0
 
  ; run fc-cache updater
+ GetFullPathName /SHORT \$1 \$INSTDIR
  DetailPrint "Building font cache (may take a while)"
- ExecWait "\$INSTDIR\\fc_update.bat"
+ ExecWait "\$1\\fc_update.bat"
 SectionEnd
 
 Section make_uninstaller
@@ -344,8 +345,9 @@
 
 Section "InstallPackages"
   ; fix the installed packages (if any)
-  SetOutPath "\$INSTDIR"
-  ExecWait '"\$INSTDIR\\bin\\octave-cli.exe" --no-gui -W -H -f -q --eval "pkg rebuild"' \$0
+  GetFullPathName /SHORT \$1 \$INSTDIR
+  SetOutPath "\$1"
+  ExecWait '"\$1\\bin\\octave-cli.exe" --no-gui -W -H -f -q --eval "pkg rebuild"' \$0
 SectionEnd
 
 Section "Uninstall"