From 7e4b67b1770b996529fff1b6bd73bac1d9a38601 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 19 Mar 2024 12:22:53 +0800 Subject: [PATCH] build: update linux resources --- README.md | 4 +++- build/build.linux.sh | 4 +++- build/resources/SourceGit.desktop.template | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 build/resources/SourceGit.desktop.template diff --git a/README.md b/README.md index 45a3569d..6249f475 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,20 @@ Opensource Git GUI client. You can download the latest stable from [Releases](https://github.com/sourcegit-scm/sourcegit/releases/latest) or download workflow artifacts from [Github Actions](https://github.com/sourcegit-scm/sourcegit/actions) to try this app based on each commits. - For **macOS** users: * Download `SourceGit.osx-x64.zip` or `SourceGit.osx-arm64.zip` from Releases. `x64` for Intel and `arm64` for Apple Silicon. * Move `SourceGit.app` to `Applications` folder. * Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`. +* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your mac. * You may need to run `sudo xattr -cr /Applications/SourceGit.app` to make sure the software works. For **Linux** users: * `xdg-open` must be installed to support open native file manager. +* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux. * Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI. +* Modify `SourceGit.desktop.template` (replace SOURCEGIT_LOCAL_FOLDER with real path) and move it into `~/.local/share/applications`. ## Screen Shots diff --git a/build/build.linux.sh b/build/build.linux.sh index 35dca61e..6e2c302b 100644 --- a/build/build.linux.sh +++ b/build/build.linux.sh @@ -2,5 +2,7 @@ rm -rf SourceGit dotnet publish ../src/SourceGit.csproj -c Release -r linux-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained -tar -zcvf SourceGit.linux-x64.tar.gz SourceGit --exclude=en --exclude=zh --exclude="*.dbg" +cp resources/SourceGit.desktop.template SourceGit/SourceGit.desktop.template +cp resources/App.icns SourceGit/SourceGit.icns +tar -zcvf SourceGit.linux-x64.tar.gz --exclude="*/en" --exclude="*/zh" --exclude="*/*.dbg" SourceGit rm -rf SourceGit diff --git a/build/resources/SourceGit.desktop.template b/build/resources/SourceGit.desktop.template new file mode 100644 index 00000000..ec4b7c41 --- /dev/null +++ b/build/resources/SourceGit.desktop.template @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=SourceGit +Comment=Free & OpenSource Git Client +Exec=SOURCEGIT_LOCAL_FOLDER/SourceGit +Icon=SOURCEGIT_LOCAL_FOLDER/SourceGit.icns +Type=Application +Terminal=false \ No newline at end of file