Closed Bug 158033 Opened 23 years ago Closed 22 years ago

misc commandline args for unix install wizard (help and ignore-run-apps)

Categories

(SeaMonkey :: Installer, defect)

All
Linux
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ajschult784, Assigned: dveditz)

Details

Attachments

(1 file, 5 obsolete files)

The unix installer does not handle most of the commandline arguments that the windows installer does. This bug is for -h (help) and -ira (Ignore Run Apps). Both should be simple to implement and (if all goes well), I will attach a patch here soon. see also bug 157672 -- handle -ms (silent install)
Attached patch patch (obsolete) — Splinter Review
handle -h (help) and -ira (ignore run app sections) the patch bails if there is no help message in config.ini, which doesn't seem like a real good idea, but I couldn't find any fallback in the windows implementation either. the help message should be in the same format as the windows one... something like: UsageMsg Usage=Usage: %s [options]%s [options] can be any of the following combination:%s -h: This help.%s -ma: Run setup in Auto mode.%s -ms: Run setup in Silent mode.%s -ira : Ignore the [RunAppX] sections%s
Attached patch patch v1.1 (obsolete) — Splinter Review
windows doesn't have a fallback, but doesn't bail. now, if usage is missing from config.ini, the installer still installs ok. if "-h" is specified, it fails silently.
Attachment #91754 - Attachment is obsolete: true
QA Contact: bugzilla → ktrina
dveditz, can you review the patch here?
Keywords: patch, review
Comment on attachment 91905 [details] [diff] [review] patch v1.1 >+ int mIgnoreRunAppX; Later on you have essentially "Don't ignore RunApps". Could we reverse the sense and default true to avoid the double-negative? (The command-line -ira is OK for consistency with windows, just nitpicking variable names) >+#define USAGE "UsageMsg Usage" Just "UsageMsg" would work, right? Don't understand what the second instance of Usage gets you. By the way, where are the config.it changes with this message in it? > for (int argNum = 1; argNum < aArgc; ++argNum) > { >+ /* Print usage >+ */ >+ if (strcmp(aArgv[argNum], "-h") == 0) Let's add "|| strcmp(aArgv[argNum], "--help") == 0)" just to fit in with GNU standard practice. >+ if (gCtx->opt->mUsageMsg) >+ fprintf (stderr, gCtx->opt->mUsageMsg, aArgv[0], "\n", >+ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n"); Why all the separate newline args? I guess I'd need to see the actual message used here, but it's hard to imagine your purpose. >+ err = aParser->GetStringAlloc(GENERAL, USAGE, &usage, &size); >+ if (err == OK && size > 0) >+ { >+ gCtx->opt->mUsageMsg = usage; Where does this get freed?
Attachment #91905 - Flags: needs-work+
> Later on you have essentially "Don't ignore RunApps". Could we reverse the > sense and default true to avoid the double-negative? > Just "UsageMsg" would work, right? Don't understand what the second instance > of Usage gets you. consistency with Windows on both counts (although I agree 100%). Windows has gbIgnoreRunAppX and "UsageMsg Usage" > Why all the separate newline args? I guess I'd need to see the actual message > used here, but it's hard to imagine your purpose. Ya, I left out the config.ini changes. The message has "%s" where a newline is desired. The Windows wizard does the same. >>+ gCtx->opt->mUsageMsg = usage; > > Where does this get freed? the same place as the other gCtx->opt strings (mTitle, mDestination and mProxy*). Never-never land.
Attached patch patch v1.2 (obsolete) — Splinter Review
patch with dveditz's suggestions
Attachment #91905 - Attachment is obsolete: true
Adding myself to cc, my autoinstall script needs this. dveditz, have time for another review?
Comment on attachment 100688 [details] [diff] [review] patch v1.2 I'm sorry I didn't notice the new patch. Feel free to mail me reminders, I quite often miss things in teh deluge of bugzilla mail. r=dveditz If you get a review from Samir you can convert my r= to sr=
Attachment #100688 - Flags: review+
Attached patch patch v1.2a (obsolete) — Splinter Review
oops. diff against packager's config.it instead of wizard's sample config.ini
Attachment #100688 - Attachment is obsolete: true
Comment on attachment 103021 [details] [diff] [review] patch v1.2a carrying forward r=dveditz
Attachment #103021 - Flags: review+
Attachment #103021 - Flags: superreview?(sgehani)
Comment on attachment 103021 [details] [diff] [review] patch v1.2a I don't think we need to expose the usage message in the config.ini. The command line argument interpretation can only change if you recompile so usage should just be hardcoded. For localization purposes the strings (usage message) should come out of installer.ini. One other nit: use the ``TRUE'' and ``FALSE'' macro definitions instead of 0 and 1 for boolean values of mDoRunAppX. And while we are here maybe an apt name would be ``mShouldRunApps'' rather than the double-verbed ``mDoRunAppX.'' >+ mDoRunAppX(1), Also, I'm not sure I understand why this error is ``unknown'': we could just define a new error E_USAGE_DISPLAYED (or something more brief) which would be more descriptive.
Attachment #103021 - Flags: superreview?(sgehani)
Attachment #103021 - Flags: superreview?
Attachment #103021 - Flags: review-
Attachment #103021 - Flags: review+
Attached patch patch v1.3 (obsolete) — Splinter Review
usage message string ==> installer.ini uses mShouldRunApps and TRUE/FALSE E_UNKOWN ==> E_USAGE_SHOWN (?)
Attachment #103021 - Attachment is obsolete: true
Comment on attachment 106063 [details] [diff] [review] patch v1.3 Please explain what auto mode and silent mode mean: be explicit about the level of UI being shown. With that change, r=sgehani
Attachment #106063 - Flags: review+
Attachment #103021 - Flags: superreview?
Attached patch patch 1.3aSplinter Review
use more explicit descriptions for different UI levels
Attachment #106063 - Attachment is obsolete: true
Comment on attachment 108574 [details] [diff] [review] patch 1.3a carrying forward r=sgehani
Attachment #108574 - Flags: superreview?(dveditz)
Attachment #108574 - Flags: review+
ajschult@eos.ncsu.edu: you got a SR from dveditz with comment#8 . Do you need soneone for the checking ?
> Do you need soneone for the checking ? yes.
Comment on attachment 108574 [details] [diff] [review] patch 1.3a marking sr+ (see comment #8)
Attachment #108574 - Flags: superreview?(dveditz) → superreview+
Attachment #108574 - Flags: approval1.4b?
Comment on attachment 108574 [details] [diff] [review] patch 1.3a a=asa (on behalf of drivers) for checkin to 1.4b.
Attachment #108574 - Flags: approval1.4b? → approval1.4b+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
updated qa contact to gbush@netscape.com
QA Contact: ktrina → gbush
verified - mozilla build 2003042505 with one nit- running commercial installer with -h (for help) displays the help options twice (does not do that with mozilla installer) -ira option works
verified, opened bug 23772 for problem with commercial installer
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: