summaryrefslogtreecommitdiff
path: root/tools/windows_packaging/ardour.nsi
blob: 3bfcc050b389879deb7a90b70ce0e32b9ee75555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!Nsis Installer Command Script
#
# This is an NSIS Installer Command Script generated automatically
# by the Fedora nsiswrapper program.  For more information see:
#
#   http://fedoraproject.org/wiki/MinGW
#
# To build an installer from the script you would normally do:
#
#   makensis this_script
#
# which will generate the output file 'installer.exe' which is a Windows
# installer containing your program.

SetCompressor /SOLID lzma
SetCompressorDictSize 32

!include MUI.nsh

!define MUI_ABORTWARNING
!define MUI_ICON ..\icons\icon\ardour.ico
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
;!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_BITMAP header.bmp
;!define MUI_WELCOMEFINISHPAGE_BITMAP welcomefinish.bmp
;!define MUI_COMPONENTSPAGE_SMALLDESC

; Installer pages
!insertmacro MUI_PAGE_WELCOME

LicenseForceSelection off

!define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)"
!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(LICENSE_BOTTOM_TEXT)"
!insertmacro MUI_PAGE_LICENSE ..\COPYING

!insertmacro MUI_PAGE_DIRECTORY

!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_RUN "$INSTDIR\Ardour-3.0.exe"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_CONFIRM

!insertmacro MUI_UNPAGE_INSTFILES
ShowUninstDetails hide
!insertmacro MUI_UNPAGE_FINISH

!insertmacro MUI_LANGUAGE "English"

; Product definitions
;!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.
!define INSTDIR_KEY "SOFTWARE\Ardour-3.0"

; Product Information
Name "Ardour-3.0"
OutFile "Ardour-3.0-Setup.exe"
InstallDir "$PROGRAMFILES\Ardour"
InstallDirRegKey HKLM "${INSTDIR_KEY}" "Install_Dir"


ComponentText "Select which optional components you want to install."

DirText "Please select the installation folder."

Section "Ardour-3.0"
!ifndef DUMMYINSTALL
  SectionIn RO

  SetOutPath $INSTDIR
  File ardour-3.0.exe
  File *.dll
  File jack*.exe
  File ardour.ico
  File /r etc
  File /r jack
  File /r lib
  File /r share

!endif
SectionEnd

Section "Start Menu Shortcuts"
!ifndef DUMMY_INSTALL
  CreateDirectory "$SMPROGRAMS\Ardour-3.0"
  CreateShortCut "$SMPROGRAMS\Ardour-3.0\Uninstall Ardour-3.0.lnk" "$INSTDIR\Uninstall Ardour-3.0.exe" "" "$INSTDIR\Uninstall Ardour-3.0.exe" 0
  CreateShortCut "$SMPROGRAMS\Ardour-3.0\ardour-3.0.exe.lnk" "$INSTDIR\.\ardour-3.0.exe" "" "$INSTDIR\ardour.ico" 0
!endif
SectionEnd

Section "Desktop Icons"
!ifndef DUMMY_INSTALL
  CreateShortCut "$DESKTOP\Ardour-3.0.exe.lnk" "$INSTDIR\ardour-3.0.exe" "" "$INSTDIR\ardour.ico"
!endif
SectionEnd

Section "Uninstall"
!ifndef DUMMY_INSTALL
  Delete /rebootok "$DESKTOP\ardour-3.0.exe.lnk"
  Delete /rebootok "$SMPROGRAMS\Ardour-3.0\ardour-3.0.exe.lnk"
  Delete /rebootok "$SMPROGRAMS\Ardour-3.0\Uninstall Ardour-3.0.lnk"
  RMDir "$SMPROGRAMS\Ardour-3.0"

  ;RMDir "$INSTDIR\."
  Delete /rebootok "$INSTDIR\ardour-3.0.exe"
  Delete /rebootok "$INSTDIR\jack*.exe"
  Delete /rebootok "$INSTDIR\*.dll"
  Delete /rebootok "$INSTDIR\ardour.ico"
  RMDir /r "$INSTDIR\etc"
  RMDir /r "$INSTDIR\jack"
  RMDir /r "$INSTDIR\lib"
  RMDir /r "$INSTDIR\share"
  RMDir "$INSTDIR"
!endif
SectionEnd

Section -post
!ifndef DUMMY_INSTALL
  WriteUninstaller "$INSTDIR\Uninstall Ardour-3.0.exe"
!endif
SectionEnd