Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangtian616 committed Jan 19, 2024
2 parents 4a61c1a + 65512dc commit 5dcae5e
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 12 deletions.
58 changes: 51 additions & 7 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
- target: Linux
os: ubuntu-latest
artifact_name: release-Linux
artifact_path: build/linux/*.zip
artifact_path: |
build/linux/*.AppImage
build/linux/*.deb
- target: iOS
os: macos-latest
cache_pod_key: ios-pods
Expand Down Expand Up @@ -139,18 +141,60 @@ jobs:
Copy-Item $SrcDir\* -Recurse $DestDir
Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force
Compress-Archive $DestDir build\windows\JHenTai_${{ steps.get_version.outputs.version }}_Windows.zip
# Build Linux .zip
# Build Linux .deb and .AppImage
- name: Build Linux
if: matrix.target == 'Linux'
run: |
# Prepare build depends
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install -y ninja-build libgtk-3-dev libfuse2
# Compile
flutter config --enable-linux-desktop
flutter build linux --release -t lib/src/main.dart
mkdir ./build/linux/JHenTai_${{ steps.get_version.outputs.version }}
cp -a build/linux/x64/release/bundle/* ./build/linux/JHenTai_${{ steps.get_version.outputs.version }}
cd build/linux
zip -qroy JHenTai_${{ steps.get_version.outputs.version }}_Linux.zip JHenTai_${{ steps.get_version.outputs.version }}
# Build debian package
mkdir -p build/linux/JHenTai-${{ steps.get_version.outputs.version }}-Linux-amd64
cd build/linux/JHenTai-${{ steps.get_version.outputs.version }}-Linux-amd64
mkdir -p opt/jhentai
mkdir -p usr/share/applications
mkdir -p usr/share/icons/hicolor/512x512/apps
cp -r ../x64/release/bundle/* opt/jhentai
cp -r ../../../linux/assets/DEBIAN .
chmod 0755 DEBIAN/postinst
chmod 0755 DEBIAN/postrm
cat>DEBIAN/control<<EOF
Maintainer: madoka773 <[email protected]>
Package: jhentai
Version: ${{ steps.get_version.outputs.version }}
Section: x11
Priority: optional
Architecture: amd64
Essential: no
Installed-Size: 34648
Description: A cross-platform app made for e-hentai & exhentai by Flutter.
Homepage: https://github.com/jiangtian616/JHenTai
EOF
cp ../../../linux/assets/top.jtmonster.jhentai.desktop usr/share/applications
cp ../../../assets/icon_512.png usr/share/icons/hicolor/512x512/apps/top.jtmonster.jhentai.png
cd ..
dpkg-deb --build JHenTai-${{ steps.get_version.outputs.version }}-Linux-amd64
# Build AppImage
wget -O appimage-builder https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder
mkdir AppDir
cp -r x64/release/bundle/* AppDir
mkdir -p AppDir/usr/share/icons/hicolor/512x512/apps/
mkdir -p AppDir/usr/share/applications
cp ../../linux/assets/top.jtmonster.jhentai.desktop AppDir/usr/share/applications
cp ../../assets/icon_512.png AppDir/usr/share/icons/hicolor/512x512/apps/top.jtmonster.jhentai.png
./appimage-builder --skip-tests --recipe ../../linux/assets/AppImageBuilder.yml
mv JHenTai-latest-x86_64.AppImage JHenTai-${{ steps.get_version.outputs.version }}-Linux-x86_64.AppImage
# Upload Artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Install for MacOS(No maintenance): download .dmg.
- Trust it in system setting.
- If you use a proxy server, set proxy address at network setting page.

Install for Linux(No maintenance): download Linux_xxx.zip, then unpack it.
Install for Linux(No maintenance): download Linux-amd64.deb or Linux-x86_64.AppImage due to your platform, then install or execute it.

- If you use a proxy server, set proxy address at network setting page.

Expand All @@ -54,7 +54,7 @@ Update for Windows: Delete old unpacked directory directly, then download latest

Update for MacOS(No maintenance): download .dmg.

Update for Linux(No maintenance): Delete old unpacked directory directly, then download latest Linux_xxx.zip, unpack it.
Update for Linux(No maintenance): Delete old and download the latest product.

## Help With Translation

Expand Down
6 changes: 3 additions & 3 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MacOS安装(不维护): 下载dmg后安装即可。
- 在系统设置-安全性与隐私中信任应用
- 如果你使用了代理服务器,在网络设置里配置代理地址。

Linux安装(不维护):下载Linux_xxx.zip后解压即可
Linux安装(不维护):根据你的系统选择 Linux-amd64.deb 或 Linux-x86_64.AppImage,下载后安装运行即可

- 如果你使用了代理服务器,在网络设置里配置代理地址。

Expand All @@ -53,9 +53,9 @@ iOS更新: 下载ipa文件后,使用[AltStore](https://altstore.io)、SideLo

Windows更新: 直接删除旧的解压出来的文件夹,下载最新的Windows_xxx.zip后解压使用即可。

MacOS更新(不维护): 直接删除旧的应用,下载最新的dmg后安装即可
MacOS更新(不维护): 直接删除旧包后,下载最新的包使用即可

Linux更新(不维护): 直接删除旧的解压出来的文件夹,下载最新的Linux_xxx.zip后解压使用即可
Linux更新(不维护): 直接删除旧包后,下载最新的包使用即可

## 开发动机

Expand Down
Binary file added assets/icon_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions changelog/v7.4.11+150.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- 偏好设置中支持搜索时将中文标签搜索结果按热度排序。感谢[e-hentai-db](https://github.com/ccloli/e-hentai-db)
[e-hentai-tag-count](https://github.com/poly000/e-hentai-tag-count)
- Linux发布产物改为.deb与.AppImage文件。感谢[madoka773](https://github.com/madoka773)
- 重新添加自动重定向至表站的设置,以应对部分ip无法访问表站的问题
- 支持自动创建.nomedia文件
- 支持处理下载原图时GP不足的情况
Expand Down
38 changes: 38 additions & 0 deletions linux/assets/AppImageBuilder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 1
AppDir:
path: ../../build/linux/AppDir
app_info:
id: top.jtmonster.jhentai
name: JHenTai
icon: top.jtmonster.jhentai
version: latest
exec: jhentai
exec_args: $@
files:
include:
- /lib64/ld-linux-x86-64.so.2
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
test:
fedora-30:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
debian-stable:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
archlinux-latest:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
centos-7:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
ubuntu-xenial:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
AppImage:
arch: x86_64
update-information: guess
6 changes: 6 additions & 0 deletions linux/assets/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
ln -sf /opt/jhentai/jhentai /usr/bin/jhentai
chmod +x /usr/bin/jhentai
update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true
exit 0
5 changes: 5 additions & 0 deletions linux/assets/DEBIAN/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
rm /usr/bin/jhentai
update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true
exit 0
8 changes: 8 additions & 0 deletions linux/assets/top.jtmonster.jhentai.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=JHenTai
Comment=A cross-platform app made for e-hentai & exhentai by Flutter.
Exec=jhentai
Icon=top.jtmonster.jhentai
Categories=Network;Graphics
Terminal=false
Binary file removed linux/jhentai_icon.png
Binary file not shown.

0 comments on commit 5dcae5e

Please sign in to comment.