visibility macros and flush() added to SrcFileSource; merge with master
[ardour.git] / tools / windows_packaging / ardour.nsi
1 #!Nsis Installer Command Script
2 #
3 # This is an NSIS Installer Command Script generated automatically
4 # by the Fedora nsiswrapper program.  For more information see:
5 #
6 #   http://fedoraproject.org/wiki/MinGW
7 #
8 # To build an installer from the script you would normally do:
9 #
10 #   makensis this_script
11 #
12 # which will generate the output file 'installer.exe' which is a Windows
13 # installer containing your program.
14
15 SetCompressor /SOLID lzma
16 SetCompressorDictSize 32
17
18 !include MUI.nsh
19
20 !define MUI_ABORTWARNING
21 !define MUI_ICON ..\icons\icon\ardour.ico
22 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
23 ;!define MUI_HEADERIMAGE
24 ;!define MUI_HEADERIMAGE_BITMAP header.bmp
25 ;!define MUI_WELCOMEFINISHPAGE_BITMAP welcomefinish.bmp
26 ;!define MUI_COMPONENTSPAGE_SMALLDESC
27
28 ; Installer pages
29 !insertmacro MUI_PAGE_WELCOME
30
31 LicenseForceSelection off
32
33 !define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)"
34 !define MUI_LICENSEPAGE_TEXT_BOTTOM "$(LICENSE_BOTTOM_TEXT)"
35 !insertmacro MUI_PAGE_LICENSE ..\COPYING
36
37 !insertmacro MUI_PAGE_DIRECTORY
38
39 !insertmacro MUI_PAGE_INSTFILES
40
41 !define MUI_FINISHPAGE_RUN "$INSTDIR\Ardour-3.0.exe"
42 !insertmacro MUI_PAGE_FINISH
43
44 ; Uninstaller pages
45 !insertmacro MUI_UNPAGE_CONFIRM
46
47 !insertmacro MUI_UNPAGE_INSTFILES
48 ShowUninstDetails hide
49 !insertmacro MUI_UNPAGE_FINISH
50
51 !insertmacro MUI_LANGUAGE "English"
52
53 ; Product definitions
54 ;!define DUMMYINSTALL ; Define this to make it build quickly, not including any of the files or code in the sections, for quick testing of features of the installer and development thereof.
55 !define INSTDIR_KEY "SOFTWARE\Ardour-3.0"
56
57 ; Product Information
58 Name "Ardour-3.0"
59 OutFile "Ardour-3.0-Setup.exe"
60 InstallDir "$PROGRAMFILES\Ardour"
61 InstallDirRegKey HKLM "${INSTDIR_KEY}" "Install_Dir"
62
63
64 ComponentText "Select which optional components you want to install."
65
66 DirText "Please select the installation folder."
67
68 Section "Ardour-3.0"
69 !ifndef DUMMYINSTALL
70   SectionIn RO
71
72   SetOutPath $INSTDIR
73   File ardour-3.0.exe
74   File *.dll
75   File jack*.exe
76   File ardour.ico
77   File /r etc
78   File /r jack
79   File /r lib
80   File /r share
81
82 !endif
83 SectionEnd
84
85 Section "Start Menu Shortcuts"
86 !ifndef DUMMY_INSTALL
87   CreateDirectory "$SMPROGRAMS\Ardour-3.0"
88   CreateShortCut "$SMPROGRAMS\Ardour-3.0\Uninstall Ardour-3.0.lnk" "$INSTDIR\Uninstall Ardour-3.0.exe" "" "$INSTDIR\Uninstall Ardour-3.0.exe" 0
89   CreateShortCut "$SMPROGRAMS\Ardour-3.0\ardour-3.0.exe.lnk" "$INSTDIR\.\ardour-3.0.exe" "" "$INSTDIR\ardour.ico" 0
90 !endif
91 SectionEnd
92
93 Section "Desktop Icons"
94 !ifndef DUMMY_INSTALL
95   CreateShortCut "$DESKTOP\Ardour-3.0.exe.lnk" "$INSTDIR\ardour-3.0.exe" "" "$INSTDIR\ardour.ico"
96 !endif
97 SectionEnd
98
99 Section "Uninstall"
100 !ifndef DUMMY_INSTALL
101   Delete /rebootok "$DESKTOP\ardour-3.0.exe.lnk"
102   Delete /rebootok "$SMPROGRAMS\Ardour-3.0\ardour-3.0.exe.lnk"
103   Delete /rebootok "$SMPROGRAMS\Ardour-3.0\Uninstall Ardour-3.0.lnk"
104   RMDir "$SMPROGRAMS\Ardour-3.0"
105
106   ;RMDir "$INSTDIR\."
107   Delete /rebootok "$INSTDIR\ardour-3.0.exe"
108   Delete /rebootok "$INSTDIR\jack*.exe"
109   Delete /rebootok "$INSTDIR\*.dll"
110   Delete /rebootok "$INSTDIR\ardour.ico"
111   RMDir /r "$INSTDIR\etc"
112   RMDir /r "$INSTDIR\jack"
113   RMDir /r "$INSTDIR\lib"
114   RMDir /r "$INSTDIR\share"
115   RMDir "$INSTDIR"
116 !endif
117 SectionEnd
118
119 Section -post
120 !ifndef DUMMY_INSTALL
121   WriteUninstaller "$INSTDIR\Uninstall Ardour-3.0.exe"
122 !endif
123 SectionEnd