Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presumable BUG #131

Open
cjroca opened this issue Aug 10, 2021 · 1 comment
Open

Presumable BUG #131

cjroca opened this issue Aug 10, 2021 · 1 comment

Comments

@cjroca
Copy link

cjroca commented Aug 10, 2021

HI,

MAC OSX BIgSur, no matter actual version.
IBC version 3.8.7

I have installed offline TWS version 985 on custom folder
/User/USERNAME/Applications/Trader_Workstation_985
instead of default folder /User/USERNAME/Applications/Trader Workstation 985

I've made setup configurations in twsstartmacos.sh file as follows:
TWS_PATH=/Users/USERNAME/Applications/Trader_Workstation_985

But when running twsstartmacos.sh script, I've got error that shows:
"Offline TWS/Gateway version 985 is not installed"

Since I work with unix/linux servers for the last 30 years...I could find the issue in your script.
Filew ibcstart.sh
line 259
tws_jars="${tws_path}/Trader Workstation ${tws_version}/jars"

There is the assumption that TWS has been installed on default folder, but not always would be that way, for example...in my case.....
Code line 259 would be
tws_jars="${tws_path}/Trader_Workstation_${tws_version}/jars"

I found several of those assumption.
I believe that value should be taken from TWS_PATH in twsstartmacos.sh file.

I have uninstalled TWS and installed back again on default folder and now it's working good.
That's all.
Thank you for your work, I will help me a lot, and I hope my findings would help you as well.
Best regards.

@rlktradewright
Copy link
Member

@cjroca thanks for that.

The reason the scripts make assumptions about the location is that until v980 the user had no control over where to install. On Windows, for example, it would install to the Jts folder on the system drive (so typically C:\Jts). The user could actually then copy the installation to a different folder (for example C\Trading\TWS) and change the TWS_PATH setting in the script and all would be well, as long as the folder structure below that base folder was preserved.

And although I've installed several of the versions from 980 onwards, I never actually noticed this change - or rather, I presumably noticed but didn't follow through to see what the implications of using a non-default location would be.

The default location works well because it means that the user only has to specify the major version number to enable the scripts to locate and run TWS or Gateway (regardless of which is actually installed, since the .jar files are identical for both). So it makes things really simple for the many users who are not comfortable editing scripts and so on.

Modifying the Windows and Linux scripts to allow the user to specify a non-default location not as straightforward as it is for macOS. This is because the default folder structure includes a version number folder to store the .jar files, and also a rather silly subfolder structure to hold the Gateway files, whereas a custom location need not have this, so the folder structure may no longer be the same. Therefore the script will first have to do what it currently does (in case it is a default folder structure) and if it can't find the version folder, then try looking for the jars folder immediately below the base folder.

This is not a major change, but it will involve additional explanation in the User Guide and in the comments in the top-level scripts, which is a shame because it will spoil the simplicity of the current approach.

I'm not sure when I'll get around to doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants