lack of SETUP #202

Closed
miniupnp opened this Issue Mar 30, 2013 · 11 comments

Comments

Projects
None yet
6 participants
@miniupnp
Contributor

miniupnp commented Mar 30, 2013

OpenDUNE currently lacks a replacement for the original SETUP.EXE tool, which edits the DUNE.CFG file.

This could be a separate executable, or just command line arguments added to the main opendune executable.

@TrueBrain

This comment has been minimized.

Show comment Hide comment
@TrueBrain

TrueBrain Mar 30, 2013

Member

On the long run, the idea was to replace the DUNE.CFG with an .ini file of some kind, to make it easier to change settings etc. DUNE.CFG isn't really flexible, doesn't allow adding new stuff etc etc. That is why we never made anything like this.

I don't mind either choice, just wanted to make you aware of the thought behind it ;) Either making a dune.ini or a setup.exe tool, both the same to me :) (or ofc, anything else smart someone can come up with :D)

Member

TrueBrain commented Mar 30, 2013

On the long run, the idea was to replace the DUNE.CFG with an .ini file of some kind, to make it easier to change settings etc. DUNE.CFG isn't really flexible, doesn't allow adding new stuff etc etc. That is why we never made anything like this.

I don't mind either choice, just wanted to make you aware of the thought behind it ;) Either making a dune.ini or a setup.exe tool, both the same to me :) (or ofc, anything else smart someone can come up with :D)

@EagleEyeSA

This comment has been minimized.

Show comment Hide comment
@EagleEyeSA

EagleEyeSA Mar 30, 2013

I would definitely love a dune.ini, and also for OpenDUNE to generate one with the default settings if one wasn't found.

I would definitely love a dune.ini, and also for OpenDUNE to generate one with the default settings if one wasn't found.

@ghost ghost assigned miniupnp Apr 2, 2013

@miniupnp

This comment has been minimized.

Show comment Hide comment
@miniupnp

miniupnp Apr 2, 2013

Contributor

See my branch dune_cfg : 4f7bec7
I have added generating of default config if dune.cfg is not found, and also a --set-lang command line argument.
I found that language is the only parameter used from the dune.cfg file.

Contributor

miniupnp commented Apr 2, 2013

See my branch dune_cfg : 4f7bec7
I have added generating of default config if dune.cfg is not found, and also a --set-lang command line argument.
I found that language is the only parameter used from the dune.cfg file.

@TrueBrain

This comment has been minimized.

Show comment Hide comment
@TrueBrain

TrueBrain Apr 2, 2013

Member

I personally don't see the use of command lines in games like this. It only complicates things. I also do understand it is the easiest solutions, but from what you have build it should be trivial to make a dune.ini, not?

Coding style wise, I would change:

0 == strcmp

to its more often used way of writing:

strcmp == 0

Easier to read, in my opinion; minor details :)

Member

TrueBrain commented Apr 2, 2013

I personally don't see the use of command lines in games like this. It only complicates things. I also do understand it is the easiest solutions, but from what you have build it should be trivial to make a dune.ini, not?

Coding style wise, I would change:

0 == strcmp

to its more often used way of writing:

strcmp == 0

Easier to read, in my opinion; minor details :)

@TrueBrain

This comment has been minimized.

Show comment Hide comment
@TrueBrain

TrueBrain Apr 2, 2013

Member

PS: shouldn't command line parsing be done by something like getopt, instead of a custom implementation?

Member

TrueBrain commented Apr 2, 2013

PS: shouldn't command line parsing be done by something like getopt, instead of a custom implementation?

@miniupnp

This comment has been minimized.

Show comment Hide comment
@miniupnp

miniupnp Apr 3, 2013

Contributor

I personally find 0 == strcmp(...) easier to read, but I understand you prefer the other way :)
About getopt, I was concerned about portability (windows) but that should be easy to change.

Contributor

miniupnp commented Apr 3, 2013

I personally find 0 == strcmp(...) easier to read, but I understand you prefer the other way :)
About getopt, I was concerned about portability (windows) but that should be easy to change.

@rofl0r

This comment has been minimized.

Show comment Hide comment
@rofl0r

rofl0r Apr 3, 2013

Contributor

getopt is indeed a bitch, the gnu one behaves a lot different to what posix dictates

Contributor

rofl0r commented Apr 3, 2013

getopt is indeed a bitch, the gnu one behaves a lot different to what posix dictates

@wangds

This comment has been minimized.

Show comment Hide comment
@wangds

wangds Apr 4, 2013

Contributor

I'm in favour of a dune.ini. Dune already comes with a (somewhat faulty) INI reader.
Command lines arguments don't work well on Windows.

Contributor

wangds commented Apr 4, 2013

I'm in favour of a dune.ini. Dune already comes with a (somewhat faulty) INI reader.
Command lines arguments don't work well on Windows.

@Xaroth

This comment has been minimized.

Show comment Hide comment
@Xaroth

Xaroth Apr 5, 2013

Member

I've already made a half attempt at a config reader/writer for dune, so that we have a way of converting people's cfg files to ini format (and if needed, the other way around).
As said before, I too am in favour of a .ini sooner or later

Member

Xaroth commented Apr 5, 2013

I've already made a half attempt at a config reader/writer for dune, so that we have a way of converting people's cfg files to ini format (and if needed, the other way around).
As said before, I too am in favour of a .ini sooner or later

@TrueBrain

This comment has been minimized.

Show comment Hide comment
@TrueBrain

TrueBrain Apr 17, 2013

Member

Okay, so the general consensus seems to be that we need a dune.ini. I am pushing towards a release, so I would like to ask you if you can split your patch so that we can at least commit the part where you write a dune.cfg with the default config if it is missing? Then at least we temporary fix that problem in a solid way, and we can work after that on a dune.ini.

Parameters indeed would be very annoying for our Windows and OSX users, so that might be sub-optimal.

Member

TrueBrain commented Apr 17, 2013

Okay, so the general consensus seems to be that we need a dune.ini. I am pushing towards a release, so I would like to ask you if you can split your patch so that we can at least commit the part where you write a dune.cfg with the default config if it is missing? Then at least we temporary fix that problem in a solid way, and we can work after that on a dune.ini.

Parameters indeed would be very annoying for our Windows and OSX users, so that might be sub-optimal.

@miniupnp

This comment has been minimized.

Show comment Hide comment
@miniupnp

miniupnp Sep 26, 2015

Contributor

I'm adding support for an opendune.ini file, so the dune.cfg is not an issue anymore.

Contributor

miniupnp commented Sep 26, 2015

I'm adding support for an opendune.ini file, so the dune.cfg is not an issue anymore.

@miniupnp miniupnp closed this Sep 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment