mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: windows release actions
This commit is contained in:
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
@@ -40,23 +40,25 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# releaseWin:
|
releaseWin:
|
||||||
# name: Release windows
|
name: Release windows
|
||||||
# runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# - name: Install Flutter
|
with:
|
||||||
# uses: subosito/flutter-action@v2
|
fetch-depth: '0'
|
||||||
# - name: Build
|
- name: Install Flutter
|
||||||
# run: dart run fl_build -p windows
|
uses: subosito/flutter-action@v2
|
||||||
# - name: Create Release
|
- name: Build
|
||||||
# uses: softprops/action-gh-release@v1
|
run: dart run fl_build -p windows
|
||||||
# with:
|
- name: Create Release
|
||||||
# files: |
|
uses: softprops/action-gh-release@v1
|
||||||
# ${{ env.APP_NAME }}_amd64_windows.zip
|
with:
|
||||||
# env:
|
files: |
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_windows_amd64.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# releaseApple:
|
# releaseApple:
|
||||||
# name: Release ios and macos
|
# name: Release ios and macos
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ Especially thanks to <a href="https://github.com/TerminalStudio/dartssh2">dartss
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
## ⬇️ Download
|
## ⬇️ Download
|
||||||
[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://cdn.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703): Full support with my own certificate
|
🎉 **The `Android / Linux / Windows` version are now built via GitHub Actions**
|
||||||
[Linux](https://cdn.lolli.tech/serverbox/latest.AppImage) / [Windows](https://cdn.lolli.tech/serverbox/latest.win.zip): Basically tested, with debug certificate
|
|
||||||
|
[iOS & macOS](https://apps.apple.com/app/id6476033062) / [Android & Linux & Windows](https://github.com/lollipopkit/flutter_gpt_box/releases)
|
||||||
|
|
||||||
|
|
||||||
## 🔖 Feature
|
## 🔖 Feature
|
||||||
|
|||||||
@@ -16,8 +16,9 @@
|
|||||||
|
|
||||||
|
|
||||||
## ⬇️ Download
|
## ⬇️ Download
|
||||||
[iOS](https://apps.apple.com/app/id1586449703) / [Android](https://cdn.lolli.tech/serverbox/latest.apk) / [macOS](https://apps.apple.com/app/id1586449703): 经过测试,使用自签名证书
|
🎉 **现在 `Android / Linux / Windows` 版本使用 GitHub Actions 构建**。
|
||||||
[Linux](https://cdn.lolli.tech/serverbox/latest.AppImage) / [Windows](https://cdn.lolli.tech/serverbox/latest.win.zip): 经过不完全测试,使用调试证书
|
|
||||||
|
[iOS & macOS](https://apps.apple.com/app/id1586449703) / [Android & Linux & Windows](https://github.com/lollipopkit/flutter_gpt_box/releases)
|
||||||
|
|
||||||
|
|
||||||
## 🔖 特点
|
## 🔖 特点
|
||||||
|
|||||||
@@ -1175,7 +1175,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
autoFocus: true,
|
autoFocus: true,
|
||||||
hint: 'https://example.com/logo.png',
|
hint: 'https://example.com/logo.png',
|
||||||
icon: Icons.link,
|
icon: Icons.link,
|
||||||
maxLines: 3,
|
maxLines: 2,
|
||||||
onSubmitted: onSave,
|
onSubmitted: onSave,
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
|||||||
@@ -494,19 +494,22 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
try {
|
try {
|
||||||
await context.showLoadingDialog(fn: () async {
|
await context.showLoadingDialog(
|
||||||
final remotePath = _getRemotePath(file);
|
fn: () async {
|
||||||
if (useRmr) {
|
final remotePath = _getRemotePath(file);
|
||||||
await _client!.run('rm -r "$remotePath"');
|
if (useRmr) {
|
||||||
} else if (file.attr.isDirectory) {
|
await _client!.run('rm -r "$remotePath"');
|
||||||
await _status.client!.rmdir(remotePath);
|
} else if (file.attr.isDirectory) {
|
||||||
} else {
|
await _status.client!.rmdir(remotePath);
|
||||||
await _status.client!.remove(remotePath);
|
} else {
|
||||||
}
|
await _status.client!.remove(remotePath);
|
||||||
});
|
}
|
||||||
|
},
|
||||||
|
onErr: (e, s) {},
|
||||||
|
);
|
||||||
_listDir();
|
_listDir();
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
_showErrDialog(context, e, 'Delete', s);
|
context.showErrDialog(e: e, s: s, operation: l10n.delete);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(l10n.delete, style: UIs.textRed),
|
child: Text(l10n.delete, style: UIs.textRed),
|
||||||
@@ -547,13 +550,16 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
}
|
}
|
||||||
context.pop();
|
context.pop();
|
||||||
try {
|
try {
|
||||||
await context.showLoadingDialog(fn: () async {
|
await context.showLoadingDialog(
|
||||||
final dir = '${_status.path!.path}/${textController.text}';
|
fn: () async {
|
||||||
await _status.client!.mkdir(dir);
|
final dir = '${_status.path!.path}/${textController.text}';
|
||||||
});
|
await _status.client!.mkdir(dir);
|
||||||
|
},
|
||||||
|
onErr: (e, s) {},
|
||||||
|
);
|
||||||
_listDir();
|
_listDir();
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
_showErrDialog(context, e, 'Create folder', s);
|
context.showErrDialog(e: e, s: s, operation: l10n.createFolder);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(l10n.ok, style: UIs.textRed),
|
child: Text(l10n.ok, style: UIs.textRed),
|
||||||
@@ -591,13 +597,16 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
}
|
}
|
||||||
context.pop();
|
context.pop();
|
||||||
try {
|
try {
|
||||||
await context.showLoadingDialog(fn: () async {
|
await context.showLoadingDialog(
|
||||||
final path = '${_status.path!.path}/${textController.text}';
|
fn: () async {
|
||||||
await _client!.run('touch "$path"');
|
final path = '${_status.path!.path}/${textController.text}';
|
||||||
});
|
await _client!.run('touch "$path"');
|
||||||
|
},
|
||||||
|
onErr: (e, s) {},
|
||||||
|
);
|
||||||
_listDir();
|
_listDir();
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
_showErrDialog(context, e, 'Create file', s);
|
context.showErrDialog(e: e, s: s, operation: l10n.createFile);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(l10n.ok, style: UIs.textRed),
|
child: Text(l10n.ok, style: UIs.textRed),
|
||||||
@@ -636,13 +645,16 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
}
|
}
|
||||||
context.pop();
|
context.pop();
|
||||||
try {
|
try {
|
||||||
await context.showLoadingDialog(fn: () async {
|
await context.showLoadingDialog(
|
||||||
final newName = textController.text;
|
fn: () async {
|
||||||
await _status.client?.rename(file.filename, newName);
|
final newName = textController.text;
|
||||||
});
|
await _status.client?.rename(file.filename, newName);
|
||||||
|
},
|
||||||
|
onErr: (e, s) {},
|
||||||
|
);
|
||||||
_listDir();
|
_listDir();
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
_showErrDialog(context, e, 'Rename', s);
|
context.showErrDialog(e: e, s: s, operation: l10n.rename);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(l10n.rename, style: UIs.textRed),
|
child: Text(l10n.rename, style: UIs.textRed),
|
||||||
@@ -672,29 +684,6 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
_listDir();
|
_listDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _showErrDialog(
|
|
||||||
BuildContext ctx, Object e, String op, StackTrace s) async {
|
|
||||||
Loggers.app.warning('$op failed', e, s);
|
|
||||||
return ctx.showRoundDialog(
|
|
||||||
title: l10n.error,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Text(e.toString()),
|
|
||||||
const SizedBox(height: 7),
|
|
||||||
SimpleMarkdown(data: s.toString()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => ctx.pop(),
|
|
||||||
child: Text(l10n.ok),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String _getRemotePath(SftpName name) {
|
String _getRemotePath(SftpName name) {
|
||||||
final prePath = _status.path!.path;
|
final prePath = _status.path!.path;
|
||||||
// Only support Linux as remote now, so the seperator is '/'
|
// Only support Linux as remote now, so the seperator is '/'
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dynamic_color/dynamic_color_plugin.h>
|
#include <dynamic_color/dynamic_color_plugin.h>
|
||||||
#include <gtk/gtk_plugin.h>
|
|
||||||
#include <screen_retriever/screen_retriever_plugin.h>
|
#include <screen_retriever/screen_retriever_plugin.h>
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
#include <window_manager/window_manager_plugin.h>
|
#include <window_manager/window_manager_plugin.h>
|
||||||
@@ -16,9 +15,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||||||
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
||||||
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) gtk_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
|
|
||||||
gtk_plugin_register_with_registrar(gtk_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
|
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
|
||||||
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
|
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_color
|
dynamic_color
|
||||||
gtk
|
|
||||||
screen_retriever
|
screen_retriever
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
window_manager
|
window_manager
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import app_links
|
|
||||||
import device_info_plus
|
import device_info_plus
|
||||||
import dynamic_color
|
import dynamic_color
|
||||||
import icloud_storage
|
import icloud_storage
|
||||||
@@ -19,7 +18,6 @@ import wakelock_plus
|
|||||||
import window_manager
|
import window_manager
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin"))
|
|
||||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||||
IcloudStoragePlugin.register(with: registry.registrar(forPlugin: "IcloudStoragePlugin"))
|
IcloudStoragePlugin.register(with: registry.registrar(forPlugin: "IcloudStoragePlugin"))
|
||||||
|
|||||||
24
pubspec.lock
24
pubspec.lock
@@ -33,14 +33,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.2"
|
||||||
app_links:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: app_links
|
|
||||||
sha256: "96e677810b83707ff5e10fac11e4839daa0ea4e0123c35864c092699165eb3db"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "6.1.1"
|
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -392,8 +384,8 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "v1.0.11"
|
ref: "v1.0.13"
|
||||||
resolved-ref: ead58f6e985600c03cd27fb6563c10b6afa2d640
|
resolved-ref: baded8103bd046806929b8d6547d5bce38060b06
|
||||||
url: "https://github.com/lppcg/fl_build.git"
|
url: "https://github.com/lppcg/fl_build.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
@@ -409,8 +401,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "v1.0.27"
|
ref: "v1.0.29"
|
||||||
resolved-ref: "7f329a63eff761bbb2013d4865515a4aeaecf3e8"
|
resolved-ref: "674d5b3fccd1ae29c2739f119e34719874186587"
|
||||||
url: "https://github.com/lppcg/fl_lib"
|
url: "https://github.com/lppcg/fl_lib"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
@@ -570,14 +562,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.3.1"
|
||||||
gtk:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: gtk
|
|
||||||
sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.0"
|
|
||||||
highlight:
|
highlight:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ dependencies:
|
|||||||
fl_lib:
|
fl_lib:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lppcg/fl_lib
|
url: https://github.com/lppcg/fl_lib
|
||||||
ref: v1.0.27
|
ref: v1.0.29
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
# dartssh2:
|
# dartssh2:
|
||||||
@@ -74,7 +74,7 @@ dev_dependencies:
|
|||||||
# path: ../fl_build
|
# path: ../fl_build
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lppcg/fl_build.git
|
url: https://github.com/lppcg/fl_build.git
|
||||||
ref: v1.0.11
|
ref: v1.0.13
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
generate: true
|
generate: true
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <app_links/app_links_plugin_c_api.h>
|
|
||||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||||
#include <local_auth_windows/local_auth_plugin.h>
|
#include <local_auth_windows/local_auth_plugin.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
@@ -16,8 +15,6 @@
|
|||||||
#include <window_manager/window_manager_plugin.h>
|
#include <window_manager/window_manager_plugin.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
AppLinksPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
|
|
||||||
DynamicColorPluginCApiRegisterWithRegistrar(
|
DynamicColorPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||||
LocalAuthPluginRegisterWithRegistrar(
|
LocalAuthPluginRegisterWithRegistrar(
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
app_links
|
|
||||||
dynamic_color
|
dynamic_color
|
||||||
local_auth_windows
|
local_auth_windows
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
|
|||||||
Reference in New Issue
Block a user