]> git.tdb.fi Git - ext/subsurface.git/blob - packaging/windows/subsurface.nsi
Add libxslt to Windows packaging file
[ext/subsurface.git] / packaging / windows / subsurface.nsi
1 # this installer creator needs to be run with
2 # makensis subsurface.nsi
3 #
4 # it assumes that packaging/windows/dll is a symlink to
5 # the directory in which the required Windows DLLs are installed
6 # (in my case that's /usr/i686-w64-mingw32/sys-root/mingw/bin)
7 #
8 # define the name of the installer
9 outfile "subsurface-installer.exe"
10 Name subsurface
11
12 # some data for the package to identify itself
13 VIProductVersion "1.1.9.0"
14 VIAddVersionKey ProductName subsurface
15 VIAddVersionKey FileDescription "subsurface diving log program"
16 VIAddVersionKey LegalCopyright "GPL v.2"
17 VIAddVersionKey ProductVersion "1.1"
18 VIAddVersionKey FileVersion "1.1"
19
20 # icon to use for the installer
21 Icon .\subsurface.ico
22
23 # the installer needs to be run with admin privileges
24 RequestExecutionLevel admin
25
26 # pop up a little dialog that tells the user that we're about to
27 # install subsurface
28 Function .onInit
29   MessageBox MB_YESNO "This will install subsurface. Do you wish to continue?" IDYES gogogo
30     Abort
31   gogogo:
32 FunctionEnd
33  
34 # define the directory to install to, the desktop in this case as specified  
35 # by the predefined $DESKTOP variable
36 installDir "$PROGRAMFILES\subsurface"
37
38 # default section
39 Section
40
41 # define the output path for this file
42 setOutPath $INSTDIR
43
44 SetShellVarContext all
45
46 # create directory in the Start menu
47 CreateDirectory "$SMPROGRAMS\subsurface"
48
49 # create Start menu shortcut
50 createShortCut "$SMPROGRAMS\subsurface\subsurface.lnk" "$INSTDIR\subsurface.exe"
51
52 #create uninstaller and corresponding shortcut in Start menu
53 writeUninstaller "$INSTDIR\subsurface-uninstall.exe"
54 createShortCut "$SMPROGRAMS\subsurface\uninstall-subsurface.lnk" "$INSTDIR\subsurface-uninstall.exe"
55  
56 # define what to install and place it in the output path
57 file /oname=subsurface.exe ../../subsurface.exe
58 file /oname=subsurface.ico subsurface.ico
59 file /oname=subsurface.svg ../../subsurface.svg
60 file /oname=libatk-1.0-0.dll dll/libatk-1.0-0.dll
61 file /oname=libcairo-2.dll dll/libcairo-2.dll
62 file /oname=libdivecomputer-0.dll dll\libdivecomputer-0.dll
63 file /oname=libffi-5.dll dll\libffi-5.dll
64 file /oname=libfontconfig-1.dll dll\libfontconfig-1.dll
65 file /oname=libfreetype-6.dll dll\libfreetype-6.dll
66 file /oname=libgdk_pixbuf-2.0-0.dll dll\libgdk_pixbuf-2.0-0.dll
67 file /oname=libgdk-win32-2.0-0.dll dll\libgdk-win32-2.0-0.dll
68 file /oname=libgio-2.0-0.dll dll\libgio-2.0-0.dll
69 file /oname=libglib-2.0-0.dll dll\libglib-2.0-0.dll
70 file /oname=libgmodule-2.0-0.dll dll\libgmodule-2.0-0.dll
71 file /oname=libgobject-2.0-0.dll dll\libgobject-2.0-0.dll
72 file /oname=libgthread-2.0-0.dll dll\libgthread-2.0-0.dll
73 file /oname=libgtk-win32-2.0-0.dll dll\libgtk-win32-2.0-0.dll
74 file /oname=libintl-8.dll dll\libintl-8.dll
75 file /oname=libjasper-1.dll dll\libjasper-1.dll
76 file /oname=libjpeg-8.dll dll\libjpeg-8.dll
77 file /oname=libpango-1.0-0.dll dll\libpango-1.0-0.dll
78 file /oname=libpangocairo-1.0-0.dll dll\libpangocairo-1.0-0.dll
79 file /oname=libpangoft2-1.0-0.dll dll\libpangoft2-1.0-0.dll
80 file /oname=libpangowin32-1.0-0.dll dll\libpangowin32-1.0-0.dll
81 file /oname=libpixman-1-0.dll dll\libpixman-1-0.dll
82 file /oname=libpng15-15.dll dll\libpng15-15.dll
83 file /oname=libtiff-3.dll dll\libtiff-3.dll
84 file /oname=libxml2-2.dll dll\libxml2-2.dll
85 file /oname=libxslt-1.dll dll\libxslt-1.dll
86 file /oname=pthreadGC2.dll dll\pthreadGC2.dll
87 file /oname=zlib1.dll dll\zlib1.dll
88 sectionEnd
89
90 section "uninstall"
91   SetShellVarContext all
92   delete "$INSTDIR\subsurface-uninstall.exe"
93   delete "$INSTDIR\*.*"
94   RMDir  "$INSTDIR"
95   delete "$SMPROGRAMS\subsurface\uninstall-subsurface.lnk"
96   delete "$SMPROGRAMS\subsurface\subsurface.lnk"
97   RMDir  "$SMPROGRAMS\subsurface"
98
99   MessageBox MB_YESNO "Do you wish to keep subsurface's registry settings?" IDYES end
100   DeleteRegKey HKCU "SOFTWARE\subsurface"
101   end:
102 sectionEnd