diff Makefile.mingw @ 30396:62f0988c666c

Final piece of getting the installer translations integrated with the regular po files. This is a variation of the instructions at: http://nsis.sourceforge.net/Creating_language_files_and_integrating_with_MUI Using a Perl tool that the gcompris folks wrote. The NSIS LangStrings needed to have the underscores removed because .desktop files variable names may not contain underscores. Currently only translations with >=50% coverage will be present in the installer
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 19 May 2010 03:26:05 +0000
parents 8612d2ca0523
children c43570e34d81
line wrap: on
line diff
--- a/Makefile.mingw	Wed May 19 02:50:02 2010 +0000
+++ b/Makefile.mingw	Wed May 19 03:26:05 2010 +0000
@@ -75,6 +75,8 @@
 #build an expression for `find` to use to ignore the above files
 EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS))
 
+include $(PIDGIN_COMMON_RULES)
+
 .PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_installer_includes $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT)
 
 all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H)
@@ -101,7 +103,7 @@
 pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip:
 	pidgin/win32/nsis/generate_gtk_zip.sh `pwd`
 
-generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip debug_symbols_zip
+generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip debug_symbols_zip $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/nsis_translations.desktop
 	rm -f pidgin/win32/nsis/pidgin-translations.nsh pidgin/win32/nsis/pidgin-spellcheck.nsh pidgin/win32/nsis/pidgin-spellcheck-preselect.nsh
 	find $(STRIPPED_RELEASE_DIR)/locale -maxdepth 1 -mindepth 1 \
 	 -exec basename {} ';' \
@@ -119,6 +121,13 @@
 	 -e "s/ \"[^\"]*\"\ \"[^\"]*\"[\t\ ]*$$//" | \
          iconv -f utf-8 -t latin1 \
         > pidgin/win32/nsis/pidgin-spellcheck-preselect.nsh
+	#Generate the Installer translations
+	echo "!define GCOMPRIS_NSIS_INCLUDE_PATH \".\"" > $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/langmacros.nsh
+	echo "@INSERT_TRANSLATIONS@" >> $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/langmacros.nsh
+	$(PERL) $(PIDGIN_TREE_TOP)/pidgin/win32/nsis/create_nsis_translations.pl \
+		$(PIDGIN_TREE_TOP)/pidgin/win32/nsis/nsis_translations.desktop \
+		$(PIDGIN_TREE_TOP)/pidgin/win32/nsis/langmacros.nsh \
+		$(PIDGIN_TREE_TOP)/pidgin/win32/nsis/translations
 
 create_release_install_dir: install
 	rm -rf $(STRIPPED_RELEASE_DIR)