-
Notifications
You must be signed in to change notification settings - Fork 263
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
Command Line option to load campaign file on startup #1165
Comments
Okay, but still don't need a -l option. Any command line argument without an option is a file name to be processed. It's the same as every command line utility ever. 🙂 |
So your only issue is it should be no command vs -load? (I suppose it really should have been -f / -file which brings it more into line with other command lines) I can see if the Apache lib supports a no command arg. We already support about a dozen command line args using it and I'm not going to write special logic for this one case. |
It does. I commented on the PR and almost closed it, but decided it was your code, so your choice. But I wouldn't be the one to merge it. |
Sorry, that sounds kinda snarky. I just mean that I have a strong opinion on command line syntax and I don't like forcing people to do things a certain way when I have really strong opinions. (Even though I will advocate strongly in such cases. 🙂) |
I agree that use While I would like to see it support a standalone path/filename, as it should then also work with file association, I'm not invested in the idea really. |
@Phergus Oops, -f is already used for fullscreen @Azhrei I see no way in Apache command cli lib to specify no flag for Options. If you want to refactor it the whole CLI options for MT, go for it. I wanted something that saved me a few seconds per launch and this was a quick 2 minute code fix using existing approach. I don't have time to refactor the whole thing to "bring it inline with other CLI tools". Besides, MapTool is NOT a command line tool, this is a flag to pass an argument to a UI application, I doubt it's really going to bug people to add a single flag to invoke this. |
Update, the lib is case sensitive (like most CLI tools) so -F/-file IS an option and does not interfere with -f/-fullscreen. Thoughts? |
Actually, I put it in the PR comment. The current code creates a DefaultParser over and over, when it should create one just once. The I'd be happy to make the change, but I didn't want to step on your toes. Since you want this sooner instead of later, I'll work on it tonight and get the PR submitted. |
I only need in in my dev branch and not in a "live" release so go ahead. |
If you want to tackle the refactor, just merge and pull this associated PR and then submit a new one to "enhance" it to allow for no flag and refactor the parser. |
Sorry. Had to go make/eat dinner. Works for me. |
Tested under Win10:
|
Documented command line options on wiki. |
Is your feature request related to a problem? Please describe.
When MapTool starts, I would like the ability to supply a path to the Campaign and have MapTool automatically load it.
Describe the solution you'd like
Add a -load="" to CLI options
Describe alternatives you've considered
Currently I have to use UI interface. This slows down development when MapTool is launched via IDE, especially when done repeatedly and campaigns are in different locations.
Additional context
Having CLI option let's you set multiple IDE configs to different campaigns as well as script the launch of MapTool with campaigns using new test.functions to load multiple MapTool instances with specified campaigns.
The text was updated successfully, but these errors were encountered: