File: bomberclone.nsi

package info (click to toggle)
bomberclone 0.11.9-7.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,228 kB
  • sloc: ansic: 14,256; sh: 3,800; makefile: 336
file content (105 lines) | stat: -rw-r--r-- 2,853 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Name "Bomberclone Installer"

OutFile "bomberclone_install.exe"

; The default installation directory
InstallDir $PROGRAMFILES\bomberclone

; Registry key to check for directory (so if you install again, it will 
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\bomberclone" "Install_Dir"

LicenseText "License"
LicenseData "COPYING"

;--------------------------------
; Pages

Page license
Page components
Page directory
Page instfiles

UninstPage uninstConfirm
UninstPage instfiles

;--------------------------------

; The stuff to install
Section "Bomberclone (required)"

  SectionIn RO
  
  ; Set output path to the installation directory.
  SetOutPath $INSTDIR
  
  ; Put file there
  File "src/bomberclone.exe"
  File "COPYING"
  File "README"
  File "AUTHORS"
  File "ChangeLog"
  File "lib/jpeg.dll"
  File "lib/libpng1.dll"
  File "lib/SDL.dll"
  File "lib/SDL_image.dll"
  File "lib/SDL_mixer.dll"
  File "lib/zlib.dll"
  SetOutPath "$INSTDIR\data"
  File /r "data/"
  ; Write the installation path into the registry
  WriteRegStr HKLM SOFTWARE\bomberclone "Install_Dir" "$INSTDIR"
  
  ; Write the uninstall keys for Windows
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bomberclone" "DisplayName" "Bomberclone"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bomberclone" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bomberclone" "NoModify" 1
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bomberclone" "NoRepair" 1
  WriteUninstaller "uninstall.exe"
  
SectionEnd

; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"

  CreateDirectory "$SMPROGRAMS\BomberClone"
  CreateShortCut "$SMPROGRAMS\BomberClone\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\BomberClone\BomberClone.lnk" "$INSTDIR\bomberclone.exe" "" "$INSTDIR\bomberclone.exe" 0
  
SectionEnd

;--------------------------------

; Uninstaller

Section "Uninstall"
  
  ; Remove registry keys
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bomberclone"
  DeleteRegKey HKLM SOFTWARE\bomberclone

  ; Remove files and uninstaller
  Delete $INSTDIR\bomberclone.exe
  Delete $INSTDIR\AUTHORS
  Delete $INSTDIR\ChangeLog
  Delete $INSTDIR\COPYING
  Delete $INSTDIR\README
  Delete $INSTDIR\uninstall.exe
  Delete $INSTDIR\jpeg.dll
  Delete $INSTDIR\libpng1.dll
  Delete $INSTDIR\SDL.dll
  Delete $INSTDIR\SDL_image.dll
  Delete $INSTDIR\SDL_mixer.dll
  Delete $INSTDIR\zlib.dll
  
  RMDir /r $INSTDIR\data
  
  ; Remove shortcuts, if any
  Delete "$SMPROGRAMS\bomberclone\*.*"

  ; Remove directories used
  RMDir "$SMPROGRAMS\bomberclone"
  RMDir /r "$INSTDIR"
  Delete /REBOOTOK "$INSTDIR"

SectionEnd