Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Resolve build parameters
id: info
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Windows SDK UAP platform
shell: pwsh
Expand All @@ -119,7 +119,7 @@ jobs:
dotnet-version: 8.0.x

- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'

Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:

- name: Restore WinGet CLI cache
id: winget-cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: src/UniGetUI.PackageEngine.Managers.WinGet/winget-cli_${{ matrix.platform }}
key: winget-cli-${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('scripts/fetch-winget-cli.ps1') }}
Expand All @@ -165,32 +165,32 @@ jobs:

- name: Save WinGet CLI cache
if: steps.winget-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: src/UniGetUI.PackageEngine.Managers.WinGet/winget-cli_${{ matrix.platform }}
key: ${{ steps.winget-cache.outputs.cache-primary-key }}

- name: Restore dependencies
working-directory: src
run: dotnet restore
run: dotnet restore UniGetUI.sln

- name: Run tests
working-directory: src
shell: pwsh
run: |
# Retry once to handle flaky tests (e.g. TaskRecyclerTests uses Random)
dotnet test --no-restore --verbosity q --nologo
dotnet test UniGetUI.sln --no-restore --verbosity q --nologo
if ($LASTEXITCODE -ne 0) {
Write-Host "::warning::First test run failed, retrying..."
dotnet test --no-restore --verbosity q --nologo
dotnet test UniGetUI.sln --no-restore --verbosity q --nologo
if ($LASTEXITCODE -ne 0) { exit 1 }
}

- name: Publish
shell: pwsh
run: |
$Platform = '${{ matrix.platform }}'
dotnet publish src/UniGetUI/UniGetUI.csproj /noLogo /p:Configuration=Release /p:Platform=$Platform -v m
dotnet publish src/UniGetUI/UniGetUI.csproj /noLogo /p:Configuration=Release /p:Platform=$Platform -p:RuntimeIdentifier=win-$Platform -v m
if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed" }

