Skip to content
Open
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
34 changes: 23 additions & 11 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
global-json-file: global.json

- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
restore-keys: |
${{ runner.os }}-nuget-
Expand Down Expand Up @@ -184,11 +184,20 @@ jobs:
shell: pwsh
run: |
$Platform = '${{ matrix.platform }}'
[xml]$BuildProps = Get-Content "src/Directory.Build.props"
$PortableTargetFramework = @($BuildProps.Project.PropertyGroup | Where-Object { $_.PortableTargetFramework } | Select-Object -First 1).PortableTargetFramework
$WindowsTargetPlatformVersion = @($BuildProps.Project.PropertyGroup | Where-Object { $_.WindowsTargetPlatformVersion } | Select-Object -First 1).WindowsTargetPlatformVersion
if ([string]::IsNullOrWhiteSpace($PortableTargetFramework) -or [string]::IsNullOrWhiteSpace($WindowsTargetPlatformVersion)) {
throw "Could not resolve the target framework from src/Directory.Build.props"
}
$TargetFramework = "$PortableTargetFramework-windows$WindowsTargetPlatformVersion"
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
$PublishDir = "src/UniGetUI/bin/$Platform/Release/net8.0-windows10.0.26100.0/win-$Platform/publish"
$PublishDir = "src/UniGetUI/bin/$Platform/Release/$TargetFramework/win-$Platform/publish"
if (Test-Path "unigetui_bin") { Remove-Item "unigetui_bin" -Recurse -Force }
New-Item "unigetui_bin" -ItemType Directory | Out-Null
Get-ChildItem $PublishDir | Move-Item -Destination "unigetui_bin" -Force
Expand Down Expand Up @@ -233,16 +242,19 @@ jobs:
# Build the installer (signing of the installer itself happens in the next step)
# Temporarily remove SignTool line so ISCC doesn't try to sign during build
$issContent = Get-Content $IssPath -Raw
$issContentNoSign = $issContent -Replace '(?m)^SignTool=.*$', '; SignTool=azsign (disabled for CI, signed separately)'
$issContentNoSign = $issContentNoSign -Replace '(?m)^SignedUninstaller=yes', 'SignedUninstaller=no'
Set-Content $IssPath $issContentNoSign -NoNewline
$InstallerBaseName = "UniGetUI.Installer.$Platform"
& ISCC.exe $IssPath /F"$InstallerBaseName" /O"$OutputDir"
if ($LASTEXITCODE -ne 0) { throw "Inno Setup failed with exit code $LASTEXITCODE" }
try {
$issContentNoSign = $issContent -Replace '(?m)^SignTool=.*$', '; SignTool=azsign (disabled for CI, signed separately)'
$issContentNoSign = $issContentNoSign -Replace '(?m)^SignedUninstaller=yes', 'SignedUninstaller=no'
Set-Content $IssPath $issContentNoSign -NoNewline
# Restore original ISS content
Set-Content $IssPath $issContent -NoNewline
$InstallerBaseName = "UniGetUI.Installer.$Platform"
& ISCC.exe $IssPath /F"$InstallerBaseName" /O"$OutputDir"
if ($LASTEXITCODE -ne 0) { throw "Inno Setup failed with exit code $LASTEXITCODE" }
}
finally {
Set-Content $IssPath $issContent -NoNewline
}
- name: Stage output
shell: pwsh
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches: [ "main" ]
paths:
- 'global.json'
- '**.cs'
- '**.csproj'
- '**.props'
Expand All @@ -14,6 +15,7 @@ on:
pull_request:
branches: [ "main" ]
paths:
- 'global.json'
- '**.cs'
- '**.csproj'
- '**.props'
Expand All @@ -36,16 +38,16 @@ jobs:
with:
fetch-depth: 0

- name: Install .NET Core
- name: Install .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
global-json-file: global.json

- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('global.json', 'src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
restore-keys: |
${{ runner.os }}-nuget-
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ src/UniGetUI/choco-cli/extensions/chocolatey-dotnetfx/
InstallerExtras/MsiCreator/setup.exe
InstallerExtras/MsiCreator/UniGetUI Installer.msi
InstallerExtras/MsiCreator/UniGetUISetup.msi
src/global.json
UniGetUI.Installer.ms-store-test.exe
UniGetUI Installer_winget-fix-test.exe
InstallerExtras/uninst-*.e32
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Project Overview

UniGetUI is a WinUI 3 desktop app (C#/.NET 8, Windows App SDK) providing a GUI for CLI package managers (WinGet, Scoop, Chocolatey, Pip, Npm, .NET Tool, PowerShell Gallery, Cargo, Vcpkg). Solution lives in `src/UniGetUI.sln`.
UniGetUI is a WinUI 3 desktop app (C#/.NET 10, Windows App SDK) providing a GUI for CLI package managers (WinGet, Scoop, Chocolatey, Pip, Npm, .NET Tool, PowerShell Gallery, Cargo, Vcpkg). Solution lives in `src/UniGetUI.sln`.

## Architecture

Expand Down Expand Up @@ -44,7 +44,7 @@ dotnet test --verbosity q --nologo
dotnet publish src/UniGetUI/UniGetUI.csproj /p:Configuration=Release /p:Platform=x64
```

- Target framework: `net8.0-windows10.0.26100.0` (min `10.0.19041`)
- Target framework: `net10.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.ps1`
- Self-contained, publish-trimmed (partial), Windows App SDK self-contained
- Tests use **xUnit** (`[Fact]`, `Assert.*`)
Expand Down
6 changes: 3 additions & 3 deletions UniGetUI.iss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Script generated by the Inno Setup Script Wizard.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppVersion "3.3.7"
Expand Down Expand Up @@ -30,8 +30,8 @@ DisableProgramGroupPage=yes
DisableDirPage=no
DirExistsWarning=no
CloseApplications=no
; Remove the following line to run in administrative install mode (install for all users.)
;PrivilegesRequired=lowest
; Default to per-user install mode and let the dialog opt into all-users installs when needed.
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=UniGetUI Installer
OutputDir=.
Expand Down
4 changes: 2 additions & 2 deletions configuration.winget/develop-unigetui.winget
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ resources:
id: Microsoft.VisualStudio.2022.Community
source: winget

- name: Install .NET 8 SDK
- name: Install .NET 10 SDK
type: Microsoft.WinGet/Package
properties:
id: Microsoft.DotNet.SDK.8
id: Microsoft.DotNet.SDK.10
source: winget

- name: Install Windows App SDK
Expand Down
4 changes: 2 additions & 2 deletions configuration.winget/unigetui-all.winget
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ resources:
id: Rustlang.Rustup
source: winget

- name: Install .NET 8 SDK
- name: Install .NET 10 SDK
type: Microsoft.WinGet/Package
properties:
id: Microsoft.DotNet.SDK.8
id: Microsoft.DotNet.SDK.10
source: winget

# vcpkg bootstrap is optional; run scripts\dev-setup-optional.ps1 if needed.
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "10.0.103",
"rollForward": "latestPatch"
}
}
33 changes: 27 additions & 6 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
$SrcDir = Join-Path $RepoRoot "src"
$PublishProject = Join-Path $SrcDir "UniGetUI" "UniGetUI.csproj"
$BinDir = Join-Path $RepoRoot "unigetui_bin"
$TargetFramework = "net8.0-windows10.0.26100.0"
$BuildPropsPath = Join-Path $SrcDir "Directory.Build.props"
[xml] $BuildProps = Get-Content $BuildPropsPath
$PortableTargetFramework = @($BuildProps.Project.PropertyGroup | Where-Object { $_.PortableTargetFramework } | Select-Object -First 1).PortableTargetFramework
$WindowsTargetPlatformVersion = @($BuildProps.Project.PropertyGroup | Where-Object { $_.WindowsTargetPlatformVersion } | Select-Object -First 1).WindowsTargetPlatformVersion

if ([string]::IsNullOrWhiteSpace($PortableTargetFramework) -or [string]::IsNullOrWhiteSpace($WindowsTargetPlatformVersion)) {
throw "Could not resolve the target framework from $BuildPropsPath"
}

$TargetFramework = "$PortableTargetFramework-windows$WindowsTargetPlatformVersion"
$PublishDir = Join-Path $SrcDir "UniGetUI" "bin" $Platform $Configuration $TargetFramework "win-$Platform" "publish"

# --- Version stamping ---
Expand All @@ -57,7 +66,7 @@ Write-Host "Building UniGetUI version: $PackageVersion"
# --- Test ---
if (-not $SkipTests) {
Write-Host "`n=== Running tests ===" -ForegroundColor Cyan
dotnet test (Join-Path $SrcDir "UniGetUI.sln") --verbosity q --nologo
dotnet test (Join-Path $SrcDir "UniGetUI.sln") --verbosity q --nologo --ignore-failed-sources
if ($LASTEXITCODE -ne 0) {
throw "Tests failed with exit code $LASTEXITCODE"
}
Expand All @@ -71,7 +80,7 @@ dotnet clean (Join-Path $SrcDir "UniGetUI.sln") -v m --nologo
Write-Host "`n=== Fetching winget-cli ($Platform) ===" -ForegroundColor Cyan
& (Join-Path $PSScriptRoot "fetch-winget-cli.ps1") -Architectures @($Platform) -Force

dotnet publish $PublishProject /noLogo /p:Configuration=$Configuration /p:Platform=$Platform -v m
dotnet publish $PublishProject /noLogo /p:Configuration=$Configuration /p:Platform=$Platform --ignore-failed-sources -v m
if ($LASTEXITCODE -ne 0) {
throw "dotnet publish failed with exit code $LASTEXITCODE"
}
Expand Down Expand Up @@ -112,9 +121,21 @@ if (-not $SkipInstaller) {
if ($IsccPath) {
Write-Host "`n=== Building installer ===" -ForegroundColor Cyan
$InstallerBaseName = "UniGetUI.Installer.$Platform"
& $IsccPath (Join-Path $RepoRoot "UniGetUI.iss") /F"$InstallerBaseName" /O"$OutputPath"
if ($LASTEXITCODE -ne 0) {
throw "Inno Setup failed with exit code $LASTEXITCODE"
$IssPath = Join-Path $RepoRoot "UniGetUI.iss"
$IssContent = Get-Content $IssPath -Raw

try {
$IssContentNoSign = $IssContent -Replace '(?m)^SignTool=.*$', '; SignTool=azsign (disabled for local build)'
$IssContentNoSign = $IssContentNoSign -Replace '(?m)^SignedUninstaller=yes', 'SignedUninstaller=no'
Set-Content $IssPath $IssContentNoSign -NoNewline

& $IsccPath $IssPath /F"$InstallerBaseName" /O"$OutputPath"
if ($LASTEXITCODE -ne 0) {
throw "Inno Setup failed with exit code $LASTEXITCODE"
}
}
finally {
Set-Content $IssPath $IssContent -NoNewline
}
} else {
Write-Warning "Inno Setup 6 (ISCC.exe) not found — skipping installer build."
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<!-- IF BUILD FAILS DUE TO MISSING Microsoft.Management.Deployment NAMESPACE,
TOGGLE THE LAST NUMBER OF THE LINE BELOW 1 UNIT UP OR DOWN, AND REBUILD-->

<SdkVersion>8.0.407</SdkVersion>
<SdkVersion>10.0.103</SdkVersion>
<Authors>Devolutions Inc. and the contributors</Authors>
<PublisherName>Devolutions Inc.</PublisherName>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PortableTargetFramework>net8.0</PortableTargetFramework>
<PortableTargetFramework>net10.0</PortableTargetFramework>
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
<WindowsTargetFramework>$(PortableTargetFramework)-windows$(WindowsTargetPlatformVersion)</WindowsTargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="PhotoSauce.MagicScaler" Version="0.15.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
<ItemGroup>
<ProjectReference Include="..\UniGetUI.Core.Settings\UniGetUI.Core.Settings.csproj" />
<ProjectReference Include="..\UniGetUI.Core.Tools\UniGetUI.Core.Tools.csproj" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<ProjectReference Include="..\UniGetUI.PAckageEngine.Interfaces\UniGetUI.PackageEngine.Interfaces.csproj" />
<ProjectReference Include="..\UniGetUI.PackageEngine.PackageEngine\UniGetUI.PackageEngine.PEInterface.csproj" />
</ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions src/UniGetUI/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"configurations": [
{
"name": "WingetUI (Unpackaged)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "dotnet: build y:\\WingetUI-Store\\src\\wingetui-interface\\wingetui-interface.csproj",
"program": "${workspaceFolder}/bin/Debug/net6.0-windows10.0.19041.0/wingetui-interface.exe",
"args": [],
"cwd": "${workspaceFolder}/bin/Debug/net6.0-windows10.0.19041.0/",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "UniGetUI (Unpackaged)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build UniGetUI (Debug x64)",
"program": "${workspaceFolder}/bin/x64/Debug/net10.0-windows10.0.26100.0/UniGetUI.exe",
"args": [],
"cwd": "${workspaceFolder}/bin/x64/Debug/net10.0-windows10.0.26100.0/",
"console": "integratedTerminal",
"stopAtEntry": false
}
]
}
17 changes: 12 additions & 5 deletions src/UniGetUI/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "dotnet",
"task": "build y:\\WingetUI-Store\\src\\wingetui-interface\\wingetui-interface.csproj --debug",
"file": "y:\\WingetUI-Store\\src\\wingetui-interface\\wingetui-interface.csproj",
"label": "build UniGetUI (Debug x64)",
"type": "process",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/UniGetUI.csproj",
"--configuration",
"Debug",
"/p:Platform=x64"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "dotnet: build y:\\WingetUI-Store\\src\\wingetui-interface\\wingetui-interface.csproj"
"problemMatcher": "$msCompile"
}
]
}
2 changes: 2 additions & 0 deletions src/UniGetUI/AutoUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,11 @@ UpdaterOverrides updaterOverrides

try
{
#pragma warning disable SYSLIB0057
X509Certificate signerCertificate = X509Certificate.CreateFromSignedFile(
installerLocation
);
#pragma warning restore SYSLIB0057
using X509Certificate2 cert = new(signerCertificate);

string signerThumbprint = NormalizeThumbprint(cert.Thumbprint ?? string.Empty);
Expand Down
3 changes: 0 additions & 3 deletions src/UniGetUI/UniGetUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.4948" />
<PackageReference Include="PhotoSauce.MagicScaler" Version="0.15.0" />
<PackageReference Include="System.Drawing.Common" Version="9.0.8" Aliases="DrawingCommon" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
<PackageReference Include="Octokit" Version="14.0.0" />
Expand Down
Loading