Upgrade to .NET 8 LTS and enhance installer functionality

- Upgraded from .NET 7 to .NET 8 LTS for better Windows 11 compatibility
- Added App.config with runtime switches to prevent DirectWrite crashes
- Moved software rendering initialization to App() constructor
- Disabled ReadyToRun compilation to avoid font rendering issues
- Enhanced installer with auto-launch after installation
- Removed license agreement screen from installer
- Added WiX heat.exe file harvesting for proper multi-file deployment
- Cleaned up old MSI files from repository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-07 09:30:21 -08:00
parent cff9bc4876
commit 308966da36
7 changed files with 59 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ param(
$ErrorActionPreference = "Stop"
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
$projectPath = Join-Path $scriptPath "NfcActions\NfcActions.csproj"
$publishPath = Join-Path $scriptPath "NfcActions\bin\Release\net7.0-windows\win-x64\publish"
$publishPath = Join-Path $scriptPath "NfcActions\bin\Release\net8.0-windows\win-x64\publish"
$installerPath = Join-Path $scriptPath "Installer"
Write-Host "=== NFC Actions Release Build ===" -ForegroundColor Cyan
@@ -83,6 +83,12 @@ if ($BuildInstaller) {
exit 1
}
# Update the harvested file to set ID to NfcActions.exe
Write-Host " Setting file ID for NfcActions.exe..." -ForegroundColor Gray
$harvestedContent = Get-Content obj\HarvestedFiles.wxs -Raw
$harvestedContent = $harvestedContent -replace '(<File Id=")([^"]+)(" KeyPath="yes" Source="\$\(var\.PublishDir\)\\NfcActions\.exe")', '$1NfcActionsExe$3'
Set-Content obj\HarvestedFiles.wxs -Value $harvestedContent
# Run candle (compile) on both wxs files
Write-Host " Compiling installer..." -ForegroundColor Gray
& candle.exe Product.wxs obj\HarvestedFiles.wxs "-dPublishDir=$publishPath" -out obj\ -arch x64
@@ -94,7 +100,7 @@ if ($BuildInstaller) {
# Run light (link)
Write-Host " Linking MSI package..." -ForegroundColor Gray
& light.exe obj\Product.wixobj obj\HarvestedFiles.wixobj -out bin\NfcActions-Setup.msi -ext WixUIExtension -sval
& light.exe obj\Product.wixobj obj\HarvestedFiles.wixobj -out bin\NfcActions-Setup.msi -ext WixUIExtension -ext WixUtilExtension -sval
if ($LASTEXITCODE -ne 0) {
Pop-Location
Write-Host "Light (WiX link) failed!" -ForegroundColor Red