Skip to content

Commit 6798642

Browse files
committed
Build a DMG file for MacOS
1 parent 97fb6d1 commit 6798642

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,25 @@ jobs:
7777
with:
7878
name: gqrx-appimage-${{ github.run_id }}
7979
path: Gqrx-*.AppImage
80+
macos:
81+
name: MacOS
82+
runs-on: macos-10.15
83+
steps:
84+
- name: Install dependencies
85+
run: brew install gr-osmosdr && brew install --HEAD dylibbundler
86+
- name: Checkout code
87+
uses: actions/checkout@v2
88+
with:
89+
fetch-depth: 0
90+
- name: Configure
91+
run: mkdir build && cd build && cmake ..
92+
- name: Compile
93+
working-directory: build
94+
run: make
95+
- name: Build DMG
96+
run: ./macos_bundle.sh
97+
- name: Save artifact
98+
uses: actions/upload-artifact@v2
99+
with:
100+
name: gqrx-macos-${{ github.run_id }}
101+
path: Gqrx.dmg

macos_bundle.sh

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
GQRX_VERSION=$(git describe --long --dirty)
4+
5+
mkdir -p Gqrx.app/Contents/MacOS
6+
mkdir -p Gqrx.app/Contents/Resources
7+
8+
/bin/cat <<EOM >Gqrx.app/Contents/Info.plist
9+
<?xml version="1.0" encoding="UTF-8"?>
10+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
11+
<plist version="1.0">
12+
<dict>
13+
<key>CFBundleGetInfoString</key>
14+
<string>Gqrx</string>
15+
<key>LSEnvironment</key>
16+
<dict>
17+
<key>SOAPY_SDR_ROOT</key>
18+
<string>/usr/local</string>
19+
</dict>
20+
<key>CFBundleExecutable</key>
21+
<string>gqrx</string>
22+
<key>CFBundleIdentifier</key>
23+
<string>dk.gqrx.www</string>
24+
<key>CFBundleName</key>
25+
<string>gqrx</string>
26+
<key>CFBundleIconFile</key>
27+
<string>gqrx.icns</string>
28+
<key>CFBundleShortVersionString</key>
29+
<string>$GQRX_VERSION</string>
30+
<key>CFBundleInfoDictionaryVersion</key>
31+
<string>6.0</string>
32+
<key>CFBundlePackageType</key>
33+
<string>APPL</string>
34+
<key>IFMajorVersion</key>
35+
<integer>1</integer>
36+
<key>IFMinorVersion</key>
37+
<integer>0</integer>
38+
</dict>
39+
</plist>
40+
EOM
41+
42+
cp build/src/gqrx Gqrx.app/Contents/MacOS
43+
cp resources/icons/gqrx.icns Gqrx.app/Contents/Resources
44+
45+
dylibbundler -s /usr/local/opt/icu4c/lib/ -od -b -x Gqrx.app/Contents/MacOS/gqrx -d Gqrx.app/Contents/Libs/
46+
/usr/local/opt/qt/bin/macdeployqt Gqrx.app -dmg -no-strip -always-overwrite

0 commit comments

Comments
 (0)