Skip to content

Commit a1a78ca

Browse files
committed
v0.8.0
- **VHDX Compression**: Compress VHDX virtual disk files to reclaim physical disk space, with two strategies available — quick optimization and full rebuild. Automatically cleans system caches before compression, with visual progress indication throughout the process. - **Sparse VHD Mode**: Set VHDX to sparse mode for on-demand disk allocation, so actual disk usage is far smaller than the nominal size. Automatically enabled for new installations based on configuration and preserved when cloning distributions. - **Colorful Icons**: Each function icon now has its own semantic color, making operations like start, stop, terminal, editor, and file manager instantly recognizable. Can be toggled back to a single-color style with one click. - **Settings Page Redesign**: The settings page has been split into three independent tabs — General, Advanced, and Interface — with clear categorization and separate saving. A quick "Stop WSL" action has also been added. - **Terminal Experience Upgrade**: Windows Terminal is now preferred, falling back to the classic command line only when unavailable. - **Installer**: A standardized Windows installation wizard is now available, supporting all languages, with one-click creation of desktop shortcuts, Start Menu entries, and scheduled tasks. - **About Page Redesign**: Redesigned with a scrollable layout, consolidating quick links to the official website, announcements, discussions, and documentation. Copyright and open-source license information has been added. - **Update Experience Improvements**: Update and expiration notifications now include the release date and a direct download link, eliminating the need to manually visit GitHub. - **Configurable Sidebar Toggle**: The sidebar collapse button can now be shown or hidden to suit different usage preferences. - **Application Architecture Refactoring**: The startup process has been modularized, improving code maintainability and launch stability. - **Unified API Service**: Backend APIs have been migrated to a self-hosted service, making update checks and data fetching more stable and controllable. - **Build & Distribution Improvements**: Dual-channel releases (portable and installer) are now available, with expanded distribution via Cloudflare CDN and Gitee mirroring for users in China. - **Source Code Compliance**: SPDX open-source license declarations have been adopted across all source files, achieving REUSE specification compliance. - **UI/UX Improvements**: Unified UI design and interactive experience for all dialogs.
1 parent 6ec2794 commit a1a78ca

252 files changed

