Initial sauer
[SauerbratenRemote.git] / src / vcpp / sauerbraten.nsi
blob578106da699d685a50bbf479529c87eb2961bc33
1 Name "Sauerbraten"
3 OutFile "sauerbraten_2006_xx_xx_setup.exe"
5 InstallDir $PROGRAMFILES\Sauerbraten
7 InstallDirRegKey HKLM "Software\Sauerbraten" "Install_Dir"
9 SetCompressor /SOLID lzma
10 XPStyle on
12 Page components
13 Page directory
14 Page instfiles
16 UninstPage uninstConfirm
17 UninstPage instfiles
19 Section "Sauerbraten (required)"
21 SectionIn RO
23 SetOutPath $INSTDIR
25 File /r "..\..\*.*"
27 WriteRegStr HKLM SOFTWARE\Sauerbraten "Install_Dir" "$INSTDIR"
29 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sauerbraten" "DisplayName" "Sauerbraten"
30 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sauerbraten" "UninstallString" '"$INSTDIR\uninstall.exe"'
31 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sauerbraten" "NoModify" 1
32 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sauerbraten" "NoRepair" 1
33 WriteUninstaller "uninstall.exe"
35 SectionEnd
37 Section "Visual C++ redistributable runtime"
39 ExecWait '"$INSTDIR\bin\vcredist_x86.exe"'
41 SectionEnd
43 Section "Start Menu Shortcuts"
45 CreateDirectory "$SMPROGRAMS\Sauerbraten"
47 SetOutPath "$INSTDIR"
49 CreateShortCut "$INSTDIR\Sauerbraten.lnk" "$INSTDIR\sauerbraten.bat" "" "$INSTDIR\sauerbraten.bat" 0
50 CreateShortCut "$SMPROGRAMS\Sauerbraten\Sauerbraten.lnk" "$INSTDIR\sauerbraten.bat" "" "$INSTDIR\sauerbraten.bat" 0
51 CreateShortCut "$SMPROGRAMS\Sauerbraten\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
52 CreateShortCut "$SMPROGRAMS\Sauerbraten\README.lnk" "$INSTDIR\README.html" "" "$INSTDIR\README.html" 0
54 SectionEnd
56 Section "Uninstall"
58 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sauerbraten"
59 DeleteRegKey HKLM SOFTWARE\Sauerbraten
61 RMDir /r "$SMPROGRAMS\Sauerbraten"
62 RMDir /r "$INSTDIR"
64 SectionEnd