Closed Bug 388833 Opened 17 years ago Closed 17 years ago

Add a way to launch XUL applications from Firefox commandline

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: benjamin)

References

Details

Attachments

(1 file)

Now that Firefox is libxul based, we can launch XUL-based applications using its runtime. The launch code could be ported from XULRunner so Firefox could launch applications from its commandline, kind of like the -chrome commandline parameter.

For example,
firefox -app <path-to-application.ini>
This kinda-sorta does what we want. firefox.exe can now accept -app <application.ini> to launch a XR app. There are of course still problems:

1) Firefox prefs and commandline handlers are still in effect.
2) On Mac the dock icon will be Firefox
3) On Windows the shared taskbar icon will have the Firefox logo.
Assignee: nobody → benjamin
Status: NEW → ASSIGNED
Attachment #273035 - Flags: review?(ted.mielczarek)
Comment on attachment 273035 [details] [diff] [review]
firefox.exe honors -app application.ini, rev. 1

+ * A helper class which calls NS_LogTerm/NS_LogTerm in it's scope.

grammar-nit: should be "its"

+  else if (IsArg(argv[1], "app")) {

Err, shouldn't you check that argc > 1 here?

You may also want to note somewhere that -app *must* be the first parameter to firefox.exe, so people aren't confused when they try to stick -console or something in there first.

r=me otherwise.  I do think people are going to use this and then complain about the nits though.  :)
Attachment #273035 - Flags: review?(ted.mielczarek) → review+
Fixed on trunk with nits and with a bustage-fix for GCC, which doesn't accept foo = value as an initializer for nsAutoPtr like MSVC does.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 389779
Depends on: 390046
Comment on attachment 273035 [details] [diff] [review]
firefox.exe honors -app application.ini, rev. 1

>Index: browser/app/nsBrowserApp.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/browser/app/nsBrowserApp.cpp,v
>retrieving revision 1.45
>diff -u -8 -p -d -r1.45 nsBrowserApp.cpp
>--- browser/app/nsBrowserApp.cpp	11 Jul 2007 15:16:30 -0000	1.45
>+++ browser/app/nsBrowserApp.cpp	19 Jul 2007 21:13:19 -0000
>@@ -40,16 +40,20 @@
>+/**
>+ * A helper class which calls NS_LogTerm/NS_LogTerm in it's scope.

Shouldn't this be "NS_LogInit/NS_LogTerm" ?

>+ */
>+class ScopedLogging
>+{
>+public:
>+  ScopedLogging() { NS_LogInit(); }
>+  ~ScopedLogging() { NS_LogTerm(); }
(In reply to comment #4)
> Shouldn't this be "NS_LogInit/NS_LogTerm" ?

I fixed the comment (nsAppRunner.cpp/nsBrowserApp.cpp).
Depends on: 428830
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: