Revert all of bug 383167 changes because they're not enough... going to try again later.

git-svn-id: svn://10.0.0.236/trunk@228702 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
benjamin%smedbergs.us
2007-06-25 18:41:00 +00:00
parent ffc1960617
commit 3afc7b95f7
36 changed files with 627 additions and 2618 deletions

View File

@@ -41,52 +41,32 @@
#include <windows.h>
#include <stdlib.h>
#endif
#include "nsBuildID.h"
#include <stdio.h>
#include <stdarg.h>
#include "nsCOMPtr.h"
#include "nsILocalFile.h"
#include "nsStringGlue.h"
static void Output(const char *fmt, ... )
{
va_list ap;
va_start(ap, fmt);
#if defined(XP_WIN) && !MOZ_WINCONSOLE
char msg[2048];
vsnprintf(msg, sizeof(msg), fmt, ap);
MessageBox(NULL, msg, "XULRunner", MB_OK | MB_ICONERROR);
#else
vfprintf(stderr, fmt, ap);
static const nsXREAppData kAppData = {
sizeof(nsXREAppData),
nsnull,
"Mozilla",
"Firefox",
NS_STRINGIFY(APP_VERSION),
NS_STRINGIFY(BUILD_ID),
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
"Copyright (c) 1998 - 2007 mozilla.org",
NS_XRE_ENABLE_PROFILE_MIGRATOR |
NS_XRE_ENABLE_EXTENSION_MANAGER
#if defined(MOZILLA_OFFICIAL) && (defined(XP_WIN) || defined(XP_MACOSX))
| NS_XRE_ENABLE_CRASH_REPORTER
#endif
va_end(ap);
}
,
nsnull, // xreDirectory
nsnull, // minVersion
nsnull, // maxVersion
"https://crash-reports.mozilla.com/submit"
};
int main(int argc, char* argv[])
{
nsCOMPtr<nsILocalFile> appini;
nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
if (NS_FAILED(rv)) {
Output("Couldn't calculate the application directory.");
return 255;
}
appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
nsXREAppData *appData;
rv = XRE_CreateAppData(appini, &appData);
if (NS_FAILED(rv)) {
Output("Couldn't read application.ini");
return 255;
}
int result = XRE_main(argc, argv, appData);
XRE_FreeAppData(appData);
return result;
return XRE_main(argc, argv, &kAppData);
}
#if defined( XP_WIN ) && defined( WIN32 ) && !defined(__GNUC__)