doc: Add telemetry docs to debian/linux/mac/windows packages
[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/telemetry.pdf"
96         File "../doc/telemetrum-outline.pdf"
97 SectionEnd
98
99 Section "Uninstaller"
100
101         ; Deal with the uninstaller
102         
103         SetOutPath $INSTDIR
104
105         ; Write the install path to the registry
106         WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
107         
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"
113
114         WriteUninstaller "uninstall.exe"
115 SectionEnd
116
117 Section "Uninstall"
118         DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
119         DeleteRegKey HKLM "Software\AltusMetrum"
120
121         Delete "$INSTDIR\*.*"
122         RMDir "$INSTDIR"
123
124         ; Remove devices
125         InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
126         InstDrv::DeleteOemInfFiles /NOUNLOAD
127         InstDrv::RemoveAllDevices
128
129         ; Remove shortcuts, if any
130         Delete "$SMPROGRAMS\AltusMetrum.lnk"
131         Delete "$DESKTOP\AltusMetrum.lnk"
132 SectionEnd