1 !addplugindir Instdrv/NSIS/Plugins
3 Name "Altus Metrum Installer"
5 OutFile "Altos-Windows.exe"
7 ; Default install directory
8 InstallDir "$PROGRAMFILES\AltusMetrum"
10 ; Tell the installer where to re-install a new version
11 InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir"
13 LicenseText "GNU General Public License Version 2"
14 LicenseData "../../COPYING"
16 ; Need admin privs for Vista or Win7
17 RequestExecutionLevel admin
21 ComponentText "Altus Metrum Software and Driver Installer"
30 UninstPage uninstConfirm
33 ; And the stuff to install
35 Section "Install Driver" InstDriver
36 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} "Altus Metrum"
38 DetailPrint "InitDriverSetup: $0"
40 InstDrv::DeleteOemInfFiles /NOUNLOAD
41 InstDrv::CreateDevice /NOUNLOAD
43 File "../../telemetrum.inf"
44 InstDrv::InstallDriver /NOUNLOAD "$TEMP\telemetrum.inf"
47 Section "AltosUI Application"
50 File "windows/AltOS/*.jar"
51 File "windows/AltOS/*.dll"
53 CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$INSTDIR\altosui.jar"
56 Section "AltosUI Desktop Shortcut"
57 CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui.jar"
60 Section "TeleMetrum and TeleDongle Firmware"
64 File "windows/AltOS/telemetrum-v1.0.ihx"
65 File "windows/AltOS/teledongle-v0.2.ihx"
71 ; Deal with the uninstaller
75 ; Write the install path to the registry
76 WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
78 ; Write the uninstall keys for windows
79 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
80 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
81 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
82 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
84 WriteUninstaller "uninstall.exe"
88 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
89 DeleteRegKey HKLM "Software\AltusMetrum"
95 InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} "Altus Metrum"
96 InstDrv::DeleteOemInfFiles /NOUNLOAD
97 InstDrv::RemoveAllDevices
99 ; Remove shortcuts, if any
100 Delete "$SMPROGRAMS\AltusMetrum.lnk"
101 Delete "$DESKTOP\AltusMetrum.lnk"