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



Am Samstag, den 18.04.2009, 14:57 +0200 schrieb Julien Puydt:
> Eugen Dedu a écrit :
> > Is there a way to move ekiga.rc from root to win32?
> 
> 1) git mv ekiga.rc win32/
> 2) make sure any file referencing ekiga.rc now searches for it in win32/
> 
> Snark

Could you please rename it so that the basename is distinctive, e.g.
ekiga-rc.rc ? I ask this because eventually we can include compilation
of the resources into the autoconf/libtool make process and then an
ekiga.o file would be a bit dangerous I think. Additionally VALUE
"SpecialBuild", CVS_VERSION in the resource file is a bit outdated. Now
an EKIGA_REVISION is defined in src/revision.h . See attached patch as
an example for how one could handle the Win32 resources.
Regards
Michael
diff -urN ekiga.orig/configure.ac ekiga/configure.ac
--- ekiga.orig/configure.ac	2009-04-14 10:46:36.796362971 +0200
+++ ekiga/configure.ac	2009-04-14 10:47:05.264362806 +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-14 10:44:37.672360584 +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/ekiga-rc.rc ekiga/ekiga-rc.rc
--- ekiga.orig/ekiga-rc.rc	1970-01-01 01:00:00.000000000 +0100
+++ ekiga/ekiga-rc.rc	2009-04-14 10:47:05.268363315 +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/Makefile.am ekiga/Makefile.am
--- ekiga.orig/Makefile.am	2009-04-14 10:46:36.796362971 +0200
+++ ekiga/Makefile.am	2009-04-14 10:47:05.268363315 +0200
@@ -31,7 +31,7 @@
         win32/directx/mingw_dshow_port.h                        \
         win32/directx/strmif.h                                  \
         win32/directx/uuids.h                                   \
-	ekiga.rc						\
+	ekiga-rc.rc						\
 	win32/Makefile						\
 	win32/nsisinstaller/ekiga.nsi				\
 	win32/nsisinstaller/language_files/hungarian.nsh	\
diff -urN ekiga.orig/src/Makefile.am ekiga/src/Makefile.am
--- ekiga.orig/src/Makefile.am	2009-04-14 10:44:37.049435709 +0200
+++ ekiga/src/Makefile.am	2009-04-14 10:48:39.744363890 +0200
@@ -85,6 +85,12 @@
 	ekiga.h			                \
 	ekiga.cpp
 
+# resources
+if WIN32
+ekiga_SOURCES +=                   	\
+	$(top_srcdir)/ekiga-rc.rc
+endif
+
 if HAVE_DBUS 
 ekiga_SOURCES +=		\
 	dbus-helper/dbus.h	\
@@ -131,10 +137,13 @@
 SVN_REVISION=$(shell head ../.svn/entries -n11 2>/dev/null | tail -n1)
 CACHED_REVISION=$(shell cat revision.h 2>/dev/null | cut -c24-)
 
+.rc.o:
+	$(LIBTOOL) --tag=RC --mode=compile $(RC) $< -o $@ -I $(top_srcdir)
+
 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; \
+            echo "#define EKIGA_REVISION \"$(SVN_REVISION)\"" > revision.h; \
           fi \
         else \
           if !(test -e "./revision.h"); then\


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