]> saetta.ns0.it Git - solipa/territorio/commitdiff
Aggiunto il file risorse win.
authorAndrea Zagli <azagli@libero.it>
Mon, 26 Dec 2016 18:15:19 +0000 (19:15 +0100)
committerAndrea Zagli <azagli@libero.it>
Mon, 26 Dec 2016 18:15:19 +0000 (19:15 +0100)
configure.ac
src/Makefile.am
src/resources.rc.in [new file with mode: 0644]

index c4db9770bdc6598fef97efc5491f8c3cf554b621..e3bff55ed4e6f9b6b07570d22c050f5aee35b9ff 100644 (file)
@@ -1,8 +1,12 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
+m4_define(maj, 0)
+m4_define(min, 0)
+m4_define(mic, 3)
+
 AC_PREREQ([2.65])
-AC_INIT([territorio], [0.0.1], [azagli@libero.it])
+AC_INIT([territorio], [maj.min.mic], [azagli@libero.it])
 AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADER([config.h])
 
@@ -54,6 +58,26 @@ AC_SUBST(TERRITORIO_LIBS)
 
 # Checks for library functions.
 
+dnl ******************************
+dnl Check for Operating System
+dnl ******************************
+
+platform_win32=no
+
+case "$host" in
+*-mingw*)
+    platform_win32=yes
+    AC_CHECK_TOOL(WINDRES, windres, windres)
+    AC_SUBST(WINDRES)
+    ;;
+esac
+
+AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
+
+AC_SUBST(V_MAJOR, maj)
+AC_SUBST(V_MINOR, min)
+AC_SUBST(V_MICRO, mic)
+
 AC_CONFIG_FILES([
        libterritorio.pc
        Makefile
index b14787f63942c58c79aef2b1b71d27cf914feaf2..c0f3938ff6e1b0448e256651e550f46f5a52197b 100644 (file)
@@ -11,6 +11,12 @@ AM_CPPFLAGS = $(TERRITORIO_CFLAGS) \
 LIBS = $(TERRITORIO_LIBS) \
        -export-dynamic
 
+.rc.o:
+       $(WINDRES) $^ -o $@
+
+resources.o: resources.rc
+       $(WINDRES) $^ -o $@
+
 bin_PROGRAMS = territorio
 
 territorio_SOURCES = \
@@ -63,3 +69,12 @@ territorio_SOURCES = \
                 vie.h \
                 widget.c \
                 widget.h
+
+if PLATFORM_WIN32
+EXTRALDFLAGS=-mconsole -mwindows
+territorio_SOURCES += resources.rc
+else
+EXTRALDFLAGS=
+endif
+
+territorio_LDFLAGS = $(EXTRALDFLAGS)
diff --git a/src/resources.rc.in b/src/resources.rc.in
new file mode 100644 (file)
index 0000000..fcfe7e3
--- /dev/null
@@ -0,0 +1,25 @@
+AppIcon ICON "..\\data\\@PACKAGE@\\images\\@PACKAGE@.ico"
+
+1 VERSIONINFO
+FILEVERSION     @V_MAJOR@,@V_MINOR@,@V_MICRO@,0
+PRODUCTVERSION  @V_MAJOR@,@V_MINOR@,@V_MICRO@,0
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904E4"
+    BEGIN
+      VALUE "CompanyName", "Andrea Zagli"
+      VALUE "FileDescription", "Territorio"
+      VALUE "FileVersion", "@V_MAJOR@.@V_MINOR@.@V_MICRO@"
+      VALUE "InternalName", "@PACKAGE@"
+      VALUE "LegalCopyright", "Copyright 2010-2016 Andrea Zagli <azagli@libero.it>"
+      VALUE "OriginalFilename", "@PACKAGE@.exe"
+      VALUE "ProductName", "Territorio"
+      VALUE "ProductVersion", "@V_MAJOR@.@V_MINOR@.@V_MICRO@"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x0410, 1252
+  END
+END