]> git.tdb.fi Git - ext/subsurface.git/blob - packaging/windows/subsurface.nsi
17b734f1747637df59e36c79b981d77814a01195
[ext/subsurface.git] / packaging / windows / subsurface.nsi
1
2 # define the name of the installer
3 outfile "subsurface-installer.exe"
4 Name subsurface
5
6 VIProductVersion "1.1.0.0"
7 VIAddVersionKey ProductName subsurface
8 VIAddVersionKey ProductVersion "1.1"
9 VIAddVersionKey FileVersion "1.1"
10
11 Icon ..\share\subsurface.ico
12
13
14 RequestExecutionLevel admin
15
16 Function .onInit
17   MessageBox MB_YESNO "This will install subsurface. Do you wish to continue?" IDYES gogogo
18     Abort
19   gogogo:
20 FunctionEnd
21  
22 # define the directory to install to, the desktop in this case as specified  
23 # by the predefined $DESKTOP variable
24 installDir "$PROGRAMFILES\subsurface"
25
26 # default section
27 Section
28
29 # define the output path for this file
30 setOutPath $INSTDIR
31
32 SetShellVarContext all
33
34 # create directory in the Start menu
35 CreateDirectory "$SMPROGRAMS\subsurface"
36
37 # create Start menu shortcut
38 createShortCut "$SMPROGRAMS\subsurface\subsurface.lnk" "$INSTDIR\subsurface.exe"
39
40 #create uninstaller and corresponding shortcut in Start menu
41 writeUninstaller "$INSTDIR\subsurface-uninstall.exe"
42 createShortCut "$SMPROGRAMS\subsurface\uninstall-subsurface.lnk" "$INSTDIR\subsurface-uninstall.exe"
43  
44 # define what to install and place it in the output path
45 file subsurface.exe
46 file libatk-1.0-0.dll
47 file libcairo-2.dll
48 file libdivecomputer-0.dll
49 file libffi-5.dll
50 file libfontconfig-1.dll
51 file libfreetype-6.dll
52 file libgdk_pixbuf-2.0-0.dll
53 file libgdk-win32-2.0-0.dll
54 file libgio-2.0-0.dll
55 file libglib-2.0-0.dll
56 file libgmodule-2.0-0.dll
57 file libgobject-2.0-0.dll
58 file libgthread-2.0-0.dll
59 file libgtk-win32-2.0-0.dll
60 file libintl-8.dll
61 file libjasper-1.dll
62 file libjpeg-8.dll
63 file libpango-1.0-0.dll
64 file libpangocairo-1.0-0.dll
65 file libpangoft2-1.0-0.dll
66 file libpangowin32-1.0-0.dll
67 file libpixman-1-0.dll
68 file libpng15-15.dll
69 file libtiff-3.dll
70 file libxml2-2.dll
71 file pthreadGC2.dll
72 file zlib1.dll
73 file /oname=subsurface.ico ..\\share\\subsurface.ico
74 file /oname=subsurface.bmp ..\\share\\subsurface.bmp
75 file /oname=subsurface.svg ..\\share\\subsurface.svg
76  
77
78 sectionEnd
79
80 section "uninstall"
81   SetShellVarContext all
82   delete "$INSTDIR\subsurface-uninstall.exe"
83   delete "$INSTDIR\*.*"
84   RMDir  "$INSTDIR"
85   delete "$SMPROGRAMS\subsurface\uninstall-subsurface.lnk"
86   delete "$SMPROGRAMS\subsurface\subsurface.lnk"
87   RMDir  "$SMPROGRAMS\subsurface"
88
89   MessageBox MB_YESNO "Do you wish to store subsurface's settings?" IDYES end
90   DeleteRegKey HKCU "SOFTWARE\subsurface"
91   end:
92 sectionEnd