一个基于 Microsoft Fluent Design System 设计的现代 Windows 软件包管理器,使用 WinUI 3 构建,集成 Windows Package Manager (winget) 功能。
- 🔍 软件浏览 - 搜索和浏览 winget 仓库中的软件包
- 📦 软件安装 - 一键安装所需软件
- 🗑️ 软件卸载 - 管理和卸载已安装的软件
- 🔄 软件更新 - 检查并更新已安装的软件
- 🎨 Fluent Design - 采用 Microsoft Fluent Design System 设计语言
- ⚡ 现代化界面 - 基于 WinUI 3 的流畅、美观的用户界面
- Windows 10 版本 1809 (Build 17763) 或更高版本
- Windows 11(推荐)
- .NET 8.0 运行时
- Windows Package Manager (winget)
-
安装 Windows Package Manager (winget)
- Windows 11 系统已预装
- Windows 10 用户可从 Microsoft Store 安装 "应用安装程序"
-
安装 .NET 8.0 Runtime
winget install Microsoft.DotNet.Runtime.8
-
克隆仓库
git clone https://github.com/yourusername/FluentSoftwareManager.git cd FluentSoftwareManager -
方式一:使用 PowerShell 脚本(推荐)
# 构建项目 .\build.ps1 # 运行项目(需要管理员权限) .\run.ps1 # 发布项目 .\publish.ps1
-
方式二:使用 Visual Studio 2022
- 需要安装 "Windows 应用程序开发" 工作负载
- 以管理员身份运行 Visual Studio
- 打开
FluentSoftwareManager.sln - 按 F5 开始调试
-
方式三:使用 dotnet CLI
# 还原依赖 dotnet restore # 构建 dotnet build FluentSoftwareManager/FluentSoftwareManager.csproj -c Debug -p:Platform=x64 # 运行(需要管理员权限) dotnet run --project FluentSoftwareManager/FluentSoftwareManager.csproj -c Debug -p:Platform=x64 # 发布 dotnet publish -c Release -r win-x64 -p:Platform=x64 -o ./publish
注意: 应用程序需要管理员权限来执行安装和卸载操作。
📖 详细的构建和调试指南请查看 BUILD.md 和 QUICK_START.md
- 启动应用程序
- 在左侧导航栏选择 "Browse"
- 使用搜索框搜索软件包
- 点击软件查看详细信息
- 点击 "Install" 按钮安装软件
- 在左侧导航栏选择 "Installed"
- 查看所有已安装的软件列表
- 选择要卸载的软件
- 点击 "Uninstall" 按钮
- 在左侧导航栏选择 "Updates"
- 查看所有可更新的软件
- 点击单个软件的 "Update" 按钮更新
- 或点击 "Update All" 更新所有软件
FluentSoftwareManager/
├── FluentSoftwareManager/
│ ├── Models/ # 数据模型
│ │ └── Package.cs
│ ├── Services/ # 服务层
│ │ └── WingetService.cs
│ ├── ViewModels/ # 视图模型
│ │ ├── BrowseViewModel.cs
│ │ ├── InstalledViewModel.cs
│ │ └── UpdatesViewModel.cs
│ ├── Views/ # 视图
│ │ ├── BrowsePage.xaml
│ │ ├── InstalledPage.xaml
│ │ ├── UpdatesPage.xaml
│ │ └── SettingsPage.xaml
│ ├── Converters/ # XAML 转换器
│ │ └── BoolToVisibilityConverter.cs
│ ├── App.xaml # 应用程序入口
│ └── MainWindow.xaml # 主窗口
└── FluentSoftwareManager.sln
- 框架: .NET 8.0
- UI 框架: WinUI 3
- MVVM 工具包: CommunityToolkit.Mvvm
- 包管理器: Windows Package Manager (winget)
- 设计语言: Microsoft Fluent Design System
本项目采用 MVVM (Model-View-ViewModel) 架构模式:
- Model: 定义数据结构(Package)
- View: XAML 视图文件,使用 Fluent Design 组件
- ViewModel: 处理业务逻辑和数据绑定
- Service: WingetService 封装 winget 命令行调用
- Acrylic Material: 半透明背景效果
- Navigation View: 导航视图控件
- Card Layout: 卡片式布局
- Icons: Fluent 图标系统
- Color System: 自适应颜色系统
应用程序通过命令行调用 winget,支持以下操作:
winget search- 搜索软件包winget list- 列出已安装软件winget install- 安装软件winget uninstall- 卸载软件winget upgrade- 更新软件
本应用程序需要管理员权限以执行软件的安装和卸载操作。
应用程序会自动记录详细的日志信息,帮助诊断问题:
%LOCALAPPDATA%\FluentSoftwareManager\Logs\
完整路径示例:
C:\Users\YourName\AppData\Local\FluentSoftwareManager\Logs\app20241116.log
# 打开日志文件夹
explorer %LOCALAPPDATA%\FluentSoftwareManager\Logs
# 查看最新日志
notepad %LOCALAPPDATA%\FluentSoftwareManager\Logs\app*.log
# 实时监控日志
Get-Content "$env:LOCALAPPDATA\FluentSoftwareManager\Logs\app*.log" -Wait -Tail 10如果应用崩溃,会自动生成崩溃报告:
%LOCALAPPDATA%\FluentSoftwareManager\Logs\crash-<timestamp>.txt
详细信息请参阅 LOGGING.md
可能原因:
- Winget 未安装或不可用
- 缺少 Windows App SDK 运行时
- 缺少 .NET 8.0 Desktop Runtime
解决方案:
-
检查日志文件:
notepad %LOCALAPPDATA%\FluentSoftwareManager\Logs\app*.log
-
安装必需组件:
# 安装 winget(如果没有) winget --version # 如果失败,从 Microsoft Store 安装 "应用安装程序" # 安装 Windows App SDK Runtime winget install Microsoft.WindowsAppRuntime.1.5 # 安装 .NET Desktop Runtime winget install Microsoft.DotNet.DesktopRuntime.8
-
以管理员身份运行:
- 右键点击应用 -> "以管理员身份运行"
错误信息:
.\build.ps1 : The term '.\build.ps1' is not recognized...
解决方案:
选择以下任一方式:
方式 1:设置执行策略
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\build.ps1方式 2:使用批处理脚本
build.bat
run.bat方式 3:直接使用 dotnet CLI
dotnet build FluentSoftwareManager\FluentSoftwareManager.csproj -c Debug -p:Platform=x64
dotnet run --project FluentSoftwareManager\FluentSoftwareManager.csproj -c Debug -p:Platform=x64解决方案:
# 安装 .NET 8.0 SDK
winget install Microsoft.DotNet.SDK.8
# 验证安装
dotnet --version警告信息:
warning NETSDK1206: Found version-specific or distribution-specific runtime identifier(s)
说明:这是一个无害的警告,不影响程序运行。可以忽略或通过在项目文件中添加以下内容来消除:
<PropertyGroup>
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>
</PropertyGroup>错误信息:
The requested operation requires elevation.
解决方案:
- 方式 1:以管理员身份运行 PowerShell/命令提示符
- 方式 2:右键点击已编译的 EXE -> "以管理员身份运行"
如果问题仍然存在,请收集以下信息:
# 1. 查看日志
Get-Content "$env:LOCALAPPDATA\FluentSoftwareManager\Logs\app*.log" -Tail 50
# 2. 检查系统信息
dotnet --info
winget --version
Get-WmiObject Win32_OperatingSystem | Select-Object Caption, Version
# 3. 检查应用事件日志
Get-EventLog -LogName Application -Newest 10 -EntryType Error |
Where-Object {$_.Source -like "*FluentSoftwareManager*" -or $_.Source -like "*.NET Runtime*"}然后将信息提交到 GitHub Issues。
MIT License
欢迎提交 Issue 和 Pull Request!
- 添加软件详情对话框
- 支持批量安装
- 添加下载进度显示
- 支持多语言
- 添加软件分类浏览
- 支持自定义软件源
- 添加软件评分和评论
如有问题或建议,请提交 Issue。
Made with ❤️ using WinUI 3 and Fluent Design