dotnet8 work, source unification work

This commit is contained in:
Izakbar
2025-02-08 18:08:34 +00:00
parent de0f0b8b20
commit 574d138341
18 changed files with 245 additions and 362 deletions

View File

@@ -313,6 +313,15 @@ This setting allows to enable an alternate thumbnail render. This render doesn't
* `-` Thumbnail images are refreshed at 1 FPS rate
* `-` Possible short mouse cursor freezes
### Release build
Release builds are generated using github actions when a release is created from tag. If you wish to build locally the variable EVEOTARGET controls Linux or Windows source inclusion.
You can build using :
* dotnet build src\\Eve-O-Preview\\Eve-O-Preview.csproj --configuration Release --no-restore -p:EVEOTARGET="Linux" -p:AssemblyVersion="8.0.2.0"
* dotnet build src\\Eve-O-Preview\\Eve-O-Preview.csproj --configuration Release --no-restore -p:EVEOTARGET="Windows" -p:AssemblyVersion="8.0.2.0"
<div style="page-break-after: always;"></div>
## Credits

View File

@@ -1,6 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

View File

@@ -1,116 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BE2C3A13-CC19-4525-895F-381DD71C5833}</ProjectGuid>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EveOMock</RootNamespace>
<AssemblyName>ExeFile</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<TargetFrameworkProfile />
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<Configurations>Build;Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Build|AnyCPU'">
<OutputPath>bin\Build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,28 +0,0 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
[assembly: AssemblyTitle("EVE Online mock executable for the EVE-O Preview project")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Mock")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: CLSCompliant(true)]

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Collections.Immutable" version="9.0.1" targetFramework="net48" />
<package id="System.Formats.Nrbf" version="9.0.1" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Reflection.Metadata" version="9.0.1" targetFramework="net48" />
<package id="System.Resources.Extensions" version="8.0.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages>

View File

@@ -86,7 +86,11 @@ namespace EveOPreview.Configuration.Implementation
this.ThumbnailRefreshPeriod = 500;
this.ThumbnailResizeTimeoutPeriod = 500;
this.EnableCompatibilityMode = false;
#if LINUX
this.EnableWineCompatibilityMode = true;
#else
this.EnableWineCompatibilityMode = false;
#endif
this.ThumbnailOpacity = 0.5;
@@ -190,9 +194,9 @@ namespace EveOPreview.Configuration.Implementation
public bool MinimizeToTray { get; set; }
public int ThumbnailRefreshPeriod { get; set; }
public int ThumbnailResizeTimeoutPeriod { get; set; }
[JsonProperty("CompatibilityMode")]
public bool EnableCompatibilityMode { get; set; }
[JsonProperty("WineCompatibilityMode")]
public bool EnableWineCompatibilityMode { get; set; }
[JsonProperty("ThumbnailsOpacity")]
public double ThumbnailOpacity { get; set; }

View File

@@ -32,7 +32,7 @@ namespace EveOPreview.Configuration
bool MinimizeToTray { get; set; }
int ThumbnailRefreshPeriod { get; set; }
int ThumbnailResizeTimeoutPeriod { get; set; }
bool EnableCompatibilityMode { get; set; }
bool EnableWineCompatibilityMode { get; set; }
double ThumbnailOpacity { get; set; }

View File

@@ -1,20 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6CA62DF3-8589-484C-8BC8-F763CA66BBB1}</ProjectGuid>
<DefineConstants Condition="'$(EVEOTarget)'=='Linux'">LINUX</DefineConstants>
<TargetFramework>net8.0-windows8.0</TargetFramework>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EveOPreview</RootNamespace>
<AssemblyName>EVE-O Preview</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
@@ -25,32 +16,23 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<ApplicationVersion>8.0.1.9</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<Configurations>Build;Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<UseVSHostingProcess>false</UseVSHostingProcess>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
@@ -70,202 +52,55 @@
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<UseWPF>True</UseWPF>
<AssemblyVersion>8.0.1.9</AssemblyVersion>
<FileVersion>8.0.1.9</FileVersion>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Build|AnyCPU'">
<OutputPath>bin\Build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO" />
<Reference Include="System.Linq.Expressions" />
<Reference Include="System.Runtime" />
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml.Serialization" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="ApplicationBase\ApplicationController.cs" />
<Compile Include="ApplicationBase\ExceptionHandler.cs" />
<Compile Include="ApplicationBase\IApplicationController.cs" />
<Compile Include="ApplicationBase\IIocContainer.cs" />
<Compile Include="ApplicationBase\IPresenterGeneric.cs" />
<Compile Include="ApplicationBase\LightInjectContainer.cs" />
<Compile Include="ApplicationBase\Presenter.cs" />
<Compile Include="ApplicationBase\PresenterGeneric.cs" />
<Compile Include="Configuration\Implementation\AppConfig.cs" />
<Compile Include="Configuration\Implementation\ConfigurationStorage.cs" />
<Compile Include="Configuration\Interface\AnimationStyle.cs" />
<Compile Include="Configuration\Interface\IAppConfig.cs" />
<Compile Include="Configuration\Interface\IThumbnailConfiguration.cs" />
<Compile Include="Configuration\Interface\ZoomAnchor.cs" />
<Compile Include="Mediator\Handlers\Configuration\SaveConfigurationHandler.cs" />
<Compile Include="Mediator\Handlers\Thumbnails\ThumbnailFrameSettingsUpdatedHandler.cs" />
<Compile Include="Mediator\Handlers\Thumbnails\ThumbnailConfiguredSizeUpdatedHandler.cs" />
<Compile Include="Mediator\Handlers\Thumbnails\ThumbnailListUpdatedHandler.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailFrameSettingsUpdated.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailConfiguredSizeUpdated.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailListUpdated.cs" />
<Compile Include="Mediator\Handlers\Thumbnails\ThumbnailLocationUpdatedHandler.cs" />
<Compile Include="Mediator\Handlers\Thumbnails\ThumbnailActiveSizeUpdatedHandler.cs" />
<Compile Include="Mediator\Handlers\Services\StartStopServiceHandler.cs" />
<Compile Include="Mediator\Messages\Base\NotificationBase.cs" />
<Compile Include="Mediator\Messages\Configuration\SaveConfiguration.cs" />
<Compile Include="Mediator\Messages\Services\StartService.cs" />
<Compile Include="Mediator\Messages\Services\StopService.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailLocationUpdated.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailActiveSizeUpdated.cs" />
<Compile Include="Presenters\Implementation\ViewAnimationStyleConverter.cs" />
<Compile Include="Presenters\Interface\IMainFormPresenter.cs" />
<Compile Include="Services\Implementation\ProcessInfo.cs" />
<Compile Include="Services\Implementation\ProcessMonitor.cs" />
<Compile Include="Services\Interface\IProcessInfo.cs" />
<Compile Include="Services\Interface\IProcessMonitor.cs" />
<Compile Include="Services\Implementation\DwmThumbnail.cs" />
<Compile Include="Services\Interface\IDwmThumbnail.cs" />
<Compile Include="Services\Interface\InteropConstants.cs" />
<Compile Include="Services\Interop\ANIMATIONINFO.cs" />
<Compile Include="Services\Interop\DWM_BLURBEHIND.cs" />
<Compile Include="Services\Interop\DWM_THUMBNAIL_PROPERTIES.cs" />
<Compile Include="Services\Interop\DWM_TNP_CONSTANTS.cs" />
<Compile Include="Services\Interface\IWindowManager.cs" />
<Compile Include="Services\Interop\Gdi32NativeMethods.cs" />
<Compile Include="Services\Interop\MARGINS.cs" />
<Compile Include="Services\Interop\RECT.cs" />
<Compile Include="Configuration\Interface\ClientLayout.cs" />
<Compile Include="ApplicationBase\IPresenter.cs" />
<Compile Include="Services\Implementation\WindowManager.cs" />
<Compile Include="Services\Interop\User32NativeMethods.cs" />
<Compile Include="Presenters\Implementation\MainFormPresenter.cs" />
<Compile Include="Presenters\Interface\ViewCloseRequest.cs" />
<Compile Include="Presenters\Implementation\ViewZoomAnchorConverter.cs" />
<Compile Include="Services\Interop\WINDOWPLACEMENT.cs" />
<Compile Include="View\Implementation\LiveThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Implementation\StaticThumbnailImage.cs">
<Compile Update="View\Implementation\StaticThumbnailImage.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="View\Implementation\StaticThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Interface\IThumbnailViewFactory.cs" />
<Compile Include="Services\Interface\IThumbnailManager.cs" />
<Compile Include="View\Implementation\ThumbnailDescription.cs" />
<Compile Include="View\Interface\IMainFormView.cs" />
<Compile Include="ApplicationBase\IView.cs" />
<Compile Include="View\Interface\IThumbnailDescription.cs" />
<Compile Include="View\Interface\ViewAnimationStyle.cs" />
<Compile Include="View\Interface\ViewZoomAnchor.cs" />
<Compile Include="Configuration\Implementation\ThumbnailConfiguration.cs" />
<Compile Include="Hotkeys\HotkeyHandler.cs" />
<Compile Include="Hotkeys\HotkeyHandlerNativeMethods.cs" />
<Compile Include="View\Implementation\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Implementation\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Configuration\Interface\IConfigurationStorage.cs" />
<Compile Include="View\Interface\IThumbnailView.cs" />
<Compile Include="View\Implementation\ThumbnailViewFactory.cs" />
<Compile Include="Services\Implementation\ThumbnailManager.cs" />
<Compile Include="View\Implementation\ThumbnailOverlay.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Implementation\ThumbnailOverlay.Designer.cs">
<DependentUpon>ThumbnailOverlay.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="View\Implementation\MainForm.resx">
<SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Implementation\ThumbnailOverlay.resx">
<DependentUpon>ThumbnailOverlay.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="View\Implementation\ThumbnailView.resx">
<SubType>Designer</SubType>
<DependentUpon>ThumbnailView.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="View\Implementation\ThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Implementation\ThumbnailView.Designer.cs">
<DependentUpon>ThumbnailView.cs</DependentUpon>
</Compile>
<Compile Include="Services\Interop\DwmNativeMethods.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<EmbeddedResource Include="app.manifest" />
</ItemGroup>
<ItemGroup>
<None Include="FodyWeavers.xml" />
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody">
<Version>3.3.2</Version>
</PackageReference>
<Version>6.0.0</Version>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Fody">
<Version>4.0.2</Version>
<Version>6.9.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="LightInject">
<Version>6.4.0</Version>
<Version>7.0.1</Version>
</PackageReference>
<PackageReference Include="MediatR">
<Version>9.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
<Version>13.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
@@ -280,12 +115,9 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Compile Remove="AboutBox.cs" />
<Compile Remove="AboutBox.Designer.cs" />
<EmbeddedResource Remove="AboutBox.resx" />
</ItemGroup>
</Project>

