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} AltusMetrumSerial
37 DetailPrint "InitDriverSetup: $0"
38 InstDrv::DeleteOemInfFiles /NOUNLOAD
39 InstDrv::CreateDevice /NOUNLOAD
42 File "../telemetrum.inf"
43 InstDrv::InstallDriver /NOUNLOAD "$TEMP\telemetrum.inf"
46 File "../telemetrum.inf"
48 SetOutPath $WINDIR\Inf
49 File "../telemetrum.inf"
53 Section "AltosUI Application"
56 File "altosui-fat.jar"
59 File "cmu_time_awb.jar"
71 CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico"
74 Section "AltosUI Desktop Shortcut"
75 CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico"
78 Section "TeleMetrum and TeleDongle Firmware"
82 File "../src/telemetrum-v1.0/telemetrum-v1.0-${VERSION}.ihx"
83 File "../src/telemetrum-v1.1/telemetrum-v1.1-${VERSION}.ihx"
84 File "../src/telemini-v1.0/telemini-v1.0-${VERSION}.ihx"
85 File "../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx"
89 Section "Documentation"
93 File "../doc/altusmetrum.pdf"
94 File "../doc/altos.pdf"
95 File "../doc/telemetry.pdf"
96 File "../doc/telemetrum-outline.pdf"
101 ; Deal with the uninstaller
105 ; Write the install path to the registry
106 WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
108 ; Write the uninstall keys for windows
109 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
110 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
111 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
112 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
114 WriteUninstaller "uninstall.exe"
118 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
119 DeleteRegKey HKLM "Software\AltusMetrum"
121 Delete "$INSTDIR\*.*"
125 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
126 InstDrv::DeleteOemInfFiles /NOUNLOAD
127 InstDrv::RemoveAllDevices
129 ; Remove shortcuts, if any
130 Delete "$SMPROGRAMS\AltusMetrum.lnk"
131 Delete "$DESKTOP\AltusMetrum.lnk"