From 66a13939ae396a40ac6e4f08cb9261fdfd6e454e Mon Sep 17 00:00:00 2001 From: Kilian Wirl Date: Thu, 11 Dec 2025 13:20:52 +0100 Subject: [PATCH] ReadMe und PreBuildScript erstellt. --- AA-Forms/FormMain.cs | 1 - Properties/AssemblyInfo.cs | 5 +- SetupVerwaltung/SetupVerwaltung.vdproj | 110 ++++++++++++------------- UpdateVerwaltungReadMe.ps1 | 87 +++++++++++++++++++ Verwaltung-ReadMe.txt | 15 ++++ Verwaltung.csproj | 5 ++ 6 files changed, 164 insertions(+), 59 deletions(-) create mode 100644 UpdateVerwaltungReadMe.ps1 create mode 100644 Verwaltung-ReadMe.txt diff --git a/AA-Forms/FormMain.cs b/AA-Forms/FormMain.cs index b268db9..69662ee 100644 --- a/AA-Forms/FormMain.cs +++ b/AA-Forms/FormMain.cs @@ -93,7 +93,6 @@ namespace Deckungsbeitrag } this.Activate(); - meldung.GetInfo(this, null, false); } private void Paint_Boarder(Size size, Point location, PaintEventArgs e) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 1c3aa35..b4f34e6 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -31,6 +31,5 @@ using System.Runtime.InteropServices; // // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.9")] -[assembly: AssemblyFileVersion("1.0.1.9")] +[assembly: AssemblyVersion("1.0.2.4")] +[assembly: AssemblyFileVersion("1.0.2.4")] diff --git a/SetupVerwaltung/SetupVerwaltung.vdproj b/SetupVerwaltung/SetupVerwaltung.vdproj index 439f59c..8bf4903 100644 --- a/SetupVerwaltung/SetupVerwaltung.vdproj +++ b/SetupVerwaltung/SetupVerwaltung.vdproj @@ -40,25 +40,19 @@ "Entry" { "MsmKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" - "OwnerKey" = "8:_5E4D6952244F4AAC64F327394623EE57" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" - "OwnerKey" = "8:_BF71649AE43FBD7A416893054714CE91" + "MsmKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "OwnerKey" = "8:_5E4D6952244F4AAC64F327394623EE57" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" - "OwnerKey" = "8:_A00008624800CAF367880713AFB719F2" + "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -70,7 +64,7 @@ "Entry" { "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" - "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" + "OwnerKey" = "8:_E0CD318B00C3EBC6018E7287D1C5C964" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -82,19 +76,25 @@ "Entry" { "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" + "OwnerKey" = "8:_BF71649AE43FBD7A416893054714CE91" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" "OwnerKey" = "8:_A90E24C686315EC9D9B0BA1C76886A15" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" - "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "OwnerKey" = "8:_A00008624800CAF367880713AFB719F2" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_1FC10E99927FDE0DB378759FE2A2C1DD" - "OwnerKey" = "8:_E0CD318B00C3EBC6018E7287D1C5C964" + "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -130,6 +130,12 @@ "Entry" { "MsmKey" = "8:_3518CDF283287B9BB382E0C864B0B344" + "OwnerKey" = "8:_5E4D6952244F4AAC64F327394623EE57" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_3518CDF283287B9BB382E0C864B0B344" "OwnerKey" = "8:_9C2D77065F590227E595BA5087763024" "MsmSig" = "8:_UNDEFINED" } @@ -141,12 +147,6 @@ } "Entry" { - "MsmKey" = "8:_3518CDF283287B9BB382E0C864B0B344" - "OwnerKey" = "8:_5E4D6952244F4AAC64F327394623EE57" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_361CD6DDAD5DAD87766154F455EA61CE" "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" "MsmSig" = "8:_UNDEFINED" @@ -160,18 +160,6 @@ "Entry" { "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" - "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" - "OwnerKey" = "8:_A00008624800CAF367880713AFB719F2" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" "OwnerKey" = "8:_FD8164C4BBFD975FAFD2A4D86340E915" "MsmSig" = "8:_UNDEFINED" } @@ -184,7 +172,7 @@ "Entry" { "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" - "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "OwnerKey" = "8:_A00008624800CAF367880713AFB719F2" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -196,6 +184,18 @@ "Entry" { "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" + "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" + "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_404BC92A271981651469C5BBB22AFBC1" "OwnerKey" = "8:_5DDEB1FF3DD78281FF3203E5E9933C19" "MsmSig" = "8:_UNDEFINED" } @@ -232,13 +232,13 @@ "Entry" { "MsmKey" = "8:_5DDEB1FF3DD78281FF3203E5E9933C19" - "OwnerKey" = "8:_3518CDF283287B9BB382E0C864B0B344" + "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_5DDEB1FF3DD78281FF3203E5E9933C19" - "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" + "OwnerKey" = "8:_A90E24C686315EC9D9B0BA1C76886A15" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -256,13 +256,13 @@ "Entry" { "MsmKey" = "8:_5DDEB1FF3DD78281FF3203E5E9933C19" - "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "OwnerKey" = "8:_3518CDF283287B9BB382E0C864B0B344" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_5DDEB1FF3DD78281FF3203E5E9933C19" - "OwnerKey" = "8:_A90E24C686315EC9D9B0BA1C76886A15" + "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -340,13 +340,13 @@ "Entry" { "MsmKey" = "8:_AB17FAEB828C8765351F17BFC0E97F98" - "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" + "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_AB17FAEB828C8765351F17BFC0E97F98" - "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -388,37 +388,31 @@ "Entry" { "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" - "OwnerKey" = "8:_BF71649AE43FBD7A416893054714CE91" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" "OwnerKey" = "8:_AD2C2F4AADC342899908C708EB4F4A72" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" - "OwnerKey" = "8:_A00008624800CAF367880713AFB719F2" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" "OwnerKey" = "8:_FD8164C4BBFD975FAFD2A4D86340E915" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" + "OwnerKey" = "8:_E0CD318B00C3EBC6018E7287D1C5C964" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" "OwnerKey" = "8:_CC6E1B525578AF50C3DD3123399882F3" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" - "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" + "OwnerKey" = "8:_BF71649AE43FBD7A416893054714CE91" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -430,13 +424,19 @@ "Entry" { "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" + "OwnerKey" = "8:_A00008624800CAF367880713AFB719F2" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" "OwnerKey" = "8:_5E4D6952244F4AAC64F327394623EE57" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_E73BA90E452C02520292C6FF727EB5AC" - "OwnerKey" = "8:_E0CD318B00C3EBC6018E7287D1C5C964" + "OwnerKey" = "8:_14F178F5FD5EFA4C1973A6B30514E332" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -1621,15 +1621,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:SetupVerwaltung" - "ProductCode" = "8:{6D0E142B-44EA-43EA-9CA0-F4A2BFBC22AF}" - "PackageCode" = "8:{4252B4CA-B810-4CA9-9A37-AF7373000FBA}" + "ProductCode" = "8:{DC10DA93-2096-4B0A-9B08-5B5DEB59A8FA}" + "PackageCode" = "8:{0A25F7B5-0F0C-4888-A20A-7CFC157873F9}" "UpgradeCode" = "8:{2DC7CE56-8D1C-42EB-B326-2E887EBB7F5A}" "AspNetVersion" = "8:" "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:FALSE" + "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.15" + "ProductVersion" = "8:1.0.21" "Manufacturer" = "8:Kilian Wirl GmbH" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" diff --git a/UpdateVerwaltungReadMe.ps1 b/UpdateVerwaltungReadMe.ps1 new file mode 100644 index 0000000..1db3282 --- /dev/null +++ b/UpdateVerwaltungReadMe.ps1 @@ -0,0 +1,87 @@ +# Vollständig fehlerfrei - autonom +$ProjectDir = Split-Path $MyInvocation.MyCommand.Path -Parent +if (-not $ProjectDir) { $ProjectDir = (Get-Location).Path } + +Write-Host "Suche ReadMe in: $ProjectDir" + +$readmePath = Join-Path $ProjectDir "Verwaltung-ReadMe.txt" + +# Datei automatisch erstellen +if (-not (Test-Path $readmePath)) { + @" +===================================== +NEUIGKEITEN - Version ##VERSION## +===================================== + +Build-Info: +- Commit-Hash: ##COMMIT## +- Build-Typ: ##CUSTOM## + +Änderungen: +- [ ] Neue Features +- [ ] Bugfixes + +Erstellt: ##BUILD_DATE## +===================================== +"@ | Out-File $readmePath -Encoding UTF8 + Write-Host "✅ ReadMe-Vorlage erstellt!" +} + +# VERSION - * durch Buildnummer ersetzen +$version = "1.0.0.0" +$assemblyInfoPath = Join-Path $ProjectDir "Properties\AssemblyInfo.cs" +if (Test-Path $assemblyInfoPath) { + $assemblyContent = Get-Content $assemblyInfoPath -Raw -ErrorAction SilentlyContinue + if ($assemblyContent -match 'AssemblyVersion\s*\(\s*"([^"]+)"\s*\)') { + $rawVersion = $matches[1] + # * durch Datum/Uhrzeit ersetzen + $buildNumber = (Get-Date -Format "MMdd") + $revision = (Get-Date -Format "HHmm") + $version = $rawVersion -replace '\*', $buildNumber -replace '\*', $revision + Write-Host "✓ Rohe Version: $rawVersion → Finale: $version" + } +} + +# Git Commit - 100% robust +$commit = "No Git" +try { + # Einfachster Weg: git von aktuellem Ort ausführen + $gitOutput = & git rev-parse --short HEAD 2>$null + if ($LASTEXITCODE -eq 0 -and $gitOutput -and $gitOutput.Trim()) { + $commit = $gitOutput.Trim() + } else { + # Fallback: suche .git Ordner und wechsle hin + $gitDir = Join-Path $ProjectDir ".git" + if (Test-Path $gitDir) { + Push-Location $ProjectDir + $gitOutput = & git rev-parse --short HEAD 2>$null + if ($LASTEXITCODE -eq 0 -and $gitOutput -and $gitOutput.Trim()) { + $commit = $gitOutput.Trim() + } + Pop-Location + } + } +} catch { + # Noch ein Versuch mit vollständigem Pfad + $gitExe = (Get-Command git -ErrorAction SilentlyContinue).Source + if ($gitExe) { + $gitOutput = & $gitExe rev-parse --short HEAD 2>$null + if ($LASTEXITCODE -eq 0 -and $gitOutput -and $gitOutput.Trim()) { + $commit = $gitOutput.Trim() + } + } +} +Write-Host "Git Commit gefunden: $commit" + +$custom = "PostgreSQL optimiert - Build: Debug" +$buildDate = Get-Date -Format "dd.MM.yyyy HH:mm" + +# Ersetzen (FEHLERFREI) +$content = Get-Content $readmePath -Raw -Encoding UTF8 -ErrorAction SilentlyContinue +$content = $content -replace "##VERSION##", $version ` + -replace "##COMMIT##", $commit ` + -replace "##CUSTOM##", $custom ` + -replace "##BUILD_DATE##", $buildDate + +Set-Content $readmePath $content -Encoding UTF8 +Write-Host "✓ ReadMe aktualisiert: $version ($commit)" diff --git a/Verwaltung-ReadMe.txt b/Verwaltung-ReadMe.txt new file mode 100644 index 0000000..0838277 --- /dev/null +++ b/Verwaltung-ReadMe.txt @@ -0,0 +1,15 @@ +===================================== +NEUIGKEITEN - Version 1.0.2.4 +===================================== + +Build-Info: +- Commit-Hash: No Git +- Build-Typ: PostgreSQL optimiert - Build: Debug + +Änderungen: +- [ ] Neue Features +- [ ] Bugfixes + +Installation: 11.12.2025 13:18 +===================================== + diff --git a/Verwaltung.csproj b/Verwaltung.csproj index 7d8d731..c5a660a 100644 --- a/Verwaltung.csproj +++ b/Verwaltung.csproj @@ -478,6 +478,7 @@ Settings.settings True + @@ -522,4 +523,8 @@ + + powershell -NoProfile -ExecutionPolicy Bypass -File "$(ProjectDir)UpdateVerwaltungReadMe.ps1" + + \ No newline at end of file