Fixed test client setup as a separate setup.

Please see ReadMe.md in the BreCalClient folder for details.
This commit is contained in:
Daniel Schick 2023-09-13 07:09:52 +02:00
parent 7660ee72f2
commit d74f943994
4 changed files with 32 additions and 14 deletions

View File

@ -13,6 +13,7 @@
<Title>Bremen calling client</Title> <Title>Bremen calling client</Title>
<Description>A Windows WPF client for the Bremen calling API.</Description> <Description>A Windows WPF client for the Bremen calling API.</Description>
<ApplicationIcon>containership.ico</ApplicationIcon> <ApplicationIcon>containership.ico</ApplicationIcon>
<AssemblyName>BreCalTestClient</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.6.0.0</ApplicationVersion> <ApplicationVersion>0.6.1.0</ApplicationVersion>
<BootstrapperEnabled>False</BootstrapperEnabled> <BootstrapperEnabled>False</BootstrapperEnabled>
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<CreateWebPageOnPublish>True</CreateWebPageOnPublish> <CreateWebPageOnPublish>True</CreateWebPageOnPublish>
@ -21,9 +21,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Platform>Any CPU</Platform> <Platform>Any CPU</Platform>
<PublishUrl>bin\publish.test\</PublishUrl> <PublishUrl>bin\publish.test\</PublishUrl>
<PublishProtocol>ClickOnce</PublishProtocol> <PublishProtocol>ClickOnce</PublishProtocol>
<PublishReadyToRun>False</PublishReadyToRun> <PublishReadyToRun>True</PublishReadyToRun>
<PublishSingleFile>False</PublishSingleFile> <PublishSingleFile>True</PublishSingleFile>
<SelfContained>False</SelfContained> <SelfContained>True</SelfContained>
<SignatureAlgorithm>(none)</SignatureAlgorithm> <SignatureAlgorithm>(none)</SignatureAlgorithm>
<SignManifests>False</SignManifests> <SignManifests>False</SignManifests>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
@ -37,14 +37,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublisherName>Informatikbüro Daniel Schick</PublisherName> <PublisherName>Informatikbüro Daniel Schick</PublisherName>
<SuiteName>Bremen Calling</SuiteName> <SuiteName>Bremen Calling</SuiteName>
<SupportUrl>http://www.textbausteine.net/</SupportUrl> <SupportUrl>http://www.textbausteine.net/</SupportUrl>
<PublishDir>bin\Debug\net6.0-windows\app.publish\</PublishDir> <PublishDir>bin\Debug\net6.0-windows\win-x64\app.publish\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.NetCore.DesktopRuntime.6.0.x64">
<Install>true</Install>
<ProductName>.NET Desktop Runtime 6.0.16 (x64)</ProductName>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup> <ItemGroup>
<PublishFile Include="containership.ico"> <PublishFile Include="containership.ico">
<Group> <Group>

View File

@ -16,3 +16,25 @@ If code generation is not working please have a look in the output pane and sele
## Installation ## Installation
The client is deployed via ClickOnce. The client is deployed via ClickOnce.
To deploy the test client, leave everything as it is in develop branch and publish using the profile [ClickOnceTestProfile.pubxml](./Properties/PublishProfiles/ClickOnceTestProfile.pubxml).
To deploy the productive version, use the profile [ClickOnceProfile.pubxml](./Properties/PublishProfiles/ClickOnceProfile.pubxml).
You will also need to change the AssemblyName in BreCalClient.csproj back to BreCalClient.
```xml
<AssemblyName>BreCalClient</AssemblyName>
```
Resources are embedded in the assembly. Therefore wherever Resources are referenced via assembly name this name has to be adjusted as well. For example:
```C++
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png"));
```
It is debatable if the single contained file deployment makes sense at this point. Installation file size
is at about 150MB which takes a long time to upload however it should run on any current windows installation.
Theoretically it should also work on Linux.
### Signing
Currently neither assemblies nor the installation is signed. This probably only makes sense with a paid public code signing certificate.

View File

@ -116,13 +116,13 @@ namespace BreCalClient
switch(this.ShipcallControlModel?.Shipcall?.Type) switch(this.ShipcallControlModel?.Shipcall?.Type)
{ {
case 1: // incoming case 1: // incoming
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_down_red.png")); this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_down_red.png"));
break; break;
case 2: // outgoing case 2: // outgoing
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_blue.png")); this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_up_blue.png"));
break; break;
case 3: // shifting case 3: // shifting
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png")); this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_right_green.png"));
break; break;
default: default:
break; break;