Provide a script and workflow for building the project natively on MacOS (#145)
parent
86fce382c0
commit
59f22eb481
|
@ -0,0 +1,28 @@
|
|||
name: Build for Mac
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build-mac-native:
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
name: checkout
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
|
||||
- run: ./build_macos_native.sh
|
||||
name: build-for-mac
|
||||
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: tsMuxer
|
||||
path: build/bin/mac.tar.bz2
|
||||
name: upload-artefact
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.10
|
||||
|
||||
brew install pkg-config
|
||||
brew install freetype
|
||||
brew install zlib
|
||||
|
||||
builddir=$PWD
|
||||
|
||||
mkdir build
|
||||
|
||||
pushd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DTSMUXER_GUI=TRUE ..
|
||||
make -j$(sysctl -n hw.logicalcpu)
|
||||
|
||||
pushd tsMuxerGUI
|
||||
pushd tsMuxerGUI.app/Contents
|
||||
defaults write "$PWD/Info.plist" NSPrincipalClass -string NSApplication
|
||||
defaults write "$PWD/Info.plist" NSHighResolutionCapable -string True
|
||||
plutil -convert xml1 Info.plist
|
||||
popd
|
||||
macdeployqt tsMuxerGUI.app
|
||||
popd
|
||||
|
||||
mkdir bin
|
||||
pushd bin
|
||||
mv ../tsMuxer/tsmuxer tsMuxeR
|
||||
mv ../tsMuxerGUI/tsMuxerGUI.app .
|
||||
BZIP2=-9 tar cjf mac.tar.bz2 tsMuxeR tsMuxerGUI.app
|
||||
popd
|
||||
popd
|
|
@ -109,7 +109,7 @@ if (WIN32)
|
|||
target_compile_definitions(tsmuxer PRIVATE "-DUNICODE")
|
||||
else()
|
||||
target_sources(tsmuxer PRIVATE osdep/textSubtitlesRenderFT.cpp)
|
||||
target_link_libraries(tsmuxer ${FREETYPE2_LIBRARIES})
|
||||
target_link_libraries(tsmuxer ${FREETYPE2_LIBRARIES} ${FREETYPE2_LDFLAGS})
|
||||
target_include_directories(tsmuxer PRIVATE ${FREETYPE2_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue