Closed qzi closed 3 years ago
Ok, first there is a new version of the ibcstart.sh
script here:
https://github.com/IbcAlpha/IBC/blob/master/resources/scripts/ibcstart.sh
I haven't made a new release since then so just download that into your /opt/ibc/scripts folder. It should fix the 'does not exist' error.
I don't understand the "bad substitution" error message. Have you changed the script in some way? In particular I can't see how this can be output after the "Error: does not exist" message. And I can't see what can be wrong with it, unless ${mode^^}
is not valid in macOS bash (but if that were the case, I'd expect others to be complaining about this).
Also in future it would be helpful if you just attach the complete logfile (sanitized for username and password etc) rather than quote the bits you think are interesting: that would make it much easier for me to see what's going on.
I have fixed another bug in OSX, please review it.
Your fix is not valid, as has been mentioned more than once before in #59.
${tws_settings_path}
can be set to anything the user wants, in the top level scripts, and then the .vmoptions files would not be found.
Use the update file I referred to in my previous response.
Your fix is not valid, as has been mentioned more than once before in #59.
${tws_settings_path}
can be set to anything the user wants, in the top level scripts, and then the .vmoptions files would not be found.Use the update file I referred to in my previous response.
I checked this file several hours ago, not useful, so I start to fix it. have you checked it in OSX
As I've pointed out many times before, I don't have access to a Mac, so I'm dependent on other people testing the macOS scripts for me. That's why I don't immediately do a new release when I change these scripts.
Saying you checked the updated file and that it's 'not useful', is itself not useful!. I need to know why it's failing.
By all means give me a valid fix, but also explain why the current latest file doesn't work: also as I said before, please attach (not quote) the full logfile.
Perhaps I should add that the .vmoptions files on macOS are installed (by the IB installer) in a silly place, in ~/Applications/Jts (see the screenshot in #59, and let me know if things are different on your system). This happens to be also the folder where TWS/Gateway store their settings by default, which is why your 'fix' works for you. But the .vmoptions files are not part of the TWS/Gateway settings, they're installation files, and they always stay put.
But if the user wants to store their TWS/Gateway settings elsewhere (which they can do by changing TWS_SETTINGS_PATH
in twsstartmacos.sh
or gatewaystartmacos.sh
or by setting IbDir
in config.ini), then ${tws_settings_path}
will no longer point to ~/Applications/Jts, so the .vmoptions file won't be found, and that's why your 'fix' isn't generally appropriate.
[On Windows and Linux the .vmoptions files are put in the same folder structure as the application binaries, and that folder structure's path is derived from the TWS_PATH
variable in ibcstart.sh
and StartIBC.bat
: hence changing the TWS settings path doesn't affect finding the .vmoptions file. Why IB did something different for macOS is beyond me...]
setting may be not corrected
TWS_MAJOR_VRSN=972 IBC_INI=~/ibc/config.ini TRADING_MODE='paper' IBC_PATH=/opt/ibc TWS_PATH=/Users/**/Applications TWS_SETTINGS_PATH=/Users/**/Jts LOG_PATH=~/ibc/logs TWSUSERID=** TWSPASSWORD=** FIXUSERID=** FIXPASSWORD=** JAVA_PATH=/usr/bin/java
`
=========================== An error has occurred =============================
Error: does not exist /opt/ibc/scripts/ibcstart.sh: line 157: ${mode^^}: bad substitution
================================================================================
Starting IBC version 3.8.2 on 2020-02-21 at 06:33:41
Operating system: Darwin MacBook-Pro.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
Arguments:
TWS version = 972 Entry point = ibcalpha.ibc.IbcGateway --tws-path = /Users//Applications --tws-settings-path = /Users//Jts --ibc-path = /opt/ibc --ibc-ini = /Users//ibc/config.ini --mode = paper --java-path = /usr/bin/java --user = ** --pw = --fix-user = --fix-pw =
=========================== An error has occurred =============================
Error: does not exist
`