Mercurial > pidgin.yaz
changeset 14454:22cb019456bd
[gaim-migrate @ 17168]
Use NSIS' built-in language registry key stuff. This fixes the installer forgetting which language you've selected.
Fill the installer file versioning information - Unfortunately, there doesn't appear to be a way to manipulate the value to use for the ProductVersion inside the NSIS script, so the Makefile needs to massage the data.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 05 Sep 2006 15:40:24 +0000 |
parents | 0af643d766bd |
children | c2c916d4d95c |
files | Makefile.mingw gaim-installer.nsi |
diffstat | 2 files changed, 50 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.mingw Tue Sep 05 13:55:50 2006 +0000 +++ b/Makefile.mingw Tue Sep 05 15:40:24 2006 +0000 @@ -8,6 +8,30 @@ GAIM_TOP := . include $(GAIM_TOP)/libgaim/win32/global.mak +# Generate a X.X.X.X version for the installer file versioning header +# The last digit will be 99 for a final release, 0 for dev or unknown, or the beta number +GAIM_PRODUCT_VERSION = $(shell \ +awk 'BEGIN {FS="."} { \ + if (int($$3) == $$3) { \ + $$4 = "99"; \ + } else { \ + $$5 = $$3; \ + sub(int($$3), "", $$5); \ + if ($$5 == "dev") { \ + $$4 = "0"; \ + } else { \ + if (sub("beta", "", $$5) > 0) { \ + $$4 = $$5; \ + } else { \ + $$4 = "0"; \ + } \ + } \ + } \ + printf("%s.%s.%s.%s", $$1, $$2, int($$3), $$4); \ + exit; \ +}' VERSION) + + all: $(GAIM_CONFIG_H) $(MAKE) -C $(GAIM_LIB_TOP) -f $(GAIM_WIN32_MAKEFILE) $(MAKE) -C $(GAIM_GTK_TOP) -f $(GAIM_WIN32_MAKEFILE) @@ -19,13 +43,13 @@ $(MAKE) -C $(GAIM_PO_TOP) -f $(GAIM_WIN32_MAKEFILE) install installer: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DWITH_GTK gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DWITH_GTK gaim-installer.nsi installer_nogtk: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" gaim-installer.nsi installer_debug: install - $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DDEBUG gaim-installer.nsi + $(MAKENSIS) /V3 /DGAIM_VERSION="$(GAIM_VERSION)" /DGAIM_PRODUCT_VERSION="$(GAIM_PRODUCT_VERSION)" /DDEBUG gaim-installer.nsi installers: installer installer_nogtk
--- a/gaim-installer.nsi Tue Sep 05 13:55:50 2006 +0000 +++ b/gaim-installer.nsi Tue Sep 05 15:40:24 2006 +0000 @@ -59,7 +59,6 @@ !define HKLM_APP_PATHS_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" !define GAIM_STARTUP_RUN_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" !define GAIM_UNINST_EXE "gaim-uninst.exe" -!define GAIM_REG_LANG "Installer Language" !define GTK_VERSION "2.6.10" !define GTK_REG_KEY "SOFTWARE\GTK\2.0" @@ -75,6 +74,23 @@ !define DOWNLOADER_URL "http://gaim.sourceforge.net/win32/download_redir.php" ;-------------------------------- +;Version resource +VIProductVersion "${GAIM_PRODUCT_VERSION}" +VIAddVersionKey "ProductName" "Gaim" +VIAddVersionKey "FileVersion" "${GAIM_VERSION}" +VIAddVersionKey "ProductVersion" "${GAIM_VERSION}" +VIAddVersionKey "LegalCopyright" "" +!ifdef WITH_GTK +VIAddVersionKey "FileDescription" "Gaim Installer (w/ GTK+ Installer)" +!else +!ifdef DEBUG +VIAddVersionKey "FileDescription" "Gaim Installer (Debug Version)" +!else +VIAddVersionKey "FileDescription" "Gaim Installer (w/o GTK+ Installer)" +!endif +!endif + +;-------------------------------- ;Modern UI Configuration !define MUI_ICON ".\gtk\pixmaps\gaim-install.ico" @@ -87,6 +103,10 @@ !define MUI_LICENSEPAGE_BUTTON $(GAIM_LICENSE_BUTTON) !define MUI_LICENSEPAGE_TEXT_BOTTOM $(GAIM_LICENSE_BOTTOM_TEXT) + !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" + !define MUI_LANGDLL_REGISTRY_KEY ${GAIM_REG_KEY} + !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" + !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_ABORTWARNING @@ -459,9 +479,6 @@ StrCmp $R0 "NONE" done SetOverwrite off - ; Write out installer language - WriteRegStr HKCU "${GAIM_REG_KEY}" "${GAIM_REG_LANG}" "$LANGUAGE" - ; write out uninstaller SetOverwrite on WriteUninstaller "$INSTDIR\${GAIM_UNINST_EXE}" @@ -1184,8 +1201,8 @@ Call un.RunCheck StrCpy $name "Gaim ${GAIM_VERSION}" - ; Get stored language prefrence - ReadRegStr $LANGUAGE HKCU ${GAIM_REG_KEY} "${GAIM_REG_LANG}" + ; Get stored language preference + !insertmacro MUI_UNGETLANGUAGE FunctionEnd