diff --git a/README.md b/README.md index 7d62a6b8..1f54eaaf 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,6 @@ 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, and it requires `ttf-mscorefonts-installer` installed. * 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`. ## External Tools diff --git a/build/build.deb.sh b/build/build.deb.sh new file mode 100644 index 00000000..0edd46da --- /dev/null +++ b/build/build.deb.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +rm -rf SourceGit resources/deb/opt +dotnet publish ../src/SourceGit.csproj -c Release -r linux-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained + +mkdir -p resources/deb/opt/sourcegit +mv SourceGit/SourceGit resources/deb/opt/sourcegit/sourcegit +mv SourceGit/*.so resources/deb/opt/sourcegit/ + +chmod -R 755 resources/deb + +rm -rf SourceGit + +sudo dpkg-deb --build resources/deb \ No newline at end of file diff --git a/build/build.linux.sh b/build/build.linux.sh index 60db33e8..d2c2b6d4 100644 --- a/build/build.linux.sh +++ b/build/build.linux.sh @@ -1,8 +1,6 @@ #!/bin/sh -rm -rf SourceGit +rm -rf SourceGit SourceGit.linux-x64.tar.gz dotnet publish ../src/SourceGit.csproj -c Release -r linux-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained -cp resources/SourceGit.desktop.template SourceGit/SourceGit.desktop.template -cp resources/App.icns SourceGit/SourceGit.icns tar -zcvf SourceGit.linux-x64.tar.gz --exclude="*/*.dbg" SourceGit rm -rf SourceGit diff --git a/build/resources/SourceGit.desktop.template b/build/resources/SourceGit.desktop.template deleted file mode 100644 index ec4b7c41..00000000 --- a/build/resources/SourceGit.desktop.template +++ /dev/null @@ -1,7 +0,0 @@ -[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 diff --git a/build/resources/deb/DEBIAN/control b/build/resources/deb/DEBIAN/control new file mode 100644 index 00000000..33f0ab98 --- /dev/null +++ b/build/resources/deb/DEBIAN/control @@ -0,0 +1,7 @@ +Package: sourcegit +Version: 8.8 +Priority: optional +Depends: libx11-6, libice6, libsm6 +Architecture: amd64 +Maintainer: longshuang@msn.cn +Description: Open-source & Free Git GUI Client diff --git a/build/resources/deb/usr/share/applications/sourcegit.desktop b/build/resources/deb/usr/share/applications/sourcegit.desktop new file mode 100644 index 00000000..5b5f5bba --- /dev/null +++ b/build/resources/deb/usr/share/applications/sourcegit.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Source Git +Comment=Open-source & Free Git GUI Client +Exec=/opt/sourcegit/sourcegit +Icon=/usr/share/icons/sourcegit.png +Terminal=false +Type=Application +Categories=Development \ No newline at end of file diff --git a/build/resources/deb/usr/share/icons/sourcegit.png b/build/resources/deb/usr/share/icons/sourcegit.png new file mode 100644 index 00000000..8cdcd3a8 Binary files /dev/null and b/build/resources/deb/usr/share/icons/sourcegit.png differ