Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build GKv3 installer (DMG) for MacOS #455

Merged
merged 3 commits into from
Apr 17, 2023

Conversation

hazzik
Copy link
Contributor

@hazzik hazzik commented Apr 16, 2023

Added a GitHub action that produces DMG installer containing unified (x64/arm64) build of the GEDKeeper3, that should run on both x64 (I've checked it works) and arm64 (Apple Silicon M1/M2 - I unfortunately do not have one, so could not check).

Because the DMG file are unsigned after download when it is tried to be opened it produces the "App Is Damaged and Can’t Be Opened" warning. See here for the information why this is happening and how to fix it.

TL;DR; Remove the com.apple.quarantine attribute after installation:

xattr -d com.apple.quarantine /Applications/GEDKeeper3.app

@@ -25,3 +25,6 @@ csharp_new_line_before_finally = false
[*.{md,yml}]
indent_style = space
indent_size = 2

[*.sh]
end_of_line = lf
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VS Code refused to save .sh files with LF without this configuration

- name: Build
run: dotnet build -c MacOS_Debug -p:EnableDmgBuild=true
working-directory: projects/GKv3
- name: Upload DMG file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It crates an artifact that can be downloaded from Actions tab (Actions -> 'Package GEDKeeper 3 for MacOS' -> workflow run, at the bottom of 'Summary' page). Then it can be downloaded from there and distributed as a normal release file.

# 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkisofs/genisoimage produces ISO-9660 that is a valid DMG file that can be mounted on MacOS. See the link above how to make a compressed DMG file from ISO.

@@ -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" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has changed because now we have a single target framework.

Copy link
Owner

@Serg-Norseman Serg-Norseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@Serg-Norseman Serg-Norseman merged commit 28b99fc into Serg-Norseman:master Apr 17, 2023
@hazzik hazzik deleted the build-mac branch January 24, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants