hide console on windows only

This commit is contained in:
2025-06-19 12:15:31 +02:00
parent c52c4059a0
commit bf0037cf79
3 changed files with 23 additions and 7 deletions

View File

@@ -46,6 +46,7 @@ public static class Program
InstallWithoutGui(Options.UpdateOptions, Options.Silent); InstallWithoutGui(Options.UpdateOptions, Options.Silent);
else else
{ {
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ShowWindow(GetConsoleWindow(), 0); ShowWindow(GetConsoleWindow(), 0);
RunApp(Options.UpdateOptions); RunApp(Options.UpdateOptions);
} }

View File

@@ -1,18 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Any CPU</Platform> <Platform>Any CPU</Platform>
<PublishDir>bin\publish\general\</PublishDir> <PublishDir>bin\publish\linux</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol> <PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId> <_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained> <SelfContained>false</SelfContained>
<PublishSingleFile>true</PublishSingleFile> <PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\publish\windows\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>
</Project>