Re: [Ekiga-devel-list] Cross-compiling ekiga for win32



Am Freitag, den 26.06.2009, 01:48 +0200 schrieb Julien Puydt:
> Michael Cronenworth a écrit :
> > It depends on what OS you are building on. The files in win32/ are meant
> > for Debian. For Fedora or Windows you would need to customize it a little.
> 
> I'm using debian. I already had a few problems :
> - libxml' 2.6.26 isn't available anymore ;
> - the openldap compilation fails with :
> slapdmsg.rc -O coff -o slapdmsg.res
> make[1]: slapdmsg.rc : commande introuvable (means: command not found)
> 
> the Makefile (openldap's libraries/liblutil/ Makefile to be precise) 
> target triggering the problem is :
> lapdmsg.res: slapdmsg.rc slapdmsg.bin
>           $< -O coff -o $@
> 
> which doesn't look very honest.
> 
> It's pretty late... uh... early, so I don't think I'll be able to get 
> myself out of this problem before some rest :-/
> 
> Snark

Over the weekend I have stripped down my build process and can make a
suggestion how to revise Ekiga's Win32 build - Debian based only, sorry,
but better than the current.
First, I would like to submit three patches which should go to Ekiga's
code directly.

1ekiga_linkmagic.diff allows the linker to choose the correct entry
point for a Win32 gui application, so that one can use the -mwindows
flag.

2ekiga_shownormal.diff fixes a bug in the installer which would render
Ekiga unusable after a default installation. To start Ekiga minimized
you have to use Ekiga's own option not the Windows' one.

3ekiga_mvredir.diff fixes a problem under Windows 7 (possibly Vista
too). Current Ekiga writes its log files into the application directory.
Win7 allows this, but the files are sometimes truncated or they just
vanish. It appears they use some mapping to protect the application
programs. I would suggest to write the log files onto the user's desktop
if debug output was requested.

Now to the Ekiga's win32 directory. The current diff subdirectory
containes useless diffs. It is needed, however, to hold permanent and
temporary patches. Currently there are three for opal and one for ptlib
- I will file bug reports for them. The ptlib one is especially nasty
because it is Mingw's Win32 headers which are wrong (the WINVER issue),
but they seem to prefer being on the conservative side.
Finally, in the Makefile I have upgraded the versions of the required
libs mostly. libsasl2 and celt were added. And I changed to downloading
from git where required (Ekiga) or more reliable (ffmpeg).
I attach two forms of the changes to the win32 subdir, a long patch and
as an archive of the changed / required files.

As we cannot download the win32 subdir separately from git. Starting to
build Ekiga would change as follows.
Obtain Ekiga
  git clone git://git.gnome.org/ekiga
Make a copy of the win32 directory
  cp -a ekiga/win32 .
Change into that subdirectory, it will be your "BUILDROOT"
  cd win32
Get all the sources
  make update-sources
Build Ekiga
  make
The Makefile will try to move the already downloaded Ekiga to the right
place during the make update-sources.
I hope it helps.
Regards
Michael

diff -ur ekiga.orig/src/gui/main.cpp ekiga/src/gui/main.cpp
--- ekiga.orig/src/gui/main.cpp	2009-06-28 08:17:31.000000000 +0200
+++ ekiga/src/gui/main.cpp	2009-06-28 08:18:58.000000000 +0200
@@ -4307,6 +4307,10 @@
   return gtk_image_get_pixbuf (GTK_IMAGE (mw->priv->main_video_image));
 }
 
+#ifdef WIN32
+// the linker must not find main
+#define main(c,v,e) ekigas_real_main(c,v,e)
+#endif
 
 /* The main () */
 int 
diff -ur src/ekiga/win32/nsisinstaller/ekiga.nsi ekiga/win32/nsisinstaller/ekiga.nsi
--- src/ekiga/win32/nsisinstaller/ekiga.nsi	2009-04-19 18:08:42.860313875 +0200
+++ ekiga/win32/nsisinstaller/ekiga.nsi	2009-06-11 13:58:35.729786000 +0200
@@ -393,7 +393,7 @@
   
   Section $(EKIGA_RUN_AT_STARTUP) SecStartup
      SetOutPath $INSTDIR
-     CreateShortCut "$SMSTARTUP\Ekiga.lnk" "$INSTDIR\ekiga.exe" "" "" 0 SW_SHOWMINIMIZED
+     CreateShortCut "$SMSTARTUP\Ekiga.lnk" "$INSTDIR\ekiga.exe" "" "" 0 SW_SHOWNORMAL
   SectionEnd
 SubSectionEnd
 
diff -ur ekiga.orig/src/gui/main.cpp ekiga/src/gui/main.cpp
--- ekiga.orig/src/gui/main.cpp	2009-06-28 08:22:05.000000000 +0200
+++ ekiga/src/gui/main.cpp	2009-06-28 08:23:30.000000000 +0200
@@ -4410,6 +4410,13 @@
   text_label =  g_strdup_printf ("PTLIB_TRACE_CODECS_USER_PLANE=%d", debug_level_up);
   _putenv (text_label);
   g_free (text_label);
+  if (debug_level != 0) {
+    string desk_path = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
+    if (!desk_path.empty ()) {
+      std::freopen((desk_path + "\\ekiga-stdout.txt").c_str (), "w", stdout);
+      std::freopen((desk_path + "\\ekiga-stderr.txt").c_str (), "w", stderr);
+    }
+  }
 #endif
 
   /* Ekiga initialisation */
@@ -4579,9 +4586,6 @@
     /* use msvcrt.dll to parse command line */
     __getmainargs (&argc, &argv, &env, 0, &info);
 
-    std::freopen("stdout.txt", "w", stdout);
-    std::freopen("stderr.txt", "w", stderr);
-
     iresult = main (argc, argv, env);
   }
   CloseHandle (ekr_mutex);

Attachment: win32.diff.gz
Description: GNU Zip compressed data

Attachment: win32substitut.tar.gz
Description: application/compressed-tar



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