# Stage binaries
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
-TimestampServer '${{ vars.CODE_SIGNING_TIMESTAMP_SERVER }}'

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: UniGetUI-release-${{ matrix.platform }}
path: output/*
Expand All @@ -298,7 +298,7 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: output

Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,31 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Install Windows SDK UAP platform
shell: pwsh
run: |
# CsWinRT in WindowsPackageManager.Interop requires UAP 10.0.19041.0 platform metadata
$VsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$VsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
$InstallPath = & $VsWhere -latest -property installationPath
& $VsInstaller modify --installPath $InstallPath `
--add Microsoft.VisualStudio.Component.UWP.Support `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--quiet --norestart --nocache | Out-Default
Write-Host "Windows SDK UAP platform installed"

# - name: Install WinGet
# uses: Cyberboss/install-winget@v1

- name: Install dependencies
working-directory: src
run: dotnet restore
run: dotnet restore UniGetUI.sln

# - name: Test build
# working-directory: src
# run: dotnet build --configuration Release

- name: Run Tests
working-directory: src
run: dotnet test --no-restore --verbosity q --nologo
run: dotnet test UniGetUI.sln --no-restore --verbosity q --nologo

29 changes: 13 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# UniGetUI ΓÇô Copilot Instructions
# UniGetUI - Copilot Instructions

## Project Overview

Expand All @@ -8,13 +8,13 @@ UniGetUI is a WinUI 3 desktop app (C#/.NET 8, Windows App SDK) providing a GUI f

The codebase follows a **layered, modular structure** with ~40 projects:

- **`UniGetUI/`** ΓÇô WinUI 3 entry point, XAML pages, controls, and app shell (`EntryPoint.cs`, `MainWindow.xaml`)
- **`UniGetUI.Core.*`** ΓÇô Shared infrastructure: `Logger`, `Settings`, `Tools` (includes `CoreTools.Translate()`), `IconEngine`, `LanguageEngine`
- **`UniGetUI.PackageEngine.Interfaces`** ΓÇô Contracts: `IPackageManager`, `IPackage`, `IManagerSource`, `IPackageDetails`
- **`UniGetUI.PackageEngine.PackageManagerClasses`** ΓÇô Base implementations: `PackageManager` (abstract), `Package`, helpers (`BasePkgDetailsHelper`, `BasePkgOperationHelper`, `BaseSourceHelper`)
- **`UniGetUI.PackageEngine.Managers.*`** ΓÇô Concrete manager implementations (one project per manager: `WinGet`, `Scoop`, `Chocolatey`, `Pip`, `Npm`, etc.)
- **`UniGetUI.PackageEngine.Operations`** ΓÇô Install/update/uninstall operation orchestration
- **`UniGetUI.Interface.*`** ΓÇô Enums, telemetry, background API
- **`UniGetUI/`** - WinUI 3 entry point, XAML pages, controls, and app shell (`EntryPoint.cs`, `MainWindow.xaml`)
- **`UniGetUI.Core.*`** - Shared infrastructure: `Logger`, `Settings`, `Tools` (includes `CoreTools.Translate()`), `IconEngine`, `LanguageEngine`
- **`UniGetUI.PackageEngine.Interfaces`** - Contracts: `IPackageManager`, `IPackage`, `IManagerSource`, `IPackageDetails`
- **`UniGetUI.PackageEngine.PackageManagerClasses`** - Base implementations: `PackageManager` (abstract), `Package`, helpers (`BasePkgDetailsHelper`, `BasePkgOperationHelper`, `BaseSourceHelper`)
- **`UniGetUI.PackageEngine.Managers.*`** - Concrete manager implementations (one project per manager: `WinGet`, `Scoop`, `Chocolatey`, `Pip`, `Npm`, etc.)
- **`UniGetUI.PackageEngine.Operations`** - Install/update/uninstall operation orchestration
- **`UniGetUI.Interface.*`** - Enums, telemetry, background API

## Adding a New Package Manager

Expand All @@ -27,9 +27,9 @@ protected override IReadOnlyList<Package> GetInstalledPackages_UnSafe();
```

Each manager also provides three helper classes (in a `Helpers/` subfolder):
- `*PkgDetailsHelper` extends `BasePkgDetailsHelper` ΓÇô overrides `GetDetails_UnSafe`, `GetInstallableVersions_UnSafe`, `GetIcon_UnSafe`, etc.
- `*PkgOperationHelper` extends `BasePkgOperationHelper` ΓÇô overrides `_getOperationParameters`, `_getOperationResult`
- `*SourceHelper` extends `BaseSourceHelper` ΓÇô overrides `GetSources_UnSafe`, `GetAddSourceParameters`, etc.
- `*PkgDetailsHelper` extends `BasePkgDetailsHelper` - overrides `GetDetails_UnSafe`, `GetInstallableVersions_UnSafe`, `GetIcon_UnSafe`, etc.
- `*PkgOperationHelper` extends `BasePkgOperationHelper` - overrides `_getOperationParameters`, `_getOperationResult`
- `*SourceHelper` extends `BaseSourceHelper` - overrides `GetSources_UnSafe`, `GetAddSourceParameters`, etc.

The constructor sets `Capabilities`, `Properties`, and wires the helpers. See `src/UniGetUI.PackageEngine.Managers.Scoop/Scoop.cs` as a clean reference implementation.

Expand All @@ -42,13 +42,10 @@ dotnet test --verbosity q --nologo

# Publish release build
dotnet publish src/UniGetUI/UniGetUI.csproj /p:Configuration=Release /p:Platform=x64

# Full release (runs version script, tests, publish, installer)
build_release.cmd
```

- Target framework: `net8.0-windows10.0.26100.0` (min `10.0.19041`)
- Build generates secrets via `src/UniGetUI/Services/generate-secrets.ps1` and integrity tree via `scripts/generate_integrity_tree.py`
- Build generates secrets via `src/UniGetUI/Services/generate-secrets.ps1` and integrity tree via `scripts/generate-integrity-tree.ps1`
- Self-contained, publish-trimmed (partial), Windows App SDK self-contained
- Tests use **xUnit** (`[Fact]`, `Assert.*`)

Expand All @@ -72,7 +69,7 @@ Use `CoreTools.Translate("text")` for all user-facing strings. Parameterized: `C

### Manager conventions
- `FALSE_PACKAGE_NAMES`, `FALSE_PACKAGE_IDS`, `FALSE_PACKAGE_VERSIONS` static arrays filter CLI parsing noise
- Manager initialization flows through `Initialize()` → `_loadManagerExecutableFile()` → `_loadManagerVersion()` → `_performExtraLoadingSteps()`
- Manager initialization flows through `Initialize()` -> `_loadManagerExecutableFile()` -> `_loadManagerVersion()` -> `_performExtraLoadingSteps()`
- Operations that may fail return `OperationVeredict` (note: intentional misspelling used throughout codebase)

## Key Files
Expand Down
85 changes: 0 additions & 85 deletions build_release.cmd

This file was deleted.

88 changes: 0 additions & 88 deletions scripts/apply_versions.py

This file was deleted.

Loading
Loading