Lines changed: 17630 additions & 2814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cloudflare.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Cloudflare Deploy
2+
run-name: Cloudflare:${{ github.event.release.tag_name || github.event.inputs.tag_name || github.ref_name }}
3+
4+
on:
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
inputs:
9+
tag_name:
10+
description: 'Tag name to deploy (leave empty to use selected tag/branch)'
11+
required: false
12+
default: ''
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
deploy-to-pages:
19+
name: Deploy to Pages
20+
runs-on: windows-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Get Version
27+
id: get_version
28+
shell: pwsh
29+
run: |
30+
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
31+
$tag = "${{ github.event.inputs.tag_name }}"
32+
if ([string]::IsNullOrWhiteSpace($tag)) {
33+
$tag = "${{ github.ref_name }}"
34+
Write-Host "No tag_name provided, falling back to ref_name: $tag"
35+
}
36+
} else {
37+
$tag = "${{ github.event.release.tag_name }}"
38+
}
39+
40+
if ($tag -notlike "v*") {
41+
Write-Error "Invalid tag name: $tag. Must start with 'v'."
42+
exit 1
43+
}
44+
45+
$version = $tag -replace "^v", ""
46+
echo "TAG=$tag" >> $env:GITHUB_OUTPUT
47+
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
48+
Write-Host "Tag: $tag"
49+
Write-Host "Version: $version"
50+
51+
- name: Download Release Assets
52+
shell: pwsh
53+
env:
54+
GH_TOKEN: ${{ github.token }}
55+
run: |
56+
$tag = "${{ steps.get_version.outputs.TAG }}"
57+
$version = "${{ steps.get_version.outputs.VERSION }}"
58+
$downloadDir = "temp_downloads"
59+
New-Item -ItemType Directory -Path $downloadDir -Force | Out-Null
60+
61+
Write-Host "[INFO] Downloading assets for release $tag..."
62+
63+
# Define the file patterns to download
64+
$files = @(
65+
"WSLDashboard.$version.Portable.x64.zip",
66+
"WSLDashboard.$version.Setup.x64.zip",
67+
"WSLDashboard.$version.Setup.x64.exe"
68+
)
69+
70+
foreach ($f in $files) {
71+
Write-Host "[INFO] Downloading $f..."
72+
gh release download $tag -p "$f" -D $downloadDir --clobber
73+
if (-not (Test-Path "$downloadDir/$f")) {
74+
Write-Error "[ERROR] Failed to download $f. Please check if the file exists in the release."
75+
exit 1
76+
}
77+
Write-Host "[OK] Downloaded $f"
78+
}
79+
80+
Write-Host "[SUCCESS] All assets downloaded to $downloadDir"
81+
82+
- name: Prepare Cloudflare Pages Assets
83+
shell: pwsh
84+
run: |
85+
$version = "${{ steps.get_version.outputs.VERSION }}"
86+
$downloadDir = "temp_downloads"
87+
88+
.\build\actions\cloudflare_pages_prepare.ps1 `
89+
-Version "$version" `
90+
-OutputDir "pages/releases/download/v$version" `
91+
-PortableZip "$downloadDir/WSLDashboard.$version.Portable.x64.zip" `
92+
-SetupZip "$downloadDir/WSLDashboard.$version.Setup.x64.zip" `
93+
-SetupExe "$downloadDir/WSLDashboard.$version.Setup.x64.exe"
94+
95+
- name: Deploy to Cloudflare Pages
96+
uses: cloudflare/wrangler-action@v3
97+
with:
98+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
99+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
100+
command: pages deploy pages --project-name ${{ secrets.CLOUDFLARE_DOWNLOAD_NAME }} --branch main

.github/workflows/gitee.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Gitee Deploy
2+
run-name: Gitee:${{ github.event.release.tag_name || github.event.inputs.tag_name || github.ref_name }}
3+
4+
on:
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
inputs:
9+
tag_name:
10+
description: 'Tag name to deploy (leave empty to use selected tag/branch)'
11+
required: false
12+
default: ''
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
deploy-to-gitee:
19+
name: Deploy to Gitee
20+
runs-on: windows-latest
21+
env:
22+
# Read from GitHub Secrets (Settings -> Secrets and variables -> Actions -> Secrets)
23+
GITEE_REPO_OWNER: ${{ secrets.GITEE_REPO_OWNER }}
24+
GITEE_REPO_NAME: ${{ secrets.GITEE_REPO_NAME }}
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Get Version
31+
id: get_version
32+
shell: pwsh
33+
run: |
34+
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
35+
$tag = "${{ github.event.inputs.tag_name }}"
36+
if ([string]::IsNullOrWhiteSpace($tag)) {
37+
$tag = "${{ github.ref_name }}"
38+
Write-Host "No tag_name provided, falling back to ref_name: $tag"
39+
}
40+
} else {
41+
$tag = "${{ github.event.release.tag_name }}"
42+
}
43+
44+
if ($tag -notlike "v*") {
45+
Write-Error "Invalid tag name: $tag. Must start with 'v'."
46+
exit 1
47+
}
48+
49+
$version = $tag -replace "^v", ""
50+
echo "TAG=$tag" >> $env:GITHUB_OUTPUT
51+
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
52+
Write-Host "Tag: $tag"
53+
Write-Host "Version: $version"
54+
55+
- name: Download Release Assets
56+
shell: pwsh
57+
env:
58+
GH_TOKEN: ${{ github.token }}
59+
run: |
60+
$tag = "${{ steps.get_version.outputs.TAG }}"
61+
$version = "${{ steps.get_version.outputs.VERSION }}"
62+
$downloadDir = "temp_downloads"
63+
New-Item -ItemType Directory -Path $downloadDir -Force | Out-Null
64+
65+
Write-Host "[INFO] Downloading assets for release $tag..."
66+
67+
# Define the file patterns to download
68+
$files = @(
69+
"WSLDashboard.$version.Portable.x64.zip",
70+
"WSLDashboard.$version.Setup.x64.zip",
71+
"WSLDashboard.$version.Setup.x64.exe"
72+
)
73+
74+
foreach ($f in $files) {
75+
Write-Host "[INFO] Downloading $f..."
76+
gh release download $tag -p "$f" -D $downloadDir --clobber
77+
if (-not (Test-Path "$downloadDir/$f")) {
78+
Write-Error "[ERROR] Failed to download $f. Please check if the file exists in the release."
79+
exit 1
80+
}
81+
Write-Host "[OK] Downloaded $f"
82+
}
83+
84+
Write-Host "[SUCCESS] All assets downloaded to $downloadDir"
85+
86+
- name: Deploy to Gitee
87+
shell: pwsh
88+
env:
89+
GITEE_API_TOKEN: ${{ secrets.GITEE_API_TOKEN }}
90+
run: |
91+
if ([string]::IsNullOrWhiteSpace($env:GITEE_API_TOKEN)) {
92+
Write-Error "GITEE_API_TOKEN is not set in repository secrets!"
93+
exit 1
94+
}
95+
if ([string]::IsNullOrWhiteSpace($env:GITEE_REPO_OWNER) -or [string]::IsNullOrWhiteSpace($env:GITEE_REPO_NAME)) {
96+
Write-Error "GITEE_REPO_OWNER or GITEE_REPO_NAME is not set in repository secrets!"
97+
exit 1
98+
}
99+
100+
$version = "${{ steps.get_version.outputs.VERSION }}"
101+
$downloadDir = "temp_downloads"
102+
103+
# The script now uses the environment variables defined at the job level
104+
.\build\actions\gitee_release_deploy.ps1 `
105+
-Version "$version" `
106+
-DownloadDir "$downloadDir" `
107+
-GiteeToken "$env:GITEE_API_TOKEN" `
108+
-RepoOwner "$env:GITEE_REPO_OWNER" `
109+
-RepoName "$env:GITEE_REPO_NAME"

