unify build, fix opening files when app is running

This commit is contained in:
2026-01-30 15:26:23 +01:00
parent 576e5819b2
commit b3cb95c7d3
15 changed files with 718 additions and 490 deletions

View File

@@ -0,0 +1,19 @@
Windows Registry Editor Version 5.00
; Associate .log files with RLogg
; Edit the path below if you installed RLogg to a different location
[HKEY_CURRENT_USER\Software\Classes\.log]
@="RLogg.LogFile"
[HKEY_CURRENT_USER\Software\Classes\RLogg.LogFile]
@="Log File"
[HKEY_CURRENT_USER\Software\Classes\RLogg.LogFile\DefaultIcon]
@="\"C:\\Program Files\\RLogg\\rlogg.exe\",0"
[HKEY_CURRENT_USER\Software\Classes\RLogg.LogFile\shell\open\command]
@="\"C:\\Program Files\\RLogg\\rlogg.exe\" \"%1\""
[HKEY_CURRENT_USER\Software\Classes\RLogg.LogFile\shell\open]
@="Open with RLogg"

View File

@@ -0,0 +1,63 @@
# RLogg Installation Script for Windows
# Run with: powershell -ExecutionPolicy Bypass -File install.ps1
param(
[string]$InstallPath = "$env:LOCALAPPDATA\Programs\RLogg"
)
Write-Host "Installing RLogg Log Viewer..." -ForegroundColor Cyan
Write-Host ""
# Determine the directory where this script is located
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$BinaryPath = Join-Path (Split-Path (Split-Path $ScriptDir -Parent) -Parent) "target\release\rlogg.exe"
# Check if rlogg.exe exists
if (-not (Test-Path $BinaryPath)) {
Write-Host "Error: rlogg.exe not found at $BinaryPath" -ForegroundColor Red
Write-Host "Please build the project first with: cargo build --release" -ForegroundColor Yellow
exit 1
}
# Create directory
Write-Host "Installing binary to $InstallPath..." -ForegroundColor Green
New-Item -ItemType Directory -Force -Path $InstallPath | Out-Null
# Copy binary
Copy-Item $BinaryPath $InstallPath\
# Create registry entries for .log file association
Write-Host "Configuring file associations..." -ForegroundColor Green
$regPath = "HKCU:\Software\Classes\.log"
New-Item -Path $regPath -Force | Out-Null
Set-ItemProperty -Path $regPath -Name "(default)" -Value "RLogg.LogFile"
$regPath = "HKCU:\Software\Classes\RLogg.LogFile"
New-Item -Path $regPath -Force | Out-Null
Set-ItemProperty -Path $regPath -Name "(default)" -Value "Log File"
$regPath = "HKCU:\Software\Classes\RLogg.LogFile\DefaultIcon"
New-Item -Path $regPath -Force | Out-Null
Set-ItemProperty -Path $regPath -Name "(default)" -Value "`"$InstallPath\rlogg.exe`",0"
$regPath = "HKCU:\Software\Classes\RLogg.LogFile\shell\open\command"
New-Item -Path $regPath -Force | Out-Null
Set-ItemProperty -Path $regPath -Name "(default)" -Value "`"$InstallPath\rlogg.exe`" `"%1`""
$regPath = "HKCU:\Software\Classes\RLogg.LogFile\shell\open"
New-Item -Path $regPath -Force | Out-Null
Set-ItemProperty -Path $regPath -Name "(default)" -Value "Open with RLogg"
Write-Host ""
Write-Host "Installation complete!" -ForegroundColor Green
Write-Host ""
Write-Host "RLogg is installed at: $InstallPath\rlogg.exe" -ForegroundColor Cyan
Write-Host "File associations have been configured for .log files." -ForegroundColor Cyan
Write-Host ""
Write-Host "You can now double-click .log files to open them in RLogg." -ForegroundColor Yellow
Write-Host ""
Write-Host "To uninstall, run:" -ForegroundColor Yellow
Write-Host " Remove-Item -Recurse `"$InstallPath`"" -ForegroundColor Gray
Write-Host " Remove-Item -Recurse HKCU:\Software\Classes\.log" -ForegroundColor Gray
Write-Host " Remove-Item -Recurse HKCU:\Software\Classes\RLogg.LogFile" -ForegroundColor Gray