From: divverent Date: Wed, 4 Mar 2009 07:06:05 +0000 (+0000) Subject: fix MD3 model entities crash on OS X (by renaming a class; apparently something weird... X-Git-Tag: svn-r421~219 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=469e4fc146a97cdb20cdc02fc3bc2bae59fac8ba;p=xonotic%2Fnetradiant.git fix MD3 model entities crash on OS X (by renaming a class; apparently something weird happens when a class name is used twice) git-svn-id: svn://svn.icculus.org/netradiant/trunk@201 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/COMPILING b/COMPILING index 495e84fe..e6840ba7 100644 --- a/COMPILING +++ b/COMPILING @@ -22,8 +22,8 @@ To get a copy of the source using the commandline Subversion client: -Linux/OSX(using X-windows) -========================== +Linux(using X-windows) +====================== environment: - gcc >= version 3.1 (preferably) @@ -43,7 +43,22 @@ run 'make' run: Execute './GtkRadiant/install/radiant.x86' (or './GtkRadiant/install/radiant.ppc' on osx) +OSX(using X-windows) +==================== +environment: +- OS X 10.5 +- Xcode developer tools installed +- X11 (from the OS X DVD) +- fink installed +- the following fink packages installed: + gtkglext1 pkgconfig glib2-dev libxml2 gtk+2-dev pango1-xft2-dev atk-dev atk1 gettext-dev + +build: +run 'make' + +run: +??? Jva32 (2000, KC be Ivfgn) ================== diff --git a/Makefile b/Makefile index 8c6ee489..b216c2cb 100644 --- a/Makefile +++ b/Makefile @@ -187,6 +187,9 @@ ifeq ($(OS),Darwin) DLL = dylib MWINDOWS = + # workaround for weird prints + ECHO_NOLF = /bin/echo -n + # workaround: http://developer.apple.com/qa/qa2007/qa1567.html LIBS_GL += -lX11 -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib LIBS_GTKGLEXT += -lX11 -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib @@ -938,7 +941,7 @@ $(INSTALLDIR)/heretic2/h2data.$(EXE): \ .PHONY: install-data install-data: binaries $(MKDIR) $(INSTALLDIR)/games - $(FIND) $(INSTALLDIR)/ -name .svn -exec $(RM_R) {} \; -prune + $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune [ "$(OS)" != "Darwin" ] || $(CP_R) setup/data/osx/NetRadiant.app/* $(INSTALLDIR_BASE)/NetRadiant.app/ set -ex; \ for GAME in games/*; do \ @@ -955,7 +958,7 @@ install-data: binaries $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR $(CP_R) setup/data/tools/* $(INSTALLDIR)/ - $(FIND) $(INSTALLDIR)/ -name .svn -exec $(RM_R) {} \; -prune + $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune .PHONY: install-dll ifeq ($(OS),Win32) diff --git a/games/NexuizPack/games/nexuiz.game b/games/NexuizPack/games/nexuiz.game index af48975c..8190d510 100644 --- a/games/NexuizPack/games/nexuiz.game +++ b/games/NexuizPack/games/nexuiz.game @@ -6,7 +6,7 @@ name="Nexuiz" enginepath_win32="C:/Program Files/Nexuiz/" enginepath_linux="/usr/share/games/nexuiz/" - enginepath_macos="/Applications/Nexuiz/" + enginepath_macos="../../../../.." engine_win32="nexuiz-sdl.exe" engine_linux="nexuiz-sdl" engine_macos="Nexuiz.app" diff --git a/plugins/entity/model.h b/plugins/entity/model.h index d02c7a85..4e23b93f 100644 --- a/plugins/entity/model.h +++ b/plugins/entity/model.h @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "os/path.h" #include "moduleobserver.h" -class Model : public ModuleObserver +class EModel : public ModuleObserver { ResourceReference m_resource; scene::Traversable& m_traverse; @@ -37,12 +37,12 @@ class Model : public ModuleObserver Callback m_modelChanged; public: - Model(scene::Traversable& traversable, const Callback& modelChanged) + EModel(scene::Traversable& traversable, const Callback& modelChanged) : m_resource(""), m_traverse(traversable), m_node(0), m_modelChanged(modelChanged) { m_resource.attach(*this); } - ~Model() + ~EModel() { m_resource.detach(*this); } @@ -73,7 +73,7 @@ public: m_resource.attach(*this); m_modelChanged(); } - typedef MemberCaller1 ModelChangedCaller; + typedef MemberCaller1 ModelChangedCaller; const char* getName() const { @@ -88,7 +88,7 @@ public: class SingletonModel { TraversableNode m_traverse; - Model m_model; + EModel m_model; public: SingletonModel() : m_model(m_traverse, Callback()) diff --git a/setup/data/osx/NetRadiant.app/Contents/MacOS/netradiant.sh b/setup/data/osx/NetRadiant.app/Contents/MacOS/netradiant.sh index 4cb8749f..389ac04a 100755 --- a/setup/data/osx/NetRadiant.app/Contents/MacOS/netradiant.sh +++ b/setup/data/osx/NetRadiant.app/Contents/MacOS/netradiant.sh @@ -6,5 +6,9 @@ MY_DIRECTORY="${MY_DIRECTORY%/*}" # cut off Contents #export DYLD_LIBRARY_PATH="$MY_DIRECTORY/Contents/MacOS" -cd "$MY_DIRECTORY/Contents/MacOS/NetRadiant/install" -exec /usr/bin/open-x11 ./radiant.ppc +cd "$MY_DIRECTORY/Contents/MacOS/install" +if [ -x /usr/bin/open-x11 ]; then + exec /usr/bin/open-x11 ./radiant.ppc +else + exec ./radiant.ppc +fi