Enhance Installer
Test / Run tests (push) Failing after 13s

This commit is contained in:
2026-08-05 16:31:32 +02:00
parent bf8533c857
commit 9c3cc8d4be
10 changed files with 134 additions and 45 deletions
+6 -2
View File
@@ -3,8 +3,12 @@ Pamhagen
========
Source code
C:\Program Files\Pamhagen\src\PamhagenSysCtrl-source.zip
C:\Program Files\Anlagensteuerung Pamhagen\src\pamhagen-sysctrl.zip
https://git.necronda.net/winzer/pamhagen-sysctrl
Installation folder
C:\Program Files\Pamhagen\
C:\Program Files\Anlagensteuerung Pamhagen\
Data and configuration folder
C:\ProgramData\Anlagensteuerung Pamhagen\
- config.ini : main configuration file
+3
View File
@@ -0,0 +1,3 @@
[plc]
port = COM1
+9 -1
View File
@@ -1,16 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<!-- C:\Program Files (x86)\Anlagensteuerung Pamhagen or C:\Program Files\Anlagensteuerung Pamhagen -->
<StandardDirectory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="!(bind.Property.ProductName)">
<Directory Id="InstallFolder" Name="!(bind.Property.ProductName)">
<Directory Id="SourceFolder" Name="src" />
</Directory>
</StandardDirectory>
<!-- C:\ProgramData\Anlagensteuerung Pamhagen -->
<StandardDirectory Id="CommonAppDataFolder">
<Directory Id="ConfigFolder" Name="!(bind.Property.ProductName)" />
</StandardDirectory>
<!-- C:\ProgramData\Microsoft\Windows\Start Menu\Programs -->
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="StartMenuProgramsFolder" Name="!(bind.Property.ProductName)" />
</StandardDirectory>
<!-- C:\Users\{USERNAME}\Desktop -->
<StandardDirectory Id="DesktopFolder" />
</Fragment>
</Wix>
+7 -10
View File
@@ -8,10 +8,7 @@
<SuppressValidation>false</SuppressValidation>
<PublishDirectory>$(MSBuildProjectDirectory)\..\PamhagenSysCtrl\bin\Publish</PublishDirectory>
</PropertyGroup>
<UsingTask TaskName="GetFileVersion"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<UsingTask TaskName="GetFileVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<AssemblyPath ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Output="true" />
@@ -23,7 +20,6 @@
]]></Code>
</Task>
</UsingTask>
<Target Name="PublishApplication" BeforeTargets="BeforeBuild">
<RemoveDir Directories="$(PublishDirectory)" Condition="Exists('$(PublishDirectory)')" />
<Exec Command="dotnet publish &quot;$(MSBuildProjectDirectory)\..\PamhagenSysCtrl\PamhagenSysCtrl.csproj&quot; --configuration &quot;$(Configuration)&quot; --runtime win-x64 --self-contained true --output &quot;$(PublishDirectory)&quot; --nologo" />
@@ -34,13 +30,14 @@
<DefineConstants>ProductVersion=$(ProductVersion);BuildPath=$(PublishDirectory)</DefineConstants>
</PropertyGroup>
</Target>
<Target Name="CreateSourceArchive" BeforeTargets="BeforeBuild">
<Exec Command="git -C &quot;$(MSBuildProjectDirectory)\..&quot; archive --format=zip --output &quot;$(MSBuildProjectDirectory)\Files\PamhagenSysCtrl-source.zip&quot; HEAD" />
<Exec Command="git -C &quot;$(MSBuildProjectDirectory)\..&quot; archive --format=zip --output &quot;$(MSBuildProjectDirectory)\Files\pamhagen-sysctrl.zip&quot; HEAD" />
</Target>
<ItemGroup>
<ProjectReference Include="..\PamhagenSysCtrl\PamhagenSysCtrl.csproj"
ReferenceOutputAssembly="false" />
<ProjectReference Include="..\PamhagenSysCtrl\PamhagenSysCtrl.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<None Include="Files\config.ini" />
<None Include="Files\README.txt" />
</ItemGroup>
</Project>
+15 -18
View File
@@ -1,25 +1,22 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<ComponentGroup Id="MainComponents">
<Component Directory="INSTALLFOLDER">
<File Source="$(var.BuildPath)\PamhagenSysCtrl.exe"
Id="PamhagenSysCtrl.exe" />
<Component Directory="InstallFolder">
<File Source="$(var.BuildPath)\PamhagenSysCtrl.exe" Id="PamhagenSysCtrl.exe"/>
</Component>
<Component Directory="SourceFolder">
<File Source="$(ProjectDir)\Files\PamhagenSysCtrl-source.zip"
Id="PamhagenSysCtrlSource.zip" />
</Component>
<Component Directory="INSTALLFOLDER">
<File Source="$(ProjectDir)\Files\README.txt"
Id="README.txt" />
</Component>
<Files Directory="INSTALLFOLDER" Include="$(var.BuildPath)\**">
<Exclude Files="$(var.BuildPath)\PamhagenSysCtrl.exe" />
<Exclude Files="$(var.BuildPath)\**.pdb" />
<Files Directory="InstallFolder" Include="$(var.BuildPath)\**">
<Exclude Files="$(var.BuildPath)\PamhagenSysCtrl.exe"/>
<Exclude Files="$(var.BuildPath)\**.pdb"/>
</Files>
</ComponentGroup>
<Component Directory="SourceFolder">
<File Source="$(ProjectDir)\Files\pamhagen-sysctrl.zip" Id="pamhagen_sysctrl.zip"/>
</Component>
<Component Directory="ConfigFolder" Permanent="true" NeverOverwrite="true">
<File Source="$(ProjectDir)\Files\config.ini" Id="config.ini"/>
</Component>
<Component Directory="ConfigFolder">
<File Source="$(ProjectDir)\Files\README.txt" Id="README.txt"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
+7 -8
View File
@@ -1,18 +1,17 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="Pamhagen"
Manufacturer="Pamhagen"
<Package Name="Anlagensteuerung Pamhagen"
Manufacturer="Anlagensteuerung Pamhagen"
Version="$(var.ProductVersion)"
Language="3079"
UpgradeCode="f214bfc6-1cd0-4971-807e-a4830e3b82a3"
Scope="perMachine"
Compressed="true">
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)"
AllowSameVersionUpgrades="no" />
<MediaTemplate EmbedCab="true" CompressionLevel="high" />
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" AllowSameVersionUpgrades="no"/>
<MediaTemplate EmbedCab="true" CompressionLevel="high"/>
<Feature Id="Main" Title="Pamhagen" Level="1">
<ComponentGroupRef Id="MainComponents" />
<ComponentGroupRef Id="ShortcutComponents" />
<Feature Id="Main" Title="Anlagensteuerung Pamhagen" Level="1">
<ComponentGroupRef Id="MainComponents"/>
<ComponentGroupRef Id="ShortcutComponents"/>
</Feature>
</Package>
</Wix>
+4 -4
View File
@@ -8,8 +8,8 @@
<Shortcut Id="ApplicationStartMenuShortcut"
Name="!(bind.Property.ProductName)"
Description="!(bind.Property.ProductName)"
Target="[INSTALLFOLDER]PamhagenSysCtrl.exe"
WorkingDirectory="INSTALLFOLDER" />
Target="[InstallFolder]PamhagenSysCtrl.exe"
WorkingDirectory="InstallFolder" />
<RemoveFolder Id="StartMenuProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\!(bind.Property.Manufacturer)\!(bind.Property.ProductName)"
@@ -25,8 +25,8 @@
<Shortcut Id="DesktopShortcut"
Name="!(bind.Property.ProductName)"
Description="!(bind.Property.ProductName)"
Target="[INSTALLFOLDER]PamhagenSysCtrl.exe"
WorkingDirectory="INSTALLFOLDER" />
Target="[InstallFolder]PamhagenSysCtrl.exe"
WorkingDirectory="InstallFolder" />
<RegistryValue Root="HKCU"
Key="Software\!(bind.Property.Manufacturer)\!(bind.Property.ProductName)"
Name="desktop_installed"