[dia/dia-0-97] Makefiles to generate the installer locales



commit 68892e7fdb9303e273848e481bf2118e7248ebbc
Author: Steffen Macke <sdteffen sdteffen de>
Date:   Thu Jan 27 21:34:13 2011 +0100

    Makefiles to generate the installer locales

 installer/win32/Makefile.am         |    2 +-
 installer/win32/gennsh.c            |    5 ++-
 installer/win32/locale/Makefile.am  |    3 +-
 installer/win32/locale/makefile.msc |   56 +++++++++++++++++++++++++++++++++++
 installer/win32/makefile.msc        |   23 ++++++++++++++
 5 files changed, 85 insertions(+), 4 deletions(-)
---
diff --git a/installer/win32/Makefile.am b/installer/win32/Makefile.am
index 416cfc9..f715f7e 100644
--- a/installer/win32/Makefile.am
+++ b/installer/win32/Makefile.am
@@ -3,4 +3,4 @@
 SUBDIRS = locale
 
 EXTRA_DIST = dia-diagram.ico dia-header.bmp dia-install.ico dia-intro.bmp \
-	dia-uninstall.ico dia.nsi langmacros.nsh gennsh.c 
+	dia-uninstall.ico dia.nsi langmacros.nsh gennsh.c makefile.msc
diff --git a/installer/win32/gennsh.c b/installer/win32/gennsh.c
old mode 100644
new mode 100755
index 341f4e5..a176912
--- a/installer/win32/gennsh.c
+++ b/installer/win32/gennsh.c
@@ -2,7 +2,7 @@
  * Copyright (C) 1998 Alexander Larsson
  *
  * gennsh.c
- * Copyright (C) 2009 Steffen Macke <sdteffen sdteffen de>
+ * Copyright (C) 2009,2011 Steffen Macke <sdteffen sdteffen de>
  *
  * gennsh is a program that allows to generate locale file for the
  * Dia for Windows installer
@@ -30,7 +30,7 @@
 int main(int argc, char *argv[])
 {
 
-  bindtextdomain("dia", "../../build/win32/locale");
+  bindtextdomain("dia", "../../../build/win32/locale");
   bind_textdomain_codeset("dia", "UTF-8");
   textdomain("dia");
 
@@ -87,4 +87,5 @@ int main(int argc, char *argv[])
 
   /* Installer message: Uninstallation warning. Keep $\PROFILE\.dia */
   printf("!define un.DIA_DOTDIA_WARNING \"%s\"\n", _("This will completely delete $PROFILE\.dia and all subdirectories. Continue?"));
+  return 0;
 }
diff --git a/installer/win32/locale/Makefile.am b/installer/win32/locale/Makefile.am
index 0ba4c1c..8a53394 100644
--- a/installer/win32/locale/Makefile.am
+++ b/installer/win32/locale/Makefile.am
@@ -1,3 +1,4 @@
 ## Process this file with automake to produce Makefile.in
 
-EXTRA_DIST = english.nsh french.nsh german.nsh hungarian.nsh slovak.nsh
+EXTRA_DIST = english.nsh french.nsh german.nsh hungarian.nsh slovak.nsh \
+	makefile.msc
diff --git a/installer/win32/locale/makefile.msc b/installer/win32/locale/makefile.msc
new file mode 100755
index 0000000..74ad985
--- /dev/null
+++ b/installer/win32/locale/makefile.msc
@@ -0,0 +1,56 @@
+GENNSH = ..\gennsh
+ICONV = iconv
+
+LOCALEFILES = \
+	eu.nsh \
+	fi.nsh \
+	gl.nsh \
+	ko.nsh \
+	zh.nsh
+
+UTF8FILES = \
+	basque.nsh \
+	finnish.nsh \
+	galego.nsh \
+	korean.nsh \
+	chinese.nsh
+	
+all: $(LOCALEFILES)	
+
+clean:
+	del $(LOCALEFILES) $(UTF8FILES)
+	
+eu.nsh: basque.nsh
+	$(ICONV) -f UTF-8 -t ISO-8859-1  basque.nsh  > $@
+
+basque.nsh:
+	SET LANG=eu
+	$(GENNSH) > $@
+
+finnish.nsh:
+	SET LANG=fi
+	$(GENNSH) > $@
+	
+fi.nsh: finnish.nsh
+	$(ICONV) -f UTF-8 -t ISO-8859-1 finnish.nsh > $@
+	
+galego.nsh:
+	SET LANG=gl
+	$(GENNSH) > $@
+
+gl.nsh: galego.nsh
+	$(ICONV) -f UTF-8 -t ISO-8859-1 galego.nsh > $@
+
+korean.nsh:	
+	SET LANG=ko
+	$(GENNSH) > $@
+
+ko.nsh: korean.nsh
+	$(ICONV) -f UTF-8 -t ISO-2022-KR korean.nsh > $@
+
+chinese.nsh:	
+	SET LANG=zh_CN
+	$(GENNSH) > $@
+	
+zh.nsh: chinese.nsh	
+	$(ICONV) -f UTF-8 -t GB2312 chinese.nsh > $@
diff --git a/installer/win32/makefile.msc b/installer/win32/makefile.msc
new file mode 100755
index 0000000..9f4f059
--- /dev/null
+++ b/installer/win32/makefile.msc
@@ -0,0 +1,23 @@
+TOP = ..\..\..
+PRJ_TOP = ..\..
+!INCLUDE $(TOP)\glib\build\win32\make.msc
+
+PKG_CFLAGS = $(LIBXML2_CFLAGS) 
+
+PKG_LINK = $(INTL_LIBS)
+
+LDFLAGS = /link $(LINKDEBUG) /machine:ix86
+INSTALL = copy
+
+CFLAGS = -I. -I$(PRJ_TOP)
+
+## targets
+all : \
+	gennsh.exe
+	
+gennsh.exe : gennsh.c gennsh.obj
+	$(CC) $(CFLAGS) -Fegennsh.exe gennsh.obj \
+	$(LDFLAGS) $(PKG_LINK) /subsystem:console
+
+.c.obj :
+	$(CC) $(CFLAGS) -c $(PKG_CFLAGS) $<



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]