Skip to content

Commit c5a10b7

Browse files
authored
Add macOS/arm64 (#4)
1 parent 81d0151 commit c5a10b7

File tree

4 files changed

+38
-12
lines changed

4 files changed

+38
-12
lines changed

.github/workflows/package-build.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,25 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [windows-2016, macos-latest, ubuntu-16.04]
19+
name: [
20+
linux-x86_64,
21+
macos-x86_64,
22+
macos-arm64,
23+
windows-x86_64
24+
]
25+
include:
26+
- name: linux-x86_64
27+
os: ubuntu-16.04
28+
arch: x86_64
29+
- name: macos-x86_64
30+
os: macos-10.15
31+
arch: x86_64
32+
- name: macos-arm64
33+
os: macos-11
34+
arch: arm64
35+
- name: windows-x86_64
36+
os: windows-2016
37+
arch: x86_64
2038
fail-fast: false
2139
steps:
2240
- uses: actions/checkout@v2
@@ -25,21 +43,21 @@ jobs:
2543
shell: powershell
2644
run: |
2745
./build_windows.ps1
28-
echo "UPLOAD_FILE=cutter-deps-qt-win.tar.gz" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
46+
echo "UPLOAD_FILE=cutter-deps-qt-win-${{ matrix.arch }}.tar.gz" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
2947
echo "UPLOAD_ASSET_TYPE=application/gzip" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
3048
- name: build macos
3149
if: contains(matrix.os, 'macos')
3250
run: |
3351
xcode-select --print-path
34-
make
35-
echo UPLOAD_FILE=cutter-deps-qt-macos.tar.gz >> $GITHUB_ENV
52+
make ARCH=${{ matrix.arch }}
53+
echo UPLOAD_FILE=cutter-deps-qt-macos-${{ matrix.arch }}.tar.gz >> $GITHUB_ENV
3654
echo UPLOAD_ASSET_TYPE=application/gzip >> $GITHUB_ENV
3755
- name: build linux
3856
if: contains(matrix.os, 'ubuntu')
3957
run: |
4058
sudo apt-get install libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev libxcb-*-dev
41-
make
42-
echo UPLOAD_FILE=cutter-deps-qt-linux.tar.gz >> $GITHUB_ENV
59+
make ARCH=${{ matrix.arch }}
60+
echo UPLOAD_FILE=cutter-deps-qt-linux-${{ matrix.arch }}.tar.gz >> $GITHUB_ENV
4361
echo UPLOAD_ASSET_TYPE=application/gzip >> $GITHUB_ENV
4462
- uses: actions/upload-artifact@v2
4563
if: startsWith(github.event.ref, 'refs/tags') == false
@@ -62,4 +80,4 @@ jobs:
6280
upload_url: ${{ steps.get_release.outputs.upload_url }}
6381
asset_path: ${{ env.UPLOAD_FILE }}
6482
asset_name: ${{ env.UPLOAD_FILE }}
65-
asset_content_type: ${{ env.UPLOAD_ASSET_TYPE }}
83+
asset_content_type: ${{ env.UPLOAD_ASSET_TYPE }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/jom
44
*~
55
*.swp
6+
/cutter-deps-*.tar.gz

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@ ifeq ($(filter ${PLATFORM},${PLATFORMS_SUPPORTED}),)
1717
${error Platform not detected or unsupported.}
1818
endif
1919

20+
ARCH:=x86_64
21+
22+
#BASE_URL=https://qt-mirror.dannhauer.de
23+
#BASE_URL=https://ftp.fau.de/qtproject
24+
#BASE_URL=http://www.mirrorservice.org/sites/download.qt-project.org
25+
BASE_URL=https://download.qt.io
26+
2027
ifeq (${PLATFORM},win)
2128
QT_SRC_FILE=qt-everywhere-src-5.15.2.zip
2229
QT_SRC_MD5=40fc0bda97fbcc1eff8ab905ce2b0300
23-
QT_SRC_URL=https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
30+
QT_SRC_URL=${BASE_URL}/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
2431
else
2532
QT_SRC_FILE=qt-everywhere-src-5.15.2.tar.xz
2633
QT_SRC_MD5=e1447db4f06c841d8947f0a6ce83a7b5
27-
QT_SRC_URL=https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz
34+
QT_SRC_URL=${BASE_URL}/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz
2835
endif
2936

3037
QT_SRC_DIR=qt-everywhere-src-5.15.2
@@ -41,7 +48,7 @@ PLATFORM_QT_OPTIONS=-xcb -gtk -linker gold
4148
endif
4249
ifeq (${PLATFORM},macos)
4350
PLATFORM_QT_CONFIGURE=configure
44-
PLATFORM_QT_OPTIONS=-dbus-runtime
51+
PLATFORM_QT_OPTIONS=-dbus-runtime -device-option QMAKE_APPLE_DEVICE_ARCHS=${ARCH}
4552
endif
4653
ifeq (${PLATFORM},win)
4754
PLATFORM_QT_CONFIGURE=configure.bat
@@ -50,7 +57,7 @@ endif
5057

5158
BUILD_THREADS:=4
5259

53-
PACKAGE_FILE=cutter-deps-qt-${PLATFORM}.tar.gz
60+
PACKAGE_FILE=cutter-deps-qt-${PLATFORM}-${ARCH}.tar.gz
5461

5562
all: qt pkg
5663

build_windows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ $QT_SRC_DIR = "qt-everywhere-src-$version_full"
7878
$qt_build_dir = "$QT_SRC_DIR/build"
7979
$QT_PREFIX = "$PSScriptRoot/qt"
8080
$BUILD_THREADS = 3
81-
$PACKAGE_FILE = "cutter-deps-qt-win.tar.gz"
81+
$PACKAGE_FILE = "cutter-deps-qt-win-x86_64.tar.gz"
8282

8383

8484
# https://download.qt.io/official_releases/jom/jom.zip

0 commit comments

Comments
 (0)