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

fix .deb build #269

Merged
merged 30 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,38 +242,36 @@ jobs:
mkdir -p debian/gopeed/usr/share/applications
mkdir -p debian/gopeed/usr/share/icons/hicolor/scalable/apps
mkdir -p debian/gopeed/DEBIAN

cp -r build/linux/x64/release/bundle/* debian/gopeed/opt/gopeed/
cp assets/icon/icon_512.png debian/gopeed/usr/share/icons/hicolor/scalable/apps/gopeed.png
cp assets/icon/icon.svg debian/gopeed/usr/share/icons/hicolor/scalable/apps/com.gopeed.Gopeed.svg

cat>debian/gopeed/DEBIAN/postinst<<EOF
#!/bin/bash
ln -sf /opt/gopeed/gopeed /usr/local/bin/gopeed
ln -sf /opt/gopeed/gopeed /usr/bin/gopeed
EOF

cat>debian/gopeed/DEBIAN/postrm<<EOF
#!/bin/bash
rm -f /usr/local/bin/gopeed
current_user=\$(logname)
rm -rf /home/\$current_user/.local/share/com.gopeed
rm -rf /usr/bin/gopeed
EOF
monkeyWie marked this conversation as resolved.
Show resolved Hide resolved

chmod 0755 debian/gopeed/DEBIAN/postinst
chmod 0755 debian/gopeed/DEBIAN/postrm

cat>debian/gopeed/DEBIAN/control<<EOF
Package: gopeed
Version: ${VERSION:1}
Architecture: amd64
Essential: no
Priority: optional
Depends:
Depends:
Maintainer: monkeyWie
Description: High speed downloader that supports all platforms.
EOF
cp linux/gopeed.desktop debian/gopeed/usr/share/applications/gopeed.desktop

cp linux/assets/com.gopeed.Gopeed.desktop debian/gopeed/usr/share/applications/gopeed.desktop

dpkg-deb --build debian/gopeed
mv debian/gopeed.deb build/dist/Gopeed-$VERSION-linux-amd64.deb

Expand All @@ -283,16 +281,16 @@ jobs:
chmod +x appimage-builder
mkdir AppDir
cp -r build/linux/x64/release/bundle/* AppDir
mkdir -p AppDir/usr/share/icons
cp assets/icon/icon_1024.png AppDir/usr/share/icons/gopeed.png
mkdir -p AppDir/usr/share/icons/hicolor/scalable/apps/
cp assets/icon/icon.svg AppDir/usr/share/icons/hicolor/scalable/apps/gopeed.svg
cat>AppImageBuilder.yml<<EOF
version: 1
AppDir:
path: ${PWD}/AppDir
app_info:
id: com.gopeed.gopeed
name: Gopeed
icon: gopeed.png
icon: gopeed
version: ${VERSION:1}
exec: gopeed
exec_args: \$@
Expand Down Expand Up @@ -339,6 +337,7 @@ jobs:
EOF
./appimage-builder --skip-tests --recipe AppImageBuilder.yml
mv Gopeed-*-x86_64.AppImage build/dist/Gopeed-$VERSION-linux-amd64.AppImage

- name: Upload
uses: shogo82148/actions-upload-release-asset@v1
with:
Expand Down Expand Up @@ -370,7 +369,7 @@ jobs:

sudo snap install snapcraft --classic
mkdir -p snap/gui
cp assets/icon/icon_512.png snap/gui/gopeed.png
cp assets/icon/icon.svg snap/gui/gopeed.svg

cat>snap/snapcraft.yaml<<EOF
name: gopeed
Expand Down Expand Up @@ -410,9 +409,9 @@ jobs:
flutter-target: lib/main.dart
EOF

cp linux/gopeed.desktop snap/gui/gopeed.desktop
sed -i 's/Icon=gopeed/Icon=\${SNAP}\/meta\/gui\/gopeed.png/g' snap/gui/gopeed.desktop

cp linux/assets/com.gopeed.Gopeed.desktop snap/gui/gopeed.desktop
sed -i 's/Icon=com.gopeed.Gopeed/Icon=\${SNAP}\/meta\/gui\/gopeed.svg/g' snap/gui/gopeed.desktop
snapcraft --use-lxd

# Snapcraft login
Expand Down
9 changes: 9 additions & 0 deletions ui/flutter/assets/icon/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions ui/flutter/linux/assets/com.gopeed.Gopeed.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Desktop Entry]
Name=Gopeed
GenericName=Download Manager
GenericName[zh_CN]=下载器
GenericName[zh_TW]=下載器
Comment=High speed downloader that supports all platforms.
Comment[zh_CN]=支持全平台的高速下载器
Comment[zh_TW]=支持全平臺的高速下載器
Terminal=false
Exec=gopeed
Icon=com.gopeed.Gopeed
Type=Application
Categories=Utility;Internet
Keywords=Bittorrent;Downloader;
36 changes: 36 additions & 0 deletions ui/flutter/linux/assets/com.gopeed.Gopeed.metainfo.xml
pugaizai marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.gopeed.Gopeed</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<developer_name>monkeyWie</developer_name>
<name>Gopeed</name>
<summary>High speed downloader that supports all platforms.</summary>
<summary xml:lang="zh_CN">一款支持所有平台的高速下载器。</summary>
<summary xml:lang="zh_TW">一款支援所有平台的高速下載軟體。</summary>
<recommends>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</recommends>
<description>
<p>Gopeed (full name Go Speed), a high-speed downloader developed by Golang + Flutter, supports (HTTP, BitTorrent, Magnet) protocol, and supports all platforms. In addition to basic download functions, Gopeed is also a highly customizable downloader that supports implementing more features through integration with APIs or installation and development of extensions.</p>
<p xml:lang="zh_CN">Gopeed(全称 Go Speed),是一款由Golang+Flutter开发的高速下载器,支持(HTTP、BitTorrent、Magnet)协议下载,并且支持全平台使用。除了基本的下载功能外,Gopeed 还是一款高度可定制化的下载器,支持通过对接APIs或者安装和开发扩展来实现更多的功能。</p>
<p xml:lang="zh_TW">Gopeed(全稱 Go Speed),是一款使用Golang+Flutter編寫的高速下載軟體,支援(HTTP、BitTorrent、Magnet)協定,同時支援所有的平台。</p>
</description>
<url type="homepage">https://gopeed.com</url>
<url type="bugtracker">https://github.com/GopeedLab/gopeed/issues</url>
<url type="donation">https://docs.gopeed.com/donate.html</url>
<url type="translate">https://github.com/GopeedLab/gopeed/blob/main/CONTRIBUTING.md#translation</url>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/GopeedLab/gopeed/v1.4.4/_docs/img/ui-demo.png</image>
</screenshot>
</screenshots>
<releases>
<release version="1.4.4" date="2023-11-09"/>
</releases>
<content_rating type="oars-1.1"/>
<launchable type="desktop-id">com.gopeed.Gopeed.desktop</launchable>
<update_contact>[email protected]</update_contact>
</component>
41 changes: 0 additions & 41 deletions ui/flutter/linux/com.gopeed.Gopeed.metainfo.xml

This file was deleted.

10 changes: 0 additions & 10 deletions ui/flutter/linux/gopeed.desktop

This file was deleted.