From b1942e00ea118151009ddacbb933ed436971695a Mon Sep 17 00:00:00 2001 From: Alex Pakhotin Date: Sat, 5 Dec 2009 16:22:26 -0800 Subject: [PATCH] bug 531786 - Application Name (Fennec) should not be hardcoded in installer file (setup.ini) r=mfinkle,robstrong --- mobile/installer/Makefile.in | 4 ++-- mobile/locales/Makefile.in | 14 ++++++++++++++ mobile/locales/en-US/installer/setup.ini | 16 ++++++++-------- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/mobile/installer/Makefile.in b/mobile/installer/Makefile.in index dcf04430b48f..c88e99547deb 100644 --- a/mobile/installer/Makefile.in +++ b/mobile/installer/Makefile.in @@ -189,8 +189,8 @@ UNPACKAGE = $(LIBXUL_DIST)/xulrunner*$(PKG_SUFFIX) installer: stage-package package-xulrunner $(NSINSTALL) -D $(DIST)/$(PKG_PATH) - $(NSINSTALL) $(srcdir)/../locales/$(AB_CD)/installer/setup.ini $(DIST) - cd $(DIST) && mv $(MOZ_PKG_DIR)/xulrunner/uninstall.exe $(MOZ_PKG_DIR)/ && 7z a $(PKG_PATH)$(PKG_BASENAME).7z $(MOZ_PKG_DIR) setup.ini -x!$(MOZ_PKG_DIR)/xulrunner/xulrunner-stub-installer.sfx && cat $(MOZ_PKG_DIR)/xulrunner/xulrunner-stub-installer.sfx $(PKG_PATH)$(PKG_BASENAME).7z>$(PKG_PATH)$(PKG_BASENAME).exe && rm $(PKG_PATH)$(PKG_BASENAME).7z && rm setup.ini && $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR) + $(NSINSTALL) $(DIST)/$(MOZ_PKG_DIR)/setup.ini $(DIST) + cd $(DIST) && mv $(MOZ_PKG_DIR)/xulrunner/uninstall.exe $(MOZ_PKG_DIR)/ && 7z a $(PKG_PATH)$(PKG_BASENAME).7z $(MOZ_PKG_DIR) setup.ini -x!$(MOZ_PKG_DIR)/xulrunner/xulrunner-stub-installer.sfx -x!$(MOZ_PKG_DIR)/setup.ini && cat $(MOZ_PKG_DIR)/xulrunner/xulrunner-stub-installer.sfx $(PKG_PATH)$(PKG_BASENAME).7z>$(PKG_PATH)$(PKG_BASENAME).exe && rm $(PKG_PATH)$(PKG_BASENAME).7z && rm setup.ini && $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR) endif diff --git a/mobile/locales/Makefile.in b/mobile/locales/Makefile.in index 5ae15a71edb7..8afd0c0de9a1 100644 --- a/mobile/locales/Makefile.in +++ b/mobile/locales/Makefile.in @@ -145,6 +145,20 @@ libs:: $(UPDATER_INI) $(FINAL_TARGET)/updater.ini endif +ifdef WINCE_WINDOWS_MOBILE +ifdef LOCALE_MERGEDIR +SETUP_INI := $(firstword $(wildcard $(LOCALE_MERGEDIR)/installer/setup.ini) \ + $(wildcard $(LOCALE_SRCDIR)/installer/setup.ini) \ + $(srcdir)/en-US/installer/setup.ini ) +else +SETUP_INI := $(addprefix $(LOCALE_SRCDIR)/,installer/setup.ini) +endif +libs:: $(SETUP_INI) + cat $< | \ + sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \ + $(FINAL_TARGET)/setup.ini +endif + # When we unpack fennec on MacOS X the platform.ini and application.ini are in slightly # different locations that on all other platforms ifeq (Darwin, $(OS_ARCH)) diff --git a/mobile/locales/en-US/installer/setup.ini b/mobile/locales/en-US/installer/setup.ini index 4ac3ad186d6d..1ed7de333fd8 100644 --- a/mobile/locales/en-US/installer/setup.ini +++ b/mobile/locales/en-US/installer/setup.ini @@ -1,17 +1,17 @@ ; This file is in the UTF-8 encoding [Strings] -AppShortName=Fennec -AppLongName=Mozilla Fennec -WindowCaption=Mozilla Fennec Setup -InstallTo=Install Fennec to +AppShortName=%MOZ_APP_DISPLAYNAME% +AppLongName=Mozilla %MOZ_APP_DISPLAYNAME% +WindowCaption=Mozilla %MOZ_APP_DISPLAYNAME% Setup +InstallTo=Install %MOZ_APP_DISPLAYNAME% to Install=Install Cancel=Cancel -InstalledSuccessfully=Mozilla Fennec has been installed successfully. +InstalledSuccessfully=Mozilla %MOZ_APP_DISPLAYNAME% has been installed successfully. ExtractionError=Archive extraction error: ThereWereErrors=There were errors during installation: CreatingUserProfile=Creating user profile. Please wait... -UninstallCaption=Mozilla Fennec Uninstall +UninstallCaption=Mozilla %MOZ_APP_DISPLAYNAME% Uninstall FilesWillBeRemoved=All files will be removed from AreYouSure=Are you sure? -InstallationNotFound=Mozilla Fennec installation not found. -UninstalledSuccessfully=Mozilla Fennec has been uninstalled successfully. +InstallationNotFound=Mozilla %MOZ_APP_DISPLAYNAME% installation not found. +UninstalledSuccessfully=Mozilla %MOZ_APP_DISPLAYNAME% has been uninstalled successfully.