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