2013-06-27 13:32:30 +00:00
|
|
|
# Makefile for GtkRadiant.app, requires http://macdylibbundler.sourceforge.net/
|
2013-06-03 02:12:42 +00:00
|
|
|
|
|
|
|
INSTALL = ../install
|
|
|
|
TARGET = target
|
2013-06-27 04:36:58 +00:00
|
|
|
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'
|
2013-06-03 02:12:42 +00:00
|
|
|
VERSION = 1.6.4
|
|
|
|
DMG = $(TARGET)/GtkRadiant-$(VERSION).dmg
|
|
|
|
VOLUME_NAME = "GtkRadiant $(VERSION)"
|
|
|
|
|
2013-06-27 20:02:47 +00:00
|
|
|
all: install bundle
|
2013-06-03 02:12:42 +00:00
|
|
|
|
2013-06-27 20:02:47 +00:00
|
|
|
-pre-install:
|
2013-06-03 02:12:42 +00:00
|
|
|
install -d $(TARGET)
|
|
|
|
cp -r GtkRadiant.app $(TARGET)
|
|
|
|
find $(TARGET) -name .turd -delete
|
2013-06-27 20:02:47 +00:00
|
|
|
|
|
|
|
-gtk-runtime-gdk-pixbuf-2.0:
|
|
|
|
cp -r /opt/local/lib/gdk-pixbuf-2.0 $(LIBDIR)
|
|
|
|
find $(LIBDIR)/gdk-pixbuf-2.0 -type f ! -name "*.so" -delete
|
|
|
|
|
2013-06-27 04:36:58 +00:00
|
|
|
gdk-pixbuf-query-loaders | sed $(PREFIX_SED_EXPR) > \
|
|
|
|
$(CONFDIR)/gtk-2.0/gdk-pixbuf.loaders
|
2013-06-27 20:02:47 +00:00
|
|
|
|
|
|
|
-gtk-runtime-pango:
|
|
|
|
cp -r /opt/local/lib/pango $(LIBDIR)
|
|
|
|
find $(LIBDIR)/pango -type f ! -name "*.so" -delete
|
|
|
|
|
2013-06-27 04:36:58 +00:00
|
|
|
pango-querymodules | sed $(PREFIX_SED_EXPR) > \
|
|
|
|
$(CONFDIR)/pango/pango.modules
|
|
|
|
|
2013-06-27 20:02:47 +00:00
|
|
|
-gtk-runtime: -gtk-runtime-gdk-pixbuf-2.0 -gtk-runtime-pango
|
2013-06-27 13:32:30 +00:00
|
|
|
cp -r /opt/local/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
|
2013-06-03 02:12:42 +00:00
|
|
|
|
2013-06-27 04:36:58 +00:00
|
|
|
cp -r /opt/local/share/themes/Default $(RESOURCES)/share
|
2013-06-27 20:02:47 +00:00
|
|
|
|
|
|
|
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`
|
2013-06-03 02:12:42 +00:00
|
|
|
|
|
|
|
bundle:
|
2013-06-27 01:36:32 +00:00
|
|
|
|
|
|
|
# The Radiant plugins (modules) are a little funky
|
|
|
|
# Some of them are actually linked against the build directory
|
2013-06-27 20:02:47 +00:00
|
|
|
|
2013-06-27 01:36:32 +00:00
|
|
|
ln -s ../build ./build
|
|
|
|
|
|
|
|
dylibbundler -b \
|
2013-06-27 20:02:47 +00:00
|
|
|
-x $(INSTDIR)/radiant.bin \
|
|
|
|
-x $(INSTDIR)/q3map2 \
|
|
|
|
-x $(INSTDIR)/q3map2_urt \
|
|
|
|
-x $(INSTDIR)/q3data \
|
2013-06-27 04:36:58 +00:00
|
|
|
`find $(INSTDIR)/modules -name "*.so" | xargs -I {} echo -x {}` \
|
2013-06-27 20:02:47 +00:00
|
|
|
`find $(LIBDIR) -name "*.so" | xargs -I {} echo -x {}` \
|
2013-06-27 04:36:58 +00:00
|
|
|
-d $(LIBDIR) -of -p @executable_path/../lib
|
2013-06-27 20:02:47 +00:00
|
|
|
|
2013-06-27 01:36:32 +00:00
|
|
|
rm -f build
|
|
|
|
|
2013-06-03 02:12:42 +00:00
|
|
|
image:
|
2013-06-28 13:07:02 +00:00
|
|
|
find $(TARGET) -name .DS_Store -delete
|
2013-06-03 02:12:42 +00:00
|
|
|
ln -f -s /Applications $(TARGET)/Applications
|
2013-06-28 13:07:02 +00:00
|
|
|
hdiutil create -ov $(DMG) -srcfolder $(TARGET) -volname $(VOLUME_NAME)
|
2013-06-03 02:12:42 +00:00
|
|
|
rm $(TARGET)/Applications
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(TARGET)/*
|