Help with using BfW for Mac OS X with command-line arguments
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
-
- Posts: 873
- Joined: July 4th, 2004, 9:14 pm
- Location: My imagination
- Contact:
Help with using BfW for Mac OS X with command-line arguments
Mac OS X 10.3.7
Battle for Wesnoth 0.8.10, Sithrandel's build
1) Start up Terminal
2) Enter this:
Wesnoth starts up as if it had been double-clicked.
Am I doing something wrong? Any command-line arguments I try to give it are ignored. Or is there something about the build that makes it impossible?
Battle for Wesnoth 0.8.10, Sithrandel's build
1) Start up Terminal
2) Enter this:
Code: Select all
cd ~/Applications/Battle\ for\ Wesnoth/Battle\ For\ Wesnoth.app/Contents/Resources
../MacOS/Battle\ For\ Wesnoth --help
Am I doing something wrong? Any command-line arguments I try to give it are ignored. Or is there something about the build that makes it impossible?
Play a Silver Mage in the Wesvoid campaign.
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
Yes there is something about the build which prevents this. The build itself is feeding Wesnoth command line parameters. so it will ignore the ones you type in. This is necessary to minimise the about of Mac specific source code in the general Wesnoth sources whilst at the same time maximising the Mac behaviour.
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
It certainly is possible. The question is the best way to do it effectively and easily for allDave wrote:Is there any possibility of allowing command line arguments to work on OSX?
Alot of valuable functionality for power users and developers is found in command line arguments.
David
I'll have a think and see if there is a nicer way than just allowing Invisible Philosoper's Way to work which would be the easiest way. The current code there was put in place @ version 4 when command line args were less important than getting a Mac version
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
OK... a simple typo is causing the lack of command line arguments falling through. Turns out I had been thinking I was passing them through
basically line 562 of the cocoa file, change
to
Strangely enough, having just set myArgc to zero before this had meant nothing was happening in the original loop
This change will be incorporated into my future builds.
How many plan to make use of these? Would it be worth building the option of command line input into the debug dialog box?
basically line 562 of the cocoa file, change
Code: Select all
for (tmp = 0; tmp<myArgc ;tmp++) myArgv[tmp] = gArgv[tmp];
Code: Select all
for (tmp = 0; tmp<gArgc ;tmp++) myArgv[tmp] = gArgv[tmp];
This change will be incorporated into my future builds.
How many plan to make use of these? Would it be worth building the option of command line input into the debug dialog box?
I will be using the --fps option at least onceSithrandel wrote:How many plan to make use of these? Would it be worth building the option of command line input into the debug dialog box?
For the other options... I don't even know what they are
since I couldn't get --help to work
[Edit: hit the wrong button...]
It would be very nice to be able to type options into the debug dialog,
if that's what you had in mind. (maybe with the --help output in some hidable area above)
Personally I have no problem with terminals, but I must admit,
the Mac way of doing things graphically is infesting my mind
But if the debug dialog is much trouble, I'm pleased with CLI working, too
cheers
defsy
P.S.: Thanks for the OSX builds! I'm just not sure if I should finally download 0.8.10 or wait a few days(?) for 0.8.11?
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
Code: Select all
-d, --debug Shows debugging information in-game
-f, --fullscreen Runs the game in full-screen
-h, --help Prints this message and exits
--path Prints the name of the game data directory and exits
-t, --test Runs the game in a small example scenario
-w, --windowed Runs the game in windowed mode
-v, --version Prints the game's version number and exits
--log-error="domain1,domain2,...", --log-warning=..., --log-info=...
Set the severity level of the debug domains
"all" can be used to match any debug domain
--nocache Disables caching of game data
-f / -w can be set in game.
-d is accessed by holding down Option / Alt when launching.
So what is missing is log-error, test and no cache
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
By the Debug Dialog Box, I just meant the dialog box which appears to tell you that the debug mode is on (i.e. you held down Option / Alt) at launch. It has been there for some time now.sanna wrote:I would most certainly use them, and I would love to have a debug dialog box.Sithrandel wrote: How many plan to make use of these? Would it be worth building the option of command line input into the debug dialog box?
I'll see how many other people might be interested before adding the CL option to that
Well, I do know that there is such a box, so to make my point very clear; I would love it if you added the CL option to that box.Sithrandel wrote: By the Debug Dialog Box, I just meant the dialog box which appears to tell you that the debug mode is on (i.e. you held down Option / Alt) at launch. It has been there for some time now.
I'll see how many other people might be interested before adding the CL option to that
I currently run the game with a commandline and would find it important that I could do something similar once I move over to a Mac. The heavy duty logging and saving the output to a file is really useful to pick up problems for any developer. As you point out, debug mode is simple to toggle on launch (and in-game with the :debug command) but the verbose logging is something I am not sure the current MacOS builds support.
Code: Select all
wesnoth --fps -d --log-error="all" --log-warning="all" --log-info="all" > /tmp/wesnoth.log.$$ 2>&1
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
With the bug fix mentioned above, yes it does.ott wrote:I currently run the game with a commandlineand would find it important that I could do something similar once I move over to a Mac. The heavy duty logging and saving the output to a file is really useful to pick up problems for any developer. As you point out, debug mode is simple to toggle on launch (and in-game with the :debug command) but the verbose logging is something I am not sure the current MacOS builds support.Code: Select all
wesnoth --fps -d --log-error="all" --log-warning="all" --log-info="all" > /tmp/wesnoth.log.$$ 2>&1
I am a great believer in making the app as Mac like as possible. There are, however, some things which are best done with a CLI and are not worth trying to implement in a GUI.
Once you start mentioning pipes, then the CLI is the best place for you to stay
A GUI based systems is useful for when there are those who are unfamiliar with CLIs, but who might benefit from some of the CLI switches.
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact: