Closed Bug 470971 Opened 15 years ago Closed 15 years ago

add ability to pass GRE dir to xpcshell

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: ted, Assigned: benjamin)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 1 obsolete file)

Currently you can't run xpcshell from a directory other than where components/ lives, because it expects to find those components alongside the executable. It should be possible to pass that path to xpcshell on the command line, so that you could run xpcshell from a different location.
Blocks: 460515
Assignee: nobody → benjamin
Per IRC, bsmedberg says this is tricky because we init XPCOM before parsing the commandline in xpcshell. I agreed that if it simplifies things, I'm fine with requiring the option to be the first thing on the commandline.
Attached patch -g <gredir> for xpcshell, rev. 1 (obsolete) — Splinter Review
This supports -g <gredir> for xpcshell.

You still have to do some munging of {LD,DYLD}_LIBRARY_PATH, in order to get all the libraries loaded correctly... I recommend not using run-mozilla.sh, because it messes with MOZILLA_FIVE_HOME and can get confused.
Attachment #357216 - Flags: review?(ted.mielczarek)
Note, I'm still running this through tryserver... I'm a little anxious about whether all the libxul/non-libxul configurations will work correctly, but I think they will.
Comment on attachment 357216 [details] [diff] [review]
-g <gredir> for xpcshell, rev. 1

Looks sane to me, but of course I'm not an XPConnect peer.
Attachment #357216 - Flags: review?(ted.mielczarek) → review+
Attachment #357216 - Flags: superreview?(mrbkap)
I have an updated patch for bug 460515, and it works great with this patch applied.
Attachment #357216 - Flags: superreview?(mrbkap) → superreview+
http://hg.mozilla.org/mozilla-central/rev/700bca4b693f
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reopened due to Tunit bustage... it's somehow failing to get XpcomLib from the directory service, probably due to the xpcom directory being wrong somehow. I tried http://hg.mozilla.org/mozilla-central/rev/a563bc0ec80a but that didn't work.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Just in case you haven't noticed, you backed out comment 6, but did not backout comment 7
The former patch was buggy because XRE_GetBinaryPath gives you the path of xpcshell.exe, and we really want the parent directory. This patch fixes, and also rebases against minor changes.
Attachment #357216 - Attachment is obsolete: true
You never re-landed this, did you?
http://hg.mozilla.org/mozilla-central/rev/9a28db57d6a9
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Depends on: 476676
Depends on: 485436
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.