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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
|
; tucnak-msvc.nsi
;
; Install script for Nullsoft Scriptable Install System (NSIS), http://nsis.sf.net
;
;--------------------------------
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
; The name of the installer
Name "Tucnak @PACKAGE_VERSION@"
; The file to write
OutFile "Tucnak-@PACKAGE_VERSION@.exe"
; The default installation directory
InstallDir "$PROGRAMFILES\Tucnak"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\OK1ZIA\Tucnak" "Install_Dir"
Icon "tucnak.ico"
UninstallIcon "tucnak.ico"
Crccheck on
XPStyle on
AutoCloseWindow true
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "Install Tucnak"
SectionIn 1 2 RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "..\Release\tucnak.exe"
File "..\Release\tucnak.pdb"
; File "..\Release\libftdi.dll"
; File "..\Release\libpng.dll"
; File "..\Release\libzia.dll"
; File "iconv.dll"
File "inpout32.dll"
File "intl.dll"
File "libfftw3-3.dll"
File "libglib-2.0-0.dll"
File "libgthread-2.0-0.dll"
File "libhamlib-4.dll"
File "libgcc_s_sjlj-1.dll"
File "libwinpthread-1.dll"
File "libiconv2.dll"
File "libsndfile-1.dll"
File "libusb-1.0.dll"
File "libpng.dll"
File "msvcr120.dll"
File "portaudio_x86.dll"
File "SDL2.dll"
File "SDL2_ttf.dll"
File "tucnak.ico"
File "zlib1.dll"
File "libhogweed-6.dll"
File "libgmp-10.dll"
File "libgnutls-30.dll"
File "libnettle-8.dll"
File "rigctl.exe"
File "rigctld.exe"
File "rotctl.exe"
File "rotctld.exe"
File "hidapi.dll"
;SetOutPath "$INSTDIR\libusb"
;File "libusb\Davac4.inf"
;File "libusb\Digital_analyser.inf"
;File "libusb\HdKeyb.inf"
;File "libusb\Rotar4.inf"
;File "libusb\FUNcube_Dongle.inf"
;File "libusb\Installer_x64.exe"
;File "libusb\Installer_x86.exe"
;File "libusb\testlibusb.exe"
;File "libusb\testlibusb-win.exe"
;SetOutPath "$INSTDIR\libusb\amd64"
;File "libusb\amd64\libusb0.dll"
;File "libusb\amd64\libusb0.sys"
;SetOutPath "$INSTDIR\libusb\ia64"
;File "libusb\ia64\libusb0.dll"
;File "libusb\ia64\libusb0.sys"
;SetOutPath "$INSTDIR\libusb\x86"
;File "libusb\x86\libusb0_x86.dll"
;File "libusb\x86\libusb0.sys"
; Write the installation path into the registry
WriteRegStr HKLM Software\OK1ZIA\tucnak "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tucnak" "DisplayName" "Tucnak"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tucnak" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tucnak" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tucnak" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SetOutPath $INSTDIR
SectionEnd
; Optional section (can be disabled by the user)
Section "Create shortcut in menu Start"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\OK1ZIA"
CreateShortCut "$SMPROGRAMS\OK1ZIA\Tucnak.lnk" "$INSTDIR\tucnak.exe" "" "$INSTDIR\tucnak.ico" 0
CreateShortCut "$SMPROGRAMS\OK1ZIA\Uninstall Tucnak.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
SetShellVarContext current
CreateShortCut "$SMPROGRAMS\OK1ZIA\Tucnak data.lnk" "$WINDIR\explorer.exe" '/e="$APPDATA\Tucnak"' "$INSTDIR\tucnak.ico" 0
SectionEnd
Section "Create shortcuts in Desktop"
SetShellVarContext current
CreateShortCut "$DESKTOP\Tucnak.lnk" "$INSTDIR\tucnak.exe" "" "$INSTDIR\tucnak.ico" 0
CreateShortCut "$DESKTOP\Tucnak data.lnk" "$WINDIR\explorer.exe" '/e="$APPDATA\Tucnak"' "$INSTDIR\tucnak.ico" 0
SectionEnd
;Section "Create symbolic links in C:\"
; System::Call "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
; ExecWait '"mklink" /d "c:\Tucnak-$0" "$APPDATA\Tucnak"' $0
; DetailPrint "some program returned $0"
; ExecWait '"mklink" "c:\Tucnak-Program" "$INSTDIR\tucnak.exe"' $0
; DetailPrint "some program returned $0"
;SectionEnd
Section "Run Tucnak"
Exec "$INSTDIR\tucnak.exe"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tucnak"
DeleteRegValue HKLM "Software\OK1ZIA\Tucnak" "Install_Dir"
DeleteRegKey /ifempty HKLM "Software\OK1ZIA\Tucnak"
; Remove files and uninstaller
Delete "$INSTDIR\tucnak.exe"
Delete "$INSTDIR\tucnak.pdb"
Delete "$INSTDIR\tucnak.dmp" ; can be copied here for crash analyse
; Delete "$INSTDIR\libftdi.dll"
; Delete "$INSTDIR\libzia.dll"
Delete "$INSTDIR\iconv.dll"
Delete "$INSTDIR\inpout32.dll"
Delete "$INSTDIR\intl.dll"
Delete "$INSTDIR\libfftw3-3.dll"
Delete "$INSTDIR\libhamlib-2.dll"
Delete "$INSTDIR\libhamlib-4.dll"
Delete "$INSTDIR\hamlib-*.dll"
Delete "$INSTDIR\libgcc_s_sjlj-1.dll"
Delete "$INSTDIR\libwinpthread-1.dll"
Delete "$INSTDIR\libglib-2.0-0.dll"
Delete "$INSTDIR\libgthread-1.0-0.dll"
Delete "$INSTDIR\libgthread-2.0-0.dll"
Delete "$INSTDIR\libiconv2.dll"
Delete "$INSTDIR\libsndfile-1.dll"
Delete "$INSTDIR\libusb0.dll"
Delete "$INSTDIR\libusb-1.0.dll"
Delete "$INSTDIR\libpng.dll"
Delete "$INSTDIR\msvcr100.dll"
Delete "$INSTDIR\msvcr100d.dll"
Delete "$INSTDIR\msvcr120.dll"
Delete "$INSTDIR\portaudio_x86.dll"
Delete "$INSTDIR\SDL2.dll"
Delete "$INSTDIR\SDL2_ttf.dll"
Delete "$INSTDIR\SDL.dll"
Delete "$INSTDIR\tucnak.ico"
Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\zlib1.dll"
Delete "$INSTDIR\libhogweed-6.dll"
Delete "$INSTDIR\libgmp-10.dll"
Delete "$INSTDIR\libgnutls-30.dll"
Delete "$INSTDIR\libnettle-8.dll"
Delete "$INSTDIR\rigctl.exe"
Delete "$INSTDIR\rigctld.exe"
Delete "$INSTDIR\rotctl.exe"
Delete "$INSTDIR\libusb\Davac4.inf"
Delete "$INSTDIR\libusb\Digital_analyser.inf"
Delete "$INSTDIR\libusb\HdKeyb.inf"
Delete "$INSTDIR\libusb\Rotar4.inf"
Delete "$INSTDIR\libusb\FUNcube_Dongle.inf"
Delete "$INSTDIR\libusb\Installer_x64.exe"
Delete "$INSTDIR\libusb\Installer_x86.exe"
Delete "$INSTDIR\libusb\testlibusb.exe"
Delete "$INSTDIR\libusb\testlibusb-win.exe"
Delete "$INSTDIR\libusb\amd64\libusb0.dll"
Delete "$INSTDIR\libusb\amd64\libusb0.sys"
Rmdir "$INSTDIR\libusb\amd64"
Delete "$INSTDIR\libusb\ia64\libusb0.dll"
Delete "$INSTDIR\libusb\ia64\libusb0.sys"
Rmdir "$INSTDIR\libusb\ia64"
Delete "$INSTDIR\libusb\x86\libusb0_x86.dll"
Delete "$INSTDIR\libusb\x86\libusb0.sys"
Rmdir "$INSTDIR\libusb\x86"
Rmdir "$INSTDIR\libusb"
SetShellVarContext all
Delete "$SMPROGRAMS\OK1ZIA\Tucnak.lnk"
Delete "$SMPROGRAMS\OK1ZIA\Uninstall Tucnak.lnk"
SetShellVarContext current
Delete "$SMPROGRAMS\OK1ZIA\Tucnak data.lnk"
SetShellVarContext current
Delete "$DESKTOP\Tucnak.lnk"
Delete "$DESKTOP\Tucnak data.lnk"
; Remove directories used
RMDir "$SMPROGRAMS\OK1ZIA"
RMDir "$INSTDIR"
SectionEnd
|