Commit d956c983d17e7903440b67d72f45b1793e93e808
1 parent
519b361d
Exists in
master
and in
5 other branches
Atualizando empacotamento windows.
Showing
1 changed file
with
83 additions
and
18 deletions
Show diff stats
win/pw3270.nsi.in
| @@ -96,7 +96,7 @@ SubSection "@PACKAGE@" SecMain | @@ -96,7 +96,7 @@ SubSection "@PACKAGE@" SecMain | ||
| 96 | #file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" "..\.bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" | 96 | #file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" "..\.bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" |
| 97 | 97 | ||
| 98 | # Save DataDir | 98 | # Save DataDir |
| 99 | - SetRegView 64 | 99 | + SetRegView @WINARCH@ |
| 100 | WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR" | 100 | WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR" |
| 101 | WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe" | 101 | WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe" |
| 102 | 102 | ||
| @@ -173,37 +173,102 @@ SectionEnd | @@ -173,37 +173,102 @@ SectionEnd | ||
| 173 | 173 | ||
| 174 | Section "Uninstall" | 174 | Section "Uninstall" |
| 175 | 175 | ||
| 176 | + # Always delete uninstaller first | ||
| 177 | + delete $INSTDIR\uninstaller.exe | ||
| 178 | + | ||
| 179 | + # Set SMPROGRAMS and DESKTOP path | ||
| 180 | + SetShellVarContext all | ||
| 181 | + | ||
| 182 | + # now delete installed files | ||
| 183 | + delete $INSTDIR\@PACKAGE@.exe | ||
| 184 | + | ||
| 185 | + delete $SMPROGRAMS\@PACKAGE@.lnk | ||
| 186 | + delete $DESKTOP\@PACKAGE@.lnk | ||
| 187 | + | ||
| 188 | + RMDir /r "$INSTDIR\locale" | ||
| 189 | + RMDir /r "$INSTDIR\share" | ||
| 190 | + RMDir /r "$INSTDIR\etc" | ||
| 191 | + RMDir /r "$INSTDIR\plugins" | ||
| 192 | + RMDir /r "$INSTDIR\sdk" | ||
| 193 | + RMDir /r "$INSTDIR\gtk2-runtime" | ||
| 194 | + | ||
| 195 | + # Delete all files | ||
| 196 | + delete "$INSTDIR\*.dll" | ||
| 197 | + | ||
| 198 | + # Remove registry | ||
| 199 | + SetRegView 32 | ||
| 200 | + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" | ||
| 201 | + DeleteRegKey HKLM "Software\@PACKAGE@" | ||
| 202 | + | ||
| 203 | + SetRegView @WINARCH@ | ||
| 204 | + DeleteRegKey HKLM "Software\@PACKAGE@" | ||
| 205 | + | ||
| 206 | + # Delete System libraries | ||
| 207 | + delete $SYSDIR\libhllapi.dll | ||
| 208 | + | ||
| 209 | + RMDir /r "$INSTDIR" | ||
| 210 | + | ||
| 176 | SectionEnd | 211 | SectionEnd |
| 177 | 212 | ||
| 178 | Function .onInit | 213 | Function .onInit |
| 179 | 214 | ||
| 180 | -SetRegView @WINARCH@ | 215 | + #---[ Verifica opção de instalação HLLAPI ]---------------------------------------------------------- |
| 216 | + | ||
| 217 | + Push $0 | ||
| 218 | + | ||
| 219 | + ${GetParameters} $R0 | ||
| 220 | + ClearErrors | ||
| 221 | + ${GetOptions} $R0 /HLLAPI= $0 | ||
| 181 | 222 | ||
| 182 | -ReadRegStr $4 HKLM "Software\gtkwin\@GTK_MODVERSION@" "path" | 223 | + ${if} $0 == "NO" |
| 183 | 224 | ||
| 184 | -${if} $4 == "" | 225 | + SectionGetFlags "${HLLAPIPlugin}" $0 |
| 226 | + IntOp $0 $0 & ${SECTION_OFF} | ||
| 227 | + SectionSetFlags "${HLLAPIPlugin}" $0 | ||
| 185 | 228 | ||
| 186 | - SectionGetFlags "SecGTK" $0 | ||
| 187 | - IntOp $0 $0 | ${SF_SELECTED} | ||
| 188 | - SectionSetFlags "SecGTK" $0 | 229 | + ${else} |
| 189 | 230 | ||
| 190 | -${Else} | 231 | + SectionGetFlags "${HLLAPIPlugin}" $0 |
| 232 | + IntOp $0 $0 | ${SF_SELECTED} | ||
| 233 | + SectionSetFlags "${HLLAPIPlugin}" $0 | ||
| 191 | 234 | ||
| 192 | - ${if} ${FileExists} `$4\*.*` | 235 | + ${EndIf} |
| 193 | 236 | ||
| 194 | - SectionGetFlags "SecGTK" $0 | ||
| 195 | - IntOp $0 $0 & ${SECTION_OFF} | ||
| 196 | - SectionSetFlags "SecGTK" $0 | 237 | + Pop $0 |
| 197 | 238 | ||
| 198 | - ${Else} | 239 | +!ifdef WITHGTK |
| 240 | + | ||
| 241 | + #---[ Verifica se precisa instalar GTK ]------------------------------------------------------------- | ||
| 242 | + | ||
| 243 | + SetRegView @WINARCH@ | ||
| 244 | + | ||
| 245 | + ReadRegStr $4 HKLM "Software\gtkwin\@GTK_MODVERSION@" "path" | ||
| 246 | + | ||
| 247 | + ${if} $4 == "" | ||
| 248 | + | ||
| 249 | + SectionGetFlags "SecGTK" $0 | ||
| 250 | + IntOp $0 $0 | ${SF_SELECTED} | ||
| 251 | + SectionSetFlags "SecGTK" $0 | ||
| 199 | 252 | ||
| 200 | - SectionGetFlags "SecGTK" $0 | ||
| 201 | - IntOp $0 $0 | ${SF_SELECTED} | ||
| 202 | - SectionSetFlags "SecGTK" $0 | 253 | + ${Else} |
| 203 | 254 | ||
| 204 | - ${EndIf} | 255 | + ${if} ${FileExists} `$4\*.*` |
| 205 | 256 | ||
| 206 | -${EndIf} | 257 | + SectionGetFlags "SecGTK" $0 |
| 258 | + IntOp $0 $0 & ${SECTION_OFF} | ||
| 259 | + SectionSetFlags "SecGTK" $0 | ||
| 260 | + | ||
| 261 | + ${Else} | ||
| 262 | + | ||
| 263 | + SectionGetFlags "SecGTK" $0 | ||
| 264 | + IntOp $0 $0 | ${SF_SELECTED} | ||
| 265 | + SectionSetFlags "SecGTK" $0 | ||
| 266 | + | ||
| 267 | + ${EndIf} | ||
| 268 | + | ||
| 269 | + ${EndIf} | ||
| 270 | + | ||
| 271 | +!endif | ||
| 207 | 272 | ||
| 208 | 273 | ||
| 209 | FunctionEnd | 274 | FunctionEnd |