Re: [Ekiga-devel-list] ekiga.rc



Am Sonntag, den 19.04.2009, 09:00 +0200 schrieb Julien Puydt:
> Michael Rickmann a écrit :
> > First we should decide whether the resources are moved to the win32
> > subdirectory. With my patch the resources would remain in the base
> > directory. I think that files containing copyright information, as the
> > resources do, could live there. Additionally, my patch is not quite
> > complete as it does not contain the change made to the win32 Makefile -
> > it will need more changes when we have ekiga 3.2 running - where I use
> > RC instead of WINDRES as an exported variable. RC seems to be a commonly
> > accepted abbreviation for a resource compiler. I can provide an updated
> > patch.
> 
> It's win32-specific, so indeed it would be nice to push it into win32/.
> 
> Ping us back when you have something you're happy with.
> 
> Thanks.
> 
> Snark

It took me some time to come up with something satisfying. Actually
there are two patches which I use now, a minor one for cleaning up
Ekiga's config files and then the ekiga.rc patch.

The first diff corrects my own mistake. The libsasl2 includes have to be
added to the ldap ones and must not replace them. Additionally it
removes no longer used Win32 config files from WIN32_DIST.

The second diff deals with the Windows resources. They are called now
ekiga-rc.rc and are moved to the win32 subdir. The more distinct name is
necessary because I have integrated them into the autoconf / libtool
build process. ekiga-rc.rc uses now EKIGA_REVISION as defined in
src/revision.h instead of the ancient CVS_VERSION. Since Gnome changed
to git I had to replace SVN_REVISION in src/Makefile.am. I have chosen
the output of git-describe which is in the form
EKIGA_3_2_0-101-g86ade0b, i.e. the 101st commit to tag EKIGA_3_2_0,
where the hash of the commit starts with 86ade0b. This definition of
EKIGA_REVISION will affect ptrace output of linux too. You can change it
to something more appropriate as long as it is quoted.
Regards
Michael
diff -ur ekiga.orig/configure.ac ekiga/configure.ac
--- ekiga.orig/configure.ac	2009-04-12 12:42:55.508570601 +0200
+++ ekiga/configure.ac	2009-04-12 13:16:53.096524000 +0200
@@ -351,7 +351,7 @@
   AC_MSG_RESULT()
 
   if test -f ${with_libsasl2_dir}/include/sasl/sasl.h; then
-  	LDAP_CFLAGS="-I${with_libsasl2_dir}/include"
+  	LDAP_CFLAGS="${LDAP_CFLAGS} -I${with_libsasl2_dir}/include"
   else
   	AC_MSG_ERROR(*** libsasl2 headers not found)
   fi
diff -ur ekiga.orig/Makefile.am ekiga/Makefile.am
--- ekiga.orig/Makefile.am	2009-04-12 12:42:55.508570601 +0200
+++ ekiga/Makefile.am	2009-04-12 13:17:42.672524000 +0200
@@ -21,13 +21,6 @@
 WIN32_DIST = \
 	win32/ico/ekiga.ico					\
 	win32/ico/ekiga-uninstall.ico				\
-	win32/diff/opal_opal.pc.in				\
-	win32/diff/ptlib_Makefile.am				\
-        win32/diff/ptlib_ptlib.pc.in                            \
-	win32/diff/opal_configure.ac				\
-	win32/diff/opal_Makefile.am				\
-	win32/diff/ptlib_configure.ac				\
-	win32/diff/ptlib_pwlib.pc.in				\
         win32/directx/Amvideo.h                                 \
         win32/directx/control.h                                 \
         win32/directx/ddraw.h                                   \
diff -urN ekiga.orig/configure.ac ekiga/configure.ac
--- ekiga.orig/configure.ac	2009-04-26 12:57:19.923585067 +0200
+++ ekiga/configure.ac	2009-04-26 12:57:40.999587765 +0200
@@ -100,6 +100,8 @@
     ;;
 
   mingw* )
+    LT_PROG_RC
+
     gm_platform="mingw"
     CFLAGS="$CFLAGS -DSTATIC_LIBS_USED"
     CXXFLAGS="$CXXFLAGS -DSTATIC_LIBS_USED"