View File

@@ -17,14 +17,39 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
<xs:documentation>Obsolete, use UnmanagedWinX86Assemblies instead</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinX86Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
<xs:documentation>Obsolete, use UnmanagedWinX64Assemblies instead.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinX64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinArm64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
@@ -43,6 +68,16 @@
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
@@ -53,6 +88,11 @@
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableEventSubscription" type="xs:boolean">
<xs:annotation>
<xs:documentation>The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
@@ -73,14 +113,39 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
<xs:documentation>Obsolete, use UnmanagedWinX86Assemblies instead</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UnmanagedWinX86Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged X86 (32 bit) assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
<xs:documentation>Obsolete, use UnmanagedWinX64Assemblies instead</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UnmanagedWinX64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged X64 (64 bit) assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UnmanagedWinArm64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">

View File

@@ -252,7 +252,11 @@ namespace EveOPreview.Presenters
private string GetApplicationVersion()
{
Version version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
return $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
string target = "Windows";
#if LINUX
target = "Linux";
#endif
return $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision} {target}";
}
private void ExitApplication()

View File

@@ -68,6 +68,9 @@ namespace EveOPreview
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
#if WINDOWS
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
#endif
}
private static IApplicationController InitializeApplicationController()

View File

@@ -1,18 +0,0 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("EVE-O Preview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Preview")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("8.0.1.8")]
[assembly: AssemblyFileVersion("8.0.1.8")]
[assembly: CLSCompliant(false)]

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Threading;
@@ -110,8 +111,11 @@ namespace EveOPreview.Services
public void SetActive(KeyValuePair<IntPtr, IThumbnailView> newClient)
{
this.GetActiveClient()?.ClearBorder();
#if LINUX
this._windowManager.ActivateWindow(newClient.Key, newClient.Value.Title);
#else
this._windowManager.ActivateWindow(newClient.Key, this._configuration.WindowsAnimationStyle);
#endif
this.SwitchActiveClient(newClient.Key, newClient.Value.Title);
newClient.Value.SetHighlight();
@@ -596,7 +600,11 @@ namespace EveOPreview.Services
Task.Run(() =>
{
#if LINUX
this._windowManager.ActivateWindow(view.Id, view.Title);
#else
this._windowManager.ActivateWindow(view.Id, this._configuration.WindowsAnimationStyle);
#endif
})
.ContinueWith((task) =>
{
@@ -611,7 +619,11 @@ namespace EveOPreview.Services
{
if (switchOut)
{
#if LINUX
this._windowManager.ActivateWindow(this._externalApplication, null);
#else
this._windowManager.ActivateWindow(this._externalApplication, this._configuration.WindowsAnimationStyle);
#endif
}
else
{

View File

@@ -1,5 +1,6 @@
using System;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using EveOPreview.Configuration;
using EveOPreview.Services.Interop;
@@ -13,8 +14,16 @@ namespace EveOPreview.Services.Implementation
private const int NO_ANIMATION = 0;
#endregion
public WindowManager()
#region Private fields
private readonly bool _enableWineCompatabilityMode;
#endregion
public WindowManager(IThumbnailConfiguration configuration)
{
#if LINUX
this._enableWineCompatabilityMode = configuration.EnableWineCompatibilityMode;
#endif
// Composition is always enabled for Windows 8+
this.IsCompositionEnabled =
((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor >= 2)) // Win 8 and Win 8.1
@@ -61,7 +70,76 @@ namespace EveOPreview.Services.Implementation
}
}
// if building for LINUX the window handling is slightly different
#if LINUX
private void WindowsActivateWindow(IntPtr handle)
{
User32NativeMethods.SetForegroundWindow(handle);
User32NativeMethods.SetFocus(handle);
int style = User32NativeMethods.GetWindowLong(handle, InteropConstants.GWL_STYLE);
if ((style & InteropConstants.WS_MINIMIZE) == InteropConstants.WS_MINIMIZE)
{
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
}
}
private void WineActivateWindow(string windowName)
{
// On Wine it is not possible to manipulate windows directly.
// They are managed by native Window Manager
// So a separate command-line utility is used
if (string.IsNullOrEmpty(windowName))
{
return;
}
string? cmd = null;
// If we are in a flatpak, then use flatpak-spawn to run wmctrl outside the sandbox
if (Environment.GetEnvironmentVariable("container") == "flatpak")
{
cmd = "-c \"flatpak-spawn --host wmctrl -a \"\"" + windowName + "\"\"\"";
}
else
{
cmd = "-c \"wmctrl -a \"\"" + windowName + "\"\"\"";
}
System.Diagnostics.Process.Start("/bin/bash", cmd);
}
public void ActivateWindow(IntPtr handle, string windowName)
{
if (this._enableWineCompatabilityMode)
{
this.WineActivateWindow(windowName);
}
else
{
this.WindowsActivateWindow(handle);
}
}
public void MinimizeWindow(IntPtr handle, bool enableAnimation)
{
if (enableAnimation)
{
User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
}
else
{
WINDOWPLACEMENT param = new WINDOWPLACEMENT();
param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));
User32NativeMethods.GetWindowPlacement(handle, ref param);
param.showCmd = WINDOWPLACEMENT.SW_MINIMIZE;
User32NativeMethods.SetWindowPlacement(handle, ref param);
}
}
#endif
#if WINDOWS
public void ActivateWindow(IntPtr handle, AnimationStyle animation)
{
User32NativeMethods.SetForegroundWindow(handle);
@@ -120,6 +198,7 @@ namespace EveOPreview.Services.Implementation
}
}
}
#endif
public void MoveWindow(IntPtr handle, int left, int top, int width, int height)
{

View File

@@ -9,7 +9,11 @@ namespace EveOPreview.Services
bool IsCompositionEnabled { get; }
IntPtr GetForegroundWindowHandle();
#if LINUX
void ActivateWindow(IntPtr handle, string windowName);
#else
void ActivateWindow(IntPtr handle, AnimationStyle animation);
#endif
void MinimizeWindow(IntPtr handle, AnimationStyle animation, bool enableAnimation);
void MoveWindow(IntPtr handle, int left, int top, int width, int height);
void MaximizeWindow(IntPtr handle);

View File

@@ -7,17 +7,17 @@ namespace EveOPreview.View
sealed class ThumbnailViewFactory : IThumbnailViewFactory
{
private readonly IApplicationController _controller;
private readonly bool _isCompatibilityModeEnabled;
private readonly bool _enableWineCompatibilityMode;
public ThumbnailViewFactory(IApplicationController controller, IThumbnailConfiguration configuration)
{
this._controller = controller;
this._isCompatibilityModeEnabled = configuration.EnableCompatibilityMode;
this._enableWineCompatibilityMode = configuration.EnableWineCompatibilityMode;
}
public IThumbnailView Create(IntPtr id, string title, Size size)
{
IThumbnailView view = this._isCompatibilityModeEnabled
IThumbnailView view = this._enableWineCompatibilityMode
? (IThumbnailView)this._controller.Create<StaticThumbnailView>()
: (IThumbnailView)this._controller.Create<LiveThumbnailView>();

View File

@@ -1,9 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>

View File

@@ -72,11 +72,14 @@
</dependentAssembly>
</dependency>
-->
<!--
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
-->
</assembly>