IbcAlpha / IBC

Automation of Interactive Brokers TWS. You can download the latest release here: https://github.com/ibcalpha/ibc/releases/latest
GNU General Public License v3.0
974 stars 174 forks source link

Installer for all 3 platforms. #229

Closed davidsanchez222 closed 8 months ago

davidsanchez222 commented 9 months ago

IBC is amazing and I've been getting great use out of it so far and would like to thank the contributors of this project.

However, installing on my macOS wasn't easy as I went through all the steps to start IBC like creating directories, editing config files and shell scripts. Maybe I'm a slow learner but it took a little while for me to get it up and running. I'd like to contribute by creating an installer for Windows, macOS, and Linux/Unix based systems. I know that most people using IBC already have somewhat of a technical background, but an easier installation process could possibly be of use.

Basically, the installer would be a wizard and it would do this for the user:

The only step for the user is to open up the config.ini file and input their username and password and the wizard will instruct them on how to do so.

Unrelated but on macOS when I ran the script: ./twsstart.sh, I had to add the "-inline" tag after it for IBC to run. I only see a mention of this flag in the user guide under Scheduled Tasks.

Thanks and I hope I can be of some help to this project.

rlktradewright commented 9 months ago

@davidsanchez222 Apologies, I completely forgot about responding to this.

Thanks for taking the time to make this suggestion. Perhaps after a bit more thought you've concluded that it may not be worth the effort?

I've considered the idea of producing some kind of installer many times over the past 20 years of developing, maintaining and suppoorting IBC and its predecessor IBController. Initial installation is pretty straightforward, and could easily be turned into an installer. The problems start when considering how to do updates.

As a simple case, suppose I introduce a new setting in config,ini and perhaps make some edits to improve the comments: then those same changes would have to be made to the existing config,ini, ensuring that all current settings are preserved. This is not particularly difficult, provided the user hasn't manually changed the locations of things. It would almost certainly be necessary to maintain some kind of install log that records what happened in previous installs, and that can be input into the next install process to provide context.

I dare say it's all do-able, but it's certainly non-trivial. Whenever I start thinking seriously about it, I conclude that I have better things to do with my time. And in reality it's actually very straightforward to set up IBC if you follow the instructions and use the suggested default locations: this is especially true on Windows, though admittedly less so on Linux and macOS, as you've found.

So my current feeling is that it would be better first to refine the procedure for Linux/macOS, and I have a number of ideas for doing this. Once that is more or less foolproof, one might consider again whether some automation might be helpful: for example the user might be asked whether they want to do 2FA via IBKR Mobile, and if they say yes then the relevant settings would be configured appropriately without the user having to plough through all the notes in config.ini and the script files.

Anyway, I certainly don't have much inclination, and less available time, to work on this at present. If you felt keen to try and tackle this, I certainly wouldn't want to put you off. But I'm perfectly happy just to let the subject go for now.

davidsanchez222 commented 8 months ago

Looking back at it, correct, I don't think its worth the effort. It was just the bug for the 10.19 version in the macOS script that made it difficult for me. I don't know much Java so I would have to learn that first to even get started. Also, most people using this already know enough about coding to where they can follow the instructions. If there is any need in the future to make an installer I would be open to helping out. I'll close the issue for now.