Skip to content

Commit

Permalink
deploy sql module for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Mar 28, 2016
1 parent b0847dc commit c8f88a0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions qtc_packaging/ifw/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mkdir -p $TARGET/packages/com.qtav.product/data/
### runtime
echo "coping runtime files..."
RT_DIR=$TARGET/packages/com.qtav.product.runtime
declare -a QTMODULES=(Core Gui OpenGL Widgets Qml Quick Network Svg) #TODO: use readelf, objdump or otool to get depends
declare -a QTMODULES=(Core Gui OpenGL Widgets Qml Quick Network Svg Sql) #TODO: use readelf, objdump or otool to get depends
host_is Linux && QTMODULES+=(DBus XcbQpa X11Extras)
cp -af $BUILD/bin/* $RT_DIR/data/bin
rm -rf $RT_DIR/data/bin/QtAV*d${QTAV_VER_MAJOR}.*
Expand All @@ -118,7 +118,7 @@ done

QTPLUGIN=`qmake -query QT_INSTALL_PLUGINS`
QTQML=`qmake -query QT_INSTALL_QML`
for qplugin in imageformats platforms platforminputcontexts platformthemes xcbglintegrations iconengines egldeviceintegrations generic; do
for qplugin in imageformats platforms platforminputcontexts platformthemes xcbglintegrations iconengines egldeviceintegrations generic sqldrivers; do
test -d $QTPLUGIN/$qplugin && cp -af $QTPLUGIN/$qplugin $RT_DIR/data/bin/plugins
done
# find dir -name "*d.dll" -o -name "*.pdb" -delete fail, why?
Expand Down
1 change: 1 addition & 0 deletions tools/ci/win/deploy_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if "%mode%" == "debug" (
if exist %QTDIR%\plugins\platforms xcopy /syi %QTDIR%\plugins\platforms bin\plugins\platforms > NUL
if exist %QTDIR%\plugins\imageformats xcopy /syi %QTDIR%\plugins\imageformats bin\plugins\imageformats > NUL
if exist %QTDIR%\plugins\iconengines xcopy /syi %QTDIR%\plugins\iconengines bin\plugins\iconengines > NUL
if exist %QTDIR%\plugins\sqldrivers xcopy /syi %QTDIR%\plugins\sqldrivers bin\plugins\sqldrivers > NUL
if exist %QTDIR%\qml\Qt xcopy /syi %QTDIR%\qml\Qt bin\qml\Qt > NUL
if exist %QTDIR%\qml\QtQml xcopy /syi %QTDIR%\qml\QtQml bin\qml\QtQml > NUL
if exist %QTDIR%\qml\QtQuick xcopy /syi %QTDIR%\qml\QtQuick bin\qml\QtQuick > NUL
Expand Down
21 changes: 14 additions & 7 deletions tools/deploy_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fix_qt() {
done
done
}
#TODO: fix_av

deploy() {
cd $BUILD_DIR
Expand All @@ -54,7 +55,7 @@ deploy() {
local QT_PLUGINS=`$QTBIN/qmake -query QT_INSTALL_PLUGINS`
local QT_QML=`$QTBIN/qmake -query QT_INSTALL_QML`
#cocoa depends on QtPrintSupport and DBus(5.5), QtSVG & QtPrintSupport depends on QtWidgets
QTMODULES="QtCore QtGui QtSvg QtPrintSupport QtWidgets QtDBus"
QTMODULES="QtCore QtGui QtSvg QtPrintSupport QtWidgets QtDBus QtSql"
otool -L $EXE |grep QtOpenGL && QTMODULES+=" QtOpenGL"
otool -L $EXE |grep QtQuick && QML="Qt QtQml QtQuick QtQuick.2" && QTMODULES+=" QtQuick QtQml QtNetwork"
for q in $QTMODULES; do
Expand All @@ -63,8 +64,8 @@ deploy() {
local Q=$FRAMEWORK_DIR/${q}.framework/Versions/5/${q}
test -f $Q && install_name_tool -id @executable_path/../Frameworks/${q}.framework/Versions/5/${q} $Q
done
mkdir -p $FRAMEWORK_DIR/../PlugIns/{platforms,imageformats,iconengines}
for q in platforms/libqcocoa.dylib imageformats/libqsvg.dylib imageformats/libqjpeg.dylib iconengines/libqsvgicon.dylib; do
mkdir -p $FRAMEWORK_DIR/../PlugIns/{platforms,imageformats,iconengines,sqldrivers}
for q in platforms/libqcocoa.dylib imageformats/libqsvg.dylib imageformats/libqjpeg.dylib iconengines/libqsvgicon.dylib sqldrivers/libqsqlite.dylib; do
cp -aLf $QT_PLUGINS/${q} $FRAMEWORK_DIR/../PlugIns/${q}
done
mkdir -p $FRAMEWORK_DIR/../Resources/qml
Expand All @@ -89,14 +90,20 @@ deploy() {
local EXE_DEP=`otool -L $EXE |awk '{print $1}' |grep -v : |grep "${MODULE_LIB_REL}"`
install_name_tool -change "$EXE_DEP" "@executable_path/../Frameworks/${MODULE_LIB_REL}" $EXE
done
:<<EOF
for ff in libportaudio libavutil libavcodec libavformat libavfilter libavdevice libavresample libswscale libswresample libpostproc
:<<EOC
for ff in libavutil libavcodec libavformat libavfilter libavdevice libavresample libswscale libswresample libpostproc
do
local FFPATH=`otool -L $MODULE_LIB |awk '{print $1}' |grep -v : |grep $ff`
install_name_tool -change "$FFPATH" "@executable_path/../Frameworks/${FFPATH##*/}" $MODULE_LIB
if [ -f "$FRAMEWORK_DIR/${FFPATH##*/}" ]; then
install_name_tool -id "@executable_path/../Frameworks/${FFPATH##*/}" $FRAMEWORK_DIR/${FFPATH##*/}
install_name_tool -change "$FFPATH" "@executable_path/../Frameworks/${FFPATH##*/}" $MODULE_LIB
fi
done
EOF
EOC
find bin/${APP}.app -name "*_debug*" -delete
find bin/${APP}.app -name "log*.txt" -delete
find bin/${APP}.app -name "*.prl" -delete

fix_qt $APP
cat>bin/${APP}.app/Contents/Resources/qt.conf<<EOF
[Paths]
Expand Down

0 comments on commit c8f88a0

Please sign in to comment.