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)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: ajschult784, Assigned: dveditz)
Details
Attachments
(1 file, 5 obsolete files)
|
5.36 KB,
patch
|
ajschult784
:
review+
Matti
:
superreview+
asa
:
approval1.4b+
|
Details | Diff | Splinter Review |
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)
| Reporter | ||
Comment 1•23 years ago
|
||
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
| Reporter | ||
Comment 2•23 years ago
|
||
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
Updated•23 years ago
|
QA Contact: bugzilla → ktrina
| Reporter | ||
Comment 3•23 years ago
|
||
dveditz, can you review the patch here?
| Assignee | ||
Comment 4•23 years ago
|
||
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+
| Reporter | ||
Comment 5•23 years ago
|
||
> 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.
| Reporter | ||
Comment 6•23 years ago
|
||
patch with dveditz's suggestions
Attachment #91905 -
Attachment is obsolete: true
Comment 7•23 years ago
|
||
Adding myself to cc, my autoinstall script needs this. dveditz, have time for
another review?
| Assignee | ||
Comment 8•23 years ago
|
||
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+
| Reporter | ||
Comment 9•23 years ago
|
||
oops. diff against packager's config.it instead of wizard's sample config.ini
Attachment #100688 -
Attachment is obsolete: true
| Reporter | ||
Comment 10•23 years ago
|
||
Comment on attachment 103021 [details] [diff] [review]
patch v1.2a
carrying forward r=dveditz
Attachment #103021 -
Flags: review+
| Reporter | ||
Updated•23 years ago
|
Attachment #103021 -
Flags: superreview?(sgehani)
Comment 11•23 years ago
|
||
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+
| Reporter | ||
Comment 12•23 years ago
|
||
usage message string ==> installer.ini
uses mShouldRunApps and TRUE/FALSE
E_UNKOWN ==> E_USAGE_SHOWN (?)
| Reporter | ||
Updated•23 years ago
|
Attachment #103021 -
Attachment is obsolete: true
Comment 13•23 years ago
|
||
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+
Updated•23 years ago
|
Attachment #103021 -
Flags: superreview?
| Reporter | ||
Comment 14•23 years ago
|
||
use more explicit descriptions for different UI levels
Attachment #106063 -
Attachment is obsolete: true
| Reporter | ||
Comment 15•23 years ago
|
||
Comment on attachment 108574 [details] [diff] [review]
patch 1.3a
carrying forward r=sgehani
Attachment #108574 -
Flags: superreview?(dveditz)
Attachment #108574 -
Flags: review+
Comment 16•22 years ago
|
||
ajschult@eos.ncsu.edu: you got a SR from dveditz with comment#8 .
Do you need soneone for the checking ?
| Reporter | ||
Comment 17•22 years ago
|
||
> Do you need soneone for the checking ?
yes.
Comment 18•22 years ago
|
||
Attachment #108574 -
Flags: superreview?(dveditz) → superreview+
Updated•22 years ago
|
Attachment #108574 -
Flags: approval1.4b?
Comment 19•22 years ago
|
||
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+
Comment 20•22 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 22•22 years ago
|
||
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
Comment 23•22 years ago
|
||
verified, opened bug 23772 for problem with commercial installer
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•