mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Fix non-XR orange from bug 319843 - Don't assume that we're using all of the new nsXULAppAPI features.
This commit is contained in:
parent
5e75baaf42
commit
c62f361ad2
@ -44,7 +44,7 @@
|
||||
#include "nsBuildID.h"
|
||||
|
||||
static const nsXREAppData kAppData = {
|
||||
sizeof(nsXREAppData),
|
||||
offsetof(nsXREAppData, xreDirectory),
|
||||
nsnull,
|
||||
"Mozilla",
|
||||
"Firefox",
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <string.h>
|
||||
|
||||
static const nsXREAppData kAppData = {
|
||||
sizeof(nsXREAppData),
|
||||
offsetof(nsXREAppData, xreDirectory),
|
||||
nsnull,
|
||||
"Mozilla",
|
||||
"Sunbird",
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "prtypes.h"
|
||||
|
||||
static const nsXREAppData kAppData = {
|
||||
sizeof(nsXREAppData),
|
||||
offsetof(nsXREAppData, xreDirectory),
|
||||
nsnull,
|
||||
nsnull,
|
||||
"Thunderbird",
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "prtypes.h"
|
||||
|
||||
static const nsXREAppData kAppData = {
|
||||
sizeof(nsXREAppData),
|
||||
offsetof(nsXREAppData, xreDirectory),
|
||||
nsnull,
|
||||
"mozilla.org",
|
||||
"SeaMonkey",
|
||||
|
@ -1973,23 +1973,26 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||
Output(PR_TRUE, "Error: App:BuildID not specified in application.ini\n");
|
||||
return 1;
|
||||
}
|
||||
if (!appData.minVersion) {
|
||||
Output(PR_TRUE, "Error: Gecko:MinVersion not specified in application.ini\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!appData.maxVersion) {
|
||||
// If no maxVersion is specified, we assume the app is only compatible
|
||||
// with the initial preview release. Do not increment this number ever!
|
||||
SetAllocatedString(appData.maxVersion, "1.*");
|
||||
}
|
||||
if (appData.size > offsetof(nsXREAppData, minVersion)) {
|
||||
if (!appData.minVersion) {
|
||||
Output(PR_TRUE, "Error: Gecko:MinVersion not specified in application.ini\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (NS_CompareVersions(appData.minVersion, TOOLKIT_EM_VERSION) > 0 ||
|
||||
NS_CompareVersions(appData.maxVersion, TOOLKIT_EM_VERSION) < 0) {
|
||||
Output(PR_TRUE, "Error: Platform version " TOOLKIT_EM_VERSION " is not compatible with\n"
|
||||
"minVersion >= %s\nmaxVersion <= %s\n",
|
||||
appData.minVersion, appData.maxVersion);
|
||||
return 1;
|
||||
if (!appData.maxVersion) {
|
||||
// If no maxVersion is specified, we assume the app is only compatible
|
||||
// with the initial preview release. Do not increment this number ever!
|
||||
SetAllocatedString(appData.maxVersion, "1.*");
|
||||
}
|
||||
|
||||
if (NS_CompareVersions(appData.minVersion, TOOLKIT_EM_VERSION) > 0 ||
|
||||
NS_CompareVersions(appData.maxVersion, TOOLKIT_EM_VERSION) < 0) {
|
||||
Output(PR_TRUE, "Error: Platform version " TOOLKIT_EM_VERSION " is not compatible with\n"
|
||||
"minVersion >= %s\nmaxVersion <= %s\n",
|
||||
appData.minVersion, appData.maxVersion);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!appData.xreDirectory) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user