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:
@@ -25,6 +25,24 @@ public partial class App : Application
|
||||
private LogService? _logService;
|
||||
private MainViewModel? _viewModel;
|
||||
|
||||
public App()
|
||||
{
|
||||
// CRITICAL: Set software rendering mode BEFORE any WPF initialization
|
||||
// This must be done in the constructor before InitializeComponent()
|
||||
try
|
||||
{
|
||||
// Set environment variable as additional safeguard
|
||||
Environment.SetEnvironmentVariable("DOTNET_SYSTEM_WINDOWS_DONOTUSEPRESENTATIONDPICAPABILITYTIER2ORGREATER", "1");
|
||||
|
||||
// Force software rendering
|
||||
RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// If this fails, try to continue anyway
|
||||
}
|
||||
}
|
||||
|
||||
private void Application_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
// Ensure only one instance runs at a time
|
||||
@@ -41,15 +59,6 @@ public partial class App : Application
|
||||
return;
|
||||
}
|
||||
|
||||
// Workaround for DirectWrite crash - force software rendering
|
||||
try
|
||||
{
|
||||
RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Ignore if this fails
|
||||
}
|
||||
// Initialize services
|
||||
_logService = new LogService();
|
||||
_cardReaderService = new CardReaderService(_logService);
|
||||
|
||||
Reference in New Issue
Block a user