Skip to content

Commit

Permalink
Windows|SDK|Fixed: SDK and dependency deployment on Windows
Browse files Browse the repository at this point in the history
The SDK build can now be deployed on Windows, too. test_appfw can now
be successfully built against a deployed SDK. Deploying test_appfw
copies the necessary libs from the SDK and also runs windeployqt.
  • Loading branch information
skyjake committed Aug 15, 2014
1 parent 8592ff5 commit aed3e39
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
6 changes: 3 additions & 3 deletions doomsday/config.pri
Expand Up @@ -118,10 +118,10 @@ deng_sdk {
DENG_SDK_LIB_DIR = $$DENG_SDK_DIR/lib
}
DENG_SDK_PACKS_DIR = $$DENG_SDK_DIR/packs
builtpacks.path = $$DENG_SDK_PACKS_DIR
builtpacks.path = $$DENG_SDK_PACKS_DIR

echo(SDK header directory: $$DENG_SDK_HEADER_DIR)
echo(SDK library directory: $$DENG_SDK_LIB_DIR)
echo(SDK header directory: $$DENG_SDK_HEADER_DIR)
echo(SDK library directory: $$DENG_SDK_LIB_DIR)
echo(SDK packages directory: $$DENG_SDK_PACKS_DIR)
}

Expand Down
1 change: 1 addition & 0 deletions doomsday/dep_assimp.pri
Expand Up @@ -56,6 +56,7 @@ deng_extassimp {

INSTALLS += assimplib
assimplib.path = $$DENG_BIN_DIR
deng_sdk: assimplib.path = $$DENG_SDK_LIB_DIR
deng_debug: assimplib.files = $$ASSIMP_DIR/bin/debug/assimpd.dll
else: assimplib.files = $$ASSIMP_DIR/bin/release/assimp.dll
}
Expand Down
2 changes: 2 additions & 0 deletions doomsday/dep_zlib.pri
Expand Up @@ -7,6 +7,8 @@ win32 {
INSTALLS += zlibs
zlibs.files = $$PWD/external/zlib/win32/zlib1.dll
zlibs.path = $$DENG_LIB_DIR

deng_sdk: zlibs.path = $$DENG_SDK_LIB_DIR
}
else:macx {
# Mac OS X.
Expand Down
23 changes: 21 additions & 2 deletions doomsday/doomsday_sdk.pri
Expand Up @@ -45,6 +45,9 @@ defineTest(dengDynamicLinkPath) {
QMAKE_LFLAGS += -Wl,-rpath,$$1
export(QMAKE_LFLAGS)
}
win32 {
LIBS += -L$$1
}
}

# Instruct the dynamic linker to load the libs from the SDK lib dir.
Expand Down Expand Up @@ -138,7 +141,17 @@ defineTest(dengDeploy) {
contains(DENG_CONFIG, shell): denglibs.files += $$dengSdkLib(deng_shell)

win32 {
# todo
denglibs.files += $$DENG_SDK_DIR/lib/zlib1.dll
contains(DENG_CONFIG, gui) {
denglibs.files += \
$$DENG_SDK_DIR/lib/assimpd.dll \
$$DENG_SDK_DIR/lib/assimp.dll
}

target.path = $$prefix/bin
denglibs.path = $$target.path
appPackages.path = $$prefix/data
sdkPackages.path = $$prefix/data
}
else:macx {
QMAKE_BUNDLE_DATA += $$INSTALLS
Expand All @@ -149,9 +162,9 @@ defineTest(dengDeploy) {
}
else {
target.path = $$prefix/bin
denglibs.path = $$dengFindLibDir($$prefix)
appPackages.path = $$prefix/share/$$1
sdkPackages.path = $$prefix/share/$$1
denglibs.path = $$dengFindLibDir($$prefix)
}

contains(DENG_CONFIG, symlink):unix {
Expand All @@ -169,6 +182,12 @@ defineTest(dengDeploy) {
}
}

win32 {
contains(DENG_CONFIG, gui): deployOpts += -opengl
denglibs.extra = windeployqt \"$$target.path\" -network $$deployOpts
export(denglibs.extra)
}

macx: export(QMAKE_BUNDLE_DATA)
else {
export(INSTALLS)
Expand Down
11 changes: 10 additions & 1 deletion doomsday/macros.pri
Expand Up @@ -94,7 +94,7 @@ defineTest(deployTarget) {
}

defineTest(deployLibrary) {
win32 {
win32:!deng_sdk {
DLLDESTDIR = $$DENG_LIB_DIR
export(DLLDESTDIR)
}
Expand All @@ -107,6 +107,15 @@ defineTest(deployLibrary) {
INSTALLS *= target
target.path = $$DENG_SDK_LIB_DIR
export(target.path)
win32 {
INSTALLS *= targetlib
deng_debug: targetlib.files = $$OUT_PWD/Debug/$${TARGET}.lib
else: targetlib.files = $$OUT_PWD/Release/$${TARGET}.lib
targetlib.path = $$DENG_SDK_LIB_DIR
export(targetlib.files)
export(targetlib.path)
}
!macx: INSTALLS *= builtpacks
}
export(INSTALLS)
}
Expand Down
2 changes: 2 additions & 0 deletions doomsday/tests/test_appfw/test_appfw.pro
Expand Up @@ -5,6 +5,8 @@ include($$DENG_SDK_DIR/doomsday_sdk.pri)
# Package the application resources.
dengPackage(net.dengine.test.appfw, $$OUT_PWD)

win32: INCLUDEPATH += C:/SDK/OpenGL

QT += gui opengl network
CONFIG += c++11

Expand Down

0 comments on commit aed3e39

Please sign in to comment.