hi I have found some sort automation of publish and test version control from CmakeList.txt
i just wanted to share this
in the CMakeList.txt i check for PRODUCT_STAGE is equal to “publish”
# Add QML files and resources to QML module to included them via QRC automatically:
if(PRODUCT_STAGE STREQUAL "publish")
qt_add_qml_module(
GCDriene URI
GCDriene VERSION 1.0
# uncomment for publishing:
QML_FILES ${QmlFiles}
RESOURCES ${AssetsFiles}
NO_RESOURCE_TARGET_PATH
)
add_definitions(-DAPP_BUILD_TYPE_PUBLSH)
else()
qt_add_qml_module(
GCDriene URI
GCDriene VERSION 1.0
# uncomment for publishing:
# QML_FILES ${QmlFiles}
# RESOURCES ${AssetsFiles}
NO_RESOURCE_TARGET_PATH
)
add_definitions(-DAPP_BUILD_TYPE_TEST)
endif(USE_PUBLISH_BUILD_ONOFF)
then in main.cpp i have made some simple adjustments
// use this during development
// for PUBLISHING, use the entry point below
#ifdef APP_BUILD_TYPE_TEST
felgo.setMainQmlFileName(QStringLiteral("qml/Main.qml"));
#endif
// use this instead of the above call to avoid deployment of the qml files and compile them into the binary with qt's resource system qrc
// this is the preferred deployment option for publishing games to the app stores, because then your qml files and js files are protected
// to avoid deployment of your qml files and images, also comment the DEPLOYMENTFOLDERS command in the .pro file
// also see the .pro file for more details
#ifdef APP_BUILD_TYPE_PUBLSH
felgo.setMainQmlFileName(QStringLiteral("qrc:/qml/Main.qml"));
#endif