From: Jay Dolan Date: Sat, 14 Feb 2015 14:37:38 +0000 (-0500) Subject: New Apple OS X application bundle based on work done for GtkRadiant 1.6.4. Produces... X-Git-Tag: xonotic-v0.8.1~2^2~9 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=f16cac36d647c8a8cbc4f904d9be65222e6f8f05;hp=f9bd26c040d421e1e7fcfce4b75d0bf00cc2166b New Apple OS X application bundle based on work done for GtkRadiant 1.6.4. Produces a functioning application on Yosemite. --- diff --git a/setup/data/osx/Makefile b/setup/data/osx/Makefile new file mode 100644 index 00000000..eb9ecadf --- /dev/null +++ b/setup/data/osx/Makefile @@ -0,0 +1,83 @@ +# Makefile for NetRadiant.app, requires http://macdylibbundler.sourceforge.net/ + +INSTALL = ../../../install +TARGET = target +RESOURCES = $(TARGET)/NetRadiant.app/Contents/Resources +BINDIR = $(RESOURCES)/install +CONFDIR = $(RESOURCES)/etc +DATADIR = $(RESOURCES)/share +LIBDIR = $(RESOURCES)/lib +VERSION = 1.5.0 +DMG = $(TARGET)/NetRadiant-$(VERSION).dmg +VOLUME_NAME = "NetRadiant $(VERSION)" + +# We must rewrite some Gtk configuration files, which vary from environment to +# environment depending on where you've installed MacPorts. Fun! + +MACPORTS_PREFIX := $(shell which port | sed 's:/bin/port::') +PREFIX_SED_EXPR = "s:$(MACPORTS_PREFIX):@executable_path/..:g" + +all: install bundle + +-pre-install: + install -d $(TARGET) + cp -r NetRadiant.app $(TARGET) + find $(TARGET) -name .turd -delete + +-gtk-runtime-gdk-pixbuf-2.0: + cp -r $(MACPORTS_PREFIX)/lib/gdk-pixbuf-2.0 $(LIBDIR) + find $(LIBDIR)/gdk-pixbuf-2.0 -type f ! -name "*.so" -delete + + gdk-pixbuf-query-loaders | sed $(PREFIX_SED_EXPR) > \ + $(CONFDIR)/gtk-2.0/gdk-pixbuf.loaders + +-gtk-runtime-pango: + cp -r $(MACPORTS_PREFIX)/lib/pango $(LIBDIR) + find $(LIBDIR)/pango -type f ! -name "*.so" -delete + + pango-querymodules | sed $(PREFIX_SED_EXPR) > \ + $(CONFDIR)/pango/pango.modules + +-gtk-runtime: -gtk-runtime-gdk-pixbuf-2.0 -gtk-runtime-pango + cp -r $(MACPORTS_PREFIX)/lib/gtk-2.0 $(LIBDIR) + find $(LIBDIR)/gtk-2.0 -type f ! -name "*.so" -delete + + rm -rf $(LIBDIR)/gtk-2.0/{includes,modules} + rm -rf $(LIBDIR)/gtk-2.0/*/printbackends + + cp -r $(MACPORTS_PREFIX)/share/themes/Default $(RESOURCES)/share + + gtk-query-immodules-2.0 | sed $(PREFIX_SED_EXPR) > \ + $(CONFDIR)/gtk-2.0/gtk.immodules + +install: -pre-install -gtk-runtime + cp -r $(INSTALL) $(RESOURCES) + #rm -rf `find $(INSTDIR)/installs -type d -name .svn` + +bundle: + + # The Radiant plugins (modules) are a little funky + # Some of them are actually linked against the build directory + + test -L install || ln -s $(INSTALL) + + dylibbundler -b \ + -x $(BINDIR)/radiant \ + -x $(BINDIR)/q2map \ + -x $(BINDIR)/q3data \ + -x $(BINDIR)/q3map2 \ + -x $(BINDIR)/qdata3 \ + `find $(BINDIR)/modules -name "*.dylib" | xargs -I {} echo -x {}` \ + `find $(LIBDIR) -name "*.dylib" | xargs -I {} echo -x {}` \ + -d $(LIBDIR) -of -p @executable_path/../lib + + rm -f install + +image: + find $(TARGET) -name .DS_Store -delete + ln -f -s /Applications $(TARGET)/Applications + hdiutil create -ov $(DMG) -srcfolder $(TARGET) -volname $(VOLUME_NAME) + rm $(TARGET)/Applications + +clean: + rm -rf $(TARGET)/* diff --git a/setup/data/osx/NetRadiant.app/Contents/Info.plist b/setup/data/osx/NetRadiant.app/Contents/Info.plist new file mode 100644 index 00000000..75796b16 --- /dev/null +++ b/setup/data/osx/NetRadiant.app/Contents/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + NetRadiant + CFBundleExecutable + radiant + CFBundleIconFile + radiant.icns + CFBundleIdentifier + org.xonotic.netradiant + CFBundleName + NetRadiant + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.5.0 + CFBundleSignature + ???? + CFBundleVersion + 1.5.0 + LSMinimumSystemVersion + 10.7 + + diff --git a/setup/data/osx/NetRadiant.app/Contents/MacOS/radiant b/setup/data/osx/NetRadiant.app/Contents/MacOS/radiant new file mode 100755 index 00000000..701a7fec --- /dev/null +++ b/setup/data/osx/NetRadiant.app/Contents/MacOS/radiant @@ -0,0 +1,35 @@ +#!/bin/bash + +RADIANT_HOME=$(dirname "$0") +RADIANT_HOME=${RADIANT_HOME/NetRadiant.app*/NetRadiant.app} + +echo +echo "Starting NetRadiant in ${RADIANT_HOME}" +echo + +set -x + +resources="${RADIANT_HOME}/Contents/Resources" + +export FONTCONFIG_PATH="${resources}/etc/fonts" +export FC_DEBUG=1024 + +export GDK_GL_LIBGL_PATH="${resources}/lib/libGL.1.dylib" +export GDK_GL_LIBGLU_PATH="${resources}/lib/libGLU.1.dylib" + +export GDK_PATH="${resources}" +export GDK_PIXBUF_MODULE_FILE="${resources}/etc/gtk-2.0/gdk-pixbuf.loaders" + +export GOBJECT_PATH="${resources}" + +export GTK_DATA_PREFIX="${resources}" +export GTK_EXE_PREFIX="${resources}" +export GTK_PATH="${resources}" + +export PANGO_SYSCONFDIR="${resources}/etc" +export PANGO_LIBDIR="${resources}/lib" + +cd "${resources}/install" +./radiant & + +set +x \ No newline at end of file diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/etc/fonts/fonts.conf b/setup/data/osx/NetRadiant.app/Contents/Resources/etc/fonts/fonts.conf new file mode 100644 index 00000000..7183a4be --- /dev/null +++ b/setup/data/osx/NetRadiant.app/Contents/Resources/etc/fonts/fonts.conf @@ -0,0 +1,133 @@ + + + + + + + + /usr/X11/lib/X11/fonts + /Library/Fonts + /System/Library/Fonts + fonts + + + + + mono + + + monospace + + + + + + + sans serif + + + sans-serif + + + + + + + sans + + + sans-serif + + + + + fontconfig + + + + + 0x0020 + 0x00A0 + 0x00AD + 0x034F + 0x0600 + 0x0601 + 0x0602 + 0x0603 + 0x06DD + 0x070F + 0x115F + 0x1160 + 0x1680 + 0x17B4 + 0x17B5 + 0x180E + 0x2000 + 0x2001 + 0x2002 + 0x2003 + 0x2004 + 0x2005 + 0x2006 + 0x2007 + 0x2008 + 0x2009 + 0x200A + 0x200B + 0x200C + 0x200D + 0x200E + 0x200F + 0x2028 + 0x2029 + 0x202A + 0x202B + 0x202C + 0x202D + 0x202E + 0x202F + 0x205F + 0x2060 + 0x2061 + 0x2062 + 0x2063 + 0x206A + 0x206B + 0x206C + 0x206D + 0x206E + 0x206F + 0x2800 + 0x3000 + 0x3164 + 0xFEFF + 0xFFA0 + 0xFFF9 + 0xFFFA + 0xFFFB + + + + 30 + + + + + diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/etc/gtk-2.0/gtkrc b/setup/data/osx/NetRadiant.app/Contents/Resources/etc/gtk-2.0/gtkrc new file mode 100644 index 00000000..e69de29b diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/etc/pango/pangorc b/setup/data/osx/NetRadiant.app/Contents/Resources/etc/pango/pangorc new file mode 100644 index 00000000..f56d3437 --- /dev/null +++ b/setup/data/osx/NetRadiant.app/Contents/Resources/etc/pango/pangorc @@ -0,0 +1 @@ +[Pango] \ No newline at end of file diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/lib/.turd b/setup/data/osx/NetRadiant.app/Contents/Resources/lib/.turd new file mode 100644 index 00000000..e69de29b diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/radiant.icns b/setup/data/osx/NetRadiant.app/Contents/Resources/radiant.icns new file mode 100644 index 00000000..339e718d Binary files /dev/null and b/setup/data/osx/NetRadiant.app/Contents/Resources/radiant.icns differ diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/share/gtk-2.0/icons/.turd b/setup/data/osx/NetRadiant.app/Contents/Resources/share/gtk-2.0/icons/.turd new file mode 100644 index 00000000..e69de29b diff --git a/setup/data/osx/NetRadiant.app/Contents/Resources/share/gtk-2.0/themes/.turd b/setup/data/osx/NetRadiant.app/Contents/Resources/share/gtk-2.0/themes/.turd new file mode 100644 index 00000000..e69de29b diff --git a/setup/data/osx/README.md b/setup/data/osx/README.md new file mode 100644 index 00000000..8122c170 --- /dev/null +++ b/setup/data/osx/README.md @@ -0,0 +1,50 @@ +GtkRadiant for Apple OSX +======================== + +This directory provides packaging steps for GtkRadiant for OSX. This document describes compiling the application on OSX as well as generating distributable bundles using the framework provided in this directory. + +Dependencies & Compilation +-------------------------- + +Directions for OSX Mavericks 10.9 - your mileage may vary: + +- Install [MacPorts](http://macports.org). +- Install [XQuartz](http://xquartz.macosforge.org/) + +- Install dependencies with MacPorts: + +``` +sudo port install dylibbundler pkgconfig gtkglext scons +``` + +- Get the GtkRadiant code and compile: + +``` +git clone https://github.com/TTimo/GtkRadiant.git +cd GtkRadiant/ +scons +``` + +- Run the build: + +(from the GtkRadiant/ directory) +``` +./install/radiant.bin +``` + +XQuartz note: on my configuration XQuartz doesn't automatically start for some reason. I have to open another terminal, and run the following command: `/Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin`, then start radiant. + +Building GtkRadiant.app +----------------------- + +The `Makefile` in the 'apple/' directory will produce a distributable .app bundle for GtkRadiant using `dylibbundler`: + +``` +make +make image +``` + +Getting help +------------ + +Get on irc: Quakenet #radiant, or ask on the mailing list, or post something on the issue tracker..