diff --git a/apple/GtkRadiant.app/Contents/MacOS/radiant b/apple/GtkRadiant.app/Contents/MacOS/radiant index 8ff4de42..40af99ff 100755 --- a/apple/GtkRadiant.app/Contents/MacOS/radiant +++ b/apple/GtkRadiant.app/Contents/MacOS/radiant @@ -9,15 +9,18 @@ echo set -x -GTK_RUNTIME="${RADIANT_HOME}/Contents/Resources/gtk-runtime" +resources="${RADIANT_HOME}/Contents/Resources" -export GDK_PIXBUF_MODULE_FILE="${GTK_RUNTIME}/etc/gtk-2.0/gdk-pixbuf.loaders" +export GDK_PIXBUF_MODULE_FILE="${resources}/etc/gtk-2.0/gdk-pixbuf.loaders" -export GTK_DATA_PREFIX="${GTK_RUNTIME}" -export GTK_EXE_PREFIX="${GTK_RUNTIME}" -export GTK_PATH="${GTK_RUNTIME}" +export GTK_DATA_PREFIX="${resources}" +export GTK_EXE_PREFIX="${resources}" +export GTK_PATH="${resources}" -export PANGO_SYSCONFDIR="${GTK_RUNTIME}/etc" -export PANGO_LIBDIR="${GTK_RUNTIME}/lib" +export PANGO_SYSCONFDIR="${resources}/etc" +export PANGO_LIBDIR="${resources}/lib" -"${RADIANT_HOME}/Contents/MacOS/radiant.bin" \ No newline at end of file +cd "${resources}/install" +./radiant.bin $@ + +set +x \ No newline at end of file diff --git a/apple/GtkRadiant.app/Contents/Resources/gtk-runtime/etc/gtk-2.0/gtk.immodules b/apple/GtkRadiant.app/Contents/Resources/etc/gtk-2.0/gtk.immodules similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/gtk-runtime/etc/gtk-2.0/gtk.immodules rename to apple/GtkRadiant.app/Contents/Resources/etc/gtk-2.0/gtk.immodules diff --git a/apple/GtkRadiant.app/Contents/Resources/gtk-runtime/etc/gtk-2.0/gtkrc b/apple/GtkRadiant.app/Contents/Resources/etc/gtk-2.0/gtkrc similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/gtk-runtime/etc/gtk-2.0/gtkrc rename to apple/GtkRadiant.app/Contents/Resources/etc/gtk-2.0/gtkrc diff --git a/apple/GtkRadiant.app/Contents/Resources/gtk-runtime/etc/pango/pangorc b/apple/GtkRadiant.app/Contents/Resources/etc/pango/pangorc similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/gtk-runtime/etc/pango/pangorc rename to apple/GtkRadiant.app/Contents/Resources/etc/pango/pangorc diff --git a/apple/GtkRadiant.app/Contents/Resources/bitmaps/.turd b/apple/GtkRadiant.app/Contents/Resources/install/bitmaps/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/bitmaps/.turd rename to apple/GtkRadiant.app/Contents/Resources/install/bitmaps/.turd diff --git a/apple/GtkRadiant.app/Contents/Resources/games/.turd b/apple/GtkRadiant.app/Contents/Resources/install/games/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/games/.turd rename to apple/GtkRadiant.app/Contents/Resources/install/games/.turd diff --git a/apple/GtkRadiant.app/Contents/Resources/gtk-runtime/lib/.turd b/apple/GtkRadiant.app/Contents/Resources/install/installs/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/gtk-runtime/lib/.turd rename to apple/GtkRadiant.app/Contents/Resources/install/installs/.turd diff --git a/apple/GtkRadiant.app/Contents/Resources/gtk-runtime/share/gtk-2.0/icons/.turd b/apple/GtkRadiant.app/Contents/Resources/install/modules/bitmaps/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/gtk-runtime/share/gtk-2.0/icons/.turd rename to apple/GtkRadiant.app/Contents/Resources/install/modules/bitmaps/.turd diff --git a/apple/GtkRadiant.app/Contents/Resources/gtk-runtime/share/gtk-2.0/themes/.turd b/apple/GtkRadiant.app/Contents/Resources/lib/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/gtk-runtime/share/gtk-2.0/themes/.turd rename to apple/GtkRadiant.app/Contents/Resources/lib/.turd diff --git a/apple/GtkRadiant.app/Contents/Resources/installs/.turd b/apple/GtkRadiant.app/Contents/Resources/share/gtk-2.0/icons/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/installs/.turd rename to apple/GtkRadiant.app/Contents/Resources/share/gtk-2.0/icons/.turd diff --git a/apple/GtkRadiant.app/Contents/Resources/modules/bitmaps/.turd b/apple/GtkRadiant.app/Contents/Resources/share/gtk-2.0/themes/.turd similarity index 100% rename from apple/GtkRadiant.app/Contents/Resources/modules/bitmaps/.turd rename to apple/GtkRadiant.app/Contents/Resources/share/gtk-2.0/themes/.turd diff --git a/apple/Makefile b/apple/Makefile index 008d4692..e13f8824 100644 --- a/apple/Makefile +++ b/apple/Makefile @@ -2,17 +2,16 @@ INSTALL = ../install TARGET = target -GTKRADIANT = $(TARGET)/GtkRadiant.app -BINARIES = $(GTKRADIANT)/Contents/MacOS -LIBRARIES = $(GTKRADIANT)/Contents/MacOS/lib -RESOURCES = $(GTKRADIANT)/Contents/Resources +RESOURCES = $(TARGET)/GtkRadiant.app/Contents/Resources +CONFDIR = $(RESOURCES)/etc +DATADIR = $(RESOURCES)/share +LIBDIR = $(RESOURCES)/lib +INSTDIR = $(RESOURCES)/install +PREFIX_SED_EXPR = 's:/opt/local:@executable_path/..:g' VERSION = 1.6.4 DMG = $(TARGET)/GtkRadiant-$(VERSION).dmg VOLUME_NAME = "GtkRadiant $(VERSION)" -GTK_RUNTIME = $(RESOURCES)/gtk-runtime -GTK_PREFIX_EXPR = 's:/opt/local:@executable_path/../Resources/gtk-runtime:g' - all: install pre-install: @@ -21,60 +20,45 @@ pre-install: find $(TARGET) -name .turd -delete install: pre-install - install $(INSTALL)/radiant.bin $(BINARIES)/radiant.bin - install $(INSTALL)/q3map2 $(BINARIES)/q3map2 - install $(INSTALL)/q3map2_urt $(BINARIES)/q3map2_urt - install $(INSTALL)/q3data $(BINARIES)/q3data + cp -r $(INSTALL) $(RESOURCES) + rm -rf `find $(INSTDIR)/installs -type d -name .svn` + +gtk-runtime: + gdk-pixbuf-query-loaders | sed $(PREFIX_SED_EXPR) > \ + $(CONFDIR)/gtk-2.0/gdk-pixbuf.loaders - install $(INSTALL)/bitmaps/*.* $(RESOURCES)/bitmaps + pango-querymodules | sed $(PREFIX_SED_EXPR) > \ + $(CONFDIR)/pango/pango.modules - install $(INSTALL)/modules/*.so $(RESOURCES)/modules - install $(INSTALL)/modules/bitmaps/*.* $(RESOURCES)/modules/bitmaps + cp -r /opt/local/lib/gdk-pixbuf-2.0 $(LIBDIR) + cp -r /opt/local/lib/pango $(LIBDIR) - @for i in $(INSTALL)/installs/*; do \ - if [ -d $$i/.svn ]; then \ - svn export --force $$i $(RESOURCES)/installs/`basename $$i` ; \ - else \ - cp -r $$i $(RESOURCES)/installs ; \ - fi \ - done + find $(LIBDIR) -type f ! -name "*.so" -delete + + dylibbundler -b \ + `find $(LIBDIR) -type f | xargs -I {} echo -x {}` \ + -d $(LIBDIR) -of -p @executable_path/../lib + + cp -r /opt/local/share/themes/Default $(RESOURCES)/share bundle: dylibbundler -b \ - -x $(BINARIES)/radiant.bin \ - -x $(BINARIES)/q3map2 \ - -x $(BINARIES)/q3map2_urt \ - -x $(BINARIES)/q3data \ - -d $(LIBRARIES) -of -p @executable_path/lib + -x $(INSTDIR)/radiant.bin \ + -x $(INSTDIR)/q3map2 \ + -x $(INSTDIR)/q3map2_urt \ + -x $(INSTDIR)/q3data \ + -d $(LIBDIR) -of -p @executable_path/../lib # The Radiant plugins (modules) are a little funky # Some of them are actually linked against the build directory ln -s ../build ./build dylibbundler -b \ - `find $(RESOURCES)/modules -name "*.so" | xargs -I {} echo -x {}` \ - -d $(LIBRARIES) -of -p @executable_path/lib + `find $(INSTDIR)/modules -name "*.so" | xargs -I {} echo -x {}` \ + -d $(LIBDIR) -of -p @executable_path/../lib rm -f build -gtk-runtime: - gdk-pixbuf-query-loaders | sed $(GTK_PREFIX_EXPR) > \ - $(GTK_RUNTIME)/etc/gtk-2.0/gdk-pixbuf.loaders - - pango-querymodules | sed $(GTK_PREFIX_EXPR) > \ - $(GTK_RUNTIME)/etc/pango/pango.modules - - cp -r /opt/local/lib/gdk-pixbuf-2.0 $(GTK_RUNTIME)/lib - cp -r /opt/local/lib/pango $(GTK_RUNTIME)/lib - - find $(GTK_RUNTIME)/lib -type f ! -name "*.so" -delete - - dylibbundler -b \ - `find $(GTK_RUNTIME)/lib -name "*.so" | xargs -I {} echo -x {}` \ - -d $(LIBRARIES) -of -p @executable_path/lib - - cp -r /opt/local/share/themes/Default $(GTK_RUNTIME)/share - image: ln -f -s /Applications $(TARGET)/Applications hdiutil create $(DMG) -srcfolder $(TARGET) -volname $(VOLUME_NAME)