1 !addplugindir ../altosui/Instdrv/NSIS/Plugins
2 !addincludedir ../altosui/Instdrv/NSIS/Includes
6 Name "TeleGPS Installer"
8 ; Default install directory
9 InstallDir "$PROGRAMFILES\AltusMetrum"
11 ; Tell the installer where to re-install a new version
12 InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir"
14 LicenseText "GNU General Public License Version 2"
15 LicenseData "../COPYING"
17 ; Need admin privs for Vista or Win7
18 RequestExecutionLevel admin
22 ComponentText "TeleGPS Software Installer"
25 DetailPrint "Checking host operating system"
27 DetailPrint "Installer running on 64-bit host"
29 StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum"
30 ${DisableX64FSRedirection}
41 UninstPage uninstConfirm
44 ; And the stuff to install
46 Section "Install Driver" InstDriver
48 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
50 DetailPrint "InitDriverSetup: $0"
51 InstDrv::DeleteOemInfFiles /NOUNLOAD
52 InstDrv::CreateDevice /NOUNLOAD
55 File "../altusmetrum.inf"
56 File "../altusmetrum.cat"
58 ${DisableX64FSRedirection}
59 IfFileExists $WINDIR\System32\PnPutil.exe 0 nopnp
60 ${DisableX64FSRedirection}
61 nsExec::ExecToLog '"$WINDIR\System32\PnPutil.exe" -i -a "$INSTDIR\altusmetrum.inf"'
64 InstDrv::InstallDriver /NOUNLOAD "$INSTDIR\altusmetrum.inf"
69 Section "TeleGPS Application"
74 File "telegps-fat.jar"
75 File "altoslib_@ALTOSLIB_VERSION@.jar"
76 File "altosuilib_@ALTOSUILIB_VERSION@.jar"
79 File "cmu_time_awb.jar"
91 CreateShortCut "$SMPROGRAMS\TeleGPS.lnk" "$SYSDIR\javaw.exe" "-jar telegps-fat.jar" "$INSTDIR\telegps.ico"
94 Section "TeleGPS Desktop Shortcut"
95 CreateShortCut "$DESKTOP\TeleGPS.lnk" "$INSTDIR\telegps-fat.jar" "" "$INSTDIR\telegps.ico"
98 Section "TeleGPS, TeleDongle and TeleBT Firmware"
102 File "../src/telegps-v1.0/telegps-v1.0-${VERSION}.ihx"
103 File "../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx"
104 File "../src/telebt-v1.0/telebt-v1.0-${VERSION}.ihx"
108 Section "Documentation"
112 File "../doc/telegps.pdf"
113 File "../doc/altos.pdf"
114 File "../doc/telemetry.pdf"
117 Section "Uninstaller"
119 ; Deal with the uninstaller
123 ; Write the install path to the registry
124 WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
126 ; Write the uninstall keys for windows
127 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
128 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
129 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
130 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
132 WriteUninstaller "uninstall.exe"
136 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
137 DeleteRegKey HKLM "Software\AltusMetrum"
139 Delete "$INSTDIR\*.*"
143 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
144 InstDrv::DeleteOemInfFiles /NOUNLOAD
145 InstDrv::RemoveAllDevices
147 ; Remove shortcuts, if any
148 Delete "$SMPROGRAMS\TeleGPS.lnk"
149 Delete "$DESKTOP\TeleGPS.lnk"