From 2d4b5cb3b6a77df97ae95fd297cdda7636bd04da Mon Sep 17 00:00:00 2001 From: "ajschult%verizon.net" Date: Sun, 9 Apr 2006 01:02:54 +0000 Subject: [PATCH] Bug 333244: Use hardcoded binary and app name in start script and handle MOZ_NO_REMOTE. r/sr=neil --- suite/app/Makefile.in | 4 +++- xpfe/bootstrap/Makefile.in | 1 + xpfe/bootstrap/mozilla.in | 16 ++++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/suite/app/Makefile.in b/suite/app/Makefile.in index 9876c7075ab..1a1ceb4c311 100644 --- a/suite/app/Makefile.in +++ b/suite/app/Makefile.in @@ -259,8 +259,10 @@ endif ifneq (,$(filter-out OS2 WINNT Darwin,$(OS_ARCH))) $(MOZ_APP_NAME):: $(topsrcdir)/xpfe/bootstrap/mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla|" \ + -e "s|%MOZ_USER_DIR%|.mozilla|" \ -e "s|%MREDIR%|$(mredir)|" \ + -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ -e "s|%MOZILLA-BIN%|$(PROGRAM)|g" > $@ chmod +x $@ diff --git a/xpfe/bootstrap/Makefile.in b/xpfe/bootstrap/Makefile.in index 0f4a78b7146..c9f46c67046 100644 --- a/xpfe/bootstrap/Makefile.in +++ b/xpfe/bootstrap/Makefile.in @@ -424,6 +424,7 @@ $(MOZILLA_SCRIPT):: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk -e "s|%MOZ_USER_DIR%|.mozilla|" \ -e "s|%MREDIR%|$(mredir)|" \ -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ -e "s|%MOZILLA-BIN%|$(PROGRAM)|g" > $@ chmod +x $@ diff --git a/xpfe/bootstrap/mozilla.in b/xpfe/bootstrap/mozilla.in index 46e6d873bf9..b8de7c7a450 100755 --- a/xpfe/bootstrap/mozilla.in +++ b/xpfe/bootstrap/mozilla.in @@ -36,7 +36,7 @@ # # ***** END LICENSE BLOCK ***** -## $Id: mozilla.in,v 1.11 2006-04-08 03:00:42 ajschult%verizon.net Exp $ +## $Id: mozilla.in,v 1.12 2006-04-09 01:02:54 ajschult%verizon.net Exp $ ## ## Usage: ## @@ -100,7 +100,6 @@ MRE_HOME=%MREDIR% found=0 progname="$0" curdir=`dirname "$progname"` -progbase=`basename "$progname"` run_moz="$curdir/run-mozilla.sh" if test -x "$run_moz"; then dist_bin="$curdir" @@ -144,18 +143,19 @@ if [ "$OSTYPE" = "beos" ]; then fi # Open a new tab/window in an existing instance if we can find one. -if "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'ping()' 2>/dev/null >/dev/null; then +appname="%MOZ_APP_NAME%" +if [ -z "$MOZ_NO_REMOTE" ] && "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${appname}" 'ping()' 2>/dev/null >/dev/null; then if [ $# -eq 0 ]; then # No command line args. Open new window. - exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openBrowser)" + exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${appname}" "xfeDoCommand(openBrowser)" fi case "$1" in -mail) - exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'xfeDoCommand(openInbox)' + exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${appname}" 'xfeDoCommand(openInbox)' ;; -compose) - exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'xfeDoCommand(composeMessage)' + exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${appname}" 'xfeDoCommand(composeMessage)' ;; -*) # There's an argument we don't recognize, so don't try to use a running @@ -176,7 +176,7 @@ if "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'ping()' 2>/dev/null >/de _optLast="file://${_optLast}" fi - exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "openURL(${_optLast})" + exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${appname}" "openURL(${_optLast})" ;; esac fi @@ -185,7 +185,7 @@ fi script_args="" debugging=0 -MOZILLA_BIN="${progbase}-bin" +MOZILLA_BIN="%MOZILLA-BIN%" if [ "$OSTYPE" = "beos" ]; then mimeset -F "$MOZILLA_BIN"