-
Notifications
You must be signed in to change notification settings - Fork 37
/
_servers.nsh
84 lines (51 loc) · 2.71 KB
/
_servers.nsh
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
Section "TradeLink c++"
; Set output path to the installation directory.
DetailPrint "Installing version ${VERSION}..."
SectionIn RO
SetOutPath $INSTDIR
CreateDirectory "$SMPROGRAMS\TradeLink Connectors"
; files included in install
File "BrokerServers\release\TradeLibFast.dll"
File "Install\vcredist_x86.20110514.exe"
DetailPrint "Checking for VCRedistributable..."
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TradeLinkSuite" "InstalledVcRedist"
StrCmp $0 "Yes" finishvcredist
DetailPrint "Installing vcredistributable..."
ExecWait '"vcredist_x86.20110514.exe" /q:a /c:\"VCREDI~3.EXE /q:a /c:\"\"msiexec /i vcredist.msi /qn\"\" \"' $0
DetailPrint "VCRedistributable installed. Result:$0"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TradeLinkSuite" "InstalledVcRedist" "Yes"
finishvcredist:
DetailPrint "VCRedistributable was installed."
; write path for TradeLibFast.dll
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\TradeLibFast.dll" "Path" "$INSTDIR\"
SectionEnd
Section "Lightspeed Connector"
CreateDirectory "$PROGRAMFILES\Lightspeed"
File "/oname=$PROGRAMFILES\Lightspeed\LightspeedServer.Config.txt" "BrokerServers\Lightspeedserver\LightspeedServer.Config.txt"
File "/oname=$PROGRAMFILES\Lightspeed\LightspeedServer.dll" "BrokerServers\release\LightspeedServer.dll"
File "/oname=$PROGRAMFILES\Lightspeed\TradeLibFast.dll" "BrokerServers\release\TradeLibFast.dll"
SectionEnd
Section "InteractiveBrokers Connector"
File "BrokerServers\release\TWSServer.exe"
File "BrokerServers\TWSServer\TwsSocketClient.dll"
File "BrokerServers\release\TwsServer.Config.txt"
CreateShortCut "$SMPROGRAMS\TradeLink Connectors\InteractiveBrokers.lnk" "$INSTDIR\TWSServer.exe" "" "$INSTDIR\TWSServer.exe" 0
SectionEnd
Section "Genesis Connector"
File "BrokerServers\release\ServerGenesis.exe"
File "BrokerServers\release\GTAPI.dll"
File "BrokerServers\ServerGenesis\GenesisServer.Config.txt"
File "BrokerServers\ServerGenesis\GenesisServer.Login.txt"
CreateShortCut "$SMPROGRAMS\TradeLink Connectors\Genesis.lnk" "$INSTDIR\ServerGenesis.EXE" "" "$INSTDIR\ServerGenesis.EXE" 0
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS_TLBrokerServer"
DeleteRegKey HKLM SOFTWARE\NSIS_TLBrokerServer
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\TradeLibFast.dll"
; Remove directories used
RMDir "$INSTDIR\${ANVILDIRNAME}"
RMDir "$INSTDIR"
SectionEnd