Skip to content

Commit

Permalink
qmake|Win32: Fixed tests for Windows
Browse files Browse the repository at this point in the history
The deployment of tests is a bit more streamlined now.
  • Loading branch information
skyjake committed Oct 25, 2012
1 parent 4569349 commit 53d8c82
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 33 deletions.
17 changes: 9 additions & 8 deletions doomsday/tests/archive/archive.pro
Expand Up @@ -7,14 +7,15 @@ SOURCES += main.cpp

OTHER_FILES += hello.txt

macx {
archived.files = test.zip hello.txt
archived.path = Contents/Resources

cfg.files = $$DENG_CONFIG_DIR/deng.de
cfg.path = Contents/Resources/config
deployTest($$TARGET)

QMAKE_BUNDLE_DATA += archived cfg
archived.files = test.zip hello.txt
archived.path = $$DENG_DATA_DIR

macDeployTest($$TARGET)
macx {
archived.path = Contents/Resources
QMAKE_BUNDLE_DATA += archived
}
else {
INSTALLS += archived
}
29 changes: 28 additions & 1 deletion doomsday/tests/config_test.pri
@@ -1,8 +1,12 @@
include(../config.pri)
include(../dep_deng2.pri)

cfg.files = $$DENG_CONFIG_DIR/deng.de

macx {
defineTest(macDeployTest) {
cfg.path = Contents/Resources/config

defineTest(deployTest) {
# Arg 1: target name (without .app)
fwDir = \"$${OUT_PWD}/$${1}.app/Contents/Frameworks/\"
doPostLink("rm -rf $$fwDir")
Expand All @@ -11,5 +15,28 @@ macx {

# Fix the dynamic linker paths so they point to ../Frameworks/ inside the bundle.
fixInstallName($${1}.app/Contents/MacOS/$${1}, libdeng2.2.dylib, ..)

QMAKE_BUNDLE_DATA += cfg
export(QMAKE_BUNDLE_DATA)
}
}
else:win32 {
CONFIG += console

target.path = $$DENG_BIN_DIR
cfg.path = $$DENG_DATA_DIR/config

defineTest(deployTest) {
INSTALLS += cfg target
export(INSTALLS)
}
}
else {
target.path = $$DENG_BIN_DIR
cfg.path = $$DENG_DATA_DIR/config

defineTest(deployTest) {
INSTALLS += cfg target
export(INSTALLS)
}
}
9 changes: 1 addition & 8 deletions doomsday/tests/record/record.pro
Expand Up @@ -5,11 +5,4 @@ TARGET = test_record

SOURCES += main.cpp

macx {
cfg.files = $$DENG_CONFIG_DIR/deng.de
cfg.path = Contents/Resources/config

QMAKE_BUNDLE_DATA += cfg

macDeployTest($$TARGET)
}
deployTest($$TARGET)
17 changes: 9 additions & 8 deletions doomsday/tests/script/script.pro
Expand Up @@ -9,14 +9,15 @@ SCRIPTS = kitchen_sink.de sections.de

OTHER_FILES += $$SCRIPTS

macx {
scripts.files = $$SCRIPTS
scripts.path = Contents/Resources

cfg.files = $$DENG_CONFIG_DIR/deng.de
cfg.path = Contents/Resources/config
deployTest($$TARGET)

QMAKE_BUNDLE_DATA += scripts cfg
scripts.files = $$SCRIPTS
scripts.path = $$DENG_DATA_DIR

macDeployTest($$TARGET)
macx {
scripts.path = Contents/Resources
QMAKE_BUNDLE_DATA += scripts
}
else {
INSTALLS += scripts
}
9 changes: 1 addition & 8 deletions doomsday/tests/vectors/vectors.pro
Expand Up @@ -5,11 +5,4 @@ TARGET = test_vectors

SOURCES += main.cpp

macx {
cfg.files = $$DENG_CONFIG_DIR/deng.de
cfg.path = Contents/Resources/config

QMAKE_BUNDLE_DATA += cfg

macDeployTest($$TARGET)
}
deployTest($$TARGET)

0 comments on commit 53d8c82

Please sign in to comment.