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
15Name "Icecast KH"
16OutFile "icecast-2.4.0-kh15_win64_setup.exe"
17
18InstallDir "$ProgramFiles64\Icecast KH"
19InstallDirRegKey HKLM SOFTWARE\Icecast "Install_Dir"
20
21LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
22
23ShowInstDetails hide
24ShowUninstDetails hide
25
26# Uncomment this to enable BZip2 compression, which results in
27# slightly smaller files but uses more memory at install time.
28SetCompressor bzip2
29
30XPStyle on
31
32;Version Information
33
34VIProductVersion "2.4.0.15"
35VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Icecast KH"
36VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "2.4.0"
37VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Karl Heyes @2000-2020"
38VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Icecast KH streaming media server installer"
39VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "2.4.0-KH15"
40
41Page components
42Page directory
43Page instfiles
44
45ComponentText "Select which optional components you want to install."
46
47DirText "Please select the installation folder."
48
49Function un.onInit
50    MessageBox MB_YESNO "Uninstall icecast KH from $INSTDIR ?" IDYES NoAbort
51      Abort ; causes uninstaller to quit.
52    NoAbort:
53FunctionEnd
54
55Section "Icecast Installation"
56  SectionIn RO
57
58  SetOutPath "$INSTDIR"
59  File /r "x64/*.dll"
60
61  WriteUninstaller "$INSTDIR\Uninstall.exe"
62
63  File "x64/icecast.exe"
64  SetOverwrite off
65  File "x64/icecast.xml"
66  SetOverwrite on
67
68  SetOutPath "$INSTDIR\logs"
69  File /r "x64/logs/"
70
71  SetOutPath "$INSTDIR\admin"
72  File /r "x64/admin/"
73
74  SetOutPath "$INSTDIR\doc"
75  File /r "x64/doc/"
76
77  SetOutPath "$INSTDIR\web"
78  File /r "x64/web/"
79
80  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Icecast KH" \
81                 "DisplayName" "Icecast KH"
82  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Icecast KH" \
83                 "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
84SectionEnd
85
86Section "Install Service"
87  SetOutPath "$INSTDIR"
88  ExecWait '"$INSTDIR\icecast.exe" "install" "$INSTDIR"'
89SectionEnd
90
91Section "Start Menu Shortcuts"
92  CreateDirectory "$SMPROGRAMS\Icecast KH"
93  SetOutPath "$INSTDIR"
94  CreateShortCut "$SMPROGRAMS\Icecast KH\Edit Configuration.lnk" "notepad.exe" "$INSTDIR\icecast.xml"
95  CreateShortCut "$SMPROGRAMS\Icecast KH\Uninstall Icecast.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
96  CreateShortCut "$SMPROGRAMS\Icecast KH\Run Icecast.lnk" "$INSTDIR\icecast.exe" '-c "$INSTDIR\icecast.xml"'
97SectionEnd
98
99Section "Desktop Icons"
100  SetOutPath "$INSTDIR"
101  CreateShortCut "$DESKTOP\Icecast.lnk" "$INSTDIR\icecast.exe" '-c "$INSTDIR\icecast.xml"'
102SectionEnd
103
104Section "Uninstall"
105  ExecWait '"$INSTDIR\icecast.exe" "remove"'
106  Delete $INSTDIR\Uninstall.exe
107  Delete /rebootok "$DESKTOP\Icecast.lnk"
108  Delete /rebootok "$SMPROGRAMS\Icecast KH\Run Icecast.lnk"
109  Delete /rebootok "$SMPROGRAMS\Icecast KH\Uninstall Icecast.lnk"
110  Delete /rebootok "$SMPROGRAMS\Icecast KH\Edit Configuration.lnk"
111  RMDir "$SMPROGRAMS\Icecast KH"
112
113  RMDir /r "$INSTDIR\web"
114  RMDir /r "$INSTDIR\doc"
115  RMDir /r "$INSTDIR\admin"
116
117  Delete /rebootok "$INSTDIR\icecast.exe"
118
119  Delete /rebootok "$INSTDIR\*.dll"
120
121  RMDir "$INSTDIR"
122  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Icecast KH"
123SectionEnd
124