Fix missing qt plugins in macOS travis-ci build (#225)
This commit is contained in:
parent
02794e0ebd
commit
31fc031267
13
.travis.yml
13
.travis.yml
@ -24,9 +24,8 @@ before_install:
|
||||
git pull || travis_terminate 1;
|
||||
brew update || travis_terminate 1;
|
||||
brew unlink python || travis_terminate 1;
|
||||
brew install glib pkgconfig libffi protobuf protobuf-c qt gettext gnutls fftw sqlite;
|
||||
brew install glib pkgconfig libffi protobuf protobuf-c qt gettext gnutls fftw sqlite chromaprint;
|
||||
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav;
|
||||
brew install chromaprint;
|
||||
brew install libcdio libmtp libimobiledevice libplist;
|
||||
brew install create-dmg;
|
||||
export Qt5_DIR=/usr/local/opt/qt5/lib/cmake;
|
||||
@ -34,6 +33,7 @@ before_install:
|
||||
export PATH="/usr/local/opt/gettext/bin:$PATH";
|
||||
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig/:$PKG_CONFIG_PATH;
|
||||
ls /usr/local/lib/gstreamer-1.0;
|
||||
ls /usr/local/lib/gio/modules;
|
||||
fi
|
||||
before_script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build cmake -Hstrawberry -Bbuild ; fi
|
||||
@ -43,14 +43,15 @@ script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
make -j8 || travis_terminate 1;
|
||||
make install || travis_terminate 1;
|
||||
sudo ../dist/macos/macdeploy.py strawberry.app || travis_terminate 1;
|
||||
sudo ../dist/macos/create-dmg.sh strawberry.app;
|
||||
sudo make dmg;
|
||||
fi
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ls -lh strawberry.dmg; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ls -lh strawberry*.dmg; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$CC_FOR_BUILD" == "gcc" ]] && [ -f ~/.ssh/id_rsa ]; then
|
||||
if [[ "$TRAVIS_BRANCH" == "master" ]] || [[ "$TRAVIS_BRANCH" == "macos" ]]; then
|
||||
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos;
|
||||
elif [[ "$TRAVIS_BRANCH" == "macos" ]]; then
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos-test;
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
add_custom_target(dmg
|
||||
COMMAND sudo /usr/local/opt/qt5/bin/macdeployqt strawberry.app
|
||||
COMMAND sudo ${CMAKE_SOURCE_DIR}/dist/macos/macdeploy.py strawberry.app
|
||||
COMMAND sudo ${CMAKE_SOURCE_DIR}/dist/macos/create-dmg.sh strawberry.app
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
|
2
dist/macos/create-dmg.sh.in
vendored
2
dist/macos/create-dmg.sh.in
vendored
@ -21,4 +21,4 @@ rm -f "$output_file"
|
||||
|
||||
mkdir -p "$temp_dir"
|
||||
|
||||
create-dmg --volname "$name" --background ../dist/macos/dmg_background.png --app-drop-link 450 218 --icon $bundle_dir 150 218 --window-size 600 450 $output_file $bundle_dir
|
||||
/usr/local/bin/create-dmg --volname "$name" --background "@CMAKE_SOURCE_DIR@/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon $bundle_dir 150 218 --window-size 600 450 $output_file $bundle_dir
|
||||
|
26
dist/macos/macdeploy.py
vendored
26
dist/macos/macdeploy.py
vendored
@ -36,13 +36,23 @@ FRAMEWORK_SEARCH_PATH = [
|
||||
|
||||
QT_PLUGINS = [
|
||||
'platforms/libqcocoa.dylib',
|
||||
'platforminputcontexts/libqtvirtualkeyboardplugin.dylib',
|
||||
'styles/libqmacstyle.dylib',
|
||||
'sqldrivers/libqsqlite.dylib',
|
||||
'bearer/libqgenericbearer.dylib'
|
||||
'iconengines/libqsvgicon.dylib'
|
||||
'imageformats/libqgif.dylib',
|
||||
'imageformats/libqicns.dylib',
|
||||
'imageformats/libqico.dylib',
|
||||
'imageformats/libqjpeg.dylib',
|
||||
'imageformats/libqsvg.dylib',
|
||||
'imageformats/libqtiff.dylib',
|
||||
'printsupport/libcocoaprintersupport.dylib',
|
||||
'virtualkeyboard/libqtvirtualkeyboard_hangul.dylib',
|
||||
'virtualkeyboard/libqtvirtualkeyboard_openwnn.dylib',
|
||||
'virtualkeyboard/libqtvirtualkeyboard_pinyin.dylib',
|
||||
'virtualkeyboard/libqtvirtualkeyboard_tcime.dylib',
|
||||
'virtualkeyboard/libqtvirtualkeyboard_thai.dylib',
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH = [
|
||||
@ -458,7 +468,12 @@ def FindGioModule(name):
|
||||
def main():
|
||||
logging.basicConfig(filename='macdeploy.log', level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s')
|
||||
|
||||
FixBinary(binary)
|
||||
#FixBinary(binary)
|
||||
|
||||
try:
|
||||
FixPlugin('strawberry-tagreader', '.')
|
||||
except:
|
||||
print 'Failed to find blob: %s' % traceback.format_exc()
|
||||
|
||||
for plugin in GSTREAMER_PLUGINS:
|
||||
FixPlugin(FindGstreamerPlugin(plugin), 'gstreamer')
|
||||
@ -467,13 +482,8 @@ def main():
|
||||
FixPlugin(FindGioModule('libgiognutls.so'), 'gio-modules')
|
||||
#FixPlugin(FindGioModule('libgiognomeproxy.so'), 'gio-modules')
|
||||
|
||||
try:
|
||||
FixPlugin('strawberry-tagreader', '.')
|
||||
except:
|
||||
print 'Failed to find blob: %s' % traceback.format_exc()
|
||||
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
#for plugin in QT_PLUGINS:
|
||||
#FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
||||
if len(sys.argv) <= 2:
|
||||
print 'Would run %d commands:' % len(commands)
|
||||
|
Loading…
x
Reference in New Issue
Block a user