mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 13:45:46 +00:00
add -register option for easier automated registration of components and chrome for static builds
This commit is contained in:
parent
8ccfaf4c6d
commit
fc9f434447
@ -1876,6 +1876,19 @@ int xre_main(int argc, char* argv[], const nsXREAppData& aAppData)
|
||||
}
|
||||
#endif
|
||||
|
||||
// check for -register, which registers chrome and then exits immediately
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
if (!strcmp(argv[i], "-register")) {
|
||||
nsCOMPtr<nsIChromeRegistry> chromeReg = do_GetService("@mozilla.org/chrome/chrome-registry;1");
|
||||
if (chromeReg) {
|
||||
chromeReg->CheckForNewChrome();
|
||||
chromeReg = 0;
|
||||
NS_ShutdownXPCOM(nsnull);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsresult mainResult = main1(argc, argv,
|
||||
nativeApp ? (nsISupports*)nativeApp : (nsISupports*)splash,
|
||||
aAppData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user