version 1.0.1

This commit is contained in:
meelstorm
2025-09-19 12:15:11 +02:00
parent 6c0b778ba6
commit 0abd273154
4 changed files with 56 additions and 0 deletions

View File

@@ -35,6 +35,7 @@
singleCameraControl1 = new VisionBuilder.UI.Windows.Components.SingleCameraControl();
btnTestMode = new MaterialSkin.Controls.MaterialRaisedButton();
flowLayoutPanel1 = new FlowLayoutPanel();
lblVersion = new Label();
flowLayoutPanel1.SuspendLayout();
SuspendLayout();
//
@@ -141,11 +142,23 @@
flowLayoutPanel1.Size = new Size(728, 80);
flowLayoutPanel1.TabIndex = 12;
//
// lblVersion
//
lblVersion.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
lblVersion.BackColor = Color.Transparent;
lblVersion.Location = new Point(1768, 1056);
lblVersion.Name = "lblVersion";
lblVersion.Size = new Size(148, 23);
lblVersion.TabIndex = 13;
lblVersion.Text = "Version 0.0.0.0";
lblVersion.TextAlign = ContentAlignment.TopRight;
//
// Form1
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1920, 1080);
Controls.Add(lblVersion);
Controls.Add(flowLayoutPanel1);
Controls.Add(singleCameraControl1);
Controls.Add(materialDivider1);
@@ -165,5 +178,6 @@
private Components.SingleCameraControl singleCameraControl1;
private MaterialSkin.Controls.MaterialRaisedButton btnTestMode;
private FlowLayoutPanel flowLayoutPanel1;
private Label lblVersion;
}
}

View File

@@ -26,6 +26,7 @@ namespace VisionBuilder.UI.Windows.Test
singleCameraControl1.SetViewModel(mainWindowVm.SingleCameraVms[0]);
Load += Form1_Load;
_mainWindowVm.PropertyChanged += _mainWindowVm_PropertyChanged;
lblVersion.Text = $"v{Application.ProductVersion.Split('+')[0]}";
}

View File

@@ -0,0 +1,26 @@
@echo off
setlocal
rem --- resolve absolute path of DLL ---
set "dll=..\bin\Debug\net8.0-windows\VisionBuilder.UI.Windows.Uno.dll"
for %%I in ("%dll%") do set "dll=%%~fI"
rem --- get version from DLL ---
for /f "tokens=2 delims==" %%v in ('wmic datafile where "name='%dll:\=\\%'" get Version /value ^| find "="') do set "ver=%%v"
rem --- cut off last part (keep only major.minor.build) ---
for /f "tokens=1-3 delims=." %%a in ("%ver%") do set "ver=%%a.%%b.%%c"
echo Found version: %ver%
rem --- make sure output dir exists ---
if not exist Output mkdir Output
rem --- build 7z-SFX ---
set "src=..\bin\Debug\net8.0-windows"
set "out=Output\UNO%ver%.exe"
7z a -sfx "%out%" "%src%\*"
echo Done: %out%
endlocal

View File

@@ -7,8 +7,11 @@
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>Inspectron icon-512.ico</ApplicationIcon>
<Deterministic>false</Deterministic>
<Version>1.0.1</Version>
</PropertyGroup>
<ItemGroup>
<Content Include="Inspectron icon-512.ico" />
</ItemGroup>
@@ -40,4 +43,16 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<ItemGroup>
<Folder Include="Installer\" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command=" echo &quot;$(ProjectDir)Output\UNO$(Version).exe&quot;&#xD;&#xA;if exist &quot;$(ProjectDir)\Installer\Output\UNO$(Version).exe&quot; (&#xD;&#xA; echo ERROR: Output\UNO$(Version).exe already exists.&#xD;&#xA; exit /b 1&#xD;&#xA;)" />
</Target>
</Project>