README.md edited online with Bitbucket
[gdash.git] / gdash.nsi.in
blob560c955cbe22853f0575ccf0e030fe7be16f36f2
1 ; GDash.nsi
3 ; UI
4 !include "MUI2.nsh"
6 !define MUI_ICON "gdash.ico"
7 !define MUI_COMPONENTSPAGE_NODESC
9 !insertmacro MUI_PAGE_WELCOME
10 !insertmacro MUI_PAGE_COMPONENTS
11 !insertmacro MUI_PAGE_DIRECTORY
12 !insertmacro MUI_PAGE_INSTFILES
13 !insertmacro MUI_PAGE_FINISH
15 !insertmacro MUI_UNPAGE_CONFIRM
16 !insertmacro MUI_UNPAGE_INSTFILES
18 ; Should be inserted as last one
19 !insertmacro MUI_LANGUAGE "English"
21 ; The name of the installer
22 Name "GDash"
24 !define VERSION GDASH-VERSION
25 !define MINGWDIR c:\mingw
27 ; The file to write
28 OutFile "gdash-${VERSION}-installer.exe"
30 ; The default installation directory
31 InstallDir $PROGRAMFILES\GDash
33 ; Registry key to check for directory (so if you install again, it will
34 ; overwrite the old one automatically)
35 InstallDirRegKey HKLM "Software\GDash" "Install_Dir"
37 ;--------------------------------
39 ; The stuff to install
40 Section "GDash (required)"
42 SectionIn RO
44 ; Program files
45 SetOutPath $INSTDIR
46 File "src\gdash.exe"
47 File "include\boulder_rush.png"
48 File "include\c64_gfx.png"
49 File "include\c64_gfx_bd2.png"
50 File "include\gdash_screen.png"
51 File "include\gdash_tile.png"
52 File "gdash.ico"
53 File /oname=TODO.txt "TODO"
54 File /oname=COPYING.txt "COPYING"
55 File /oname=COPYING_SDL.txt "COPYING.SDL"
56 File /oname=COPYING_GTK.txt "COPYING.GTK"
57 File README-SDL.txt
59 ; Program files, dlls
60 SetOutPath $INSTDIR
61 File ${MINGWDIR}\bin\libgcc_s_dw2-1.dll
62 File ${MINGWDIR}\bin\libstdc++-6.dll
64 ; Program files, Glib dlls
65 File ${MINGWDIR}\bin\intl.dll
66 File ${MINGWDIR}\bin\libglib-2.0-0.dll
67 File ${MINGWDIR}\bin\libgio-2.0-0.dll
68 File ${MINGWDIR}\bin\libgmodule-2.0-0.dll
69 File ${MINGWDIR}\bin\libgobject-2.0-0.dll
70 File ${MINGWDIR}\bin\libgthread-2.0-0.dll
72 ; Program files, GTK+ dlls
73 SetOutPath $INSTDIR
74 File ${MINGWDIR}\bin\freetype6.dll
75 File ${MINGWDIR}\bin\libatk-1.0-0.dll
76 File ${MINGWDIR}\bin\libcairo-2.dll
77 File ${MINGWDIR}\bin\libexpat-1.dll
78 File ${MINGWDIR}\bin\libfontconfig-1.dll
79 File ${MINGWDIR}\bin\libgdk_pixbuf-2.0-0.dll
80 File ${MINGWDIR}\bin\libgdk-win32-2.0-0.dll
81 File ${MINGWDIR}\bin\libgtk-win32-2.0-0.dll
82 File ${MINGWDIR}\bin\libpango-1.0-0.dll
83 File ${MINGWDIR}\bin\libpangocairo-1.0-0.dll
84 File ${MINGWDIR}\bin\libpangoft2-1.0-0.dll
85 File ${MINGWDIR}\bin\libpangowin32-1.0-0.dll
86 File ${MINGWDIR}\bin\libpng14-14.dll
87 File ${MINGWDIR}\bin\libpng15-15.dll
88 File ${MINGWDIR}\bin\zlib1.dll
89 ; GTK+ theming stuff for Win32
90 SetOutPath $INSTDIR\etc\gtk-2.0
91 File /oname=gtkrc gtkrc_win32
92 SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0
93 File ${MINGWDIR}\share\themes\MS-Windows\gtk-2.0\gtkrc
94 SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines
95 File ${MINGWDIR}\lib\gtk-2.0\2.10.0\engines\libwimp.dll
97 ; Program files, SDL dlls
98 SetOutPath $INSTDIR
99 File ${MINGWDIR}\bin\SDL.dll
100 File ${MINGWDIR}\bin\SDL_mixer.dll
101 File ${MINGWDIR}\bin\SDL_image.dll
102 File ${MINGWDIR}\bin\libvorbis-0.dll
103 File ${MINGWDIR}\bin\libvorbisfile-3.dll
104 File ${MINGWDIR}\bin\libogg-0.dll
105 ; the currently used sdl_img required a different version of libpng.
106 ; also requires zlib1, but that is also shipped with gtk+
107 ; also ship jpeg, so the game can load jpegs - just in case.
108 File ${MINGWDIR}\bin\libpng14-14.dll
109 File ${MINGWDIR}\bin\libjpeg-8.dll
111 ; Shaders
112 SetOutPath $INSTDIR\shaders
113 File "shaders\*.shader"
115 ; Translations
116 SetOutPath $INSTDIR\hu\LC_MESSAGES
117 File /r ${MINGWDIR}\share\locale\hu\LC_MESSAGES\gtk20.mo
118 File /r ${MINGWDIR}\share\locale\hu\LC_MESSAGES\glib20.mo
119 SetOutPath $INSTDIR\de\LC_MESSAGES
120 File /r ${MINGWDIR}\share\locale\de\LC_MESSAGES\gtk20.mo
121 File /r ${MINGWDIR}\share\locale\de\LC_MESSAGES\glib20.mo
122 SetOutPath $INSTDIR\hu\LC_MESSAGES
123 File /oname=gdash.mo "po\hu.gmo"
124 SetOutPath $INSTDIR\de\LC_MESSAGES
125 File /oname=gdash.mo "po\de.gmo"
127 ; Documentation
128 SetOutPath $INSTDIR\docs
129 File docs\style.css
130 File docs\background.png
131 File docs\gdash.png
132 File docs\Doc-*.html
133 File docs\image_*.png
134 CreateDirectory "$SMPROGRAMS\GDash"
135 CreateDirectory "$SMPROGRAMS\GDash\Documentation"
136 CreateShortCut "$SMPROGRAMS\GDash\Documentation\English.lnk" "$INSTDIR\docs\Doc-English.html" "" "" 0
137 CreateShortCut "$SMPROGRAMS\GDash\Documentation\Deutsch.lnk" "$INSTDIR\docs\Doc-Deutsch.html" "" "" 0
138 CreateShortCut "$SMPROGRAMS\GDash\Documentation\Magyar.lnk" "$INSTDIR\docs\Doc-Magyar.html" "" "" 0
141 ; Write the installation path into the registry
142 WriteRegStr HKLM SOFTWARE\GDash "Install_Dir" "$INSTDIR"
144 ; Write the uninstall keys for Windows
145 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "DisplayName" "GDash"
146 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "UninstallString" '"$INSTDIR\uninstall.exe"'
147 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "NoModify" 1
148 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "NoRepair" 1
149 WriteUninstaller "uninstall.exe"
151 SectionEnd
153 ; Optional section (can be disabled by the user)
154 Section "Cave sets"
155 ; Set output path to the installation directory.
156 SetOutPath $INSTDIR\caves
158 ; Put files there
159 File /r /x Makefile* /x create_makefile.sh "caves\*"
160 SectionEnd
163 ; Optional section
164 Section "Sound files"
165 SetOutPath $INSTDIR\sound
166 File "sound\*.ogg"
168 SetOutPath $INSTDIR\music
169 File "music\*.ogg"
170 SectionEnd
173 ; Optional section (can be disabled by the user)
174 Section "Start Menu Shortcuts"
175 SetOutPath $INSTDIR
176 CreateDirectory "$SMPROGRAMS\GDash"
177 CreateShortCut "$SMPROGRAMS\GDash\GDash.lnk" "$INSTDIR\gdash.exe" "" "$INSTDIR\gdash.ico" 0
178 CreateShortCut "$SMPROGRAMS\GDash\GDash (default settings).lnk" "$INSTDIR\gdash.exe" "--default-settings" "$INSTDIR\gdash.ico" 0
179 CreateShortCut "$SMPROGRAMS\GDash\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
180 SectionEnd
184 ; Optional section (can be disabled by the user)
185 Section "Register *.bd and *.gds files"
187 WriteRegStr HKCR ".bd" "" "GDash.Caveset"
188 WriteRegStr HKCR ".gds" "" "GDash.Caveset"
190 WriteRegStr HKCR "GDash.Caveset" "" "GDash Caveset"
191 WriteRegStr HKCR "GDash.Caveset\DefaultIcon" "" "$INSTDIR\gdash.ico,0"
193 WriteRegStr HKCR "GDash.Caveset\shell\open\command" "" '"$INSTDIR\gdash.exe" "%1"'
194 WriteRegStr HKCR "GDash.Caveset\shell\edit\command" "" '"$INSTDIR\gdash.exe" -e "%1"'
196 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 RMDir /r "$SMPROGRAMS\GDash"
216 ; Remove directories used
217 RMDir /r "$INSTDIR"
219 SectionEnd