20130313
[gdash.git] / gdash.nsi.in
blobc37b88dc93ccf1d8dd9c0944ffcbf0f1b7fa024b
1 ; GDash.nsi
4 ;--------------------------------
6 ; The name of the installer
7 Name "GDash"
9 !define VERSION GDASH-VERSION
10 !define MINGWDIR c:\mingw
12 ; The file to write
13 OutFile "gdash-${VERSION}-installer.exe"
15 ; The default installation directory
16 InstallDir $PROGRAMFILES\GDash
18 ; Registry key to check for directory (so if you install again, it will
19 ; overwrite the old one automatically)
20 InstallDirRegKey HKLM "Software\GDash" "Install_Dir"
22 ;--------------------------------
24 ; Pages
25 Page components
26 Page directory
27 Page instfiles
29 UninstPage uninstConfirm
30 UninstPage instfiles
32 ;--------------------------------
34 ; The stuff to install
35 Section "GDash (required)"
37 SectionIn RO
39 ; Program files
40 SetOutPath $INSTDIR
41 File "src\gdash.exe"
42 File "include\boulder_rush.png"
43 File "include\c64_gfx.png"
44 File "include\c64_gfx_bd2.png"
45 File "include\gdash_screen.png"
46 File "include\gdash_tile.png"
47 File "gdash.ico"
48 File /oname=README.txt "README"
49 File /oname=TODO.txt "TODO"
50 File /oname=COPYING.txt "COPYING"
51 File /oname=COPYING_SDL.txt "COPYING.SDL"
52 File /oname=COPYING_GTK.txt "COPYING.GTK"
53 File README-SDL.txt
55 ; Program files, dlls
56 SetOutPath $INSTDIR
57 File ${MINGWDIR}\bin\libgcc_s_dw2-1.dll
58 File ${MINGWDIR}\bin\libstdc++-6.dll
60 ; Program files, Glib dlls
61 File ${MINGWDIR}\bin\intl.dll
62 File ${MINGWDIR}\bin\libglib-2.0-0.dll
63 File ${MINGWDIR}\bin\libgio-2.0-0.dll
64 File ${MINGWDIR}\bin\libgmodule-2.0-0.dll
65 File ${MINGWDIR}\bin\libgobject-2.0-0.dll
66 File ${MINGWDIR}\bin\libgthread-2.0-0.dll
68 ; Program files, GTK+ dlls
69 SetOutPath $INSTDIR
70 File ${MINGWDIR}\bin\freetype6.dll
71 File ${MINGWDIR}\bin\libatk-1.0-0.dll
72 File ${MINGWDIR}\bin\libcairo-2.dll
73 File ${MINGWDIR}\bin\libexpat-1.dll
74 File ${MINGWDIR}\bin\libfontconfig-1.dll
75 File ${MINGWDIR}\bin\libgdk_pixbuf-2.0-0.dll
76 File ${MINGWDIR}\bin\libgdk-win32-2.0-0.dll
77 File ${MINGWDIR}\bin\libgtk-win32-2.0-0.dll
78 File ${MINGWDIR}\bin\libpango-1.0-0.dll
79 File ${MINGWDIR}\bin\libpangocairo-1.0-0.dll
80 File ${MINGWDIR}\bin\libpangoft2-1.0-0.dll
81 File ${MINGWDIR}\bin\libpangowin32-1.0-0.dll
82 File ${MINGWDIR}\bin\libpng14-14.dll
83 File ${MINGWDIR}\bin\libpng15-15.dll
84 File ${MINGWDIR}\bin\zlib1.dll
86 ; Program files, SDL dlls
87 SetOutPath $INSTDIR
88 File ${MINGWDIR}\bin\SDL.dll
89 File ${MINGWDIR}\bin\SDL_mixer.dll
90 File ${MINGWDIR}\bin\SDL_image.dll
91 File ${MINGWDIR}\bin\libvorbis-0.dll
92 File ${MINGWDIR}\bin\libvorbisfile-3.dll
93 File ${MINGWDIR}\bin\libogg-0.dll
94 ; the currently used sdl_img required a different version of libpng.
95 ; also requires zlib1, but that is also shipped with gtk+
96 ; also ship jpeg, so the game can load jpegs - just in case.
97 File ${MINGWDIR}\bin\libpng14-14.dll
98 File ${MINGWDIR}\bin\libjpeg-8.dll
101 ; Documentation
102 SetOutPath $INSTDIR
103 File docs\replay_to_avi.html
104 File docs\style.css
105 File docs\background.png
106 File docs\gdash.png
107 File docs\avidemux_codec.png
108 File docs\avidemux_fps.png
110 ; Write the installation path into the registry
111 WriteRegStr HKLM SOFTWARE\GDash "Install_Dir" "$INSTDIR"
113 ; Write the uninstall keys for Windows
114 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "DisplayName" "GDash"
115 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "UninstallString" '"$INSTDIR\uninstall.exe"'
116 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "NoModify" 1
117 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "NoRepair" 1
118 WriteUninstaller "uninstall.exe"
120 SectionEnd
122 ; Optional section (can be disabled by the user)
123 ; The stuff to install
124 Section "Cave sets"
126 ; Set output path to the installation directory.
127 SetOutPath $INSTDIR\caves
129 ; Put files there
130 File /r /x Makefile* /x create_makefile.sh "caves\*"
132 SectionEnd
134 Section "Sound files"
135 SetOutPath $INSTDIR\sound
136 File "sound\*.ogg"
138 SetOutPath $INSTDIR\music
139 File "music\*.ogg"
141 SectionEnd
143 Section "Translations"
144 ; Translations
145 SetOutPath $INSTDIR\hu\LC_MESSAGES
146 File /r ${MINGWDIR}\share\locale\hu\LC_MESSAGES\gtk20.mo
147 File /r ${MINGWDIR}\share\locale\hu\LC_MESSAGES\glib20.mo
148 SetOutPath $INSTDIR\de\LC_MESSAGES
149 File /r ${MINGWDIR}\share\locale\de\LC_MESSAGES\gtk20.mo
150 File /r ${MINGWDIR}\share\locale\de\LC_MESSAGES\glib20.mo
152 SetOutPath $INSTDIR\hu\LC_MESSAGES
153 File /oname=gdash.mo "po\hu.gmo"
154 SetOutPath $INSTDIR\de\LC_MESSAGES
155 File /oname=gdash.mo "po\de.gmo"
156 SectionEnd
159 ; Optional section (can be disabled by the user)
160 Section "Start Menu Shortcuts"
162 SetOutPath $INSTDIR
163 CreateDirectory "$SMPROGRAMS\GDash"
164 CreateShortCut "$SMPROGRAMS\GDash\GDash.lnk" "$INSTDIR\gdash.exe" "" "$INSTDIR\gdash.ico" 0
165 CreateShortCut "$SMPROGRAMS\GDash\README.lnk" "$INSTDIR\README.txt" "" "" 0
166 CreateShortCut "$SMPROGRAMS\GDash\Replay to AVI HOWTO.lnk" "$INSTDIR\replay_to_avi.html" "" "" 0
167 CreateShortCut "$SMPROGRAMS\GDash\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
169 SectionEnd
173 ; Optional section (can be disabled by the user)
174 Section "Register *.bd and *.gds files"
176 WriteRegStr HKCR ".bd" "" "GDash.Caveset"
177 WriteRegStr HKCR ".gds" "" "GDash.Caveset"
179 WriteRegStr HKCR "GDash.Caveset" "" "GDash Caveset"
180 WriteRegStr HKCR "GDash.Caveset\DefaultIcon" "" "$INSTDIR\gdash.ico,0"
182 WriteRegStr HKCR "GDash.Caveset\shell\open\command" "" '"$INSTDIR\gdash.exe" "%1"'
183 WriteRegStr HKCR "GDash.Caveset\shell\edit\command" "" '"$INSTDIR\gdash.exe" -e "%1"'
185 SectionEnd
189 ; Optional section (can be disabled by the user)
190 Section "any2gdash conversion utility"
192 SetOutPath $INSTDIR
193 File "util\any2gdash.exe"
195 SectionEnd
201 ;--------------------------------
202 ; Uninstaller
204 Section "Uninstall"
206 ; Remove registry keys
207 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash"
208 DeleteRegKey HKLM SOFTWARE\GDash
209 DeleteRegKey HKCR ".bd"
210 DeleteRegKey HKCR ".gds"
211 DeleteRegKey HKCR "GDash.Caveset"
213 ; Remove shortcuts, if any
214 Delete "$SMPROGRAMS\GDash\*.*"
215 RMDir "$SMPROGRAMS\GDash"
217 ; Remove directories used
218 RMDir /r "$INSTDIR"
220 SectionEnd