Skip to content

Commit

Permalink
qmake|Mac OS X: Integrate bundleapp.sh as a forced post-build step
Browse files Browse the repository at this point in the history
A bit of a hack: added a custom Make target named FORCE that causes
bundleapp.sh to be run after every build.
  • Loading branch information
skyjake committed Apr 26, 2012
1 parent 814cb3f commit 84f3f5a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
3 changes: 2 additions & 1 deletion doomsday/doomsday.pro
Expand Up @@ -3,4 +3,5 @@

TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = build libdeng2 engine plugins host
SUBDIRS = build libdeng2 engine plugins host postbuild

17 changes: 4 additions & 13 deletions doomsday/engine/engine.pro
Expand Up @@ -679,17 +679,6 @@ startupgfx.files = \
data/graphics/logo.png

macx {
# Since qmake is unable to copy directories as bundle data, let's copy
# the frameworks manually.
doPostLink("rm -rf \"$${OUT_PWD}/doomsday.app/Contents/Frameworks\"")
doPostLink("mkdir \"$${OUT_PWD}/doomsday.app/Contents/Frameworks\"")
!deng_nosdl {
doPostLink("cp -fRp \"$${SDL_FRAMEWORK_DIR}/SDL.framework\" \"$${OUT_PWD}/doomsday.app/Contents/Frameworks/\"")
!deng_nosdlmixer {
doPostLink("cp -fRp \"$${SDL_FRAMEWORK_DIR}/SDL_mixer.framework\" \"$${OUT_PWD}/doomsday.app/Contents/Frameworks/\"")
}
}

res.path = Contents/Resources
res.files = \
mac/res/English.lproj \
Expand All @@ -709,8 +698,10 @@ macx {
FW_DIR = \"$${OUT_PWD}/doomsday.app/Contents/Frameworks/\"
doPostLink("rm -rf $$FW_DIR")
doPostLink("mkdir $$FW_DIR")
doPostLink("cp -fRp $${SDL_FRAMEWORK_DIR}/SDL.framework $$FW_DIR")
doPostLink("cp -fRp $${SDL_FRAMEWORK_DIR}/SDL_mixer.framework $$FW_DIR")
!deng_nosdl {
doPostLink("cp -fRp $${SDL_FRAMEWORK_DIR}/SDL.framework $$FW_DIR")
!deng_nosdlmixer: doPostLink("cp -fRp $${SDL_FRAMEWORK_DIR}/SDL_mixer.framework $$FW_DIR")
}

# libdeng2 dynamic library.
doPostLink("cp -fRp $$OUT_PWD/../libdeng2/libdeng2*dylib $$FW_DIR")
Expand Down
3 changes: 3 additions & 0 deletions doomsday/host/host.pro
Expand Up @@ -6,6 +6,9 @@ include(../config.pri)

TEMPLATE = subdirs

# We are not building any binaries here; disable stripping.
QMAKE_STRIP = true

# The host is not installed by default.
deng_host {
INSTALLS += host
Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions doomsday/postbuild/postbuild.pro
@@ -0,0 +1,20 @@
# The Doomsday Engine Project
# Copyright (c) 2011-2012 Jaakko Keränen <jaakko.keranen@iki.fi>
# Copyright (c) 2011-2012 Daniel Swanson <danij@dengine.net>

# This project file contains tasks that are done in the end of a build.

TEMPLATE = subdirs

include(../config.pri)

# We are not building any binaries here; disable stripping.
QMAKE_STRIP = true

macx {
QMAKE_EXTRA_TARGETS += bundleapp

bundleapp.target = FORCE
bundleapp.commands = \
cd "$$OUT_PWD/.." && sh "$$PWD/bundleapp.sh" "$$PWD/.."
}

0 comments on commit 84f3f5a

Please sign in to comment.