Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event samples #84

Merged
merged 5 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 40 additions & 68 deletions OmsiExtensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,109 +17,81 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OmsiHookRPCPlugin", "OmsiHo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BasicCLI", "_OmsiHookExamples\BasicCLI\BasicCLI.csproj", "{BA833C68-E8BD-4C86-9555-85542DF02015}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TriggersSample", "_OmsiHookExamples\TriggersSample\TriggersSample.csproj", "{8950E419-6895-46E4-8CBE-68E24844D644}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventSample", "_OmsiHookExamples\EventSample\EventSample.csproj", "{47659503-9923-4E74-AD26-103C1F9FF2B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{58156BDC-C261-460F-B8BA-749E994CC743}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{3F0BF441-D76C-4E0D-A5A8-B20895438EA5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TriggersSample", "_OmsiHookExamples\TriggersSample\TriggersSample.csproj", "{1DF326AE-4D10-4545-B36A-5622B76987EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
ReleaseAndDocs|x86 = ReleaseAndDocs|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Debug|Any CPU.ActiveCfg = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Debug|Any CPU.Build.0 = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Debug|x64.ActiveCfg = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Debug|x64.Build.0 = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Debug|x86.ActiveCfg = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Debug|x86.Build.0 = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Release|Any CPU.ActiveCfg = Release|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Release|Any CPU.Build.0 = Release|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Release|x64.ActiveCfg = Release|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Release|x86.ActiveCfg = Release|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.Release|x86.Build.0 = Release|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|Any CPU.ActiveCfg = Debug|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|Any CPU.Build.0 = Debug|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|x64.ActiveCfg = Debug|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|x64.Build.0 = Debug|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|x86.ActiveCfg = Debug|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|x86.Build.0 = Debug|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|Any CPU.ActiveCfg = Release|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|Any CPU.Build.0 = Release|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|x64.ActiveCfg = Release|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|x64.Build.0 = Release|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|x86.ActiveCfg = Release|Any CPU
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|x86.Build.0 = Release|Any CPU
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Debug|Any CPU.ActiveCfg = Debug|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Debug|Any CPU.Build.0 = Debug|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Debug|x64.ActiveCfg = Debug|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.ReleaseAndDocs|x86.ActiveCfg = ReleaseAndDocs|x86
{2E750CBE-F868-4AB7-96C2-27560F53E06B}.ReleaseAndDocs|x86.Build.0 = ReleaseAndDocs|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|x86.ActiveCfg = Debug|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Debug|x86.Build.0 = Debug|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|x86.ActiveCfg = Release|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.Release|x86.Build.0 = Release|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{28DA0165-EAA7-4171-A065-319409682BD1}.ReleaseAndDocs|x86.Build.0 = Release|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Debug|x86.ActiveCfg = Debug|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Release|Any CPU.ActiveCfg = Release|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Release|x64.ActiveCfg = Release|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Debug|x86.Build.0 = Debug|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Release|x86.ActiveCfg = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Debug|Any CPU.ActiveCfg = Debug|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Debug|Any CPU.Build.0 = Debug|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Debug|x64.ActiveCfg = Debug|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Debug|x64.Build.0 = Debug|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.Release|x86.Build.0 = Release|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{FDA9A525-9722-46D3-B80C-8D2A76ABCA2D}.ReleaseAndDocs|x86.Build.0 = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Debug|x86.ActiveCfg = Debug|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Debug|x86.Build.0 = Debug|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Release|Any CPU.ActiveCfg = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Release|Any CPU.Build.0 = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Release|x64.ActiveCfg = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Release|x86.ActiveCfg = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.Release|x86.Build.0 = Release|x86
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Debug|Any CPU.ActiveCfg = Debug|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Debug|Any CPU.Build.0 = Debug|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Debug|x64.ActiveCfg = Debug|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Debug|x64.Build.0 = Debug|Win32
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{D5CA6EEA-D436-456E-BCA5-34C3DFD5BFC7}.ReleaseAndDocs|x86.Build.0 = Release|x86
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Debug|x86.ActiveCfg = Debug|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Debug|x86.Build.0 = Debug|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Release|Any CPU.ActiveCfg = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Release|Any CPU.Build.0 = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Release|x64.ActiveCfg = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Release|x86.ActiveCfg = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.Release|x86.Build.0 = Release|Win32
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|Any CPU.ActiveCfg = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|Any CPU.Build.0 = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|x64.ActiveCfg = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|x64.Build.0 = Debug|x86
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.ReleaseAndDocs|x86.ActiveCfg = Release|Win32
{CBCB99EF-DD1A-4D4D-A9A8-9BF251FDCD1B}.ReleaseAndDocs|x86.Build.0 = Release|Win32
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|x86.ActiveCfg = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Debug|x86.Build.0 = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Release|Any CPU.ActiveCfg = Release|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Release|Any CPU.Build.0 = Release|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Release|x64.ActiveCfg = Release|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Release|x86.ActiveCfg = Release|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.Release|x86.Build.0 = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Debug|Any CPU.ActiveCfg = Debug|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Debug|Any CPU.Build.0 = Debug|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Debug|x64.ActiveCfg = Debug|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Debug|x64.Build.0 = Debug|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{CDB17143-5653-48BE-AAC8-8419D5B4FD2C}.ReleaseAndDocs|x86.Build.0 = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Debug|x86.ActiveCfg = Debug|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Debug|x86.Build.0 = Debug|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Release|Any CPU.ActiveCfg = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Release|Any CPU.Build.0 = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Release|x64.ActiveCfg = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Release|x64.Build.0 = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Release|x86.ActiveCfg = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.Release|x86.Build.0 = Release|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Debug|Any CPU.ActiveCfg = Debug|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Debug|Any CPU.Build.0 = Debug|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Debug|x64.ActiveCfg = Debug|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Debug|x86.ActiveCfg = Debug|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Release|Any CPU.ActiveCfg = Release|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Release|x64.ActiveCfg = Release|x86
{8950E419-6895-46E4-8CBE-68E24844D644}.Release|x86.ActiveCfg = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{BA833C68-E8BD-4C86-9555-85542DF02015}.ReleaseAndDocs|x86.Build.0 = Release|x86
{47659503-9923-4E74-AD26-103C1F9FF2B0}.Debug|x86.ActiveCfg = Debug|x86
{47659503-9923-4E74-AD26-103C1F9FF2B0}.Debug|x86.Build.0 = Debug|x86
{47659503-9923-4E74-AD26-103C1F9FF2B0}.Release|x86.ActiveCfg = Release|x86
{47659503-9923-4E74-AD26-103C1F9FF2B0}.Release|x86.Build.0 = Release|x86
{47659503-9923-4E74-AD26-103C1F9FF2B0}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{47659503-9923-4E74-AD26-103C1F9FF2B0}.ReleaseAndDocs|x86.Build.0 = Release|x86
{1DF326AE-4D10-4545-B36A-5622B76987EC}.Debug|x86.ActiveCfg = Debug|x86
{1DF326AE-4D10-4545-B36A-5622B76987EC}.Debug|x86.Build.0 = Debug|x86
{1DF326AE-4D10-4545-B36A-5622B76987EC}.Release|x86.ActiveCfg = Release|x86
{1DF326AE-4D10-4545-B36A-5622B76987EC}.Release|x86.Build.0 = Release|x86
{1DF326AE-4D10-4545-B36A-5622B76987EC}.ReleaseAndDocs|x86.ActiveCfg = Release|x86
{1DF326AE-4D10-4545-B36A-5622B76987EC}.ReleaseAndDocs|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BA833C68-E8BD-4C86-9555-85542DF02015} = {58156BDC-C261-460F-B8BA-749E994CC743}
{8950E419-6895-46E4-8CBE-68E24844D644} = {58156BDC-C261-460F-B8BA-749E994CC743}
{BA833C68-E8BD-4C86-9555-85542DF02015} = {3F0BF441-D76C-4E0D-A5A8-B20895438EA5}
{47659503-9923-4E74-AD26-103C1F9FF2B0} = {3F0BF441-D76C-4E0D-A5A8-B20895438EA5}
{1DF326AE-4D10-4545-B36A-5622B76987EC} = {3F0BF441-D76C-4E0D-A5A8-B20895438EA5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A5F55305-C8FF-444C-9B98-FD487ADC583A}
Expand Down
7 changes: 6 additions & 1 deletion OmsiExtensionsCLI/OmsiExtensionsCLI.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
<Platforms>x86</Platforms>
<ApplicationIcon>favicon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\OmsiHook\OmsiHook.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="favicon.ico" />
</ItemGroup>

</Project>
Binary file added OmsiExtensionsCLI/favicon.ico
Binary file not shown.
9 changes: 5 additions & 4 deletions OmsiHook/OmsiHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class OmsiHook
/// <remarks>
/// <inheritdoc cref="OnOmsiExited"/>
/// </remarks>
public event EventHandler OnMapChange;
public event EventHandler<OmsiMap> OnMapChange;
/// <summary>
/// An event raised when Omsi has loaded or unloaded a new map. The <c>EventArgs</c> is a boolean representing whether the map is loaded.
///
Expand Down Expand Up @@ -149,7 +149,7 @@ public D3DTexture CreateTextureObject()
return new D3DTexture(omsiMemory, 0);
}

private void OmsiHook_OnMapChange(object sender, EventArgs e)
private void OmsiHook_OnMapChange(object sender, OmsiMap e)
{
Task.Run(() => {
while(!isD3DReady)
Expand All @@ -173,8 +173,9 @@ private void OmsiHook_OnOmsiGotD3DContext(object sender, EventArgs e)
[Obsolete("This will be obselete once TMyOMSIList is wrapped! The list of vehicles will be moved to OmsiGlobals.")]
public OmsiRoadVehicleInst GetRoadVehicleInst(int index)
{
// TODO: A More permanant fix should be done at some point.
var vehPtr = GetListItem(0x00861508, index);
return vehPtr == 0 ? null : new OmsiRoadVehicleInst(omsiMemory, vehPtr);
return vehPtr < 1000 ? null : new OmsiRoadVehicleInst(omsiMemory, vehPtr);
}

/// <summary>
Expand Down Expand Up @@ -222,7 +223,7 @@ private void MonitorStateTask()
if(lastMapState != currentMapName)
{
if(currentMapName != 0)
OnMapChange?.Invoke(this, new());
OnMapChange?.Invoke(this, Globals.Map);
lastMapState = currentMapName;
}
if(lastMapLoaded != currentMapLoaded)
Expand Down
52 changes: 34 additions & 18 deletions OmsiHook/OmsiHook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<Authors>Thomas Mathieson et al</Authors>
<Copyright>Copyright Thomas Mathieson 2023 all rights reserved</Copyright>
<Copyright>Copyright Thomas Mathieson 2022-2024 all rights reserved</Copyright>
<PackageProjectUrl>https://github.com/space928/Omsi-Extensions</PackageProjectUrl>
<RepositoryUrl>https://github.com/space928/Omsi-Extensions</RepositoryUrl>
<PackageLicenseFile></PackageLicenseFile>
<Description>OmsiHook is a simple library for hooking into Omsi's memory for modding.</Description>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>2.4.3.1</AssemblyVersion>
<FileVersion>2.4.3.1</FileVersion>
<Version>2.4.3</Version>
<AssemblyVersion>2.4.4.1</AssemblyVersion>
<FileVersion>2.4.4.1</FileVersion>
<Version>2.4.4</Version>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<SignAssembly>False</SignAssembly>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -22,18 +22,34 @@
<Nullable>disable</Nullable>
<Platforms>x86</Platforms>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<Configurations>Debug;Release;ReleaseAndDocs</Configurations>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" />

<PropertyGroup>
<BuildDocFx>true</BuildDocFx>
<DocfxConfigFile>$(MSBuildProjectDirectory)/docs/docfx.json</DocfxConfigFile>
<PreviewOutputFolder>$(MSBuildProjectDirectory)/docs/_site</PreviewOutputFolder>
<MetadataOutputFolder>$(MSBuildProjectDirectory)/docs</MetadataOutputFolder>
<LogFile>$(MSBuildProjectDirectory)/docs/docfx_log.txt</LogFile>
<LogLevel>Info</LogLevel>
</PropertyGroup>

<!--Handle all the ReleaseAndDocs specific config. Beware when using the project properties editor, as it might accidentally mess up this bit of the csproj...-->
<Choose>
<When Condition="'$(Configuration)'!='ReleaseAndDocs'">
<PropertyGroup>
<_ConfigurationNormalized>$(Configuration)</_ConfigurationNormalized>
<BuildDocFx>false</BuildDocFx>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<_ConfigurationNormalized>Release</_ConfigurationNormalized>
<OutDir>$(MSBuildProjectDirectory)/bin/$(Platform)/Release/$(TargetFramework)/</OutDir>
<PackageOutputPath>$(MSBuildProjectDirectory)/bin/$(Platform)/Release/</PackageOutputPath>

<BuildDocFx>true</BuildDocFx>
<DocfxConfigFile>$(MSBuildProjectDirectory)/docs/docfx.json</DocfxConfigFile>
<PreviewOutputFolder>$(MSBuildProjectDirectory)/docs/_site</PreviewOutputFolder>
<MetadataOutputFolder>$(MSBuildProjectDirectory)/docs</MetadataOutputFolder>
<LogFile>$(MSBuildProjectDirectory)/docs/docfx_log.txt</LogFile>
<LogLevel>Info</LogLevel>
</PropertyGroup>
</Otherwise>
</Choose>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
Expand All @@ -45,22 +61,22 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\$(Configuration)\OmsiHookInvoker.dll" Link="OmsiHookInvoker.dll">
<None Include="..\$(_ConfigurationNormalized)\OmsiHookInvoker.dll" Link="OmsiHookInvoker.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>True</Pack>
<PackagePath>\lib\net6.0</PackagePath>
</None>
<None Include="..\OmsiHookRPCPlugin\bin\x86\$(Configuration)\$(TargetFramework)\OmsiHookRPCPlugin.dll" Link="OmsiHookRPCPlugin.dll">
<None Include="..\OmsiHookRPCPlugin\bin\x86\$(_ConfigurationNormalized)\$(TargetFramework)\OmsiHookRPCPlugin.dll" Link="OmsiHookRPCPlugin.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>True</Pack>
<PackagePath>\lib\net6.0</PackagePath>
</None>
<None Include="..\OmsiHookRPCPlugin\bin\x86\$(Configuration)\$(TargetFramework)\OmsiHookRPCPluginNE.dll" Link="OmsiHookRPCPluginNE.dll">
<None Include="..\OmsiHookRPCPlugin\bin\x86\$(_ConfigurationNormalized)\$(TargetFramework)\OmsiHookRPCPluginNE.dll" Link="OmsiHookRPCPluginNE.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>True</Pack>
<PackagePath>\lib\net6.0</PackagePath>
</None>
<None Include="..\OmsiHookRPCPlugin\bin\x86\$(Configuration)\$(TargetFramework)\OmsiHookRPCPlugin.opl" Link="OmsiHookRPCPlugin.opl">
<None Include="..\OmsiHookRPCPlugin\bin\x86\$(_ConfigurationNormalized)\$(TargetFramework)\OmsiHookRPCPlugin.opl" Link="OmsiHookRPCPlugin.opl">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>True</Pack>
<PackagePath>\lib\net6.0</PackagePath>
Expand All @@ -85,7 +101,7 @@

<!--Hack to fix docfx build bug... For some reason sometimes docfx tries to load the wrong version of System.Memory.dll; as
a workaround we can delete docfx's copy of System.Memory.dll and let it use MSBuild's one which *should* work.-->
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)'=='ReleaseAndDocs'">
<Exec Command="set &quot;DocFXMemory=$(Pkgdocfx_console)\tools\System.Memory.dll&quot;&#xD;&#xA;if exist &quot;%25DocFXMemory%25&quot; (&#xD;&#xA; echo &quot;Applying docfx build workaround (deleting docfx's copy of System.Memory.dll)...&quot;&#xD;&#xA; del /q &quot;%25DocFXMemory%25&quot;&#xD;&#xA;) else (&#xD;&#xA; echo &quot;DBG: File doesn't exist %25DocFXMemory%25&quot;&#xD;&#xA;)" />
</Target>

Expand Down
Loading