From 4ae40aeab0e4bf9470465d15f3e8e12b14476edc Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 30 May 2003 12:41:47 +0000 Subject: [PATCH] added checks and texts for mixing gtk1 and gtk2 git-svn-id: trunk@4216 - --- .gitattributes | 1 + components/gtk/gtkglarea/README | 21 +++++++++++++++++++++ components/gtk/gtkglarea/gtkopengl.lpk | 3 ++- ide/lazarus.pp | 9 ++++++++- tools/check_ide_libs.sh | 12 ++++++++++++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 components/gtk/gtkglarea/README create mode 100644 tools/check_ide_libs.sh diff --git a/.gitattributes b/.gitattributes index 2e9efd6ef3..f3d4c70796 100644 --- a/.gitattributes +++ b/.gitattributes @@ -849,6 +849,7 @@ packager/ufrmaddcomponent.lrs svneol=native#text/pascal packager/ufrmaddcomponent.pas svneol=native#text/pascal tools/apiwizz/apiwizard.pp svneol=native#text/pascal tools/apiwizz/apiwizz.pp svneol=native#text/pascal +tools/check_ide_libs.sh -text svneol=native#application/x-sh tools/install/create_fpc_deb.sh -text svneol=native#application/x-sh tools/install/create_fpc_export_tgz.sh -text svneol=native#application/x-sh tools/install/create_fpc_rpm.sh -text svneol=native#application/x-sh diff --git a/components/gtk/gtkglarea/README b/components/gtk/gtkglarea/README new file mode 100644 index 0000000000..0403ee78bb --- /dev/null +++ b/components/gtk/gtkglarea/README @@ -0,0 +1,21 @@ +Package GtkOpenGL + +Contains the lcl component TGTKGLAreaControl, which wraps the gtkglarea, a +gtk widget for opengl. This component works only with the gtk interface. + +There is an example in examples/gtkglarea/. + + +WARNING: +Make sure your program links to libgtkgl, not to libgtkgl-2.0. Linking to +libgtkgl-2.0 will result in mixing gtk1 and gtk2 in your program/IDE, which +will result in al kinds of strange errors, including freezing your +windowmanager. +You can find out, what libs were linked to your program with the ldd program: + +[]$ ldd yourprogram + + +ToDo: +Add an example using the package. + diff --git a/components/gtk/gtkglarea/gtkopengl.lpk b/components/gtk/gtkglarea/gtkopengl.lpk index 3661e849cf..2b1f647856 100644 --- a/components/gtk/gtkglarea/gtkopengl.lpk +++ b/components/gtk/gtkglarea/gtkopengl.lpk @@ -3,7 +3,8 @@ - + diff --git a/ide/lazarus.pp b/ide/lazarus.pp index f66a5c95a3..bb69898b85 100644 --- a/ide/lazarus.pp +++ b/ide/lazarus.pp @@ -76,7 +76,11 @@ begin {$ENDIF} SplashForm.StartTimer; - Application.Run; + try + Application.Run; + except + writeln('lazarus.pp - unhandled exception'); + end; SplashForm.Free; SplashForm:=nil; @@ -90,6 +94,9 @@ end. { $Log$ + Revision 1.45 2003/05/30 12:41:46 mattias + added checks and texts for mixing gtk1 and gtk2 + Revision 1.44 2003/05/30 08:10:51 mattias added try except to Application.Run, message on changing debugger items during compile diff --git a/tools/check_ide_libs.sh b/tools/check_ide_libs.sh new file mode 100644 index 0000000000..a6bf5e5b75 --- /dev/null +++ b/tools/check_ide_libs.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +set -x + +GlibCount=`ldd lazarus | grep '\blibglib-[12]' | wc -l | sed 's/ //g'` +if [ "x$GlibCount" = "x2" ]; then + echo "lazarus.pp(1) fatal: lib glib is used twice" + exit -1 +fi + +# end.