[ekiga] Moved and improved ekiga RC file for win32



commit d301b926c1ee9eefb88a479955c6d7eeebddfd13
Author: Julien Puydt <jpuydt gnome org>
Date:   Sun Apr 26 16:38:19 2009 +0200

    Moved and improved ekiga RC file for win32
    
    Patch from Michael Rickmann
---
 Makefile.am                   |    2 +-
 configure.ac                  |    2 ++
 src/Makefile.am               |   17 +++++++++++++----
 src/gui/main.cpp              |    2 +-
 win32/Makefile                |    3 +--
 ekiga.rc => win32/ekiga-rc.rc |    5 ++---
 6 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a8eb72f..c0faec5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,7 +38,7 @@ WIN32_DIST = \
         win32/directx/mingw_dshow_port.h                        \
         win32/directx/strmif.h                                  \
         win32/directx/uuids.h                                   \
-	ekiga.rc						\
+	win32/ekiga-rc.rc					\
 	win32/Makefile						\
 	win32/nsisinstaller/ekiga.nsi				\
 	win32/nsisinstaller/language_files/hungarian.nsh	\
diff --git a/configure.ac b/configure.ac
index d6bbd1b..cf3397c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,8 @@ case $target_os in
     ;;
 
   mingw* )
+    LT_PROG_RC
+
     gm_platform="mingw"
     CFLAGS="$CFLAGS -DSTATIC_LIBS_USED"
     CXXFLAGS="$CXXFLAGS -DSTATIC_LIBS_USED"
diff --git a/src/Makefile.am b/src/Makefile.am
index 67cd79f..5dc2e8b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -85,6 +85,12 @@ ekiga_SOURCES +=				\
 	ekiga.h			                \
 	ekiga.cpp
 
+# resources
+if WIN32
+ekiga_SOURCES +=                   	\
+	$(top_srcdir)/win32/ekiga-rc.rc
+endif
+
 if HAVE_DBUS 
 ekiga_SOURCES +=		\
 	dbus-helper/dbus.h	\
@@ -128,13 +134,16 @@ service_in_files = $(service_DATA:.service=.service.in)
 
 endif
 
-SVN_REVISION=$(shell head ../.svn/entries -n11 2>/dev/null | tail -n1)
+.rc.o:
+	$(LIBTOOL) --tag=RC --mode=compile $(RC) $< -o $@ -I $(top_srcdir)
+
+GIT_REVISION=\"$(shell (cd ../.git; git describe ))\"
 CACHED_REVISION=$(shell cat revision.h 2>/dev/null | cut -c24-)
 
 src/revision.h:
-$(shell if test -e "../.svn/entries"; then \
-          if test "x$(SVN_REVISION)" != "x$(CACHED_REVISION)"; then \
-            echo "#define EKIGA_REVISION $(SVN_REVISION)" > revision.h; \
+$(shell if test -d "../.git" -a -n "$$(which git)"; then \
+          if test "x$(GIT_REVISION)" != "x$(CACHED_REVISION)"; then \
+            echo "#define EKIGA_REVISION $(GIT_REVISION)" > revision.h; \
           fi \
         else \
           if !(test -e "./revision.h"); then\
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 2602ba9..4ba90e0 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -4466,7 +4466,7 @@ main (int argc,
 #endif
 
 #ifdef EKIGA_REVISION
-  PTRACE(1, "Ekiga SVN revision: " << EKIGA_REVISION);
+  PTRACE(1, "Ekiga git revision: " << EKIGA_REVISION);
 #endif
 
 #ifdef HAVE_DBUS
diff --git a/win32/Makefile b/win32/Makefile
index 4eef42e..9c90088 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -50,7 +50,7 @@ export RANLIB:=$(HOST_TOOL_PREFIX)-ranlib
 export DLLTOOL:=$(HOST_TOOL_PREFIX)-dlltool
 export DLLWRAP:=$(HOST_TOOL_PREFIX)-dllwrap
 export OBJDUMP:=$(HOST_TOOL_PREFIX)-objdump
-export WINDRES:=$(HOST_TOOL_PREFIX)-windres
+export RC:=$(HOST_TOOL_PREFIX)-windres
 export STRIP:=$(HOST_TOOL_PREFIX)-strip
 export AS:=$(HOST_TOOL_PREFIX)-as
 export CFLAGS:=-I$(INCLUDEDIR) $(MACH_FLAGS) -DPTRACING
@@ -605,7 +605,6 @@ else
 	(cd $(EKIGA_DIR)/; ACLOCAL_FLAGS="-I $(BUILDROOT)/share/aclocal"; ./autogen.sh $(confekiga) )
 endif
 $(EKIGA_DIR)/src/ekiga.exe: binaries $(EKIGA_DIR)/config.status
-	$(WINDRES) $(EKIGA_DIR)/ekiga.rc $(EKIGA_DIR)/ekiga_rc.o -I $(INCLUDEDIR)
 	$(MAKE) $(MAKEOPTS) -C $(EKIGA_DIR)
 	$(MAKE) $(MAKEOPTS) -C $(EKIGA_DIR)/help
 
diff --git a/ekiga.rc b/win32/ekiga-rc.rc
old mode 100755
new mode 100644
similarity index 90%
rename from ekiga.rc
rename to win32/ekiga-rc.rc
index 5babba2..2045414
--- a/ekiga.rc
+++ b/win32/ekiga-rc.rc
@@ -1,4 +1,5 @@
 #include "config.h"
+#include "src/revision.h"
 
 1 VERSIONINFO
 FILEVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER, 0
@@ -19,9 +20,7 @@ FILETYPE 1
    VALUE "ProductName", "Ekiga"
    VALUE "OriginalFilename", "ekiga.exe"
    VALUE "ProductVersion", PACKAGE_VERSION
-#ifdef CVS_VERSION
-   VALUE "SpecialBuild", CVS_VERSION
-#endif
+   VALUE "SpecialBuild", EKIGA_REVISION
   }
  }
 }



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