Initialer Commit

This commit is contained in:
2026-06-09 22:13:00 +02:00
commit 1d8ca0b908
68 changed files with 4374 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
param(
[string]$InstallDir = "C:\printservice-app",
[string]$ConfigDir = "C:\printservice",
[int]$Port = 8080,
[string]$Jar = "$PSScriptRoot\..\target\printservice-standalone.jar"
)
New-Item -ItemType Directory -Force -Path $InstallDir, "$InstallDir\logs", $ConfigDir | Out-Null
Copy-Item $Jar "$InstallDir\printservice-standalone.jar" -Force
Copy-Item "$PSScriptRoot\..\service\printservice.xml" "$InstallDir\printservice.xml" -Force
(Get-Content "$InstallDir\printservice.xml") `
-replace 'C:\\printservice', ($ConfigDir -replace '\\','\\') `
-replace '--port=8080', "--port=$Port" | Set-Content "$InstallDir\printservice.xml" -Encoding UTF8
Write-Host "Bitte WinSW-x64.exe als $InstallDir\printservice.exe ablegen, falls noch nicht vorhanden."
if (Test-Path "$InstallDir\printservice.exe") {
Push-Location $InstallDir
.\printservice.exe install
.\printservice.exe start
Pop-Location
} else {
Write-Host "Download WinSW, benenne es in printservice.exe um und fuehre danach aus:"
Write-Host "cd $InstallDir; .\printservice.exe install; .\printservice.exe start"
}

View File

@@ -0,0 +1,6 @@
@echo off
setlocal
set BASE=%~dp0..
if not defined PRINTSERVICE_CONFIG_DIR set PRINTSERVICE_CONFIG_DIR=C:\printservice
if not defined PRINTSERVICE_PORT set PRINTSERVICE_PORT=8080
java -Dprintservice.config.dir=%PRINTSERVICE_CONFIG_DIR% -jar "%BASE%\target\printservice-standalone.jar" --host=0.0.0.0 --port=%PRINTSERVICE_PORT%

View File

@@ -0,0 +1,6 @@
param(
[string]$ConfigDir = "C:\printservice",
[int]$Port = 8080,
[string]$Jar = "$PSScriptRoot\..\target\printservice-standalone.jar"
)
java "-Dprintservice.config.dir=$ConfigDir" -jar $Jar --host=0.0.0.0 --port=$Port

View File

@@ -0,0 +1,9 @@
param([string]$InstallDir = "C:\printservice-app")
Push-Location $InstallDir
if (Test-Path ".\printservice.exe") {
.\printservice.exe stop
.\printservice.exe uninstall
} else {
Write-Host "printservice.exe nicht gefunden. WinSW-Datei pruefen."
}
Pop-Location