]> git.gag.com Git - fw/altos/blob - ao-tools/altosui/altos-windows.nsi
Merge remote branch 'aj/sitemap' into buttonbox
[fw/altos] / ao-tools / altosui / altos-windows.nsi
1 !addplugindir Instdrv/NSIS/Plugins
2
3 Name "Altus Metrum Installer"
4
5 ; Default install directory
6 InstallDir "$PROGRAMFILES\AltusMetrum"
7
8 ; Tell the installer where to re-install a new version
9 InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir"
10
11 LicenseText "GNU General Public License Version 2"
12 LicenseData "../../COPYING"
13
14 ; Need admin privs for Vista or Win7
15 RequestExecutionLevel admin
16
17 ShowInstDetails Show
18
19 ComponentText "Altus Metrum Software and Driver Installer"
20
21 ; Pages to present
22
23 Page license
24 Page components
25 Page directory
26 Page instfiles
27
28 UninstPage uninstConfirm
29 UninstPage instfiles
30
31 ; And the stuff to install
32
33 Section "Install Driver" InstDriver
34         InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} "Altus Metrum"
35         Pop $0
36         DetailPrint "InitDriverSetup: $0"
37
38         InstDrv::DeleteOemInfFiles /NOUNLOAD
39         InstDrv::CreateDevice /NOUNLOAD
40         SetOutPath $TEMP
41         File "../../telemetrum.inf"
42         InstDrv::InstallDriver /NOUNLOAD "$TEMP\telemetrum.inf"
43
44         SetOutPath $INSTDIR
45         File "../../telemetrum.inf"
46 SectionEnd
47
48 Section "AltosUI Application"
49         SetOutPath $INSTDIR
50
51         File "altosui-fat.jar"
52         File "cmudict04.jar"
53         File "cmulex.jar"
54         File "cmu_time_awb.jar"
55         File "cmutimelex.jar"
56         File "cmu_us_kal.jar"
57         File "en_us.jar"
58         File "freetts.jar"
59
60         File "*.dll"
61
62         File "../../icon/*.ico"
63
64         CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico"
65 SectionEnd
66
67 Section "AltosUI Desktop Shortcut"
68         CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar"  "" "$INSTDIR\altus-metrum.ico"
69 SectionEnd
70
71 Section "TeleMetrum and TeleDongle Firmware"
72
73         SetOutPath $INSTDIR
74
75         File "../../src/telemetrum-v1.0/telemetrum-v1.0-${VERSION}.ihx"
76         File "../../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx"
77
78 SectionEnd
79
80 Section "Uninstaller"
81
82         ; Deal with the uninstaller
83         
84         SetOutPath $INSTDIR
85
86         ; Write the install path to the registry
87         WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
88         
89         ; Write the uninstall keys for windows
90         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
91         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
92         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
93         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
94
95         WriteUninstaller "uninstall.exe"
96 SectionEnd
97
98 Section "Uninstall"
99         DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
100         DeleteRegKey HKLM "Software\AltusMetrum"
101
102         Delete "$INSTDIR\*.*"
103         RMDir "$INSTDIR"
104
105         ; Remove devices
106         InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} "Altus Metrum"
107         InstDrv::DeleteOemInfFiles /NOUNLOAD
108         InstDrv::RemoveAllDevices
109
110         ; Remove shortcuts, if any
111         Delete "$SMPROGRAMS\AltusMetrum.lnk"
112         Delete "$DESKTOP\AltusMetrum.lnk"
113 SectionEnd