From: Andrea Zagli Date: Wed, 22 May 2013 10:49:20 +0000 (+0200) Subject: Icona per win (closes #104). X-Git-Tag: 0.0.3~18 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=643c8539636502d41b737f1834f81a35af56ad56;p=solipa%2Forganigramma Icona per win (closes #104). --- diff --git a/.gitignore b/.gitignore index 241c624..1f99f59 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ stamp-h1 .anjuta* *exe make_installer.sh +resources.rc diff --git a/configure.ac b/configure.ac index aafca9e..aa92754 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 43a7fc4..a056048 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 index 0000000..8b83290 --- /dev/null +++ b/src/resources.rc.in @@ -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 " + 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