forked from lballabio/quantlib-old
-
Notifications
You must be signed in to change notification settings - Fork 1
/
QuantLibXL-bin.nsi
149 lines (103 loc) · 4.58 KB
/
QuantLibXL-bin.nsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
; QuantLibXL binary distribution
; Use this script to create an installer with just the QuantLibXL binary
; and some additional stuff
; Constants
!define APP "QuantLibXL"
!define VER_NUMBER "1.7.0"
!define VER_NUMBER_UNDERSCORE "1_7_0"
!define COMPILER "vc90"
# Compiler Flags
SetCompressor lzma
; General Attributes
Caption "${APP} - Setup"
DirText "Please select a location to install ${APP} (or use the default):"
Icon "Docs\images\favicon.ico"
InstallDir $PROGRAMFILES\${APP}-${VER_NUMBER}
LicenseData "LICENSE.TXT"
LicenseText "${APP} is released under the following license:"
Name "${APP}"
OutFile "..\${APP}-bin-${VER_NUMBER}.exe"
UninstallIcon "Docs\images\favicon.ico"
UninstallText "This will uninstall ${APP}. Hit next to continue."
ComponentText \
"By default the installer will install the QuantLibXL Addin (XLL) and basic example workbooks." \
"Optional components:" \
"The QuantLibXL Framework is a business application layer written in Excel VBA, \
including template workbooks for market data and interest rate derivates."
# Installer Instructions
Section
SetOutPath "$INSTDIR"
File "Authors.txt"
File "Contributors.txt"
File "LICENSE.TXT"
File "NEWS.txt"
File "README.txt"
SetOutPath "$INSTDIR\Docs"
File "Docs\QuantLibXL-docs-${VER_NUMBER}.chm"
SetOutPath "$INSTDIR\xll"
#File "xll\QuantLibXLDynamic-${COMPILER}-mt-${VER_NUMBER_UNDERSCORE}.xll"
#File "..\ObjectHandler\xll\ObjectHandler-xll-${COMPILER}-mt-${VER_NUMBER_UNDERSCORE}.xll"
File "xll\QuantLibXL-${COMPILER}-mt-s-${VER_NUMBER_UNDERSCORE}.xll"
SetOutPath "$INSTDIR\Workbooks\DateCalendarsDayCounters"
File "Workbooks\DateCalendarsDayCounters\*.xls"
SetOutPath "$INSTDIR\Workbooks\Math"
File "Workbooks\Math\*.xls"
SetOutPath "$INSTDIR\Workbooks\StandaloneExamples"
File /r "Workbooks\StandaloneExamples\*.xls"
SetOutPath "$INSTDIR\Workbooks\Utilities"
File "Workbooks\Utilities\*.xls"
WriteRegStr HKEY_LOCAL_MACHINE \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP}-bin-${VER_NUMBER}" \
"DisplayName" "${APP}-bin ${VER_NUMBER} (remove only)"
WriteRegStr HKEY_LOCAL_MACHINE \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP}-bin-${VER_NUMBER}" \
"UninstallString" '"$INSTDIR\QuantLibXLUninstall.exe"'
CreateDirectory "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}"
CreateShortCut "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\Uninstall QuantLibXL.lnk" \
"$INSTDIR\QuantLibXLUninstall.exe" "" \
"$INSTDIR\QuantLibXLUninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\README.txt.lnk" \
"$INSTDIR\README.txt"
CreateShortCut "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\LICENSE.txt.lnk" \
"$INSTDIR\LICENSE.txt"
CreateShortCut "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\QuantLibXL Directory.lnk" \
"$INSTDIR"
CreateShortCut "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\Example workbooks.lnk" \
"$INSTDIR\Workbooks"
CreateShortCut "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\Documentation (WinHelp).lnk" \
"$INSTDIR\Docs\QuantLibXL-docs-${VER_NUMBER}.chm"
WriteINIStr "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\QuantLib Home Page.url" \
"InternetShortcut" "URL" "http://www.quantlib.org/"
WriteINIStr "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}\QuantLibXL Home Page.url" \
"InternetShortcut" "URL" "http://www.quantlibxl.org/"
WriteUninstaller "QuantLibXLUninstall.exe"
SectionEnd
Section /o Framework
SetOutPath "$INSTDIR\framework"
File "framework\QuantLibXL.xla"
File "framework\QuantLibXLA.cer"
File "framework\ReadMe.txt"
File /r "framework\*.txt"
File /r "framework\*.xla"
File /r "framework\*.xlam"
File /r "framework\*.xls"
File /r "framework\*.xml"
SetOutPath "$INSTDIR\Workbooks"
File /r "Workbooks\*.xls"
SetOutPath "$INSTDIR\Data"
File /r "Data\*.xls"
#File /r "Data\*.xml"
SetOutPath "$INSTDIR\metadata"
File /r "..\QuantLibAddin\gensrc\metadata\*.xml"
# ObjectBuilder crashes if it can't find the icon
SetOutPath "$INSTDIR\Docs\images"
File "Docs\images\favicon.bmp"
CreateShortCut "$SMPROGRAMS\QuantLibXL-${VER_NUMBER}\QuantLibXL.xla.lnk" \
"$INSTDIR\framework\QuantLibXL.xla"
SectionEnd
Section "Uninstall"
RMDir /r "$INSTDIR"
RMDir /r "$SMPROGRAMS\${APP}-bin-${VER_NUMBER}"
DeleteRegKey HKEY_LOCAL_MACHINE \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP}-bin-${VER_NUMBER}"
SectionEnd