.github/workflows/notification.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Notification Deploy
2+
run-name: Notification:${{ github.event.release.tag_name || github.event.inputs.tag_name || github.ref_name }}
3+
4+
on:
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
inputs:
9+
tag_name:
10+
description: 'Tag name to deploy (leave empty to use selected tag/branch)'
11+
required: false
12+
default: ''
13+
release_date:
14+
description: 'Release date (leave empty to use current date)'
15+
required: false
16+
default: ''
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
deploy-update-api:
23+
name: Deploy to Pages
24+
runs-on: windows-latest
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Get Version
31+
id: get_version
32+
shell: pwsh
33+
run: |
34+
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
35+
$tag = "${{ github.event.inputs.tag_name }}"
36+
if ([string]::IsNullOrWhiteSpace($tag)) {
37+
$tag = "${{ github.ref_name }}"
38+
Write-Host "No tag_name provided, falling back to ref_name: $tag"
39+
}
40+
} else {
41+
$tag = "${{ github.event.release.tag_name }}"
42+
}
43+
44+
if ($tag -notlike "v*") {
45+
Write-Error "Invalid tag name: $tag. Must start with 'v'."
46+
exit 1
47+
}
48+
49+
$version = $tag -replace "^v", ""
50+
echo "TAG=$tag" >> $env:GITHUB_OUTPUT
51+
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
52+
Write-Host "Tag: $tag"
53+
Write-Host "Version: $version"
54+
55+
- name: Prepare Notification Assets
56+
shell: pwsh
57+
run: |
58+
$version = "${{ steps.get_version.outputs.VERSION }}"
59+
$outputDir = "pages_api"
60+
$releaseDate = "${{ github.event.inputs.release_date }}"
61+
62+
if ([string]::IsNullOrWhiteSpace($releaseDate)) {
63+
.\build\actions\notification_prepare.ps1 `
64+
-Version "$version" `
65+
-OutputDir "$outputDir"
66+
} else {
67+
.\build\actions\notification_prepare.ps1 `
68+
-Version "$version" `
69+
-OutputDir "$outputDir" `
70+
-ReleaseDate "$releaseDate"
71+
}
72+
73+
- name: Deploy to Cloudflare Pages
74+
uses: cloudflare/wrangler-action@v3
75+
with:
76+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
77+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
78+
command: pages deploy pages_api --project-name ${{ secrets.CLOUDFLARE_NOTIFICATION_NAME }} --branch main

.github/workflows/release.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Release
1+
name: GitHub Release
2+
run-name: GitHub:${{ github.ref_name }}
23

34
permissions:
45
contents: write
56

67
on:
8+
workflow_dispatch:
79
push:
810
tags:
911
- 'v[0-9].[0-9].[0-9]*'
@@ -32,47 +34,34 @@ jobs:
3234
with:
3335
toolchain: stable-x86_64-pc-windows-msvc
3436

35-
# - name: Install UPX
36-
# uses: crazy-max/ghaction-upx@v3
37-
# with:
38-
# install-only: true
39-
4037
- name: Build Release
4138
run: cargo build --release
4239

4340
- name: Get Version
44-
if: startsWith(github.ref, 'refs/tags/')
4541
id: get_version
4642
shell: pwsh
4743
run: |
48-
$version = $env:GITHUB_REF -replace "refs/tags/v", ""
44+
if ("${{ github.ref }}" -like "refs/tags/*") {
45+
$version = $env:GITHUB_REF -replace "refs/tags/v", ""
46+
} else {
47+
# If manually triggered without a tag, fallback to Cargo.toml version (simplified handling)
48+
$version = (Get-Content Cargo.toml | Select-String "^version =" | ForEach-Object { $_.ToString().Split('"')[1] })
49+
}
4950
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
5051
Write-Host "Version: $version"
5152
5253
- name: Prepare Assets
53-
if: startsWith(github.ref, 'refs/tags/')
5454
shell: pwsh
5555
run: |
56-
$version = "${{ steps.get_version.outputs.VERSION }}"
57-
$raw_exe = "target/release/wsldashboard.exe"
58-
$versioned_exe = "target/release/wsldashboard.v$version.exe"
59-
# $upx_exe = "target/release/wsldashboard.v$version.upx.exe"
60-
61-
# Rename original to versioned name (Uncompressed)
62-
Move-Item $raw_exe $versioned_exe
63-
64-
# # Copy versioned to UPX target name
65-
# Copy-Item $versioned_exe $upx_exe
66-
67-
# - name: Compress with UPX
68-
# if: startsWith(github.ref, 'refs/tags/')
69-
# run: upx --best --lzma target/release/wsldashboard.v${{ steps.get_version.outputs.VERSION }}.upx.exe
56+
.\build\actions\github_release_prepare.ps1 -Version "${{ steps.get_version.outputs.VERSION }}"
7057
7158
- name: Release
72-
if: startsWith(github.ref, 'refs/tags/')
59+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
7360
uses: softprops/action-gh-release@v1
7461
with:
7562
files: |
76-
target/release/wsldashboard.v${{ steps.get_version.outputs.VERSION }}.exe
77-
# target/release/wsldashboard.v${{ steps.get_version.outputs.VERSION }}.upx.exe
63+
target/release/WSLDashboard.${{ steps.get_version.outputs.VERSION }}.Portable.x64.zip
64+
build/releases/WSLDashboard.${{ steps.get_version.outputs.VERSION }}.Setup.x64.zip
65+
build/releases/WSLDashboard.${{ steps.get_version.outputs.VERSION }}.Setup.x64.exe
7866
generate_release_notes: true
67+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
.*
33
!/.github/
44

5-
**/*.exe
5+
**/*.exe
6+
7+
**/*.zip

0 commit comments

Comments
 (0)