diff --git a/.qmake.conf b/.qmake.conf new file mode 100644 index 000000000..6997d9100 --- /dev/null +++ b/.qmake.conf @@ -0,0 +1,6 @@ +QTAV_MAJOR_VERSION = 1 +QTAV_MINOR_VERSION = 4 +QTAV_PATCH_VERSION = 2 + +QTAV_VERSION = $${QTAV_MAJOR_VERSION}.$${QTAV_MINOR_VERSION}.$${QTAV_PATCH_VERSION} +#MODULE_VERSION = $$QTAV_VERSION diff --git a/QtAV.pro b/QtAV.pro index 57c84aad5..c3d395889 100644 --- a/QtAV.pro +++ b/QtAV.pro @@ -17,7 +17,7 @@ greaterThan(QT_MAJOR_VERSION, 4) { SUBDIRS += examples examples.depends += libqtav } -!no-tests { +!android:!no-tests { SUBDIRS += tests tests.depends += libqtav } @@ -60,8 +60,8 @@ runConfigTests() } -PACKAGE_VERSION = 1.4.1 +PACKAGE_VERSION = $$QTAV_VERSION PACKAGE_NAME= QtAV include(pack.pri) -#packageSet(1.4.1, QtAV) +#packageSet($$QTAV_VERSION, QtAV) diff --git a/examples/QMLPlayer/QMLPlayer.pro b/examples/QMLPlayer/QMLPlayer.pro index 444ef5da1..c55fd0a72 100644 --- a/examples/QMLPlayer/QMLPlayer.pro +++ b/examples/QMLPlayer/QMLPlayer.pro @@ -1,4 +1,4 @@ -VERSION = 1.4.2 +VERSION = $$QTAV_VERSION *maemo*: DEFINES += Q_OS_MAEMO # Add more folders to ship with the application, here folder_01.source = qml/QMLPlayer diff --git a/examples/common/libcommon.pri b/examples/common/libcommon.pri index f49a87794..296d6ebab 100644 --- a/examples/common/libcommon.pri +++ b/examples/common/libcommon.pri @@ -48,7 +48,7 @@ NAME = common } eval(LIB$$upper($$NAME)_PRI_INCLUDED = 1) -LIB_VERSION = 1.4.1 #0.x.y may be wrong for dll +LIB_VERSION = $$QTAV_VERSION #0.x.y may be wrong for dll ios: STATICLINK=1 isEmpty(STATICLINK): STATICLINK = 0 #1 or 0. use static lib or not diff --git a/qml/libQmlAV.pri b/qml/libQmlAV.pri index 2bd46882f..4f162fa5b 100644 --- a/qml/libQmlAV.pri +++ b/qml/libQmlAV.pri @@ -48,7 +48,7 @@ NAME = QmlAV } eval(LIB$$upper($$NAME)_PRI_INCLUDED = 1) -LIB_VERSION = 1.4.1 #0.x.y may be wrong for dll +LIB_VERSION = $$QTAV_VERSION #0.x.y may be wrong for dll ios: STATICLINK=1 isEmpty(STATICLINK): STATICLINK = 0 #1 or 0. use static lib or not @@ -138,7 +138,7 @@ unix { # TODO: for macx. see qtcreator/src/rpath.pri. (-rpath define rpath, @rpath exapand to that path?) macx|ios { QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/Frameworks/ - QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../,-rpath,@executable_path/../ + #QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../,-rpath,@executable_path/../ } else { RPATHDIR = \$\$ORIGIN \$\$ORIGIN/lib . /usr/local/lib # $$PROJECT_LIBDIR only for host == target. But QMAKE_TARGET.arch is only available on windows. QT_ARCH is bad, e.g. QT_ARCH=i386 while QMAKE_HOST.arch=i686 diff --git a/qtc_packaging/ifw/build.sh b/qtc_packaging/ifw/build.sh index c71005191..e9e19b3af 100755 --- a/qtc_packaging/ifw/build.sh +++ b/qtc_packaging/ifw/build.sh @@ -15,8 +15,11 @@ MKSPEC=`grep mkspecs_cached $BUILD/.qmake.cache |cut -d "=" -f 2` MKSPEC=`echo $MKSPEC` TARGET=${MKSPEC}-${ARCH} -QTAV_VER=`grep PACKAGE_VERSION ../../QtAV.pro |cut -d "=" -f 2` -QTAV_VER=`echo $QTAV_VER` +QTAV_VER_MAJOR=`grep -m 1 QTAV_MAJOR_VERSION ../../.qmake.conf |cut -d "=" -f 2 | tr -d ' '` +QTAV_VER_MINOR=`grep -m 1 QTAV_MINOR_VERSION ../../.qmake.conf |cut -d "=" -f 2 | tr -d ' '` +QTAV_VER_PATCH=`grep -m 1 QTAV_PATCH_VERSION ../../.qmake.conf |cut -d "=" -f 2 | tr -d ' '` +QTAV_VER=${QTAV_VER_MAJOR}.${QTAV_VER_MINOR}.${QTAV_VER_PATCH} +echo "QtAV $QTAV_VER" function platform_is() { local name=$1 @@ -94,12 +97,15 @@ cp -Lf $LIBQTAV $TARGET/packages/com.qtav.product.runtime/data/bin echo "coping development files..." cp -af ../../src/QtAV $TARGET/packages/com.qtav.product.dev/data/include cp -af ../../qml/QmlAV $TARGET/packages/com.qtav.product.dev/data/include +cp -af $BUILD/tools/install_sdk/mkspecs $TARGET/packages/com.qtav.product.dev/data cp -af ../../{README.md,lgpl-2.1.txt,gpl-3.0.txt,doc} $TARGET/packages/com.qtav.product/data #mingw: libQt5AV1.a cp -af $LIBDIR/*Qt*AV* $TARGET/packages/com.qtav.product.dev/data/lib - - +[ -f $LIBDIR/Qt5AV1.lib ] && cp -af $LIBDIR/libQt5AV1.a $TARGET/packages/com.qtav.product.dev/data/lib/Qt5AV.lib +[ -f $LIBDIR/libQt5AV1.a ] && cp -af $LIBDIR/libQt5AV1.a $TARGET/packages/com.qtav.product.dev/data/lib/libQt5AV.a +[ -f $LIBDIR/libQt5AV1.so ] && cp -af $LIBDIR/libQt5AV1.a $TARGET/packages/com.qtav.product.dev/data/lib/libQt5AV.so +rm -f $TARGET/packages/com.qtav.product.dev/data/lib/{*.dll,*.so.*} # player echo "coping player files..." diff --git a/root.pri b/root.pri index ac20340b7..7d98b5dd6 100644 --- a/root.pri +++ b/root.pri @@ -49,6 +49,17 @@ defineTest(qtRunCommandQuitly) { return(true) } +isEmpty(QTAV_VERSION) { + QTAV_MAJOR_VERSION = 1 + QTAV_MINOR_VERSION = 4 + QTAV_PATCH_VERSION = 2 + QTAV_VERSION = $${QTAV_MAJOR_VERSION}.$${QTAV_MINOR_VERSION}.$${QTAV_PATCH_VERSION} + message("QTAV_VERSION not set, cache the default $$QTAV_VERSION") + cache(QTAV_MAJOR_VERSION, set, QTAV_MAJOR_VERSION) + cache(QTAV_MINOR_VERSION, set, QTAV_MINOR_VERSION) + cache(QTAV_PATCH_VERSION, set, QTAV_PATCH_VERSION) + cache(QTAV_VERSION, set, QTAV_VERSION) +} defineTest(testArch) { test_dir = $$_PRO_FILE_PWD_/tests/arch test_out_dir = $$shadowed($$test_dir) diff --git a/src/libQtAV.pri b/src/libQtAV.pri index d9a656e0c..f88eb9cbf 100644 --- a/src/libQtAV.pri +++ b/src/libQtAV.pri @@ -48,7 +48,7 @@ NAME = QtAV } eval(LIB$$upper($$NAME)_PRI_INCLUDED = 1) -LIB_VERSION = 1.4.1 #0.x.y may be wrong for dll +LIB_VERSION = $$QTAV_VERSION #0.x.y may be wrong for dll ios: STATICLINK=1 isEmpty(STATICLINK): STATICLINK = 0 #1 or 0. use static lib or not @@ -141,6 +141,7 @@ unix { # TODO: for macx. see qtcreator/src/rpath.pri. (-rpath define rpath, @rpath exapand to that path?) macx|ios { QMAKE_LFLAGS_SONAME = -Wl,-install_name,$$PROJECT_LIBDIR/ +# 5.4 #QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../,-rpath,@executable_path/../ } else { RPATHDIR = \$\$ORIGIN \$\$ORIGIN/lib . /usr/local/lib $$[QT_INSTALL_LIBS] diff --git a/tools/install_sdk/install_sdk.pro b/tools/install_sdk/install_sdk.pro index 05b576843..231b6a5a7 100644 --- a/tools/install_sdk/install_sdk.pro +++ b/tools/install_sdk/install_sdk.pro @@ -14,7 +14,7 @@ PROJECTROOT = $$PWD/../.. include($$PROJECTROOT/common.pri) preparePaths($$OUT_PWD/../../out) -VERSION = 1.4.1 +VERSION = $$QTAV_VERSION # windows: Qt5AV.dll, not Qt1AV.dll !mac_framework: VERSION = $${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}