2011-07-05 22:49:41 +00:00
|
|
|
# Config for making example and demo apps packageable
|
|
|
|
|
|
|
|
|
|
# Note that the paths here all assumed the including .pro file
|
|
|
|
|
# is exactly 3 levels of directory tree below the root
|
|
|
|
|
|
|
|
|
|
qtc_harmattan {
|
|
|
|
|
CONFIG += maemo
|
|
|
|
|
CONFIG += package
|
2011-07-13 07:58:59 +00:00
|
|
|
QMAKE_CXXFLAGS += -Wno-psabi
|
2011-07-05 22:49:41 +00:00
|
|
|
# The Qt SDK / Qt Creator harmattan integration needs some special treatment
|
|
|
|
|
QT3D_INSTALL_BINS = /bin
|
|
|
|
|
QT3D_INSTALL_LIBS = /usr/lib
|
|
|
|
|
QT3D_INSTALL_PLUGINS = /usr/lib/qt4/plugins
|
|
|
|
|
QT3D_INSTALL_IMPORTS = /usr/lib/qt4/imports
|
|
|
|
|
QT3D_INSTALL_DATA = /usr/share/qt4
|
|
|
|
|
} else {
|
|
|
|
|
QT3D_INSTALL_BINS = $$[QT_INSTALL_BINS]
|
|
|
|
|
QT3D_INSTALL_LIBS = $$[QT_INSTALL_LIBS]
|
|
|
|
|
QT3D_INSTALL_PLUGINS = $$[QT_INSTALL_PLUGINS]
|
|
|
|
|
QT3D_INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS]
|
|
|
|
|
QT3D_INSTALL_DATA = $$[QT_INSTALL_DATA]
|
|
|
|
|
}
|
|
|
|
|
|
2011-07-18 06:44:46 +00:00
|
|
|
qt3dquick_deploy_pkg {
|
|
|
|
|
CONFIG += qt3d_deploy_pkg
|
|
|
|
|
|
|
|
|
|
package {
|
|
|
|
|
macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
|
|
|
|
|
LIBS += -framework Qt3DQuick -F../../../src/quick3d
|
|
|
|
|
INCLUDEPATH += ../../../src/quick3d/Qt3DQuick.framework/Versions/1/Headers
|
|
|
|
|
} else {
|
|
|
|
|
win32 {
|
|
|
|
|
CONFIG(debug, debug|release) {
|
|
|
|
|
TARGET = $$member(TARGET, 0)d
|
|
|
|
|
LIBS += ..\\..\\..\\src\\quick3d\\debug\\Qt3DQuickd.lib
|
|
|
|
|
} else {
|
|
|
|
|
LIBS += ..\\..\\..\\src\\quick3d\\release\\Qt3DQuick.lib
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
LIBS += -L../../../src/quick3d -lQt3DQuick
|
|
|
|
|
}
|
|
|
|
|
INCLUDEPATH += ../../../include/Qt3DQuick
|
|
|
|
|
}
|
2011-12-09 10:19:56 +00:00
|
|
|
QT += declarative quick opengl
|
2011-07-18 06:44:46 +00:00
|
|
|
|
|
|
|
|
maemo: icons.files = icon-l-qtquick3d.png
|
2011-08-02 08:31:22 +00:00
|
|
|
} else {
|
|
|
|
|
CONFIG += qt3dquick
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
qt3d_deploy_pkg {
|
|
|
|
|
package {
|
|
|
|
|
macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
|
|
|
|
|
LIBS += -framework Qt3D -F../../../src/threed
|
|
|
|
|
INCLUDEPATH += ../../../src/threed/Qt3D.framework/Versions/1/Headers
|
|
|
|
|
} else {
|
|
|
|
|
win32 {
|
|
|
|
|
CONFIG(debug, debug|release) {
|
|
|
|
|
TARGET = $$member(TARGET, 0)d
|
|
|
|
|
LIBS += ..\\..\\..\\src\\threed\\debug\\Qt3Dd.lib
|
|
|
|
|
} else {
|
|
|
|
|
LIBS += ..\\..\\..\\src\\threed\\release\\Qt3D.lib
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
LIBS += -L../../../src/threed -lQt3D
|
|
|
|
|
}
|
|
|
|
|
INCLUDEPATH += ../../../include/Qt3D
|
|
|
|
|
}
|
|
|
|
|
QT += opengl
|
2011-08-02 08:31:22 +00:00
|
|
|
|
2011-08-05 04:01:49 +00:00
|
|
|
!qt3dquick_deploy_pkg: maemo: icons.files = icon-l-qt3d.png
|
2011-08-02 08:31:22 +00:00
|
|
|
} else {
|
|
|
|
|
CONFIG += qt3d
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-07-05 22:49:41 +00:00
|
|
|
contains(TEMPLATE, app) {
|
|
|
|
|
package {
|
|
|
|
|
maemo {
|
|
|
|
|
applnk.files = $${TARGET}.desktop
|
|
|
|
|
applnk.path = /usr/share/applications
|
|
|
|
|
|
|
|
|
|
# icons.files is set by qt3dquick_pkg_dep.pri or qt3d_pkg_dep.pri
|
|
|
|
|
icons.path = /usr/share/themes/base/meegotouch/icons
|
|
|
|
|
INSTALLS += icons applnk
|
2011-07-18 06:44:46 +00:00
|
|
|
|
2011-09-01 03:52:06 +00:00
|
|
|
app_target.path = $$QT3D_INSTALL_BINS
|
2011-08-30 06:20:20 +00:00
|
|
|
INSTALLS += app_target
|
2011-07-18 06:44:46 +00:00
|
|
|
} else {
|
|
|
|
|
mt {
|
2011-08-25 01:23:47 +00:00
|
|
|
applnk.files = info.json $${TARGET}.qmlproject
|
2011-07-18 06:44:46 +00:00
|
|
|
applnk.path = /opt/mt/applications/$${TARGET}
|
|
|
|
|
|
|
|
|
|
# icons.files is set by qt3dquick_pkg_dep.pri or qt3d_pkg_dep.pri
|
|
|
|
|
icons.path = /opt/mt/applications/$${TARGET}
|
|
|
|
|
INSTALLS += icons applnk
|
2011-09-01 03:52:06 +00:00
|
|
|
app_target.path = /opt/mt/applications/$${TARGET}
|
2011-08-30 06:20:20 +00:00
|
|
|
INSTALLS += app_target
|
2011-07-18 06:44:46 +00:00
|
|
|
|
|
|
|
|
DEFINES += QT3D_USE_OPT=$${TARGET}
|
|
|
|
|
} else {
|
2011-09-01 03:52:06 +00:00
|
|
|
app_target.path = $$QT3D_INSTALL_BINS
|
2011-08-30 06:20:20 +00:00
|
|
|
INSTALLS += app_target
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
2011-07-05 22:49:41 +00:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
DESTDIR = ../../../bin
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-07-18 06:44:46 +00:00
|
|
|
|
|
|
|
|
qt3d_deploy_qml {
|
|
|
|
|
mt {
|
2011-08-23 01:15:33 +00:00
|
|
|
package {
|
|
|
|
|
TARGET_DIR = $$PWD
|
|
|
|
|
} else {
|
|
|
|
|
TARGET_DIR = /opt/mt/applications/$$TARGET
|
|
|
|
|
}
|
2011-07-18 06:44:46 +00:00
|
|
|
} else {
|
2011-10-17 03:28:09 +00:00
|
|
|
TARGET_DIR = $$[QT_INSTALL_DATA]/quick3d/resources/examples/$$TARGET
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
2011-08-02 08:31:22 +00:00
|
|
|
symbian {
|
|
|
|
|
TARGET_DIR = .
|
|
|
|
|
} else: macx {
|
2011-07-18 06:44:46 +00:00
|
|
|
TARGET_DIR = .
|
|
|
|
|
} else {
|
|
|
|
|
!package {
|
|
|
|
|
TARGET_DIR = ../../../bin/resources/examples/$$TARGET
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for(dir, INSTALL_DIRS) {
|
|
|
|
|
di.source = $${dir}
|
|
|
|
|
di.target = $$TARGET_DIR
|
|
|
|
|
DEPLOYMENTFOLDERS += di
|
|
|
|
|
}
|
2011-08-30 06:20:20 +00:00
|
|
|
for(file, INSTALL_FILES) {
|
|
|
|
|
fi.source = $${file}
|
|
|
|
|
fi.target = $$TARGET_DIR
|
|
|
|
|
DEPLOYMENTFOLDERS += fi
|
|
|
|
|
}
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# The following code was generated by the Qt Quick Application wizard of Qt Creator.
|
|
|
|
|
# The file it was contained in was qmlapplicationviewer.pri, if necessary it should
|
|
|
|
|
# be possible to simply cut & paste the code straight out of the latest version to
|
|
|
|
|
# update it.
|
|
|
|
|
#
|
|
|
|
|
# The only changes has been to comment out the installPrexfix line below, this
|
|
|
|
|
# will probably be necessary to replicate when replacing.
|
|
|
|
|
#
|
|
|
|
|
defineTest(qtcAddDeployment) {
|
|
|
|
|
MAINPROFILEPWD = $$PWD
|
|
|
|
|
|
|
|
|
|
win32 {
|
|
|
|
|
copyCommand =
|
2011-08-02 08:31:22 +00:00
|
|
|
!package {
|
|
|
|
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
|
|
|
|
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
|
|
|
|
|
source = $$replace(source, /, \\)
|
|
|
|
|
sourcePathSegments = $$split(source, \\)
|
|
|
|
|
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
|
|
|
|
|
target = $$replace(target, /, \\)
|
|
|
|
|
!isEqual(source,$$target) {
|
|
|
|
|
!isEmpty(copyCommand):copyCommand += &&
|
|
|
|
|
isEqual(QMAKE_DIR_SEP, \\) {
|
|
|
|
|
copyCommand += $$QMAKE_COPY_DIR \"$$source\" \"$$target\"
|
|
|
|
|
} else {
|
|
|
|
|
source = $$replace(source, \\\\, /)
|
|
|
|
|
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
|
|
|
|
|
target = $$replace(target, \\\\, /)
|
|
|
|
|
copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
|
|
|
|
|
}
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
}
|
2011-08-02 08:31:22 +00:00
|
|
|
!isEmpty(copyCommand) {
|
|
|
|
|
message(copyCommand - $$copyCommand)
|
|
|
|
|
copyCommand = @echo Copying application data... && $$copyCommand
|
|
|
|
|
copydeploymentfolders.commands = $$copyCommand
|
|
|
|
|
first.depends = $(first) copydeploymentfolders
|
|
|
|
|
export(first.depends)
|
|
|
|
|
export(copydeploymentfolders.commands)
|
|
|
|
|
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
|
|
|
|
|
}
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
2011-08-02 08:31:22 +00:00
|
|
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
|
|
|
|
item = item$${deploymentfolder}
|
|
|
|
|
itemfiles = $${item}.files
|
|
|
|
|
$$itemfiles = $$eval($${deploymentfolder}.source)
|
|
|
|
|
itempath = $${item}.path
|
|
|
|
|
$$itempath = $$eval($${deploymentfolder}.target)
|
|
|
|
|
export($$itemfiles)
|
|
|
|
|
export($$itempath)
|
|
|
|
|
INSTALLS += $$item
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
} else:unix {
|
|
|
|
|
maemo5 {
|
|
|
|
|
desktopfile.files = $${TARGET}.desktop
|
|
|
|
|
desktopfile.path = /usr/share/applications/hildon
|
|
|
|
|
icon.files = $${TARGET}64.png
|
|
|
|
|
icon.path = /usr/share/icons/hicolor/64x64/apps
|
|
|
|
|
} else {
|
|
|
|
|
desktopfile.files = $${TARGET}_harmattan.desktop
|
|
|
|
|
desktopfile.path = /usr/share/applications
|
|
|
|
|
icon.files = $${TARGET}80.png
|
|
|
|
|
icon.path = /usr/share/icons/hicolor/80x80/apps
|
|
|
|
|
copyCommand =
|
|
|
|
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
|
|
|
|
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
|
|
|
|
|
source = $$replace(source, \\\\, /)
|
|
|
|
|
macx {
|
2011-08-03 07:43:35 +00:00
|
|
|
target = $$DESTDIR/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
|
2011-07-18 06:44:46 +00:00
|
|
|
} else {
|
2011-08-25 01:23:47 +00:00
|
|
|
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
target = $$replace(target, \\\\, /)
|
|
|
|
|
sourcePathSegments = $$split(source, /)
|
|
|
|
|
targetFullPath = $$target/$$last(sourcePathSegments)
|
|
|
|
|
!isEqual(source,$$targetFullPath) {
|
|
|
|
|
!isEmpty(copyCommand):copyCommand += &&
|
|
|
|
|
copyCommand += $(MKDIR) \"$$target\"
|
2011-10-02 08:18:42 +00:00
|
|
|
copyCommand += && $(COPY_DIR) -v \"$$source\" \"$$target\"
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
!isEmpty(copyCommand) {
|
|
|
|
|
copyCommand = @echo Copying application data... && $$copyCommand
|
|
|
|
|
copydeploymentfolders.commands = $$copyCommand
|
|
|
|
|
first.depends = $(first) copydeploymentfolders
|
|
|
|
|
export(first.depends)
|
|
|
|
|
export(copydeploymentfolders.commands)
|
|
|
|
|
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-08-23 01:15:33 +00:00
|
|
|
mt {
|
2011-08-25 01:23:47 +00:00
|
|
|
desktopfile.files = $${TARGET}.qmlproject info.json
|
|
|
|
|
desktopfile.path = /opt/mt/applications/$$TARGET
|
|
|
|
|
icon.files = ../icon.png
|
|
|
|
|
icon.path = /opt/mt/applications/$$TARGET
|
|
|
|
|
|
2011-08-23 01:15:33 +00:00
|
|
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
|
|
|
|
item = item$${deploymentfolder}
|
|
|
|
|
itemfiles = $${item}.files
|
|
|
|
|
$$itemfiles = $$eval($${deploymentfolder}.source)
|
|
|
|
|
itempath = $${item}.path
|
|
|
|
|
$$itempath = /opt/mt/applications/$$TARGET
|
|
|
|
|
export($$itemfiles)
|
|
|
|
|
export($$itempath)
|
|
|
|
|
INSTALLS += $$item
|
|
|
|
|
}
|
|
|
|
|
target.path = /opt/mt/applications/$$TARGET
|
|
|
|
|
} else {
|
|
|
|
|
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
|
|
|
|
item = item$${deploymentfolder}
|
|
|
|
|
itemfiles = $${item}.files
|
|
|
|
|
$$itemfiles = $$eval($${deploymentfolder}.source)
|
|
|
|
|
itempath = $${item}.path
|
2011-10-17 03:28:09 +00:00
|
|
|
$$itempath = $$[QT_INSTALL_PREFIX]/$$eval($${deploymentfolder}.target)
|
2011-08-23 01:15:33 +00:00
|
|
|
export($$itemfiles)
|
|
|
|
|
export($$itempath)
|
|
|
|
|
INSTALLS += $$item
|
|
|
|
|
}
|
2011-10-17 03:28:09 +00:00
|
|
|
target.path = $$[QT_INSTALL_BINS]
|
2011-07-18 06:44:46 +00:00
|
|
|
}
|
|
|
|
|
export(icon.files)
|
|
|
|
|
export(icon.path)
|
|
|
|
|
export(desktopfile.files)
|
|
|
|
|
export(desktopfile.path)
|
|
|
|
|
export(target.path)
|
|
|
|
|
INSTALLS += desktopfile icon target
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export (ICON)
|
|
|
|
|
export (INSTALLS)
|
|
|
|
|
export (LIBS)
|
|
|
|
|
export (QMAKE_EXTRA_TARGETS)
|
2011-07-05 22:49:41 +00:00
|
|
|
}
|