forked from litalbarkai/open-redatam
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.23 KB
/
build-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build Mac executables
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up environment on Mac
run: |
brew install qt@5
echo "/usr/local/opt/qt@5/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L/usr/local/opt/qt@5/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I/usr/local/opt/qt@5/include" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=/usr/local/opt/qt@5/lib/pkgconfig" >> $GITHUB_ENV
- name: Build redatam and redatamgui on Mac
run: make all
- name: Create .app bundle for redatamgui
run: |
mkdir -p RedatamGUI.app/Contents/MacOS
mkdir -p RedatamGUI.app/Contents/Resources
cp redatamgui RedatamGUI.app/Contents/MacOS/
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>CFBundleExecutable</key>
<string>redatamgui</string>
<key>CFBundleIdentifier</key>
<string>com.pacha.openredatam</string>
<key>CFBundleName</key>
<string>Redatam GUI</string>
<key>CFBundleVersion</key>
<string>2.0</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
</dict>
</plist>" > RedatamGUI.app/Contents/Info.plist
# Add your icon file to the Resources directory if you have one
# cp path/to/icon.icns RedatamGUI.app/Contents/Resources/
- name: Bundle Qt libraries on Mac
run: |
/usr/local/opt/qt@5/bin/macdeployqt RedatamGUI.app
- name: Create DMG
run: |
mkdir -p dmg-root/Applications
cp -R RedatamGUI.app dmg-root/Applications/
cp redatam dmg-root/Applications/
hdiutil create -volname "Redatam" -srcfolder dmg-root -ov -format UDZO open-redatam-mac.dmg
- name: Upload macOS DMG
uses: actions/upload-artifact@v4
with:
name: open-redatam-mac
path: open-redatam-mac.dmg