mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
fixes bug 286147 "switch from .xulapp to application.ini" r=bsmedberg
This commit is contained in:
parent
f467c64f5c
commit
a87b534479
@ -168,9 +168,6 @@ endif
|
||||
APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
|
||||
DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\"
|
||||
|
||||
BUILD_ID = $(shell cat $(DEPTH)/config/build_number)
|
||||
DEFINES += -DBUILD_ID=\"$(BUILD_ID)\"
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += -framework QuickTime -framework IOKit
|
||||
|
@ -47,7 +47,7 @@ static const nsXREAppData kAppData = {
|
||||
"Mozilla",
|
||||
"Firefox",
|
||||
APP_VERSION,
|
||||
BUILD_ID,
|
||||
NS_STRINGIFY(BUILD_ID),
|
||||
// ec8030f7-c20a-464f-9b0e-13a3a9e97384
|
||||
{ 0xec8030f7, 0xc20a, 0x464f, { 0x9b, 0x0e, 0x13, 0xa3, 0xa9, 0xe9, 0x73, 0x84 } },
|
||||
"Copyright (c) 2004 mozilla.org",
|
||||
|
@ -168,9 +168,6 @@ endif
|
||||
APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
|
||||
DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\"
|
||||
|
||||
BUILD_ID = $(shell cat $(DEPTH)/config/build_number)
|
||||
DEFINES += -DBUILD_ID=\"$(BUILD_ID)\"
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += -framework QuickTime -framework IOKit
|
||||
|
@ -49,7 +49,7 @@ static const nsXREAppData kAppData = {
|
||||
"Mozilla",
|
||||
"Sunbird",
|
||||
APP_VERSION,
|
||||
BUILD_ID,
|
||||
NS_STRINGIFY(BUILD_ID),
|
||||
// {718e30fb-e89b-41dd-9da7-e25a45638b28}
|
||||
{ 0x718e30fb, 0xe89b, 0x41dd, { 0x9d, 0xa7, 0xe2, 0x5a, 0x45, 0x63, 0x8b, 0x28 } },
|
||||
"Copyright (c) 2004 mozilla.org",
|
||||
|
@ -814,3 +814,8 @@ EXPAND_LOCALE_SRCDIR = $(if $(filter en-US,$(AB_CD)),$(topsrcdir)/$(1)/en-US,$(t
|
||||
ifdef relativesrcdir
|
||||
LOCALE_SRCDIR = $(call EXPAND_LOCALE_SRCDIR,$(relativesrcdir))
|
||||
endif
|
||||
|
||||
#
|
||||
# Add BUILD_ID to set of DEFINES
|
||||
#
|
||||
DEFINES += -DBUILD_ID=$(shell cat $(DEPTH)/config/build_number)
|
||||
|
@ -1,3 +1,4 @@
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
@ -1283,8 +1284,12 @@ PREF_DIST_DIR = $(GRE_DIST)
|
||||
PREF_DIR = greprefs
|
||||
else
|
||||
PREF_DIST_DIR = $(FINAL_TARGET)
|
||||
ifdef XPI_NAME
|
||||
PREF_DIR = defaults/preferences
|
||||
else
|
||||
PREF_DIR = defaults/pref
|
||||
endif
|
||||
endif
|
||||
|
||||
$(FINAL_TARGET)/$(PREF_DIR) $(GRE_DIST)/$(PREF_DIR) $(DESTDIR)$(mozappdir)/$(PREF_DIR):
|
||||
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
||||
@ -1664,6 +1669,26 @@ libs realchrome::
|
||||
fi
|
||||
endif
|
||||
|
||||
ifneq ($(DIST_FILES),)
|
||||
libs:: $(DIST_FILES)
|
||||
@$(EXIT_ON_ERROR) \
|
||||
for f in $(DIST_FILES); do \
|
||||
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl \
|
||||
$(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) \
|
||||
$(srcdir)/$$f > $(FINAL_TARGET)/`basename $$f`; \
|
||||
done
|
||||
endif
|
||||
|
||||
ifneq ($(DIST_CHROME_FILES),)
|
||||
libs:: $(DIST_CHROME_FILES)
|
||||
@$(EXIT_ON_ERROR) \
|
||||
for f in $(DIST_CHROME_FILES); do \
|
||||
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl \
|
||||
$(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) \
|
||||
$(srcdir)/$$f > $(FINAL_TARGET)/chrome/`basename $$f`; \
|
||||
done
|
||||
endif
|
||||
|
||||
REGCHROME = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
|
||||
$(if $(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)),-x) \
|
||||
$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(FINAL_TARGET)/chrome/installed-chrome.txt \
|
||||
|
10
configure.in
10
configure.in
@ -922,6 +922,14 @@ dnl Get mozilla version from central milestone file
|
||||
MOZILLA_VERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir`
|
||||
AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
|
||||
|
||||
dnl Get the major and minor versions from the MOZILLA_VERSION
|
||||
changequote(,)
|
||||
MOZILLA_VERSION_MAJOR=`echo $MOZILLA_VERSION | sed 's|^\([0-9]*\).*|\1|'`
|
||||
MOZILLA_VERSION_MINOR=`echo $MOZILLA_VERSION | sed 's|^[0-9]*\.\([0-9]*\).*|\1|'`
|
||||
changequote([,])
|
||||
AC_DEFINE_UNQUOTED(MOZILLA_VERSION_MAJOR,$MOZILLA_VERSION_MAJOR)
|
||||
AC_DEFINE_UNQUOTED(MOZILLA_VERSION_MINOR,$MOZILLA_VERSION_MINOR)
|
||||
|
||||
dnl ========================================================
|
||||
dnl System overrides of the defaults for target
|
||||
dnl ========================================================
|
||||
@ -6241,6 +6249,8 @@ esac
|
||||
AC_SUBST(CYGDRIVE_MOUNT)
|
||||
|
||||
AC_SUBST(MOZILLA_VERSION)
|
||||
AC_SUBST(MOZILLA_VERSION_MAJOR)
|
||||
AC_SUBST(MOZILLA_VERSION_MINOR)
|
||||
|
||||
. ${srcdir}/config/chrome-versions.sh
|
||||
AC_SUBST(MOZILLA_LOCALE_VERSION)
|
||||
|
@ -1,3 +1,4 @@
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
@ -45,5 +46,14 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = layout_debug
|
||||
DIRS = src ui
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
# If we have a XULRunner-enabled tree, then build as a standalone XUL app.
|
||||
ifdef MOZ_XULRUNNER
|
||||
|
||||
export XPI_NAME = layoutdebug
|
||||
PREF_JS_EXPORTS = $(srcdir)/layoutdebug-prefs.js
|
||||
DIST_FILES = application.ini
|
||||
DIST_CHROME_FILES = chrome.manifest
|
||||
|
||||
endif # MOZ_XULRUNNER
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
12
extensions/layout-debug/application.ini
Normal file
12
extensions/layout-debug/application.ini
Normal file
@ -0,0 +1,12 @@
|
||||
#filter substitution
|
||||
[App]
|
||||
Vendor=MozillaTest
|
||||
Name=LayoutDebug
|
||||
Version=0.1
|
||||
BuildID=@BUILD_ID@
|
||||
Copyright=Copyright (c) 2004 Mozilla.org
|
||||
ID={da915c15-c21a-41e2-95c3-2e0f76fd3191}
|
||||
|
||||
[Gecko]
|
||||
MinVersion=@MOZILLA_VERSION_MAJOR@.@MOZILLA_VERSION_MINOR@
|
||||
MaxVersion=@MOZILLA_VERSION_MAJOR@.@MOZILLA_VERSION_MINOR@
|
2
extensions/layout-debug/chrome.manifest
Normal file
2
extensions/layout-debug/chrome.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
content layoutdebug jar:layoutdebug.jar!/content/layoutdebug/
|
||||
locale layoutdebug en-US jar:layoutdebug.jar!/locale/en-US/layoutdebug/
|
1
extensions/layout-debug/layoutdebug-prefs.js
Normal file
1
extensions/layout-debug/layoutdebug-prefs.js
Normal file
@ -0,0 +1 @@
|
||||
pref("toolkit.defaultChromeURI", "chrome://layoutdebug/content/layoutdebug.xul");
|
@ -146,9 +146,6 @@ endif
|
||||
APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
|
||||
DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\"
|
||||
|
||||
BUILD_ID = $(shell cat $(DEPTH)/config/build_number)
|
||||
DEFINES += -DBUILD_ID=\"$(BUILD_ID)\"
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += -framework QuickTime -framework IOKit
|
||||
|
@ -48,7 +48,7 @@ static const nsXREAppData kAppData = {
|
||||
0,
|
||||
"Thunderbird",
|
||||
APP_VERSION,
|
||||
BUILD_ID,
|
||||
NS_STRINGIFY(BUILD_ID),
|
||||
// {3550f703-e582-4d05-9a08-453d09bdfdc6}
|
||||
{ 0x3550f703, 0xe582, 0x4d05, { 0x9a, 0x08, 0x45, 0x3d, 0x09, 0xbd, 0xfd, 0xc6 } },
|
||||
"Copyright (c) 2005 mozilla.org",
|
||||
|
@ -104,9 +104,6 @@ CPPSRCS = \
|
||||
nsNativeAppSupportBase.cpp \
|
||||
$(NULL)
|
||||
|
||||
BUILD_ID = $(shell cat $(DEPTH)/config/build_number)
|
||||
DEFINES += -DBUILD_ID=\"$(BUILD_ID)\"
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||
CPPSRCS += nsNativeAppSupportWin.cpp
|
||||
DEFINES += -DWIN32_LEAN_AND_MEAN
|
||||
|
@ -474,7 +474,7 @@ nsXULAppInfo::GetAppBuildID(nsACString& aResult)
|
||||
NS_IMETHODIMP
|
||||
nsXULAppInfo::GetGeckoBuildID(nsACString& aResult)
|
||||
{
|
||||
aResult.Assign(BUILD_ID);
|
||||
aResult.Assign(NS_STRINGIFY(BUILD_ID));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -426,6 +426,11 @@ typedef PRUint32 nsresult;
|
||||
#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0)
|
||||
#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
|
||||
|
||||
/*
|
||||
* Use this macro to form a string literal from an identifier.
|
||||
*/
|
||||
#define NS_STRINGIFY(x) #x
|
||||
|
||||
/*
|
||||
* These macros allow you to give a hint to the compiler about branch
|
||||
* probability so that it can better optimize. Use them like this:
|
||||
@ -449,4 +454,3 @@ typedef PRUint32 nsresult;
|
||||
#endif
|
||||
|
||||
#endif /* nscore_h___ */
|
||||
|
||||
|
@ -183,9 +183,6 @@ endif
|
||||
APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
|
||||
DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\"
|
||||
|
||||
BUILD_ID = $(shell cat $(DEPTH)/config/build_number)
|
||||
DEFINES += -DBUILD_ID=\"$(BUILD_ID)\"
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += -framework QuickTime -framework IOKit
|
||||
|
@ -237,7 +237,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (argc == 2 && (IsArg(argv[1], "v") || IsArg(argv[1], "version")))
|
||||
{
|
||||
printf("Mozilla XULRunner %s %s\n", MOZILLA_VERSION, BUILD_ID);
|
||||
printf("Mozilla XULRunner %s %d\n", MOZILLA_VERSION, BUILD_ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -45,32 +45,20 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = simple
|
||||
export XPI_NAME = simple
|
||||
|
||||
ifneq (,$(filter os2 windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
PREF_JS_EXPORTS = $(srcdir)/simple-prefs.js
|
||||
DIST_FILES = application.ini
|
||||
DIST_CHROME_FILES = chrome.manifest
|
||||
|
||||
ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ICONS = icons/simple.ico
|
||||
endif
|
||||
ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ICONS = icons/simple.xpm icons/simple16.xpm
|
||||
endif
|
||||
|
||||
PREFS = simple-prefs.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# generate various fields for simple.xulapp
|
||||
BUILD_ID := `date +%Y%m%d%H`
|
||||
GECKO_VERSION := `echo $(MOZILLA_VERSION) | sed 's|\(^[0-9]*\.[0-9]*\).*|\1|'`
|
||||
|
||||
libs:: simple.manifest
|
||||
$(INSTALL) $^ $(FINAL_TARGET)/chrome
|
||||
|
||||
ifneq (,$(ICONS))
|
||||
libs:: $(ICONS)
|
||||
$(INSTALL) $^ $(FINAL_TARGET)/chrome/icons/default
|
||||
|
||||
libs:: $(PREFS)
|
||||
$(INSTALL) $^ $(FINAL_TARGET)/defaults/preferences
|
||||
|
||||
libs:: simple.xulapp
|
||||
$(EXIT_ON_ERROR) \
|
||||
cat $< | sed 's|BUILD_ID|'$(BUILD_ID)'|' \
|
||||
| sed 's|GECKO_VERSION|'$(GECKO_VERSION)'|' \
|
||||
> $(FINAL_TARGET)/simple.xulapp
|
||||
endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#filter substitution
|
||||
[App]
|
||||
;
|
||||
; This field specifies your organization's name. This field is recommended,
|
||||
@ -12,7 +13,7 @@ Version=0.1
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
BuildID=BUILD_ID
|
||||
BuildID=@BUILD_ID@
|
||||
;
|
||||
; This field specifies a compact copyright notice for your application. This
|
||||
; field is optional.
|
||||
@ -28,13 +29,13 @@ ID={3aea3f07-ffe3-4060-bb03-bff3a5365e90}
|
||||
; This field is required. It specifies the minimum Gecko version that this
|
||||
; application requires. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
MinVersion=GECKO_VERSION
|
||||
MinVersion=@MOZILLA_VERSION_MAJOR@.@MOZILLA_VERSION_MINOR@
|
||||
;
|
||||
; This field is optional. It specifies the maximum Gecko version that this
|
||||
; application requires. It should be specified if your application uses
|
||||
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
|
||||
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
||||
MaxVersion=GECKO_VERSION
|
||||
MaxVersion=@MOZILLA_VERSION_MAJOR@.@MOZILLA_VERSION_MINOR@
|
||||
|
||||
[Shell]
|
||||
;
|
Loading…
Reference in New Issue
Block a user