Skip to content

Commit

Permalink
添加图标,添加打包
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Sep 30, 2024
1 parent 365f1a1 commit f1cd305
Show file tree
Hide file tree
Showing 15 changed files with 782 additions and 1 deletion.
143 changes: 143 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish

on:
push:
branches:
- main

jobs:
windows:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Flutter
uses: flutter-actions/setup-flutter@v3
with:
channel: 'stable'
version: 3.24.3
cache-sdk: true

- name: Install Dependencies
shell: pwsh
# run: dart pub global activate -s path tools/flutter_distributor/packages/flutter_distributor
run: dart pub global activate flutter_distributor

- name: Setup Inno Setup 6
shell: pwsh
run: |-
./tools/is_setup.exe /VERYSLIENT
Copy-Item "./tools/ChineseSimplified.isl" -Destination "C:\Program Files (x86)\Inno Setup 6\Languages"
- name: Setup 7ZIP
shell: pwsh
run: |-
./tools/7z2405-x64.exe /S
- name: Pack EXE Installer & Portable Archive
run: |-
flutter_distributor package --platform windows --target exe,zip
- name: Upload Dist Artifact
uses: actions/upload-artifact@v4
with:
name: Windows Artifact(Dist)
path: dist

linux:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Flutter
uses: flutter-actions/setup-flutter@v3
with:
channel: 'stable'
version: 3.24.3
cache-sdk: true

- name: Install Dependencies
run: |-
sudo apt-get update
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev rpm patchelf locate libfuse2
dart pub global activate flutter_distributor
- name: Setup AppImageTool
run: |-
sudo mv tools/appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
sudo chmod a+x /usr/local/bin/appimagetool
- name: Pack Installers
run: flutter_distributor package --platform linux --targets appimage,deb,rpm

- name: Upload Dist Artifact
uses: actions/upload-artifact@v4
with:
name: Linux Artifact(Dist)
path: dist

publish_releases:
name: publish
runs-on: ubuntu-latest
needs:
- windows
- linux

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Version
run: |-
sudo snap install yq
version=$(yq eval '.version' pubspec.yaml)
echo "VERSION=$version" >> $GITHUB_ENV
- name: Download Build Artifact(Windows)
uses: actions/download-artifact@v4
with:
name: "Windows Artifact(Dist)"
path: dist/
- name: Download Build Artifact(Linux)
uses: actions/download-artifact@v4
with:
name: "Linux Artifact(Dist)"
path: dist/
- name: Download Build Artifact(MacOS arm64)
uses: actions/download-artifact@v4
with:
name: "MacOS Artifact(Dist arm64)"
path: dist/
- name: Download Build Artifact(MacOS x64)
uses: actions/download-artifact@v4
with:
name: "MacOS Artifact(Dist x64)"
path: dist/
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
body_path: RELEASE_CHANGELOG.md
prerelease: false
draft: false
generate_release_notes: true
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
files: |
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}-windows-setup.exe
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}-windows.zip
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}-linux.deb
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}-linux.rpm
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}-linux.AppImage
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}+${{ env.VERSION }}-windows-setup.exe
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}+${{ env.VERSION }}-windows.zip
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}+${{ env.VERSION }}-linux.deb
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}+${{ env.VERSION }}-linux.rpm
./dist/${{ env.VERSION }}/nyalcf-${{ env.VERSION }}+${{ env.VERSION }}-linux.AppImage
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _AppState extends State<App> with WindowListener {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Eda',
title: 'Eda (Beta)',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
Expand Down
26 changes: 26 additions & 0 deletions linux/packaging/appimage/make_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
display_name: Eda

icon: icon.png

keywords:
- Eda
- LoCyanFrp

generic_name: Eda

actions: []

categories:
- Network

startup_notify: true

# 您可以指定要与您的应用捆绑的共享库
#
# flutter_distributor 会自动检测您的应用所依赖的共享库,但您也可以在此处手动指定它们。
#
# 以下示例展示了如何将 libcurl 库与您的应用捆绑在一起
#
# include:
# - libcurl.so.4
include: []
28 changes: 28 additions & 0 deletions linux/packaging/deb/make_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
display_name: Eda
package_name: eda
maintainer:
name: 夏沫花火zzz
email: [email protected]
co_authors:
- name: 夏沫花火zzz
email: [email protected]
priority: optional
section: x11
installed_size: 6604
essential: false
icon: icon.png

postinstall_scripts: []
postuninstall_scripts:
- 'rm -rf ~/.share/moe.muska.ami/eda'

keywords:
- Eda
- LoCyanFrp

generic_name: Eda

categories:
- Network

startup_notify: true
22 changes: 22 additions & 0 deletions linux/packaging/rpm/make_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
icon: icon.png
summary: Eda
group: Application/Network
vendor: Muska_Ami
packager: Muska_Ami
packagerEmail: [email protected]
license: MIT
url: https://github.com/LoCyan-Team/Eda
build_arch: x86_64

display_name: Eda

keywords:
- Eda
- LoCyanFrp

generic_name: Eda

categories:
- Network

startup_notify: true
88 changes: 88 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.6.1"
args:
dependency: transitive
description:
name: args
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.5.0"
async:
dependency: transitive
description:
Expand All @@ -25,6 +41,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.3"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.1"
clock:
dependency: transitive
description:
Expand All @@ -41,6 +73,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.18.0"
crypto:
dependency: transitive
description:
name: crypto
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
url: "https://pub.dev"
source: hosted
version: "3.0.5"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -78,6 +118,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
sha256: "619817c4b65b322b5104b6bb6dfe6cda62d9729bd7ad4303ecc8b4e690a67a77"
url: "https://pub.dev"
source: hosted
version: "0.14.1"
flutter_lints:
dependency: "direct dev"
description:
Expand All @@ -99,6 +147,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image:
dependency: transitive
description:
name: image
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
leak_tracker:
dependency: transitive
description:
Expand Down Expand Up @@ -163,6 +227,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
url: "https://pub.dev"
source: hosted
version: "6.0.2"
screen_retriever:
dependency: transitive
description:
Expand Down Expand Up @@ -264,6 +336,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.2"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
source: hosted
version: "6.5.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.5.3 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
5 changes: 5 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ dev_dependencies:
# rules and activating additional ones.
flutter_lints: ^4.0.0

flutter_launcher_icons:
image_path: "icon.png"
windows:
generate: true

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

Expand Down
Binary file added tools/7z2405-x64.exe
Binary file not shown.
Loading

0 comments on commit f1cd305

Please sign in to comment.