Script-NSI-SqueakBot1.4
From OFSET Wiki
A utiliser avec NSIS http://nsis.sourceforge.net/Main_Page
; SqueakBot.nsi
;--------------------------------
; The name of the installer
Name "SqueakBot v.1.4"
; The file to write
OutFile "squeakbot-1.4.exe"
; The default installation directory
InstallDir $PROGRAMFILES\SqueakBot
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\SqueakBot" "Install_Dir"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\French.nlf"
XPStyle on
Icon "boiteabots.ico"
UninstallIcon "boiteabots.ico"
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "SqueakBot (requis)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "SqueakBot-1.4\SqueakBot-1.4-3.8-6665-fr.image"
File "SqueakBot-1.4\SqueakBot-1.4-3.8-6665-fr.changes"
File "SqueakBot-1.4\SqueakV3.sources"
File "Squeak.exe"
File "boiteabots.ico"
File "Squeak.ini"
File "SqueakFFIPrims.dll"
File "CHANGELOG"
File "LICENSE"
; La dll pour le port parallele
; SetOutPath $SYSDIR
; File "io.dll"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\SqueakBot "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SqueakBot"
"DisplayName" "SqueakBot v.1.4"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SqueakBot"
"UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SqueakBot"
"NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SqueakBot"
"NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Raccourcis dans le menu Démarrer"
; Permet de définir le "Working directory"
SetOutPath $INSTDIR
CreateDirectory "$SMPROGRAMS\SqueakBot"
CreateShortCut "$SMPROGRAMS\SqueakBot\Lancer SqueakBot.lnk" "$INSTDIR\Squeak.exe"
"SqueakBot-1.4-3.8-6665-fr.image" "$INSTDIR\boiteabots.ico" 0 SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\SqueakBot\Uninstall.lnk" "$INSTDIR\uninstall.exe" ""
"$INSTDIR\uninstall.exe" 0
SectionEnd
Section "Raccourcis sur le bureau"
CreateShortCut "$DESKTOP\Lancer SqueakBot.lnk" "$INSTDIR\Squeak.exe"
"SqueakBot-1.4-3.8-6665-fr.image" "$INSTDIR\boiteabots.ico" 0 SW_SHOWMAXIMIZED
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SqueakBot"
DeleteRegKey HKLM SOFTWARE\SqueakBot
; Remove files and uninstaller
Delete $INSTDIR\*.*
; Remove shortcuts, if any
Delete "$SMPROGRAMS\SqueakBot\*.*"
Delete "$DESKTOP\Lancer SqueakBot.lnk"
; Remove directories used
RMDir "$SMPROGRAMS\SqueakBot"
RMDir "$INSTDIR"
SectionEnd
;--------------------------------

