Merge branch 'macos' into master
This commit is contained in:
commit
9d8e6bb253
|
@ -894,10 +894,14 @@ jobs:
|
||||||
working-directory: build
|
working-directory: build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: make install
|
run: make install
|
||||||
#- name: Create DMG
|
- name: Create DMG
|
||||||
# working-directory: build
|
working-directory: build
|
||||||
# shell: bash
|
shell: bash
|
||||||
# run: make dmg
|
run: make dmg
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: upload-macos
|
||||||
|
path: build/strawberry-*.dmg
|
||||||
|
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
|
@ -1045,3 +1049,27 @@ jobs:
|
||||||
- name: Build Windows installer
|
- name: Build Windows installer
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: makensis strawberry.nsi
|
run: makensis strawberry.nsi
|
||||||
|
|
||||||
|
|
||||||
|
upload-macos:
|
||||||
|
name: Upload macOS DMG
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref == 'refs/heads/macos'
|
||||||
|
needs:
|
||||||
|
- build-macos
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1.2.0
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: uploads
|
||||||
|
- name: Install SSH keys
|
||||||
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
with:
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS2 }}
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
- name: rsync
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
for i in $(find uploads -type f -name '*.dmg'); do
|
||||||
|
rsync -e "ssh -p 50220 -o StrictHostKeyChecking=no" -va $i travis@echoes.jkvinge.net:/home/travis/builds/macos/catalina/
|
||||||
|
done
|
||||||
|
|
|
@ -2,8 +2,6 @@ sudo: required
|
||||||
language: C++
|
language: C++
|
||||||
os:
|
os:
|
||||||
- osx
|
- osx
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
|
|
||||||
|
@ -27,8 +25,6 @@ before_install:
|
||||||
- sudo ln -s /usr/local/Caskroom/sparkle/$(ls /usr/local/Caskroom/sparkle | head -n1)/Sparkle.framework.dSYM /Library/Frameworks/Sparkle.framework.dSYM
|
- sudo ln -s /usr/local/Caskroom/sparkle/$(ls /usr/local/Caskroom/sparkle | head -n1)/Sparkle.framework.dSYM /Library/Frameworks/Sparkle.framework.dSYM
|
||||||
- export Qt5_DIR=/usr/local/opt/qt5/lib/cmake
|
- export Qt5_DIR=/usr/local/opt/qt5/lib/cmake
|
||||||
- export Qt5LinguistTools_DIR=/usr/local/opt/qt5/lib/cmake/Qt5LinguistTools
|
- export Qt5LinguistTools_DIR=/usr/local/opt/qt5/lib/cmake/Qt5LinguistTools
|
||||||
- export PATH="/usr/local/opt/gettext/bin:$PATH"
|
|
||||||
- export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig/:/usr/local/opt/zlib/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
- ls /usr/local/lib/gstreamer-1.0
|
- ls /usr/local/lib/gstreamer-1.0
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
|
@ -42,9 +38,9 @@ after_success:
|
||||||
- ls -lh strawberry*.dmg
|
- ls -lh strawberry*.dmg
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$CC_FOR_BUILD" == "gcc" ]] && [ -f ~/.ssh/id_rsa ]; then
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$CC_FOR_BUILD" == "gcc" ]] && [ -f ~/.ssh/id_rsa ]; then
|
||||||
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
||||||
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos;
|
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos/highsierra/;
|
||||||
elif [[ "$TRAVIS_BRANCH" == "macos" ]]; then
|
elif [[ "$TRAVIS_BRANCH" == "macos" ]]; then
|
||||||
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos;
|
rsync -e "ssh -o StrictHostKeyChecking=no" -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos/highsierra/;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/dist/macos/macversion.sh OUTPUT_VARIABLE MACOS_VERSION_PACKAGE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
add_custom_target(dmg
|
add_custom_target(dmg
|
||||||
COMMAND /usr/local/opt/qt5/bin/macdeployqt strawberry.app
|
COMMAND /usr/local/opt/qt5/bin/macdeployqt strawberry.app
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/dist/macos/macdeploy.py strawberry.app
|
COMMAND ${CMAKE_SOURCE_DIR}/dist/macos/macdeploy.py strawberry.app
|
||||||
COMMAND create-dmg --volname strawberry --background "${CMAKE_SOURCE_DIR}/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon strawberry.app 150 218 --window-size 600 450 strawberry-${STRAWBERRY_VERSION_PACKAGE}.dmg strawberry.app
|
COMMAND create-dmg --volname strawberry --background "${CMAKE_SOURCE_DIR}/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon strawberry.app 150 218 --window-size 600 450 strawberry-${STRAWBERRY_VERSION_PACKAGE}-${MACOS_VERSION_PACKAGE}.dmg strawberry.app
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
|
@ -21,7 +21,6 @@ import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import commands
|
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
@ -156,7 +155,7 @@ class CouldNotFindGstreamerPluginError(Error):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print 'Usage: %s <bundle.app>' % sys.argv[0]
|
print('Usage: %s <bundle.app>' % sys.argv[0])
|
||||||
|
|
||||||
bundle_dir = sys.argv[1]
|
bundle_dir = sys.argv[1]
|
||||||
|
|
||||||
|
@ -176,20 +175,21 @@ fixed_frameworks = set()
|
||||||
|
|
||||||
|
|
||||||
def GetBrokenLibraries(binary):
|
def GetBrokenLibraries(binary):
|
||||||
#print "Checking libs for binary: %s" % binary
|
#print("Checking libs for binary: %s" % binary)
|
||||||
output = subprocess.Popen([OTOOL, '-L', binary], stdout=subprocess.PIPE).communicate()[0]
|
output = subprocess.Popen([OTOOL, '-L', binary], stdout=subprocess.PIPE).communicate()[0].decode('utf-8')
|
||||||
broken_libs = {'frameworks': [], 'libs': []}
|
broken_libs = {'frameworks': [], 'libs': []}
|
||||||
for line in [x.split(' ')[0].lstrip() for x in output.split('\n')[1:]]:
|
for line in [x.split(' ')[0].lstrip() for x in output.split('\n')[1:]]:
|
||||||
#print "Checking line: %s" % line
|
#print("Checking line: %s" % line)
|
||||||
if not line: # skip empty lines
|
if not line: # skip empty lines
|
||||||
continue
|
continue
|
||||||
if os.path.basename(binary) == os.path.basename(line):
|
if os.path.basename(binary) == os.path.basename(line):
|
||||||
#print "mnope %s-%s" % (os.path.basename(binary), os.path.basename(line))
|
#print("mnope %s-%s" % (os.path.basename(binary), os.path.basename(line)))
|
||||||
continue
|
continue
|
||||||
if re.match(r'^\s*/System/', line):
|
if re.match(r'^\s*/System/', line):
|
||||||
|
#print("system framework: %s" % line)
|
||||||
continue # System framework
|
continue # System framework
|
||||||
elif re.match(r'^\s*/usr/lib/', line):
|
elif re.match(r'^\s*/usr/lib/', line):
|
||||||
#print "unix style system lib"
|
#print("unix style system lib: %s" % line)
|
||||||
continue # unix style system library
|
continue # unix style system library
|
||||||
elif re.match(r'^\s*@executable_path', line) or re.match(r'^\s*@rpath', line) or re.match(r'^\s*@loader_path', line):
|
elif re.match(r'^\s*@executable_path', line) or re.match(r'^\s*@rpath', line) or re.match(r'^\s*@loader_path', line):
|
||||||
# Potentially already fixed library
|
# Potentially already fixed library
|
||||||
|
@ -206,8 +206,9 @@ def GetBrokenLibraries(binary):
|
||||||
if not os.path.exists(os.path.join(frameworks_dir, relative_path)):
|
if not os.path.exists(os.path.join(frameworks_dir, relative_path)):
|
||||||
broken_libs['frameworks'].append(relative_path)
|
broken_libs['frameworks'].append(relative_path)
|
||||||
else:
|
else:
|
||||||
print "GetBrokenLibraries Error: %s" % line
|
print("GetBrokenLibraries Error: %s" % line)
|
||||||
elif re.search(r'\w+\.framework', line):
|
elif re.search(r'\w+\.framework', line):
|
||||||
|
#print("framework: %s" % line)
|
||||||
broken_libs['frameworks'].append(line)
|
broken_libs['frameworks'].append(line)
|
||||||
else:
|
else:
|
||||||
broken_libs['libs'].append(line)
|
broken_libs['libs'].append(line)
|
||||||
|
@ -279,7 +280,7 @@ def FixLibrary(path):
|
||||||
|
|
||||||
abs_path = FindLibrary(path)
|
abs_path = FindLibrary(path)
|
||||||
if abs_path == "":
|
if abs_path == "":
|
||||||
print "Could not resolve %s, not fixing!" % path
|
print("Could not resolve %s, not fixing!" % path)
|
||||||
return
|
return
|
||||||
|
|
||||||
broken_libs = GetBrokenLibraries(abs_path)
|
broken_libs = GetBrokenLibraries(abs_path)
|
||||||
|
@ -482,7 +483,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
FixPlugin('strawberry-tagreader', '.')
|
FixPlugin('strawberry-tagreader', '.')
|
||||||
except:
|
except:
|
||||||
print 'Failed to find blob: %s' % traceback.format_exc()
|
print('Failed to find blob: %s' % traceback.format_exc())
|
||||||
|
|
||||||
for plugin in GSTREAMER_PLUGINS:
|
for plugin in GSTREAMER_PLUGINS:
|
||||||
FixPlugin(FindGstreamerPlugin(plugin), 'gstreamer')
|
FixPlugin(FindGstreamerPlugin(plugin), 'gstreamer')
|
||||||
|
@ -495,11 +496,11 @@ def main():
|
||||||
#FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
#FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||||
|
|
||||||
if len(sys.argv) <= 2:
|
if len(sys.argv) <= 2:
|
||||||
print 'Would run %d commands:' % len(commands)
|
print('Would run %d commands:' % len(commands))
|
||||||
for command in commands:
|
for command in commands:
|
||||||
print ' '.join(command)
|
print(' '.join(command))
|
||||||
|
|
||||||
#print 'OK?'
|
#print('OK?')
|
||||||
#raw_input()
|
#raw_input()
|
||||||
|
|
||||||
for command in commands:
|
for command in commands:
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
macos_version=$(sw_vers -productVersion| awk -F '[.]' '{print $2}')
|
||||||
|
macos_codenames=(
|
||||||
|
["13"]="highsierra"
|
||||||
|
["14"]="mojave"
|
||||||
|
["15"]="catalina"
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -n "${macos_codenames[$macos_version]}" ]]; then
|
||||||
|
echo "${macos_codenames[$macos_version]}"
|
||||||
|
else
|
||||||
|
echo "unknown"
|
||||||
|
fi
|
Loading…
Reference in New Issue