View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002730 | FSSCP | launcher | public | 2012-11-18 16:30 | 2012-12-04 05:04 |
Reporter | FUBAR-BDHR | Assigned To | CommanderDJ | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
OS | Windows | OS Version | XP/7 | ||
Product Version | 3.6.15 | ||||
Fixed in Version | 3.6.15 | ||||
Summary | 0002730: Unrecognized command line paramater issues | ||||
Description | The changing of launcher flags such as -spec, -glow, -normal, etc is causing multiple warnings every time the launcher or game is run for anyone that had these flags enabled. While removing them is easy for us modders for the end user the only ways are to either edit files that have a big # DO NOT EDIT THIS FILE waring at the top or select and old exe that still has the flags, uncheck them, and then reselect the new exe. There needs to be a more elegant way of handling this. I would suggest adding a depreciated flags section. It's already possible to have flags that don't appear in the launcher. This section would contain old flags such as this and just ignore them when present. This would also have the added benefit of allowing previous versions of the game to be run and still have these flags enabled. | ||||
Steps To Reproduce | Select any version of FS2_Open (3.6.12 for instance) that has these flags in the launcher and enable them. Apply and hit OK to close the launcher. Run the launcher again and select a recent trunk build. | ||||
Tags | No tags attached. | ||||
|
2730.patch (2,184 bytes)
Index: code/cmdline/cmdline.cpp =================================================================== --- code/cmdline/cmdline.cpp (revision 9380) +++ code/cmdline/cmdline.cpp (working copy) @@ -445,7 +445,16 @@ cmdline_parm output_sexp_arg("-output_sexps", NULL); //WMC - outputs all SEXPs to sexps.html cmdline_parm output_scripting_arg("-output_scripting", NULL); //WMC +// Deprecated flags - CommanderDJ +cmdline_parm deprecated_spec_arg("-spec", NULL); +cmdline_parm deprecated_glow_arg("-glow", NULL); +cmdline_parm deprecated_normal_arg("-normal", NULL); +cmdline_parm deprecated_env_arg("-env", NULL); +int Cmdline_deprecated_spec = 0; +int Cmdline_deprecated_glow = 0; +int Cmdline_deprecated_normal = 0; +int Cmdline_deprecated_env = 0; #ifndef NDEBUG // NOTE: this assumes that os_init() has already been called but isn't a fatal error if it hasn't @@ -453,7 +462,6 @@ { cmdline_parm *parmp; int found = 0; - mprintf(("Passed cmdline options:")); for (parmp = GET_FIRST(&Parm_list); parmp !=END_OF_LIST(&Parm_list); parmp = GET_NEXT(parmp) ) { @@ -471,6 +479,27 @@ mprintf(("\n <none>")); mprintf(("\n")); + + //Print log messages about any deprecated flags we found - CommanderDJ + if(Cmdline_deprecated_spec == 1) + { + mprintf(("Deprecated flag '-spec' found. Please remove from your cmdline.\n")); + } + + if(Cmdline_deprecated_glow == 1) + { + mprintf(("Deprecated flag '-glow' found. Please remove from your cmdline.\n")); + } + + if(Cmdline_deprecated_normal == 1) + { + mprintf(("Deprecated flag '-normal' found. Please remove from your cmdline.\n")); + } + + if(Cmdline_deprecated_env == 1) + { + mprintf(("Deprecated flag '-env' found. Please remove from your cmdline.\n")); + } } #endif @@ -1476,6 +1505,27 @@ Cmdline_reparse_mainhall = 1; } + //Deprecated flags - CommanderDJ + if( deprecated_spec_arg.found() ) + { + Cmdline_deprecated_spec = 1; + } + + if( deprecated_glow_arg.found() ) + { + Cmdline_deprecated_glow = 1; + } + + if( deprecated_normal_arg.found() ) + { + Cmdline_deprecated_normal = 1; + } + + if( deprecated_env_arg.found() ) + { + Cmdline_deprecated_env = 1; + } + return true; } |
|
Patch attached. If no issues are found, could someone please commit this? Thanks. |
|
Probably want to add -TBP and the other older depreciated flags for other TC's (can't remember what they are right now) to that list. |
|
The patch is good as far as it goes, but what this really needs is a way to quickly specify whether a given flag is deprecated. I'll need to coordinate with JG18 on something. |
|
-wcsaga was one, couldn't find any others in a quick look through revisions [1-5]000 |
|
well I went back to the TBP release 3.6.9 version. -wcsaga was the only other one besides -tbp. I also found -jpgtga and -2d_poof |
|
Um, why was this taken from me? I looked at the bug, worked on it and uploaded the patch. If the patch is unsatisfactory, why not offer suggestions for improvement so that I can do better (and learn more!) rather than just handing it over to someone else? |
|
The patch is by no means unsatisfactory; I said in my comment above that the patch is good. There is a larger issue of future-proofing the command line flags that is needed, but that doesn't negate the usefulness of the patch. I assigned the bug to myself because I need to look into the way the Launcher obtains the parameters from the FSO EXE, and assigning it to myself will ensure it stays on my to-do list. I'm not trying to steal credit for your patch. (I am a stickler for making sure the right person gets credit for his contributions; take a look at recently closed bugs such as 0002596 and 0002712.) |
|
Alright then. I'd still like to help in any way I can, so if there's anything I can contribute to helping this get future-proofed, let me know. |
|
Will do. I hope to be able to provide a status update this weekend. |
|
JG18 isn't going to be available until after this semester. This means the future proofing is going to be delayed. >:( CommanderDJ, the future proofing involves modifying the Launcher struct so that the launcher itself can tell that a flag has been deprecated. It would still allow the flag to be used, but not display it on the interface or whatever other custom deprecation handling is appropriate. Now even though the launcher part needs JG18 to be available, the FSO part can be done immediately. I'd love to have your help with it, but you bowed out of the communications menu redesign because you were short on time. This will be a similar modification of structs, albeit simpler than the communications menu. If you can make time to work on this, I'll be happy to coach you, but I'd need you to be able to follow through on it. Regardless, I went ahead and committed your patch to fix the immediate problem. If you want to work on the future-proofing, we can open a new ticket for it; either way, you can resolve this ticket at your discretion. |
|
Thanks, Goober; marking as fixed. Sure, I'd like to work on helping future-proof this. I'm on holidays for a couple months now, so I'll be much more available. Hit me up with a PM or open a ticket for it and we can go from there. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-18 16:30 | FUBAR-BDHR | New Issue | |
2012-11-28 08:38 | CommanderDJ | Assigned To | => CommanderDJ |
2012-11-28 08:38 | CommanderDJ | Status | new => assigned |
2012-11-28 13:48 | CommanderDJ | File Added: 2730.patch | |
2012-11-28 13:49 | CommanderDJ | Note Added: 0014210 | |
2012-11-28 13:49 | CommanderDJ | Status | assigned => code review |
2012-11-28 16:07 | FUBAR-BDHR | Note Added: 0014211 | |
2012-11-28 16:40 | Goober5000 | Note Added: 0014213 | |
2012-11-28 16:40 | Goober5000 | Assigned To | CommanderDJ => Goober5000 |
2012-11-28 16:40 | Goober5000 | Status | code review => assigned |
2012-11-28 21:02 | niffiwan | Note Added: 0014219 | |
2012-11-28 21:25 | FUBAR-BDHR | Note Added: 0014221 | |
2012-11-29 02:10 | CommanderDJ | Note Added: 0014223 | |
2012-11-29 06:52 | Goober5000 | Note Added: 0014225 | |
2012-11-29 10:03 | CommanderDJ | Note Added: 0014226 | |
2012-11-30 05:35 | Goober5000 | Note Added: 0014234 | |
2012-12-04 04:51 | Goober5000 | Note Added: 0014282 | |
2012-12-04 04:51 | Goober5000 | Assigned To | Goober5000 => CommanderDJ |
2012-12-04 04:51 | Goober5000 | Status | assigned => code review |
2012-12-04 05:04 | CommanderDJ | Note Added: 0014283 | |
2012-12-04 05:04 | CommanderDJ | Status | code review => resolved |
2012-12-04 05:04 | CommanderDJ | Fixed in Version | => 3.6.15 |
2012-12-04 05:04 | CommanderDJ | Resolution | open => fixed |