altosui: Ship TeleMini v1.0 firmware with fat blobs
[fw/altos] / 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
35         InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
36         Pop $0
37         DetailPrint "InitDriverSetup: $0"
38         InstDrv::DeleteOemInfFiles /NOUNLOAD
39         InstDrv::CreateDevice /NOUNLOAD
40
41         SetOutPath $TEMP
42         File "../telemetrum.inf"
43         InstDrv::InstallDriver /NOUNLOAD "$TEMP\telemetrum.inf"
44
45         SetOutPath $INSTDIR
46         File "../telemetrum.inf"
47
48         SetOutPath $WINDIR\Inf
49         File "../telemetrum.inf"
50
51 SectionEnd
52
53 Section "AltosUI Application"
54         SetOutPath $INSTDIR
55
56         File "altosui-fat.jar"
57         File "cmudict04.jar"
58         File "cmulex.jar"
59         File "cmu_time_awb.jar"
60         File "cmutimelex.jar"
61         File "cmu_us_kal.jar"
62         File "en_us.jar"
63         File "freetts.jar"
64         File "jfreechart.jar"
65         File "jcommon.jar"
66
67         File "*.dll"
68
69         File "../icon/*.ico"
70
71         CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico"
72 SectionEnd
73
74 Section "AltosUI Desktop Shortcut"
75         CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar"  "" "$INSTDIR\altus-metrum.ico"
76 SectionEnd
77
78 Section "TeleMetrum and TeleDongle Firmware"
79
80         SetOutPath $INSTDIR
81
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"
86
87 SectionEnd
88
89 Section "Documentation"
90
91         SetOutPath $INSTDIR
92
93         File "../doc/altusmetrum.pdf"
94         File "../doc/altos.pdf"
95         File "../doc/telemetrum-outline.pdf"
96 SectionEnd
97
98 Section "Uninstaller"
99
100         ; Deal with the uninstaller
101         
102         SetOutPath $INSTDIR
103
104         ; Write the install path to the registry
105         WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
106         
107         ; Write the uninstall keys for windows
108         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
109         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
110         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
111         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
112
113         WriteUninstaller "uninstall.exe"
114 SectionEnd
115
116 Section "Uninstall"
117         DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
118         DeleteRegKey HKLM "Software\AltusMetrum"
119
120         Delete "$INSTDIR\*.*"
121         RMDir "$INSTDIR"
122
123         ; Remove devices
124         InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
125         InstDrv::DeleteOemInfFiles /NOUNLOAD
126         InstDrv::RemoveAllDevices
127
128         ; Remove shortcuts, if any
129         Delete "$SMPROGRAMS\AltusMetrum.lnk"
130         Delete "$DESKTOP\AltusMetrum.lnk"
131 SectionEnd