Subversion Repositories gelsvn

Rev

Rev 286 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 286 Rev 287
Line 8... Line 8...
8
 
8
 
9
; The file to write
9
; The file to write
10
OutFile "GELsetup.exe"
10
OutFile "GELsetup.exe"
11
 
11
 
12
; The default installation directory
12
; The default installation directory
13
InstallDir $DOCUMENTS\GEL
13
InstallDir H:\GEL
14
 
14
 
15
; Show install details
15
; Show install details
16
ShowInstDetails show
16
ShowInstDetails show
17
 
17
 
18
;Things that need to be extracted on startup (keep these lines before any File command!)
18
;Things that need to be extracted on startup (keep these lines before any File command!)
Line 141... Line 141...
141
    WriteRegExpandStr 'HKCU' "Environment" "GEL_LIB" "$INSTDIR\lib"
141
    WriteRegExpandStr 'HKCU' "Environment" "GEL_LIB" "$INSTDIR\lib"
142
    WriteRegExpandStr 'HKCU' "Environment" "GEL_BIN" "$INSTDIR\bin"
142
    WriteRegExpandStr 'HKCU' "Environment" "GEL_BIN" "$INSTDIR\bin"
143
 
143
 
144
  ${EndIf}
144
  ${EndIf}
145
 
145
 
146
  ClearErrors
146
 ; ClearErrors
147
  FileOpen $0 $INSTDIR\bin\setenvvars.bat w
147
 ; FileOpen $0 $INSTDIR\bin\setenvvars.bat w
148
  IfErrors done
148
 ; IfErrors done
149
  FileWrite $0 "set GEL_INCLUDE=$INSTDIR\include"
149
 ; FileWrite $0 "set GEL_INCLUDE=$INSTDIR\include"
-
 
150
 ; FileWriteByte $0 "13"
-
 
151
 ; FileWriteByte $0 "10"
150
  FileWrite $0 "set GEL_LIB=$INSTDIR\lib"
152
 ; FileWrite $0 "set GEL_LIB=$INSTDIR\lib"
-
 
153
 ; FileWriteByte $0 "13"
-
 
154
 ; FileWriteByte $0 "10"
151
  FileWrite $0 "set GEL_BIN=$INSTDIR\bin"
155
 ; FileWrite $0 "set GEL_BIN=$INSTDIR\bin"
-
 
156
 ; FileWriteByte $0 "13"
-
 
157
 ; FileWriteByte $0 "10"
152
  FileClose $0
158
 ; FileClose $0
153
  done:
159
 ; done:
154
  
160
  
155
  # Add %GEL_BIN% to path
161
  # Add %GEL_BIN% to path
156
  
162
  
157
  ${If} $R2 = 0
163
  ${If} $R2 = 0
158
    ReadRegStr $1 'HKLM' "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
164
    ReadRegStr $1 'HKLM' "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
Line 162... Line 168...
162
 
168
 
163
  StrCpy $2 $1 1 -1 # copy last char
169
  StrCpy $2 $1 1 -1 # copy last char
164
  StrCmp $2 ";" 0 +2 # if last char == ;
170
  StrCmp $2 ";" 0 +2 # if last char == ;
165
    StrCpy $1 $1 -1 # remove last char
171
    StrCpy $1 $1 -1 # remove last char
166
  StrCmp $1 "" AddToPath_NTdoIt
172
  StrCmp $1 "" AddToPath_NTdoIt
167
    StrCpy $0 "$1;%GEL_BIN%"
173
    StrCpy $0 "$1;$INSTDIR\bin"
168
  AddToPath_NTdoIt:
174
  AddToPath_NTdoIt:
169
    ${If} $R2 = 0
175
    ${If} $R2 = 0
170
      WriteRegExpandStr 'HKLM' "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
176
      WriteRegExpandStr 'HKLM' "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
171
    ${Else}
177
    ${Else}
172
      WriteRegExpandStr 'HKCU' "Environment" "PATH" $0
178
      WriteRegExpandStr 'HKCU' "Environment" "PATH" $0