зеркало из https://github.com/mozilla/pjs.git
initial landing
This commit is contained in:
Родитель
d929dc638f
Коммит
cdb0ac93a1
|
@ -0,0 +1,54 @@
|
|||
# vim:set ts=8 sw=8 sts=8 et:
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = app
|
||||
|
||||
#ifeq ($(OS_ARCH),WINNT)
|
||||
#ifdef MOZ_INSTALLER
|
||||
#DIRS += installer/windows
|
||||
#endif
|
||||
#endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,314 @@
|
|||
# vim:set ts=8 sw=8 sts=8 et:
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
# Jonathan Wilson <jonwil@tpgi.com.au>
|
||||
# Dan Mosedale <dmose@mozilla.org>
|
||||
# Darin Fisher <darin@meer.net>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = profile
|
||||
|
||||
#PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js
|
||||
|
||||
ifeq ($(USE_SHORT_LIBNAME), 1)
|
||||
PROGRAM = xulrun$(BIN_SUFFIX)
|
||||
else
|
||||
PROGRAM = xulrunner-bin$(BIN_SUFFIX)
|
||||
endif
|
||||
|
||||
REQUIRES = \
|
||||
xulapp \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = nsXulRunnerApp.cpp
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
STATIC_COMPONENTS_LINKER_PATH = -L$(DIST)/lib/components
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
TK_LIBS := -framework Cocoa $(TK_LIBS)
|
||||
endif
|
||||
|
||||
LIBS = \
|
||||
$(STATIC_COMPONENTS_LINKER_PATH) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
# Add explicit X11 dependency when building against X11 toolkits
|
||||
ifneq (,$(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)))
|
||||
LIBS += $(XLDFLAGS) $(XLIBS)
|
||||
endif
|
||||
|
||||
ifdef MOZ_JPROF
|
||||
LIBS += -ljprof
|
||||
endif
|
||||
|
||||
ifndef MOZ_WINCONSOLE
|
||||
ifdef MOZ_DEBUG
|
||||
MOZ_WINCONSOLE = 1
|
||||
else
|
||||
MOZ_WINCONSOLE = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
NSDISTMODE = copy
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
ifndef BUILD_STATIC_LIBS
|
||||
|
||||
ifdef NS_TRACE_MALLOC
|
||||
EXTRA_DSO_LIBS += tracemalloc
|
||||
endif
|
||||
|
||||
else
|
||||
include $(topsrcdir)/config/static-config.mk
|
||||
|
||||
EXTRA_DEPS += \
|
||||
$(STATIC_EXTRA_DEPS) \
|
||||
$(NULL)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
REQUIRES += $(STATIC_REQUIRES)
|
||||
EXTRA_LIBS += $(STATIC_EXTRA_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool gdi32)
|
||||
#RCINCLUDE = splash.rc
|
||||
ifndef GNU_CC
|
||||
RCFLAGS += -DMOZ_PHOENIX -I$(srcdir)
|
||||
else
|
||||
RCFLAGS += -DMOZ_PHOENIX --include-dir $(srcdir)
|
||||
endif
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
RCFLAGS += -DMOZ_STATIC_BUILD
|
||||
endif
|
||||
ifdef DEBUG
|
||||
RCFLAGS += -DDEBUG
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),BeOS)
|
||||
OS_LIBS += -ltracker
|
||||
endif
|
||||
|
||||
#ifeq ($(OS_ARCH),OS2)
|
||||
#RESFILE=splashos2.res
|
||||
#RCFLAGS += -DMOZ_PHOENIX
|
||||
#ifdef BUILD_STATIC_LIBS
|
||||
#OS_LIBS += -lpmwinx
|
||||
#EXE_DEF_FILE = browser.def
|
||||
#RCFLAGS += -DMOZ_STATIC_BUILD -i $(DIST)/include/widget
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
#RCFLAGS += -DDEBUG
|
||||
#endif
|
||||
#RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
||||
#endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
#DEFINES += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
include $(topsrcdir)/config/static-rules.mk
|
||||
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
|
||||
ifdef USE_PREBINDING
|
||||
BIN_FLAGS += -Wl,-headerpad -Wl,5a0c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
|
||||
LIBS += -lphexlib
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
#
|
||||
# Control the default heap size.
|
||||
# This is the heap returned by GetProcessHeap().
|
||||
# As we use the CRT heap, the default size is too large and wastes VM.
|
||||
#
|
||||
# The default heap size is 1MB on Win32.
|
||||
# The heap will grow if need be.
|
||||
#
|
||||
# Set it to 256k. See bug 127069.
|
||||
#
|
||||
ifndef GNU_CC
|
||||
LDFLAGS += /HEAP:0x40000
|
||||
endif
|
||||
endif
|
||||
|
||||
$(PROGRAM): $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
$(EXE_DEF_FILE):
|
||||
rm -f $@
|
||||
@echo NAME mozilla >$(EXE_DEF_FILE)
|
||||
@echo IMPORTS >>$(EXE_DEF_FILE)
|
||||
@echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE)
|
||||
@echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE)
|
||||
@echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE)
|
||||
|
||||
LDFLAGS += -Zlinker /NOE
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||
|
||||
xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
|
||||
cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \
|
||||
-e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \
|
||||
-e "s|%MREDIR%|$(mredir)|" > $@
|
||||
chmod +x $@
|
||||
|
||||
libs:: xulrunner
|
||||
$(INSTALL) $< $(DIST)/bin
|
||||
|
||||
install:: xulrunner
|
||||
$(SYSINSTALL) $< $(DESTDIR)$(bindir)
|
||||
|
||||
GARBAGE += xulrunner
|
||||
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, firefox.js)
|
||||
|
||||
endif
|
||||
|
||||
ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
|
||||
#ICON_FILES = \
|
||||
# $(DIST)/branding/mozicon50.xpm \
|
||||
# $(DIST)/branding/mozicon16.xpm \
|
||||
# $(DIST)/branding/document.png \
|
||||
# $(NULL)
|
||||
#
|
||||
#libs:: $(ICON_FILES)
|
||||
# $(INSTALL) $^ $(DIST)/bin/icons
|
||||
|
||||
#install::
|
||||
# $(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/icons
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
#libs::
|
||||
# $(INSTALL) $(DIST)/branding/default.xpm $(DIST)/bin/chrome/icons/default
|
||||
|
||||
#install::
|
||||
# $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default.xpm $(DESTDIR)$(mozappdir)/icons
|
||||
endif
|
||||
|
||||
#export:: brand.dtd.in
|
||||
# $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $^ > brand.dtd
|
||||
|
||||
#export::
|
||||
#ifndef MOZ_USE_OFFICIAL_BRANDING
|
||||
# $(NSINSTALL) -D $(DIST)/branding
|
||||
#ifeq ($(OS_ARCH),WINNT)
|
||||
# cp $(srcdir)/firefox.ico $(DIST)/branding/firefox.ico
|
||||
# cp $(srcdir)/firefox.ico $(DIST)/branding/app.ico
|
||||
# cp $(srcdir)/document.ico $(DIST)/branding/document.ico
|
||||
#endif
|
||||
#ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
# cp $(srcdir)/macbuild/firefox.icns $(DIST)/branding/firefox.icns
|
||||
#endif
|
||||
#ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
# cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm
|
||||
# cp $(srcdir)/mozicon50.xpm $(DIST)/branding/mozicon50.xpm
|
||||
# cp $(srcdir)/document.png $(DIST)/branding/document.png
|
||||
#endif
|
||||
#ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
# cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm
|
||||
#endif
|
||||
#ifeq ($(OS_ARCH),OS2)
|
||||
# cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
|
||||
# cp $(srcdir)/firefox-os2.ico $(DIST)/branding/app.ico
|
||||
# cp $(srcdir)/document-os2.ico $(DIST)/branding/document.ico
|
||||
#endif
|
||||
#endif
|
||||
|
||||
libs::
|
||||
touch $(DIST)/bin/.autoreg
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
|
||||
APP_NAME = XulRunner
|
||||
|
||||
libs:: $(PROGRAM)
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app
|
||||
sed -e "s/APP_VERSION/$(APP_VERSION)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
|
||||
rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS/mangle $(DIST)/$(APP_NAME).app/Contents/MacOS/shlibsign
|
||||
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
-cp -L $(DIST)/bin/mangle $(DIST)/bin/shlibsign $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
cp -RL $(DIST)/branding/firefox.icns $(DIST)/$(APP_NAME).app/Contents/Resources/firefox.icns
|
||||
echo -n APPLMOZB > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
|
||||
# remove CVS dirs from packaged app
|
||||
find $(DIST)/$(APP_NAME).app -type d -name "CVS" -prune -exec rm -rf {} \;
|
||||
|
||||
clean clobber::
|
||||
rm -rf $(DIST)/$(APP_NAME).app
|
||||
endif
|
||||
|
||||
README_FILE = $(topsrcdir)/README.txt
|
||||
|
||||
libs::
|
||||
$(INSTALL) $(README_FILE) $(DIST)/bin
|
||||
$(INSTALL) $(topsrcdir)/LICENSE $(DIST)/bin
|
|
@ -0,0 +1,266 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
## $Id: mozilla.in,v 1.1 2004-08-05 21:38:22 darin%meer.net Exp $
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ mozilla [args]
|
||||
##
|
||||
## This script is meant to run the mozilla-bin binary from either
|
||||
## mozilla/xpfe/bootstrap or mozilla/dist/bin.
|
||||
##
|
||||
## The script will setup all the environment voodoo needed to make
|
||||
## the mozilla-bin binary to work.
|
||||
##
|
||||
|
||||
moz_pis_startstop_scripts()
|
||||
{
|
||||
MOZ_USER_DIR="%MOZ_USER_DIR%"
|
||||
# MOZ_PIS_ is the name space for "Mozilla Plugable Init Scripts"
|
||||
# These variables and there meaning are specified in
|
||||
# mozilla/xpfe/bootstrap/init.d/README
|
||||
MOZ_PIS_API=2
|
||||
MOZ_PIS_MOZBINDIR="${dist_bin}"
|
||||
MOZ_PIS_SESSION_PID="$$"
|
||||
MOZ_PIS_USER_DIR="${MOZ_USER_DIR}"
|
||||
export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR
|
||||
|
||||
case "${1}" in
|
||||
"start")
|
||||
for curr_pis in "${dist_bin}/init.d"/S* "${HOME}/${MOZ_USER_DIR}/init.d"/S* ; do
|
||||
if [ -x "${curr_pis}" ] ; then
|
||||
case "${curr_pis}" in
|
||||
*.sh) . "${curr_pis}" ;;
|
||||
*) "${curr_pis}" "start" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
;;
|
||||
"stop")
|
||||
for curr_pis in "${HOME}/${MOZ_USER_DIR}/init.d"/K* "${dist_bin}/init.d"/K* ; do
|
||||
if [ -x "${curr_pis}" ] ; then
|
||||
case "${curr_pis}" in
|
||||
*.sh) . "${curr_pis}" ;;
|
||||
*) "${curr_pis}" "stop" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo 1>&2 "$0: Internal error in moz_pis_startstop_scripts."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#uncomment for debugging
|
||||
#set -x
|
||||
|
||||
moz_libdir=%MOZAPPDIR%
|
||||
MRE_HOME=%MREDIR%
|
||||
|
||||
# Use run-mozilla.sh in the current dir if it exists
|
||||
# If not, then start resolving symlinks until we find run-mozilla.sh
|
||||
found=0
|
||||
progname="$0"
|
||||
curdir=`dirname "$progname"`
|
||||
progbase=`basename "$progname"`
|
||||
profile=""
|
||||
run_moz="$curdir/run-mozilla.sh"
|
||||
if test -x "$run_moz"; then
|
||||
dist_bin="$curdir"
|
||||
found=1
|
||||
else
|
||||
here=`/bin/pwd`
|
||||
while [ -h "$progname" ]; do
|
||||
bn=`basename "$progname"`
|
||||
cd `dirname "$progname"`
|
||||
progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
|
||||
if [ ! -x "$progname" ]; then
|
||||
break
|
||||
fi
|
||||
curdir=`dirname "$progname"`
|
||||
run_moz="$curdir/run-mozilla.sh"
|
||||
if [ -x "$run_moz" ]; then
|
||||
cd "$curdir"
|
||||
dist_bin=`pwd`
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
cd "$here"
|
||||
fi
|
||||
if [ $found = 0 ]; then
|
||||
# Check default compile-time libdir
|
||||
if [ -x "$moz_libdir/run-mozilla.sh" ]; then
|
||||
dist_bin="$moz_libdir"
|
||||
else
|
||||
echo "Cannot find mozilla runtime directory. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
script_args=""
|
||||
moreargs=""
|
||||
debugging=0
|
||||
MOZILLA_BIN="${progbase}-bin"
|
||||
MOZ_CLIENT_PROGRAM="$dist_bin/mozilla-xremote-client"
|
||||
|
||||
run_xremote_client() {
|
||||
if [ -n "${profile}" ]; then
|
||||
"${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -p "${profile}" "$1"
|
||||
else
|
||||
"${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# The following is to check for a currently running instance.
|
||||
# This is taken almost verbatim from the Mozilla RPM package's launch script.
|
||||
check_running() {
|
||||
run_xremote_client 'ping()' 2>/dev/null >/dev/null
|
||||
RETURN_VAL=$?
|
||||
if [ $RETURN_VAL -eq 0 ]; then
|
||||
echo 1
|
||||
return 1
|
||||
else
|
||||
echo 0
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$OSTYPE" = "beos" ]; then
|
||||
mimeset -F "$MOZILLA_BIN"
|
||||
fi
|
||||
|
||||
################################################################ Parse Arguments
|
||||
# If there's a command line argument but it doesn't begin with a -
|
||||
# it's probably a url. Try to send it to a running instance.
|
||||
_USE_EXIST=0
|
||||
_NEW_WINDOW=
|
||||
_optOne="$1"
|
||||
case "${_optOne}" in
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
_USE_EXIST=1
|
||||
;;
|
||||
esac
|
||||
|
||||
_optOthers=
|
||||
_optLast=
|
||||
for i in "$@"; do
|
||||
_optLast="${i}"
|
||||
done #last arg
|
||||
|
||||
for i in "$@"; do
|
||||
[ "$i" = "${_optLast}" ] && break
|
||||
_optOthers="${_optOthers} ${i}"
|
||||
done #others arg
|
||||
|
||||
#???: needs check if othersopt begin with -* ?
|
||||
if [ `expr "${_optLast}" : '.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then
|
||||
# Last argument seems to be a local file/directory
|
||||
# Check, if it is absolutely specified (ie. /home/foo/file vs. ./file)
|
||||
# If it is just "relatively" (./file) specified, make it absolutely
|
||||
[ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
|
||||
elif [ `expr "${_optLast}" : '.*:/.*'` -gt 0 -o -n "${_optOthers}" ]; then #???? like before...
|
||||
_NEW_WINDOW=1
|
||||
fi
|
||||
|
||||
# check for -P argument used to select a user profile
|
||||
_expectProfileName=0
|
||||
for i in "$@"; do
|
||||
if [ "$i" = "-P" ]; then
|
||||
_expectProfileName=1
|
||||
profile=""
|
||||
elif [ ${_expectProfileName} = 1 ]; then
|
||||
_expectProfileName=0
|
||||
profile="$i"
|
||||
fi
|
||||
done
|
||||
|
||||
################################################################ Parse Arguments
|
||||
|
||||
########################################################################### Main
|
||||
ALREADY_RUNNING=`check_running`
|
||||
|
||||
if [ $ALREADY_RUNNING -eq 1 ]; then
|
||||
# There's an instance already running. Use it.
|
||||
# Any command line args passed in?
|
||||
if [ $# -gt 0 ]; then
|
||||
# There were "some" command line args.
|
||||
if [ ${_USE_EXIST} -eq 1 ]; then
|
||||
# We should use an existing instance, as _USE_EXIST=$_USE_EXIST=-1
|
||||
_open_type="window"
|
||||
#_open_type="tab"
|
||||
_remote_cmd="openURL(${_optLast} , new-${_open_type})"
|
||||
run_xremote_client "${_remote_cmd}"
|
||||
unset _remote_cmd _open_type
|
||||
exit $?
|
||||
fi
|
||||
else
|
||||
# No command line args. Open new window/tab
|
||||
run_xremote_client "xfeDoCommand(openBrowser)"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
# Default action - no running instance or _USE_EXIST (${_USE_EXIST}) ! -eq 1
|
||||
########################################################################### Main
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-p | --pure | -pure)
|
||||
MOZILLA_BIN="${MOZILLA_BIN}.pure"
|
||||
shift
|
||||
;;
|
||||
-g | --debug)
|
||||
script_args="$script_args -g"
|
||||
debugging=1
|
||||
shift
|
||||
;;
|
||||
-d | --debugger)
|
||||
script_args="$script_args -d $2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
moreargs="$moreargs \"$1\""
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
export MRE_HOME
|
||||
eval "set -- $moreargs"
|
||||
|
||||
## Start addon scripts
|
||||
moz_pis_startstop_scripts "start"
|
||||
|
||||
if [ $debugging = 1 ]
|
||||
then
|
||||
echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
|
||||
fi
|
||||
"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
|
||||
exitcode=$?
|
||||
|
||||
## Stop addon scripts
|
||||
moz_pis_startstop_scripts "stop"
|
||||
|
||||
exit $exitcode
|
||||
# EOF.
|
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = chrome extensions
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
FILES := \
|
||||
localstore.rdf \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(FILES)
|
||||
$(INSTALL) $^ $(DIST)/bin/defaults/profile
|
||||
$(INSTALL) $^ $(DIST)/bin/defaults/profile/US
|
||||
|
||||
install:: $(FILES)
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/US
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
FILES := \
|
||||
userContent-example.css \
|
||||
userChrome-example.css \
|
||||
$(NULL)
|
||||
|
||||
FILES := $(addprefix $(srcdir)/, $(FILES))
|
||||
|
||||
libs::
|
||||
$(INSTALL) $(FILES) $(DIST)/bin/defaults/profile/chrome
|
||||
$(INSTALL) $(FILES) $(DIST)/bin/defaults/profile/US/chrome
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/defaults/profile/chrome
|
||||
$(NSINSTALL) -t $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/defaults/profile/US/chrome
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Edit this file and copy it as userChrome.css into your
|
||||
* profile-directory/chrome/
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file can be used to customize the look of Mozilla's user interface
|
||||
* You should consider using !important on rules which you want to
|
||||
* override default settings.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Do not remove the @namespace line -- it's required for correct functioning
|
||||
*/
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
|
||||
|
||||
|
||||
/*
|
||||
* Some possible accessibility enhancements:
|
||||
*/
|
||||
/*
|
||||
* Make all the default font sizes 20 pt:
|
||||
*
|
||||
* * {
|
||||
* font-size: 20pt !important
|
||||
* }
|
||||
*/
|
||||
/*
|
||||
* Make menu items in particular 15 pt instead of the default size:
|
||||
*
|
||||
* menupopup > * {
|
||||
* font-size: 15pt !important
|
||||
* }
|
||||
*/
|
||||
/*
|
||||
* Give the Location (URL) Bar a fixed-width font
|
||||
*
|
||||
* #urlbar {
|
||||
* font-family: monospace !important;
|
||||
* }
|
||||
*/
|
||||
|
||||
/*
|
||||
* Eliminate the throbber and its annoying movement:
|
||||
*
|
||||
* #throbber-box {
|
||||
* display: none !important;
|
||||
* }
|
||||
*/
|
||||
|
||||
/*
|
||||
* For more examples see http://www.mozilla.org/unix/customizing.html
|
||||
*/
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Edit this file and copy it as userContent.css into your
|
||||
* profile-directory/chrome/
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file can be used to apply a style to all web pages you view
|
||||
* Rules without !important are overruled by author rules if the
|
||||
* author sets any. Rules with !important overrule author rules.
|
||||
*/
|
||||
|
||||
/*
|
||||
* example: turn off "blink" element blinking
|
||||
*
|
||||
* blink { text-decoration: none ! important; }
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* example: give all tables a 2px border
|
||||
*
|
||||
* table { border: 2px solid; }
|
||||
*/
|
||||
|
||||
/*
|
||||
* example: turn off "marquee" element
|
||||
*
|
||||
* marquee { -moz-binding: none; }
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* For more examples see http://www.mozilla.org/unix/customizing.html
|
||||
*/
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
|
||||
xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
|
||||
<Seq about="urn:mozilla:extension:root"/>
|
||||
<Seq about="urn:mozilla:theme:root"/>
|
||||
|
||||
</RDF>
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
FILES := \
|
||||
Extensions.rdf \
|
||||
$(NULL)
|
||||
|
||||
FILES := $(addprefix $(srcdir)/, $(FILES))
|
||||
|
||||
libs::
|
||||
$(INSTALL) $(FILES) $(DIST)/bin/defaults/profile/extensions
|
||||
$(INSTALL) $(srcdir)/"installed-extensions.txt" $(DIST)/bin/defaults/profile/extensions
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/defaults/profile/extensions
|
||||
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/"installed-extensions.txt" $(DESTDIR)$(mozappdir)/defaults/profile/extensions
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<RDF:RDF
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
</RDF:RDF>
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
# This file specifies the build flags for Xul Runner. You can use it by adding:
|
||||
# . $topsrcdir/xulrunner/config/mozconfig
|
||||
# to the top of your mozconfig file.
|
||||
|
||||
export MOZ_XULRUNNER=1
|
||||
mk_add_options MOZ_XULRUNNER=1
|
||||
|
||||
ac_add_options --disable-ldap
|
||||
ac_add_options --disable-mailnews
|
||||
ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,typeaheadfind,webservices,inspector,gnomevfs,negotiateauth
|
||||
ac_add_options --enable-crypto
|
||||
ac_add_options --disable-composer
|
||||
ac_add_options --enable-single-profile
|
||||
ac_add_options --disable-profilesharing
|
Загрузка…
Ссылка в новой задаче