stop doing automatic tag push during builds
[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/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx"
85
86 SectionEnd
87
88 Section "Documentation"
89
90         SetOutPath $INSTDIR
91
92         File "../doc/altusmetrum.pdf"
93         File "../doc/altos.pdf"
94         File "../doc/telemetrum-outline.pdf"
95 SectionEnd
96
97 Section "Uninstaller"
98
99         ; Deal with the uninstaller
100         
101         SetOutPath $INSTDIR
102
103         ; Write the install path to the registry
104         WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR"
105         
106         ; Write the uninstall keys for windows
107         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum"
108         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"'
109         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1"
110         WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1"
111
112         WriteUninstaller "uninstall.exe"
113 SectionEnd
114
115 Section "Uninstall"
116         DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum"
117         DeleteRegKey HKLM "Software\AltusMetrum"
118
119         Delete "$INSTDIR\*.*"
120         RMDir "$INSTDIR"
121
122         ; Remove devices
123         InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
124         InstDrv::DeleteOemInfFiles /NOUNLOAD
125         InstDrv::RemoveAllDevices
126
127         ; Remove shortcuts, if any
128         Delete "$SMPROGRAMS\AltusMetrum.lnk"
129         Delete "$DESKTOP\AltusMetrum.lnk"
130 SectionEnd