Skip to content

Commit

Permalink
Merge pull request #45 from laamaa/feature/macos-bundle
Browse files Browse the repository at this point in the history
Add macOS bundle creation to GH Actions
  • Loading branch information
laamaa authored Mar 11, 2022
2 parents 4ca038f + f75d232 commit a1cf4e2
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,43 @@ jobs:
path: |
LICENSE
README.md
AUDIOGUIDE.md
m8c
gamecontrollerdb.txt
config.ini.sample
build-macos:
runs-on: macos-latest

steps:
- name: 'Install dependencies'
run: brew install sdl2 libserialport pkg-config

- name: 'Checkout'
uses: actions/checkout@v2

- name: 'Get current date'
id: date
run: echo "::set-output name=date::$(date +%Y%m%d)"

- name: 'Build package'
run: |
make
chmod 755 m8c
cd macos/m8c.app/Contents/
mkdir MacOS
cd MacOS
cp ../../../../m8c .
cp /usr/local/opt/sdl2/lib/libSDL2* .
cp /usr/local/opt/libserialport/lib/libserialport.* .
install_name_tool -change /usr/local/opt/libserialport/lib/libserialport.0.dylib @executable_path/libserialport.0.dylib m8c
install_name_tool -change /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib @executable_path/libSDL2-2.0.0.dylib m8c
cd ../../../../
cp -r macos/m8c.app .
zip -r m8c.zip m8c.app LICENSE README.md AUDIOGUIDE.md config.ini.sample gamecontrollerdb.txt
- name: 'Upload artifact'
uses: actions/upload-artifact@v2
with:
name: m8c-${{ steps.date.outputs.date }}-macos
path: m8c.zip

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.dylib
*.a
*.o
*.exe
.DS_Store
m8c
.vscode
font.c
Expand Down
54 changes: 54 additions & 0 deletions macos/m8c.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?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>BuildMachineOSBuild</key>
<string>17G11023</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIconFile</key>
<string>m8c</string>
<key>CFBundleExecutable</key>
<string>m8c</string>
<key>CFBundleIdentifier</key>
<string>com.laamaa.m8c</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>m8c</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10B61</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18B71</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1010</string>
<key>DTXcodeBuild</key>
<string>10B61</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2021 laamaa. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions macos/m8c.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPL????
Binary file added macos/m8c.app/Contents/Resources/m8c.icns
Binary file not shown.

0 comments on commit a1cf4e2

Please sign in to comment.