diff -urN ekiga.orig/ekiga.rc ekiga/ekiga.rc
--- ekiga.orig/ekiga.rc	2009-04-26 12:55:34.415613661 +0200
+++ ekiga/ekiga.rc	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-#include "config.h"
-
-1 VERSIONINFO
-FILEVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER, 0
-PRODUCTVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER, 0
-FILEFLAGSMASK 0
-FILEOS 0x40000
-FILETYPE 1
-{
- BLOCK "StringFileInfo"
- {
-  BLOCK "040904E4"
-  {
-   VALUE "CompanyName", "see www.ekiga.org"
-   VALUE "FileDescription", "Ekiga is a free Voice over IP phone"
-   VALUE "FileVersion", VERSION
-   VALUE "InternalName", "Ekiga"
-   VALUE "LegalCopyright", "2000-2009 Damien Sandras"
-   VALUE "ProductName", "Ekiga"
-   VALUE "OriginalFilename", "ekiga.exe"
-   VALUE "ProductVersion", PACKAGE_VERSION
-#ifdef CVS_VERSION
-   VALUE "SpecialBuild", CVS_VERSION
-#endif
-  }
- }
-}
-
-2 ICON DISCARDABLE "win32/ico/ekiga.ico"
diff -urN ekiga.orig/Makefile.am ekiga/Makefile.am
--- ekiga.orig/Makefile.am	2009-04-26 12:57:19.923585067 +0200
+++ ekiga/Makefile.am	2009-04-26 12:57:41.003585760 +0200
@@ -31,7 +31,7 @@
         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 -urN ekiga.orig/src/gui/main.cpp ekiga/src/gui/main.cpp
--- ekiga.orig/src/gui/main.cpp	2009-04-26 12:55:46.645665310 +0200
+++ ekiga/src/gui/main.cpp	2009-04-26 13:00:57.503586877 +0200
@@ -4466,7 +4466,7 @@
 #endif
 
 #ifdef EKIGA_REVISION
-  PTRACE(1, "Ekiga SVN revision: " << EKIGA_REVISION);
+  PTRACE(1, "Ekiga git revision: " << EKIGA_REVISION);
 #endif
 
 #ifdef HAVE_DBUS
diff -urN ekiga.orig/src/Makefile.am ekiga/src/Makefile.am
--- ekiga.orig/src/Makefile.am	2009-04-26 12:55:46.552160942 +0200
+++ ekiga/src/Makefile.am	2009-04-26 12:57:41.003585760 +0200
@@ -85,6 +85,12 @@
 	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 @@
 
 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 -urN ekiga.orig/win32/ekiga-rc.rc ekiga/win32/ekiga-rc.rc
--- ekiga.orig/win32/ekiga-rc.rc	1970-01-01 01:00:00.000000000 +0100
+++ ekiga/win32/ekiga-rc.rc	2009-04-26 12:57:41.003585760 +0200
@@ -0,0 +1,28 @@
+#include "config.h"
+#include "src/revision.h"
+
+1 VERSIONINFO
+FILEVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER, 0
+PRODUCTVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER, 0
+FILEFLAGSMASK 0
+FILEOS 0x40000
+FILETYPE 1
+{
+ BLOCK "StringFileInfo"
+ {
+  BLOCK "040904E4"
+  {
+   VALUE "CompanyName", "see www.ekiga.org"
+   VALUE "FileDescription", "Ekiga is a free Voice over IP phone"
+   VALUE "FileVersion", VERSION
+   VALUE "InternalName", "Ekiga"
+   VALUE "LegalCopyright", "2000-2009 Damien Sandras"
+   VALUE "ProductName", "Ekiga"
+   VALUE "OriginalFilename", "ekiga.exe"
+   VALUE "ProductVersion", PACKAGE_VERSION
+   VALUE "SpecialBuild", EKIGA_REVISION
+  }
+ }
+}
+
+2 ICON DISCARDABLE "win32/ico/ekiga.ico"
diff -urN ekiga.orig/win32/Makefile ekiga/win32/Makefile
--- ekiga.orig/win32/Makefile	2009-04-26 12:55:46.651579750 +0200
+++ ekiga/win32/Makefile	2009-04-26 12:57:41.003585760 +0200
@@ -50,7 +50,7 @@
 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 @@
 	(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
 


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