mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Vastly simplify the .app structure. Radiant runs.
This commit is contained in:
parent
178ebc262b
commit
09126695d9
12 changed files with 41 additions and 54 deletions
|
@ -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"
|
||||
cd "${resources}/install"
|
||||
./radiant.bin $@
|
||||
|
||||
set +x
|
|
@ -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`
|
||||
|
||||
install $(INSTALL)/bitmaps/*.* $(RESOURCES)/bitmaps
|
||||
gtk-runtime:
|
||||
gdk-pixbuf-query-loaders | sed $(PREFIX_SED_EXPR) > \
|
||||
$(CONFDIR)/gtk-2.0/gdk-pixbuf.loaders
|
||||
|
||||
install $(INSTALL)/modules/*.so $(RESOURCES)/modules
|
||||
install $(INSTALL)/modules/bitmaps/*.* $(RESOURCES)/modules/bitmaps
|
||||
pango-querymodules | sed $(PREFIX_SED_EXPR) > \
|
||||
$(CONFDIR)/pango/pango.modules
|
||||
|
||||
@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
|
||||
cp -r /opt/local/lib/gdk-pixbuf-2.0 $(LIBDIR)
|
||||
cp -r /opt/local/lib/pango $(LIBDIR)
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue