pidgin: f1167f90: Explicitly save the language when using ...

datallah at pidgin.im datallah at pidgin.im
Wed Aug 26 00:06:41 EDT 2009


-----------------------------------------------------------------
Revision: f1167f906624ca218b6fd2a39b10be205ca99892
Ancestor: 22cbd3e44c758f0db317d5684626ff755de0a07e
Author: datallah at pidgin.im
Date: 2009-08-26T03:59:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f1167f906624ca218b6fd2a39b10be205ca99892

Modified files:
        pidgin/win32/nsis/pidgin-installer.nsi

ChangeLog: 

Explicitly save the language when using the silent installer (if it is explicitly set).  NSIS doesn\'t do this for us. Fixes #8658.

-------------- next part --------------
============================================================
--- pidgin/win32/nsis/pidgin-installer.nsi	0e3dfb77c656cd2d40e5de3ac6490bba85a2cf5e
+++ pidgin/win32/nsis/pidgin-installer.nsi	a296a33ee8aedc4404a027d3d0df6eb0ac38204d
@@ -12,6 +12,7 @@ Var SPELLCHECK_SEL
 Var ISSILENT
 Var STARTUP_RUN_KEY
 Var SPELLCHECK_SEL
+Var LANGUAGE_SET
 
 ;--------------------------------
 ;Configuration
@@ -74,7 +75,7 @@ SetDateSave on
 !define PERL_REG_KEY				"SOFTWARE\Perl"
 !define PERL_DLL				"perl510.dll"
 !define GTK_DEFAULT_INSTALL_PATH		"$COMMONFILES\GTK\2.0"
-!define GTK_RUNTIME_INSTALLER			"..\..\..\..\gtk_installer\gtk-runtime*.exe"
+!define GTK_RUNTIME_INSTALLER			"..\..\..\..\gtk_installer\gtk-runtime-${GTK_INSTALL_VERSION}*.exe"
 
 !define ASPELL_REG_KEY				"SOFTWARE\Aspell"
 !define DOWNLOADER_URL				"http://pidgin.im/win32/download_redir.php"
@@ -1341,10 +1342,12 @@ Function .onInit
   IfSilent 0 +2
     StrCpy $ISSILENT "/NOUI"
 
+  StrCpy $LANGUAGE_SET "0"
   ClearErrors
   ${GetOptions} "$R3" "/L=" $R1
   IfErrors +3
   StrCpy $LANGUAGE $R1
+  StrCpy $LANGUAGE_SET "1"
   Goto skip_lang
 
   ; Select Language
@@ -1407,6 +1410,17 @@ FunctionEnd
   Pop $R0
 FunctionEnd
 
+Function .onInstSuccess
+  ; NSIS doesn't appear to save the language when in Silent Mode, so we do so manually
+  IfSilent 0 done
+
+  StrCmp $LANGUAGE_SET "0" done
+
+  WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
+
+  done:
+FunctionEnd
+
 Function un.onInit
   Call un.RunCheck
   StrCpy $name "Pidgin ${PIDGIN_VERSION}"


More information about the Commits mailing list