]> saetta.ns0.it Git - solipa/organigramma/commitdiff
Icona per win (closes #104).
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Wed, 22 May 2013 10:49:20 +0000 (12:49 +0200)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Wed, 22 May 2013 10:49:20 +0000 (12:49 +0200)
.gitignore
configure.ac
src/Makefile.am
src/resources.rc.in [new file with mode: 0644]

index 241c6247d2754f0e5d1b23c373b19a3e26711576..1f99f59e26f23c6efad121fa1d0176277c28d300 100644 (file)
@@ -28,3 +28,4 @@ stamp-h1
 .anjuta*
 *exe
 make_installer.sh
+resources.rc
index aafca9e1f29881525b01fa7ed763df044c53ca7b..aa92754a76f6ca290cfe168b328b99a55b202035 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, 1)
+
 AC_PREREQ([2.65])
-AC_INIT([organigramma], [0.0.1], [azagli@libero.it])
+AC_INIT([organigramma], [maj.min.mic], [azagli@libero.it])
 AC_CONFIG_SRCDIR([src/main.c])
 AC_CONFIG_HEADER([config.h])
 
@@ -44,10 +48,31 @@ AC_SUBST(ORGANIGRAMMA_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([
        liborganigramma.pc
        Makefile
        src/Makefile
+       src/resources.rc
        libreria/Makefile
        data/Makefile
        data/organigramma/Makefile
index 43a7fc4f60e8e3d913cc33602535c59cecac48d4..a0560485c851778ea603dd667c03dd87d8244060 100644 (file)
@@ -8,6 +8,12 @@ AM_CPPFLAGS = $(ORGANIGRAMMA_CFLAGS) \
 LIBS = $(ORGANIGRAMMA_LIBS) \
        -export-dynamic
 
+.rc.o:
+       $(WINDRES) $^ -o $@
+
+resources.o: resources.rc
+       $(WINDRES) $^ -o $@
+
 bin_PROGRAMS = organigramma
 
 marshal.c: marshal.h organigramma_marshal.list $(GLIB_GENMARSHAL)
@@ -86,4 +92,13 @@ organigramma_SOURCES = \
                 ufficiorecapito.c \
                 ufficiorecapito.h \
                 ufficiostanza.c \
-                ufficiostanza.h
\ No newline at end of file
+                ufficiostanza.h
+
+if PLATFORM_WIN32
+EXTRALDFLAGS=-mconsole -mwindows
+organigramma_SOURCES += resources.rc
+else
+EXTRALDFLAGS=
+endif
+
+organigramma_LDFLAGS = $(EXTRALDFLAGS)
diff --git a/src/resources.rc.in b/src/resources.rc.in
new file mode 100644 (file)
index 0000000..8b83290
--- /dev/null
@@ -0,0 +1,25 @@
+AppIcon ICON "..\\data\\organigramma\\images\\organigramma.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", "Organigramma"
+      VALUE "FileVersion", "@V_MAJOR@.@V_MINOR@.@V_MICRO@"
+      VALUE "InternalName", "organigramma"
+      VALUE "LegalCopyright", "Copyright 2013 Andrea Zagli <a.zagli@comune.scandicci.fi.it>"
+      VALUE "OriginalFilename", "organigramma.exe"
+      VALUE "ProductName", "Organigramma"
+      VALUE "ProductVersion", "@V_MAJOR@.@V_MINOR@.@V_MICRO@"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x0410, 1252
+  END
+END