Bunch of mac build fixes

This commit is contained in:
John Maguire 2019-10-16 19:42:21 +01:00
parent 4dfda20ec6
commit 992311c185
4 changed files with 43 additions and 32 deletions

View File

@ -442,9 +442,10 @@ jobs:
- run:
name: Setup PATH
command: |
echo 'export Qt5_DIR=/usr/local/opt/qt5/lib/cmake' >> $BASH_ENV
echo 'export Qt5LinguistTools_DIR=/usr/local/Cellar/qt/5.11.2/lib/cmake/Qt5LinguistTools' >> $BASH_ENV
echo 'export GST_SCANNER_PATH=/usr/local/Cellar/gstreamer/1.14.4/libexec/gstreamer-1.0/gst-plugin-scanner' >> $BASH_ENV
echo 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' >> $BASH_ENV
echo 'export Qt5_DIR=/usr/local/Cellar/qt/5.13.1/lib/cmake/Qt5' >> $BASH_ENV
echo 'export Qt5LinguistTools_DIR=/usr/local/Cellar/qt/5.13.1/lib/cmake/Qt5LinguistTools' >> $BASH_ENV
echo 'export GST_SCANNER_PATH=/usr/local/Cellar/gstreamer/1.16.1/libexec/gstreamer-1.0/gst-plugin-scanner' >> $BASH_ENV
echo 'export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0' >> $BASH_ENV
echo 'export PATH=/usr/local/opt/gettext/bin:$PATH' >> $BASH_ENV
source $BASH_ENV
@ -456,35 +457,37 @@ jobs:
chromaprint
cmake
cryptopp
fftw
gettext
glew
glib
liblastfm
google-sparsehash
gst-libav
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
pkgconfig
protobuf
protobuf-c
qt
- run:
name: Install sqlite
command: brew install sqlite --with-fts
- run:
name: Install gstreamer
command: brew install gstreamer gst-plugins-base
- run:
name: Install gst-plugins-good
command: brew install gst-plugins-good --with-flac
- run:
name: Install gst-plugins
command: brew install gst-plugins-bad gst-plugins-ugly
- run:
name: Install other dependencies
command: brew install chromaprint liblastfm
sqlite
- checkout
- run:
name: Checkout qt5 branch
command: git checkout qt5
- run:
name: cmake
command: cmake .. -DUSE_VISUALISATIONS=OFF
command: >
cmake
..
-Wno-dev
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_OSX_ARCHITECTURES=x86_64
-DGETTEXT_MSGMERGE_EXECUTABLE=/usr/local/Cellar/gettext/0.20.1/bin/msgmerge
-DGETTEXT_MSGFMT_EXECUTABLE=/usr/local/Cellar/gettext/0.20.1/bin/msgfmt
-DGETTEXT_XGETTEXT_EXECUTABLE=/usr/local/Cellar/gettext/0.20.1/bin/xgettext
working_directory: bin
- run:
name: make

View File

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_policy(SET CMP0011 OLD)
cmake_policy(SET CMP0053 OLD)
include(CheckCXXCompilerFlag)
include(FindPkgConfig)

22
dist/macdeploy.py vendored
View File

@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/python
# This file is part of Clementine.
#
@ -66,7 +66,6 @@ GSTREAMER_PLUGINS = [
'libgstisomp4.so',
'libgstlame.so',
'libgstlibav.so',
'libgstmad.so',
'libgstmms.so',
# TODO: Bring back Musepack support.
'libgstogg.so',
@ -75,27 +74,25 @@ GSTREAMER_PLUGINS = [
'libgstspeex.so',
'libgsttaglib.so',
'libgstvorbis.so',
'libgstwavpack.so',
'libgstwavparse.so',
'libgstxingmux.so',
# HTTP src support
'libgstsouphttpsrc.so',
'libgstsoup.so',
# Icecast support
'libgsticydemux.so',
# CD support
'libgstcdio.so',
# RTSP streaming
'libgstrtp.so',
'libgstrtsp.so',
]
GSTREAMER_SEARCH_PATH = [
'/usr/local/lib/gstreamer-1.0',
'/target/lib/gstreamer-1.0',
'/target/libexec/gstreamer-1.0',
'/usr/local/Cellar/gstreamer/1.16.1/libexec/gstreamer-1.0',
]
QT_PLUGINS = [
@ -110,14 +107,19 @@ QT_PLUGINS = [
'imageformats/libqjpeg.dylib',
#'imageformats/libqmng.dylib',
'imageformats/libqsvg.dylib',
'platforms/libqcocoa.dylib',
]
QT_PLUGINS_SEARCH_PATH = [
'/usr/local/Cellar/qt/5.13.1/plugins',
'/target/plugins',
'/usr/local/Trolltech/Qt-4.7.0/plugins',
'/Developer/Applications/Qt/plugins',
]
GIO_MODULES_SEARCH_PATH = ['/target/lib/gio/modules',]
GIO_MODULES_SEARCH_PATH = [
'/usr/local/lib/gio/modules',
'/target/lib/gio/modules',
]
INSTALL_NAME_TOOL_APPLE = 'install_name_tool'
INSTALL_NAME_TOOL_CROSS = 'x86_64-apple-darwin-%s' % INSTALL_NAME_TOOL_APPLE
@ -303,6 +305,7 @@ def CopyLibrary(path):
new_path = os.path.join(frameworks_dir, os.path.basename(path))
args = ['cp', path, new_path]
commands.append(args)
commands.append(['chmod', '+w', new_path])
LOGGER.info("Copying library '%s'", path)
return new_path
@ -313,6 +316,7 @@ def CopyPlugin(path, subdir):
commands.append(args)
args = ['cp', path, new_path]
commands.append(args)
commands.append(['chmod', '+w', new_path])
LOGGER.info("Copying plugin '%s'", path)
return new_path
@ -337,6 +341,7 @@ def CopyFramework(src_binary):
commands.append(['mkdir', '-p', dest_dir])
commands.append(['cp', src_binary, dest_binary])
commands.append(['chmod', '+w', dest_binary])
# Copy special files from various places:
# QtCore has Resources/qt_menu.nib (copy to app's Resources)
@ -469,7 +474,6 @@ def main():
FixPlugin(FindGstreamerPlugin('gst-plugin-scanner'), '.')
FixPlugin(FindGioModule('libgiognutls.so'), 'gio-modules')
FixPlugin(FindGioModule('libgiolibproxy.so'), 'gio-modules')
try:
FixPlugin('clementine-spotifyblob', '.')

View File

@ -1267,6 +1267,12 @@ target_link_libraries(clementine_lib
z
)
link_directories(
${CHROMAPRINT_LIBRARY_DIRS}
${GSTREAMER_APP_LIBRARY_DIRS}
${GLEW_LIBRARY_DIRS}
)
if(HAVE_VISUALISATIONS)
target_link_libraries(clementine_lib ${LIBPROJECTM_LIBRARIES})
endif(HAVE_VISUALISATIONS)
@ -1424,9 +1430,6 @@ if (APPLE)
install(FILES ../dist/cacert.pem
DESTINATION "${CMAKE_BINARY_DIR}/clementine.app/Contents/Resources")
install(DIRECTORY "${QT_QTGUI_LIBRARY_RELEASE}/Versions/Current/Resources/"
DESTINATION "${CMAKE_BINARY_DIR}/clementine.app/Contents/Resources")
if (HAVE_BREAKPAD)
install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/google-breakpad/client/mac/build/Release/Breakpad.framework