-
Notifications
You must be signed in to change notification settings - Fork 11
Macos support #28
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
Open
to-fuu
wants to merge
36
commits into
hedge-dev:main
Choose a base branch
from
to-fuu:macos-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Macos support #28
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
67b59ce
Initial Macos Support
thesupersonic16 8c956b4
Initial Macos Support
to-fuu 6f941d9
Add building instructions
to-fuu 409d8a0
Make self contained
to-fuu 70d5b0b
Remove log
to-fuu 6aee6fe
add build command
to-fuu 2a4b84f
remove Dotnet.Bundle dependencies
to-fuu db07d96
Update icon
to-fuu e0ed516
Disable detecting UnleashedRecomp
to-fuu f1e7c13
Update build docs
to-fuu b8b3adb
Fix menu bar showing Avalonia Application
to-fuu a2ae2a1
Support URI Schemes
to-fuu 73e5474
Support URI Schemes
to-fuu 2993c29
Fix build command
to-fuu e758958
change bash to zsh
to-fuu 1d2f7ea
change bash to zsh
to-fuu 9fab194
update the build command
to-fuu e4bc8ad
change build command ro release
to-fuu 8459403
Merge remote-tracking branch 'origin' into macos-support
to-fuu 466a041
ignore output and idea folder
to-fuu b88eacd
move .icns file to macos folder
to-fuu f11c76a
move info.plist out
to-fuu 56f7431
update locating on macos
to-fuu b6b158e
use the game's ID
to-fuu 9bb00f0
change to macOS
to-fuu 37f9d2d
update docs
to-fuu bc7f08a
update output folder
to-fuu dbe4881
fix rebase
to-fuu a3b7422
remove version requirement
to-fuu 1b08a77
improve build docs
to-fuu 0a3be97
remove version from docs
to-fuu 25decd2
remove empty space
to-fuu 964a1d7
use Executable for root
to-fuu c456b48
remove empty line
to-fuu 32b4237
update build release
to-fuu 83ace70
revert changes
to-fuu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ on: | |
env: | ||
PROJECT_PATH: ./Source/HedgeModManager.UI/HedgeModManager.UI.csproj | ||
FLATPAK_ID: io.github.hedge_dev.hedgemodmanager | ||
MACOS_BUILD_SCRIPT: ./macos/generate-bundle.bash | ||
GENERATOR_URL: https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/refs/heads/master/dotnet/flatpak-dotnet-generator.py | ||
DOTNET_VERSION: 8 | ||
DOTNET_CLI_HOME: /tmp/.dotnet | ||
|
@@ -82,12 +83,19 @@ jobs: | |
|
||
- name: Build Flatpak Bundle | ||
run: flatpak build-bundle repo ./flatpak/${{env.FLATPAK_ID}}.flatpak ${{env.FLATPAK_ID}} | ||
|
||
- name: osx-arm64 Build | ||
run: dotnet publish -p:PublishProfile=osx-arm64 -c Release -p:AssemblyVersion=${{ github.event.inputs.version }} -p:FileVersion=${{ github.event.inputs.version }} -o ./output/macos/osx-arm64 ${{env.PROJECT_PATH}} -p:UseAppHost=true | ||
|
||
- name: Build osx-arm64 Bundle | ||
run: /bin/bash ${{env.MACOS_BUILD_SCRIPT}} ${{ github.event.inputs.version }} | ||
|
||
- name: Prepare Release | ||
run: | | ||
mkdir -p ./release | ||
mv ./output/win-x64/HedgeModManager.UI.exe ./release/HedgeModManager.exe | ||
mv ./flatpak/${{env.FLATPAK_ID}}.flatpak ./release/${{env.FLATPAK_ID}}.flatpak | ||
mv ./output/macos/HedgeModManager.app ./release/HedgeModManager.app | ||
|
||
- name: Create Release | ||
uses: softprops/[email protected] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
<ProjectReference Include="..\HedgeModManager\HedgeModManager.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,4 @@ | |
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
</Project> | ||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Source/HedgeModManager.UI/Properties/PublishProfiles/osx-arm64.pubxml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<RuntimeIdentifiers>osx-arm64</RuntimeIdentifiers> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> | ||
<SelfContained>true</SelfContained> | ||
</PropertyGroup> | ||
</Project> |
8 changes: 8 additions & 0 deletions
8
Source/HedgeModManager.UI/Properties/PublishProfiles/osx-x64.pubxml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<RuntimeIdentifiers>osx-x64</RuntimeIdentifiers> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> | ||
<SelfContained>false</SelfContained> | ||
</PropertyGroup> | ||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Building from source | ||
|
||
## 1. Clone the repository | ||
```zsh | ||
git clone https://github.com/hedge-dev/HedgeModManager.git | ||
``` | ||
|
||
## 2. Build the project | ||
|
||
### macOS | ||
|
||
1. Navigate to the root of the project | ||
2. Run the build command | ||
```zsh | ||
dotnet publish -p:PublishProfile=osx-arm64 -c Release -o ./output/macos/osx-arm64 ./Source/HedgeModManager.UI/HedgeModManager.UI.csproj -p:UseAppHost=true | ||
``` | ||
3. Navigate to `macos` | ||
```zsh | ||
cd macos | ||
``` | ||
4. Run the following command to create the app bundle. | ||
```zsh | ||
/bin/bash generate-bundle.bash | ||
``` | ||
5. Navigate to `../output/macos` | ||
6. Run `HedgeModManager.app` |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?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>CFBundleURLTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleURLSchemes</key> | ||
<array> | ||
<string>hedgemmswa</string> | ||
<string>hedgemmgens</string> | ||
<string>hedgemmlw</string> | ||
<string>hedgemmforces</string> | ||
<string>hedgemmtenpex</string> | ||
<string>hedgemmmusashi</string> | ||
<string>hedgemmrainbow</string> | ||
<string>hedgemmhite</string> | ||
<string>hedgemmrangers</string> | ||
<string>hedgemmmillersonic</string> | ||
<string>hedgemmmillershadow</string> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>CFBundleIconFile</key> | ||
<string>AppIcon.icns</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>io.github.hedge_dev.hedgemodmanager</string> | ||
<key>CFBundleName</key> | ||
<string>HedgeModManager</string> | ||
<key>CFBundleVersion</key><string>1.0.0</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>12.0</string> | ||
<key>CFBundleExecutable</key> | ||
<string>HedgeModManager.UI</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key><string>1.0.0</string> | ||
<key>NSHighResolutionCapable</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
VERSION=${1:-"1.0.0"} | ||
|
||
APP_NAME="../output/macos/HedgeModManager.app" | ||
PLIST_PATH="./Info.plist" | ||
PUBLISH_OUTPUT_DIRECTORY="../output/macos/osx-arm64/." | ||
|
||
ICON_FILE="./AppIcon.icns" | ||
|
||
if [ -d "$APP_NAME" ] | ||
then | ||
rm -rf "$APP_NAME" | ||
fi | ||
|
||
mkdir "$APP_NAME" | ||
|
||
mkdir "$APP_NAME/Contents" | ||
mkdir "$APP_NAME/Contents/MacOS" | ||
mkdir "$APP_NAME/Contents/Resources" | ||
|
||
cp "$ICON_FILE" "$APP_NAME/Contents/Resources/AppIcon.icns" | ||
cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS" | ||
cp -a "$PLIST_PATH" "$APP_NAME/Contents/Info.plist" | ||
|
||
PLIST_PATH="$APP_NAME/Contents/Info.plist" | ||
|
||
# Update CFBundleShortVersionString using sed | ||
sed -i '' -e "s/<key>CFBundleShortVersionString<\/key>\s*<string>[^<]*<\/string>/<key>CFBundleShortVersionString<\/key><string>${VERSION}<\/string>/g" "$PLIST_PATH" | ||
|
||
# Update CFBundleVersion using sed | ||
sed -i '' -e "s/<key>CFBundleVersion<\/key>\s*<string>[^<]*<\/string>/<key>CFBundleVersion<\/key><string>${VERSION}<\/string>/g" "$PLIST_PATH" | ||
thesupersonic16 marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.