Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Add csproj for Headless: Alternate implementation #35

Merged
merged 12 commits into from
Apr 24, 2022
4 changes: 4 additions & 0 deletions NeosModLoader.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Global
{D4627C7F-8091-477A-ABDC-F1465D94D8D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4627C7F-8091-477A-ABDC-F1465D94D8D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4627C7F-8091-477A-ABDC-F1465D94D8D9}.Release|Any CPU.Build.0 = Release|Any CPU
{4a54bcdf-0386-43fc-9aa5-d49ce7d33dd8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4a54bcdf-0386-43fc-9aa5-d49ce7d33dd8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4a54bcdf-0386-43fc-9aa5-d49ce7d33dd8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4a54bcdf-0386-43fc-9aa5-d49ce7d33dd8}.Release|Any CPU.Build.0 = Release|Any CPU
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these should be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b625478

EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
19 changes: 14 additions & 5 deletions NeosModLoader/NeosModLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NeosModLoader</RootNamespace>
<AssemblyTitle>NeosModLoader</AssemblyTitle>
<Headless Condition="'$(Headless)'==''">false</Headless>
Copy link
Member

@ljoonal ljoonal Apr 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since later on we're testing only against true and false (and ignoring the possibility that Headless might be "0" or "1" for example), would probably be a good to add a definition after this to set it to true if it is not exactly "false" to make sure that one of the two cases always matches?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 942b72c

<AssemblyName Condition="'$(Headless)'=='false'">NeosModLoader</AssemblyName>
<AssemblyName Condition="'$(Headless)'=='true'">NeosModLoaderHeadless</AssemblyName>
<AssemblyTitle>$(AssemblyName)</AssemblyTitle>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TargetFramework>net462</TargetFramework>
<FileAlignment>512</FileAlignment>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<Deterministic>true</Deterministic>
<CopyToLibraries Condition="'$(CopyToLibraries)'==''">true</CopyToLibraries>
<CopyToLibraries Condition="'$(CopyToLibraries)'=='' And '$(Headless)'=='false'">true</CopyToLibraries>
<CopyToLibraries Condition="'$(CopyToLibraries)'=='' And '$(Headless)'=='true'">false</CopyToLibraries>
<DebugSymbols Condition="'$(Configuration)'=='Release'">false</DebugSymbols>
<DebugType Condition="'$(Configuration)'=='Release'">None</DebugType>
</PropertyGroup>
Expand All @@ -24,18 +28,23 @@

<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" Condition="'$(Headless)'=='true'" />
<Reference Include="Newtonsoft.Json" Condition="'$(Headless)'=='false'">
<HintPath>$(NeosPath)Neos_Data\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="BaseX">
<HintPath>$(NeosPath)Neos_Data\Managed\BaseX.dll</HintPath>
</Reference>
<Reference Include="FrooxEngine">
<HintPath>$(NeosPath)Neos_Data\Managed\FrooxEngine.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(NeosPath)Neos_Data\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(CopyToLibraries)'=='true'">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(NeosPath)Libraries" />
<Message Text="Copied $(TargetFileName) to $(NeosPath)Libraries" Importance="high" />
</Target>

</Project>


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, multiple extra unnecessary empty lines

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 66c788d