1 !addplugindir Instdrv/NSIS/Plugins
3 Name "Altus Metrum Installer"
5 ; Default install directory
6 InstallDir "$PROGRAMFILES\AltusMetrum"
8 ; Tell the installer where to re-install a new version
9 InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir"
11 LicenseText "GNU General Public License Version 2"
12 LicenseData "../COPYING"
14 ; Need admin privs for Vista or Win7
15 RequestExecutionLevel admin
19 ComponentText "Altus Metrum Software and Driver Installer"
28 UninstPage uninstConfirm
31 ; And the stuff to install
33 Section "Install Driver" InstDriver
35 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000A
37 DetailPrint "InitDriverSetup: $0"
38 InstDrv::DeleteOemInfFiles /NOUNLOAD
39 InstDrv::CreateDevice /NOUNLOAD
41 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000B
43 DetailPrint "InitDriverSetup: $0"
44 InstDrv::DeleteOemInfFiles /NOUNLOAD
45 InstDrv::CreateDevice /NOUNLOAD
47 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000C
49 DetailPrint "InitDriverSetup: $0"
50 InstDrv::DeleteOemInfFiles /NOUNLOAD
51 InstDrv::CreateDevice /NOUNLOAD
53 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000D
55 DetailPrint "InitDriverSetup: $0"
56 InstDrv::DeleteOemInfFiles /NOUNLOAD
57 InstDrv::CreateDevice /NOUNLOAD
59 SetOutPath $WINDIR\Inf
60 File "../telemetrum.inf"
63 File "../telemetrum.inf"
64 InstDrv::InstallDriver /NOUNLOAD "$TEMP\telemetrum.inf"
67 File "../telemetrum.inf"
70 Section "AltosUI Application"
73 File "altosui-fat.jar"
76 File "cmu_time_awb.jar"
86 CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico"
89 Section "AltosUI Desktop Shortcut"
90 CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico"
93 Section "TeleMetrum and TeleDongle Firmware"
97 File "../src/telemetrum-v1.0/telemetrum-v1.0-${VERSION}.ihx"
98 File "../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx"
102 Section "Uninstaller"
104 ; Deal with the uninstaller
108 ; Write the install path to the registry
109 WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
111 ; Write the uninstall keys for windows
112 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
113 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
114 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
115 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
117 WriteUninstaller "uninstall.exe"
121 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
122 DeleteRegKey HKLM "Software\AltusMetrum"
124 Delete "$INSTDIR\*.*"
128 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000A
129 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000B
130 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000C
131 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} USB\VID_FFFE&PID_000D
132 InstDrv::DeleteOemInfFiles /NOUNLOAD
133 InstDrv::RemoveAllDevices
135 ; Remove shortcuts, if any
136 Delete "$SMPROGRAMS\AltusMetrum.lnk"
137 Delete "$DESKTOP\AltusMetrum.lnk"