Skip to content

Commit 5e1d7fc

Browse files
fix: Chinese path support (issue #3), (#4)
* fix(flutter_pty): use MultiByteToWideChar for UTF-8 to WideChar conversion on Windows - Fix PTY creation failure when executable path or working directory contains Chinese characters. - Replace incorrect byte-by-byte WCHAR casting with proper MultiByteToWideChar API. - Ensure command line, environment block, and working directory are correctly encoded for CreateProcessW. - Fixes #3 * feat: optimize shells, and harden update cleanup - Shells: - Added zsh and bash support with platform-specific filtering (hiding Windows-only shells on macOS/Linux). - Implemented runtime fallback logic for Windows (pwsh7 > powershell > cmd) to ensure the terminal starts even if the preferred shell is missing. - Update Mechanism: - Migrated downloads to the system temp directory. - Implemented a "Scan-on-Startup" cleanup strategy that automatically removes leftover installers based on filename patterns, ensuring a clean user environment even after app restarts. * chore: remove MSIX support - Removed MSIX support from dependencies, GitHub Actions workflows, and codebase due to certificate trust issues. * chore: bump app version * feat: missing l10n in zh_CN * fix: remove unused args in lean_builder generation * fix: Copilot suggestions - ignore generated file for analyzer
1 parent 76d93cf commit 5e1d7fc

22 files changed

Lines changed: 362 additions & 153 deletions

.github/workflows/pr_checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: flutter pub get
6767

6868
- name: Generate code
69-
run: dart run lean_builder build --delete-conflicting-outputs
69+
run: dart run lean_builder build
7070

7171
- name: Analyze
7272
run: flutter analyze --no-fatal-infos
@@ -98,7 +98,7 @@ jobs:
9898
run: flutter pub get
9999

100100
- name: Generate code
101-
run: dart run lean_builder build --delete-conflicting-outputs
101+
run: dart run lean_builder build
102102

103103
- name: Analyze
104104
run: flutter analyze --no-fatal-infos
@@ -135,7 +135,7 @@ jobs:
135135
run: flutter pub get
136136

137137
- name: Generate code
138-
run: dart run lean_builder build --delete-conflicting-outputs
138+
run: dart run lean_builder build
139139

140140
- name: Analyze
141141
run: flutter analyze --no-fatal-infos

.github/workflows/release.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ jobs:
5555
5656
| Platform | Asset | Description |
5757
| :--- | :--- | :--- |
58-
| **Windows (Setup)** | [EXE](https://github.com/${{ github.repository }}/releases/download/${{ github.event_name == 'workflow_dispatch' && format('v{0}', steps.get_version.outputs.version) || github.ref_name }}/flutter_agent_panel-${{ steps.get_version.outputs.version }}-windows-x86_64-setup.exe) | Standard Windows Installer |
59-
| **Windows (MSIX)** | [MSIX](https://github.com/${{ github.repository }}/releases/download/${{ github.event_name == 'workflow_dispatch' && format('v{0}', steps.get_version.outputs.version) || github.ref_name }}/flutter_agent_panel-${{ steps.get_version.outputs.version }}-windows-x86_64.msix) | Windows Store / Modern Package |
58+
| **Windows** | [EXE](https://github.com/${{ github.repository }}/releases/download/${{ github.event_name == 'workflow_dispatch' && format('v{0}', steps.get_version.outputs.version) || github.ref_name }}/flutter_agent_panel-${{ steps.get_version.outputs.version }}-windows-x86_64-setup.exe) | Standard Windows Installer |
6059
| **macOS** | [DMG](https://github.com/${{ github.repository }}/releases/download/${{ github.event_name == 'workflow_dispatch' && format('v{0}', steps.get_version.outputs.version) || github.ref_name }}/flutter_agent_panel-${{ steps.get_version.outputs.version }}-macos-universal.dmg) | Universal Apple Disk Image |
6160
| **Linux** | [Tarball](https://github.com/${{ github.repository }}/releases/download/${{ github.event_name == 'workflow_dispatch' && format('v{0}', steps.get_version.outputs.version) || github.ref_name }}/flutter_agent_panel-${{ steps.get_version.outputs.version }}-linux-x86_64.tar.gz) | Gzipped Bundle |
6261
@@ -111,27 +110,17 @@ jobs:
111110
with:
112111
path: windows/installer.iss
113112

114-
- name: Create MSIX
115-
run: dart run msix:create --build-windows false
116-
117113
- name: Rename output files with version
118114
run: |
119115
$version = "${{ needs.create-release.outputs.version }}"
120116
Rename-Item -Path "build/windows/x64/runner/Release/Output/flutter_agent_panel_setup.exe" -NewName "flutter_agent_panel-$version-windows-x86_64-setup.exe"
121-
Rename-Item -Path "build/windows/x64/runner/Release/flutter_agent_panel.msix" -NewName "flutter_agent_panel-$version-windows-x86_64.msix"
122117
123118
- name: Upload Release Asset (EXE)
124119
uses: softprops/action-gh-release@v2
125120
with:
126121
tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', needs.create-release.outputs.version) || github.ref_name }}
127122
files: build/windows/x64/runner/Release/Output/flutter_agent_panel-${{ needs.create-release.outputs.version }}-windows-x86_64-setup.exe
128123

129-
- name: Upload Release Asset (MSIX)
130-
uses: softprops/action-gh-release@v2
131-
with:
132-
tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', needs.create-release.outputs.version) || github.ref_name }}
133-
files: build/windows/x64/runner/Release/flutter_agent_panel-${{ needs.create-release.outputs.version }}-windows-x86_64.msix
134-
135124
build-macos:
136125
name: Build macOS
137126
needs: create-release
@@ -162,7 +151,7 @@ jobs:
162151
run: flutter pub get
163152

164153
- name: Generate code
165-
run: dart run lean_builder build --delete-conflicting-outputs
154+
run: dart run lean_builder build
166155

167156
- name: Analyze
168157
run: flutter analyze --no-fatal-infos
@@ -230,7 +219,7 @@ jobs:
230219
run: flutter pub get
231220

232221
- name: Generate code
233-
run: dart run lean_builder build --delete-conflicting-outputs
222+
run: dart run lean_builder build
234223

235224
- name: Analyze
236225
run: flutter analyze --no-fatal-infos

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ analyzer:
22
exclude:
33
- packages/flutter_pty/**
44
- packages/xterm/**
5+
- lib/core/l10n/**.dart
6+
- lib/core/router/**.gr.dart
57

68
include: package:flutter_lints/flutter.yaml
79

assets/l10n/app_en.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"cmd": "Command Prompt",
2020
"wsl": "WSL",
2121
"gitBash": "Git Bash",
22+
"zsh": "Zsh",
23+
"bash": "Bash",
2224
"appearance": "Appearance",
2325
"theme": "Theme",
2426
"appFontFamily": "App Font Family",

assets/l10n/app_zh.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"cmd": "命令提示字元",
3636
"wsl": "WSL",
3737
"gitBash": "Git Bash",
38+
"zsh": "Zsh",
39+
"bash": "Bash",
3840
"appearance": "外觀",
3941
"theme": "主題",
4042
"appFontFamily": "App 字型系列",

assets/l10n/app_zh_CN.arb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"cmd": "命令提示符",
2020
"wsl": "WSL",
2121
"gitBash": "Git Bash",
22+
"zsh": "Zsh",
23+
"bash": "Bash",
2224
"appearance": "外观",
2325
"theme": "主题",
2426
"appFontFamily": "App 字体系列",

lib/core/l10n/app_localizations.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,18 @@ abstract class AppLocalizations {
201201
/// **'Git Bash'**
202202
String get gitBash;
203203

204+
/// No description provided for @zsh.
205+
///
206+
/// In en, this message translates to:
207+
/// **'Zsh'**
208+
String get zsh;
209+
210+
/// No description provided for @bash.
211+
///
212+
/// In en, this message translates to:
213+
/// **'Bash'**
214+
String get bash;
215+
204216
/// No description provided for @appearance.
205217
///
206218
/// In en, this message translates to:

lib/core/l10n/app_localizations_en.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ class AppLocalizationsEn extends AppLocalizations {
5959
@override
6060
String get gitBash => 'Git Bash';
6161

62+
@override
63+
String get zsh => 'Zsh';
64+
65+
@override
66+
String get bash => 'Bash';
67+
6268
@override
6369
String get appearance => 'Appearance';
6470

lib/core/l10n/app_localizations_zh.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ class AppLocalizationsZh extends AppLocalizations {
5959
@override
6060
String get gitBash => 'Git Bash';
6161

62+
@override
63+
String get zsh => 'Zsh';
64+
65+
@override
66+
String get bash => 'Bash';
67+
6268
@override
6369
String get appearance => '外觀';
6470

@@ -468,6 +474,12 @@ class AppLocalizationsZhCn extends AppLocalizationsZh {
468474
@override
469475
String get gitBash => 'Git Bash';
470476

477+
@override
478+
String get zsh => 'Zsh';
479+
480+
@override
481+
String get bash => 'Bash';
482+
471483
@override
472484
String get appearance => '外观';
473485

lib/core/router/app_router.gr.dart

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)