firefox --version doesn't include the buildid

RESOLVED INACTIVE

Status

()

Toolkit
Startup and Profile System
RESOLVED INACTIVE
13 years ago
a day ago

People

(Reporter: Michiel van Leeuwen (email: mvl+moz@), Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

firefox --version should include the build id, to be able to easily find out the
build id (used in the script i had to archive old builds)

[michiel@delta firefox]$ ./firefox -v
Mozilla Firefox 1.0+, Copyright (c) 1998 - 2005 mozilla.org

Comment 1

13 years ago
What version is this that you're talking about? In the source trees, the build
ID should be printed (or "<developer build>" if it can't find it). Also, looking
at the various branches, the copyright date that's displayed is inconsistent.
here's what lxr told me:

Aviary 1.0.1 tree: printf("Mozilla %s, Copyright (c) 2003-2004 mozilla.org",
MOZILLA_VERSION);

Mozilla tree: printf("%s %s, Copyright (c) 2003-2005 mozilla.org",
NS_STRINGIFY(MOZ_APP_DISPLAYNAME), NS_STRINGIFY(MOZ_APP_VERSION));

Seamonkey tree: printf("%s %s, Copyright (c) 2003-2005 mozilla.org",
NS_STRINGIFY(MOZ_APP_DISPLAYNAME), NS_STRINGIFY(MOZ_APP_VERSION));

Mozilla 1.7 tree: printf("Mozilla %s, Copyright (c) 2003-2004 mozilla.org",
MOZILLA_VERSION);

Where is this 1998-2005 string from?
(Reporter)

Comment 2

13 years ago
All i know is that i downloaded a trunk build, and tried to find out the buildid
from the commandline. I failed.
(And how is a seamonkey-tree different from a mozilla-tree?)
Can you provide lxr links?

Comment 3

13 years ago
Oops. I knew I forgot something.

<a
href="http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#1371">http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#1371</a>

I think that's the handler for the command-line flags, but I might be wrong

Comment 4

13 years ago
After a bit more looking, it appears that the string is actually printed here:

http://lxr.mozilla.org/seamonkey/source/toolkit/xre/nsAppRunner.cpp#883

Why there are two different functions in the tree called DumpVersion, who knows?

Anyway it's a simple matter of replacing (line 885 of toolkit/xre/nsAppRunner.cpp):
printf("%s %s %s, %s\n", gAppData->vendor, gAppData->name, gAppData->version,
gAppData->copyright);

with something like 
printf("%s %s %s (Build ID: %s), %s\n", gAppData->vendor, gAppData->name,
gAppData->version, gAppData->buildID, gAppData->copyright);

On a related note, where does stdout get redirected to for Windows builds by
default? I have to do a "firefox -v | more" to view any data

Updated

9 years ago
Component: Cmd-line Features → Startup and Profile System
Product: Core → Toolkit
QA Contact: startup

Comment 5

a day ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: a day ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.