ooo-build r11548 - in trunk: . bin patches/mono scratch/mono-uno-bridge src test/mono
- From: pmladek svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11548 - in trunk: . bin patches/mono scratch/mono-uno-bridge src test/mono
- Date: Mon, 11 Feb 2008 11:40:03 +0000 (GMT)
Author: pmladek
Date: Mon Feb 11 11:40:03 2008
New Revision: 11548
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11548&view=rev
Log:
2008-02-11 Petr Mladek <pmladek suse cz>
* patches/mono/cli_ure-mono-bridge.diff,
scratch/mono-uno-bridge/mono_bridge.cxx: search also GAC for the
cli_uno_bridge.dll, n#357348
* src/cli_cppuhelper.dll.config.in, src/cli_uno_bridge.dll.config.in,
bin/install-mono, configure.in, src/Makefile.am: configure where to
find OOo libraries so that the mono bridge can be accessed from
anywhere; do not longer need to change the working directory to
<ooo-home>/program
* configure.in, bin/setup.in, bin/package-ooo, bin/install-mono:
add configure switch --with-mono-gac-root; it allows to preinstall
mono GAC even when $DESTDIR is defined; remove the original dlls
when they are installaed into GAC
* test/mono/SpreadsheetSample, test/mono/Makefile: the complex wrapper
SpreadsheetSample is obsolete now
Added:
trunk/src/cli_cppuhelper.dll.config.in
trunk/src/cli_uno_bridge.dll.config.in
Modified:
trunk/ChangeLog
trunk/bin/install-mono
trunk/bin/package-ooo
trunk/bin/setup.in
trunk/configure.in
trunk/patches/mono/cli_ure-mono-bridge.diff
trunk/scratch/mono-uno-bridge/mono_bridge.cxx
trunk/src/Makefile.am
trunk/test/mono/Makefile
trunk/test/mono/SpreadsheetSample
Modified: trunk/bin/install-mono
==============================================================================
--- trunk/bin/install-mono (original)
+++ trunk/bin/install-mono Mon Feb 11 11:40:03 2008
@@ -22,6 +22,10 @@
exit 0;
fi
+# filelist for the GAC stuff
+MONOGACFILELIST=$BUILDDIR/mono_gac
+rm -f $MONOGACFILELIST
+
# install the pkgconfig file
# GAC is in /usr/lib even on 64-bit architectures, so the .pc file points to
# the /usr/lib paths; the .pc file itself must be in the arch dependant path
@@ -29,17 +33,42 @@
mkdir -p $OODESTDIR${LIBDIRBASE}/pkgconfig/
cp $SRCDIR/mono-ooo.pc ${OODESTDIR}${LIBDIRBASE}/pkgconfig/mono-$OOOINSTALLDIRNAME.pc
+# extra dlls config files
+cp $SRCDIR/cli_cppuhelper.dll.config $OOINSTDIR/program/
+cp $SRCDIR/cli_uno_bridge.dll.config $OOINSTDIR/program/
+
# install versioned assemblies into the system Global Assembly Cache (GAC)
# to become part of the assemblies that are available for all applications
# at runtime.
-# Note: It should be done in postinstall script
-# It cannot be done with DESTDIR defined, definitely
-if test "$RUN_POST_INSTALL_SCRIPTS" = "yes" -a -z "$OODESTDIR" ; then
+if test -z "$OODESTDIR" -o -n "$MONO_GAC_ROOT" ; then
+ test -n "$MONO_GAC_ROOT" && gacutil_root="-root $OODESTDIR$MONO_GAC_ROOT" || gacutil_root=
for dll in cli_basetypes.dll \
cli_cppuhelper.dll \
cli_types.dll \
cli_uno_bridge.dll \
cli_ure.dll ; do
- gacutil -i $OOINSTDIR/program/$dll -package $OOOINSTALLDIRNAME
+ gacutil $gacutil_root -i $OOINSTDIR/program/$dll -package $OOOINSTALLDIRNAME || exit 0
+
+ # the original fixes are not longer needed
+ rm -f $OOINSTDIR/program/$dll
+ rm -f $OOINSTDIR/program/$dll.config
+
+ # remove the deleted fixes from the filelist
+ if test -n "$OODESTDIR" ; then
+ file_list=`grep "^$OOINSTBASE/program/$dll$" $OODESTDIR/gid* | head -n 1 | cut -d: -f1`
+ test -z "$file_list" && echo "Error: \"$OOINSTBASE/program/$dll\" has not found in any filelist" && exit 1;
+ sed "s|^$OOINSTBASE/program/$dll$||" $file_list >$file_list.mono
+ mv $file_list.mono $file_list
+ fi
done
+
+ # filelist for the GAC
+ if test -n "$OODESTDIR" ; then
+ for dir in `find $OODESTDIR/usr/lib/mono -type d -regex ".*/cli_[_a-z]*" -o -regex ".*/ooo-2.0"` ; do
+ find $dir -type d | sed "s|^$OODESTDIR\(.*\)|%dir \1|" >>$MONOGACFILELIST
+ find $dir -type f -o -type l | sed "s|^$OODESTDIR\(.*\)|\1|" >>$MONOGACFILELIST
+ done
+ sort $MONOGACFILELIST >$MONOGACFILELIST.mono
+ mv $MONOGACFILELIST.mono $MONOGACFILELIST
+ fi
fi
Modified: trunk/bin/package-ooo
==============================================================================
--- trunk/bin/package-ooo (original)
+++ trunk/bin/package-ooo Mon Feb 11 11:40:03 2008
@@ -616,6 +616,8 @@
mv_file_between_flists mono_list.txt common_list.txt $OOINSTBASE/program/cli_.*.dll
mv_file_between_flists mono_list.txt common_list.txt $OOINSTBASE/program/libcli_.*.so
add_used_directories mono_list.txt common_list.txt
+ # add the files from GAC if it was installed
+ test -f mono_gac && cat mono_gac >>mono_list.txt
if test "z$VENDORNAME" = "zNovell" ; then
# officebean subpackage
Modified: trunk/bin/setup.in
==============================================================================
--- trunk/bin/setup.in (original)
+++ trunk/bin/setup.in Mon Feb 11 11:40:03 2008
@@ -119,6 +119,7 @@
UPSTREAM_NAME= UPSTREAM_NAME@
OOX_MODULE_TARBALL= OOX_MODULE_TARBALL@
WRITERFILTER_MODULE_TARBALL= WRITERFILTER_MODULE_TARBALL@
+MONO_GAC_ROOT= MONO_GAC_ROOT@
TCSH=/bin/tcsh
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Feb 11 11:40:03 2008
@@ -259,6 +259,16 @@
Usage: --with-arch=(x86|ppc|sparc)],
,)
+AC_ARG_WITH(mono-gac,
+[
+ --with-mono-gac-root Define the root of the mono GAC. It is especially
+ needed if you are using $DESTDIR and want to
+ preinstall the mono DLLs into the GAC.
+
+ Example: --with-mono-gac=/usr/lib],
+,)
+
+
AC_ARG_WITH(openclipart,
[
--with-openclipart Build and install OOo galleries from the Open Clip
@@ -763,6 +773,12 @@
fi
AC_MSG_RESULT(ok)
+MONO_GAC_ROOT=
+if test "z$with_mono_gac_root" != "z" -a "z$with_mono_gac_root" != "zno" ; then
+ MONO_GAC_ROOT=$with_mono_gac_root
+fi
+AC_SUBST(MONO_GAC_ROOT)
+
AC_MSG_CHECKING([for Open Clip Art Library])
OPENCLIPART_VER=
OPENCLIPART_DIR=
@@ -1185,9 +1201,11 @@
po/Makefile
doc/Makefile
src/Makefile
+src/cli_cppuhelper.dll.config
+src/cli_uno_bridge.dll.config
+src/mono-ooo.pc
src/layout/Makefile
src/sdf/Makefile
-src/mono-ooo.pc
stamp/Makefile
templates/Makefile
man/Makefile
Modified: trunk/patches/mono/cli_ure-mono-bridge.diff
==============================================================================
--- trunk/patches/mono/cli_ure-mono-bridge.diff (original)
+++ trunk/patches/mono/cli_ure-mono-bridge.diff Mon Feb 11 11:40:03 2008
@@ -2913,8 +2913,8 @@
+}
diff -ruNp cli_ure-orig/source/mono_bridge/mono_bridge.cxx cli_ure/source/mono_bridge/mono_bridge.cxx
--- cli_ure-orig/source/mono_bridge/mono_bridge.cxx 1970-01-01 01:00:00.000000000 +0100
-+++ cli_ure/source/mono_bridge/mono_bridge.cxx 2007-07-20 11:27:39.000000000 +0200
-@@ -0,0 +1,412 @@
++++ cli_ure/source/mono_bridge/mono_bridge.cxx 2008-02-11 10:36:08.000000000 +0100
+@@ -0,0 +1,432 @@
+/*************************************************************************
+ *
+ * $RCSfile: $
@@ -2976,6 +2976,8 @@
+ *
+ ************************************************************************/
+
++#include <string.h>
++
+#include "uno/dispatcher.h"
+#include "uno/environment.h"
+#include "uno/lbnames.h"
@@ -3141,6 +3143,24 @@
+ }
+}
+
++MonoAssembly *
++DoLoad (MonoDomain *domain, char *fullname)
++{
++ MonoAssemblyName aname;
++ MonoImageOpenStatus status;
++ MonoAssembly *ass;
++
++ memset (&aname, 0, sizeof (aname));
++ aname.culture = "";
++ strncpy ((char *)aname.public_key_token, "ce2cb7e279207b9e", MONO_PUBLIC_KEY_TOKEN_LENGTH);
++ aname.name = "cli_uno_bridge";
++
++ ass = mono_assembly_load (&aname, NULL, &status);
++ if (status != MONO_IMAGE_OK)
++ return NULL;
++ return ass;
++}
++
+Bridge::Bridge(
+ uno_Environment * mono_env, uno_ExtEnvironment * uno_env,
+ bool registered_mono2uno )
@@ -3151,7 +3171,7 @@
+{
+ MonoDomain * pDomain = mono_get_root_domain();
+ // FIXME where is this freed?
-+ MonoAssembly * pAssembly = mono_domain_assembly_open( pDomain, "cli_uno_bridge.dll" );
++ MonoAssembly * pAssembly = DoLoad (pDomain, "cli_uno_bridge, Version=0.0.0.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e");
+ // FIXME and this, is this needed later?
+ MonoClass * pClass = mono_class_from_name (
+ (MonoImage *)mono_assembly_get_image( pAssembly ), "com.sun.star.bridges.mono_uno", "Bridge" );
Modified: trunk/scratch/mono-uno-bridge/mono_bridge.cxx
==============================================================================
--- trunk/scratch/mono-uno-bridge/mono_bridge.cxx (original)
+++ trunk/scratch/mono-uno-bridge/mono_bridge.cxx Mon Feb 11 11:40:03 2008
@@ -59,6 +59,8 @@
*
************************************************************************/
+#include <string.h>
+
#include "uno/dispatcher.h"
#include "uno/environment.h"
#include "uno/lbnames.h"
@@ -224,6 +226,24 @@
}
}
+MonoAssembly *
+DoLoad (MonoDomain *domain, char *fullname)
+{
+ MonoAssemblyName aname;
+ MonoImageOpenStatus status;
+ MonoAssembly *ass;
+
+ memset (&aname, 0, sizeof (aname));
+ aname.culture = "";
+ strncpy ((char *)aname.public_key_token, "ce2cb7e279207b9e", MONO_PUBLIC_KEY_TOKEN_LENGTH);
+ aname.name = "cli_uno_bridge";
+
+ ass = mono_assembly_load (&aname, NULL, &status);
+ if (status != MONO_IMAGE_OK)
+ return NULL;
+ return ass;
+}
+
Bridge::Bridge(
uno_Environment * mono_env, uno_ExtEnvironment * uno_env,
bool registered_mono2uno )
@@ -234,7 +254,7 @@
{
MonoDomain * pDomain = mono_get_root_domain();
// FIXME where is this freed?
- MonoAssembly * pAssembly = mono_domain_assembly_open( pDomain, "cli_uno_bridge.dll" );
+ MonoAssembly * pAssembly = DoLoad (pDomain, "cli_uno_bridge, Version=0.0.0.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e");
// FIXME and this, is this needed later?
MonoClass * pClass = mono_class_from_name (
(MonoImage *)mono_assembly_get_image( pAssembly ), "com.sun.star.bridges.mono_uno", "Bridge" );
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Feb 11 11:40:03 2008
@@ -5,6 +5,8 @@
Novell.dic \
Ubuntu.dic \
banner_nld.bmp \
+ cli_cppuhelper.dll.config.in \
+ cli_uno_bridge.dll.config.in \
mono-ooo.pc.in \
nologoinstall_nld.bmp \
ooobanner_nld.bmp \
Added: trunk/src/cli_cppuhelper.dll.config.in
==============================================================================
--- (empty file)
+++ trunk/src/cli_cppuhelper.dll.config.in Mon Feb 11 11:40:03 2008
@@ -0,0 +1,3 @@
+<configuration>
+ <dllmap dll="cli_uno_glue" target="@libdir@/@OOOINSTALLDIRNAME@/program/libcli_uno_glue.so"/>
+</configuration>
Added: trunk/src/cli_uno_bridge.dll.config.in
==============================================================================
--- (empty file)
+++ trunk/src/cli_uno_bridge.dll.config.in Mon Feb 11 11:40:03 2008
@@ -0,0 +1,5 @@
+<configuration>
+ <dllmap dll="cli_uno" target="@libdir@/@OOOINSTALLDIRNAME@/program/libcli_uno.so"/>
+ <dllmap dll="sal" target="@libdir@/@OOOINSTALLDIRNAME@/program/libsal.so"/>
+ <dllmap dll="uno_cppu" target="@libdir@/@OOOINSTALLDIRNAME@/program/libuno_cppu.so"/>
+</configuration>
Modified: trunk/test/mono/Makefile
==============================================================================
--- trunk/test/mono/Makefile (original)
+++ trunk/test/mono/Makefile Mon Feb 11 11:40:03 2008
@@ -5,8 +5,8 @@
all: test
-test: SpreadsheetSample.exe SpreadsheetSample
- ./SpreadsheetSample
+test: SpreadsheetSample.exe
+ mono SpreadsheetSample.exe
SpreadsheetSample.exe: ${SOURCES}
mcs SpreadsheetSample.cs SpreadsheetDocHelper.cs \
Modified: trunk/test/mono/SpreadsheetSample
==============================================================================
--- trunk/test/mono/SpreadsheetSample (original)
+++ trunk/test/mono/SpreadsheetSample Mon Feb 11 11:40:03 2008
@@ -1,5 +1,11 @@
#!/bin/sh
+# Starts the SpreadsheetSample.exe from the <ooo-home>/program directory
+# It should not be needed any longer. The sample should work from
+# anywhere just by running:
+#
+# mono $sample_dir/SpreadsheetSample.exe
+
soffice_link=`which soffice`
soffice_path=`readlink -f $soffice_link`
ooo_program_dir=$(dirname $soffice_path)
@@ -10,8 +16,8 @@
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ooo_program_dir"
sample_dir=`pwd`
-echo cd $ooo_program_dir
cd $ooo_program_dir
+pwd
echo mono $sample_dir/SpreadsheetSample.exe
mono $sample_dir/SpreadsheetSample.exe
-cd -
+cd -
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]