1 # this installer creator needs to be run with
2 # makensis subsurface.nsi
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)
8 # define the name of the installer
9 outfile "subsurface-installer.exe"
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"
20 # icon to use for the installer
23 # the installer needs to be run with admin privileges
24 RequestExecutionLevel admin
26 # pop up a little dialog that tells the user that we're about to
29 MessageBox MB_YESNO "This will install subsurface. Do you wish to continue?" IDYES gogogo
34 # define the directory to install to, the desktop in this case as specified
35 # by the predefined $DESKTOP variable
36 installDir "$PROGRAMFILES\subsurface"
41 # define the output path for this file
44 SetShellVarContext all
46 # create directory in the Start menu
47 CreateDirectory "$SMPROGRAMS\subsurface"
49 # create Start menu shortcut
50 createShortCut "$SMPROGRAMS\subsurface\subsurface.lnk" "$INSTDIR\subsurface.exe"
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"
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-5.dll dll\libtiff-5.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 file /oname=libusb-1.0.dll dll\libusb-1.0.dll
89 file /oname=SuuntoSDM.xslt ../../xslt/SuuntoSDM.xslt
90 file /oname=jdivelog2subsurface.xslt ../../xslt/jdivelog2subsurface.xslt
94 SetShellVarContext all
95 delete "$INSTDIR\subsurface-uninstall.exe"
98 delete "$SMPROGRAMS\subsurface\uninstall-subsurface.lnk"
99 delete "$SMPROGRAMS\subsurface\subsurface.lnk"
100 RMDir "$SMPROGRAMS\subsurface"
102 MessageBox MB_YESNO "Do you wish to keep subsurface's registry settings?" IDYES end
103 DeleteRegKey HKCU "SOFTWARE\subsurface"