Skip to content

Commit

Permalink
Merge pull request #455 from hazzik/build-mac
Browse files Browse the repository at this point in the history
Build GKv3 installer (DMG) for MacOS
  • Loading branch information
Serg-Norseman authored Apr 17, 2023
2 parents ef35f68 + 73a4159 commit 28b99fc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ csharp_new_line_before_finally = false
[*.{md,yml}]
indent_style = space
indent_size = 2

[*.sh]
end_of_line = lf
28 changes: 28 additions & 0 deletions .github/workflows/package-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Package GEDKeeper3 for MacOS

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
mac:

runs-on: macos-12

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c MacOS_Debug -p:EnableDmgBuild=true
working-directory: projects/GKv3
- name: Upload DMG file
uses: actions/upload-artifact@v3
with:
name: GEDKeeper3
path: projects/GKv3/GEDKeeper3/bin/MacOS_Debug/*.dmg
if-no-files-found: error
12 changes: 12 additions & 0 deletions build_v3.mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

dotnet build projects/GKv3/GEDKeeper3.sln -c MacOS_Debug -p:MacBuildBundle=true

# For details how to create a proper DMG HSF+ file see here: https://stackoverflow.com/a/7553878/259946.
# The ISO9660/HFS is a supported format for DMG files and can be treated as uncompressed DMG.

# sudo apt install mkisofs
cd projects/GKv3/GEDKeeper3/bin/MacOS_Debug
mkisofs -V GEDKeeper -D -R -apple -no-pad -o GEDKeeper3-x64.dmg osx-x64
mkisofs -V GEDKeeper -D -R -apple -no-pad -o GEDKeeper3-arm64.dmg osx-arm64
cd -
6 changes: 3 additions & 3 deletions projects/GKv3/.run/GEDKeeper3.Mac.run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GEDKeeper3.Mac" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/GEDKeeper3/bin/MacOS_Debug/net6.0/GEDKeeper3.app/Contents/MacOS/GEDKeeper3" />
<option name="EXE_PATH" value="$PROJECT_DIR$/GEDKeeper3/bin/MacOS_Debug/GEDKeeper3.app/Contents/MacOS/GEDKeeper3" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/GEDKeeper3/bin/MacOS_Debug/net6.0" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/GEDKeeper3/bin/MacOS_Debug/" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
Expand All @@ -17,4 +17,4 @@
<option name="Build" />
</method>
</configuration>
</component>
</component>

0 comments on commit 28b99fc

Please sign in to comment.