Browse Source

Merge branch 'release/1.9.x'

rdb 9 years ago
parent
commit
b53d58c5c6
2 changed files with 12 additions and 7 deletions
  1. 1 0
      doc/ReleaseNotes
  2. 11 7
      makepanda/installer.nsi

+ 1 - 0
doc/ReleaseNotes

@@ -36,6 +36,7 @@ This issue fixes several bugs that were still found in 1.9.2.
 * asyncFlattenStrong with inPlace=True caused node to disappear
 * asyncFlattenStrong with inPlace=True caused node to disappear
 * Fix asyncFlattenStrong called on nodes without parent
 * Fix asyncFlattenStrong called on nodes without parent
 * Fix is_playing() check when playing an animation backwards
 * Fix is_playing() check when playing an animation backwards
+* Windows installer no longer clears %PATH% if longer than 1024 chars
 
 
 ------------------------  RELEASE 1.9.2  ------------------------
 ------------------------  RELEASE 1.9.2  ------------------------
 
 

+ 11 - 7
makepanda/installer.nsi

@@ -604,11 +604,7 @@ Section -post
     Call RemoveFromPath
     Call RemoveFromPath
     Push "$INSTDIR\bin"
     Push "$INSTDIR\bin"
     Call RemoveFromPath
     Call RemoveFromPath
-    Push "$INSTDIR\python"
-    Call AddToPath
-    Push "$INSTDIR\python\Scripts"
-    Call AddToPath
-    Push "$INSTDIR\bin"
+    Push "$INSTDIR\python;$INSTDIR\python\Scripts;$INSTDIR\bin"
     Call AddToPath
     Call AddToPath
 
 
     # This is needed for the environment variable changes to take effect.
     # This is needed for the environment variable changes to take effect.
@@ -891,8 +887,10 @@ Function AddToPath
                 StrCmp $3 1 0 +2
                 StrCmp $3 1 0 +2
                         ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
                         ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
 
 
-                ; If the PATH string is empty, jump over the mangling routines.
-                StrCmp $1 "" AddToPath_NTdoIt
+                ; If the PATH string is empty, WATCH OUT.  This probably means
+                ; the PATH surpassed NSIS' string limit.  Don't overwrite it!
+                ; The only thing we can do is display an error message.
+                StrCmp $1 "" AddToPath_EmptyError
 
 
                 ; Pull off the last character of the PATH string.  If it's a semicolon,
                 ; Pull off the last character of the PATH string.  If it's a semicolon,
                 ; we don't need to add another one, so jump to the section where we
                 ; we don't need to add another one, so jump to the section where we
@@ -900,6 +898,12 @@ Function AddToPath
                 StrCpy $2 $1 1 -1
                 StrCpy $2 $1 1 -1
                 StrCmp $2 ";" AddToPath_NTAddPath AddToPath_NTAddSemi
                 StrCmp $2 ";" AddToPath_NTAddPath AddToPath_NTAddSemi
 
 
+                AddToPath_EmptyError:
+                        MessageBox MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION "Your PATH environment variable is too long! Please remove extraneous entries before proceeding. Panda3D needs to add the following the PATH so that the Panda3D utilities and libraries can be located correctly.$\n$\n$0$\n$\nIf you wish to add Panda3D to the path yourself, choose Ignore." IDIGNORE AddToPath_done IDRETRY AddToPath_NT
+                        SetDetailsPrint both
+                        DetailPrint "Cannot append to PATH - variable is likely too long."
+                        SetDetailsPrint listonly
+                        Abort
                 AddToPath_NTAddSemi:
                 AddToPath_NTAddSemi:
                         StrCpy $1 "$1;"
                         StrCpy $1 "$1;"
                         Goto AddToPath_NTAddPath
                         Goto AddToPath_NTAddPath