Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzo committed Jul 22, 2024
1 parent 5ac0918 commit c1ed3f1
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 74 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"HintPath",
"BonelabPath",
"BoneworksPath",
"LiveSplitPath",
"PostBuildEvent"
]
}
2 changes: 1 addition & 1 deletion SlzMods.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Project("{D4EFCE32-FB9C-666F-CB8A-DA081F9BDB07}") = "BonelabHundredStatus", "pro
EndProject
Project("{D4EFCE32-FB9C-666F-CB8A-DA081F9BDABC}") = "BoneworksDebugStats", "projects\LiveSplit\BoneworksDebugStats\BoneworksDebugStats.csproj", "{E782BFCA-90AA-A92F-22E9-85589F109ABC}"
EndProject
Project("{D4EFCE32-FB9C-666F-CB8A-DA081F9BDB08}") = "BoneworksHundredStatus", "projects\LiveSplit\BoneworksHundredStatus\BoneworksHundredStatus.csproj", "{E782BFCA-90AA-A92F-22E9-85589F10913C}"
Project("{D4EFCE32-FB9C-666F-CB8A-DA081F9BDB08}") = "BoneworksHundredStatus", "projects\LiveSplit\BoneworksHundredStatus\Project.csproj", "{E782BFCA-90AA-A92F-22E9-85589F10913C}"
EndProject
Project("{81FCC4E8-8A09-AD74-7CAB-31A3DCAD4264}") = "BonelabAmmoBugFix", "projects\Bonelab\AmmoBugFix\AmmoBugFix.csproj", "{59614574-AE6C-55D4-024A-21B97605D6F1}"
EndProject
Expand Down

This file was deleted.

22 changes: 22 additions & 0 deletions projects/LiveSplit/BoneworksHundredStatus/Project.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="BuildAll">
<Target Name="BuildAll">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Build"
Properties="Configuration=$(Configuration)" />
</Target>

<PropertyGroup>
<CopyIntoGameAfterBuild>true</CopyIntoGameAfterBuild>

<ProjectGuid>{EAE1410F-B5CF-47D6-8764-2FCAEE822C9D}</ProjectGuid>
</PropertyGroup>

<ItemGroup>
<Compile Include="AppVersion.cs" />
<Compile Include="src/**/*.cs" />
<Compile Include="../../../common/Utilities/Metadata.cs" />
<Compile Include="../../../common/Utilities/IpcClient.cs" />
<Compile Include="../../../common/Boneworks/HundredPercentState.cs" />
<Compile Include="../../../common/LiveSplit/Logger.cs" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Web.Script.Serialization;
using Sst.Common.Boneworks;
using Sst.Common.LiveSplit;

Expand All @@ -13,8 +13,10 @@ class BoneworksStateUpdater : IDisposable {
public Dictionary<string, int> LevelCollectableIndexes;

private readonly Common.Ipc.Client _client;
private readonly JavaScriptSerializer _serializer;

public BoneworksStateUpdater() {
_serializer = new JavaScriptSerializer();
_client = new Common.Ipc.Client(HundredPercentState.NAMED_PIPE);
_client.OnConnected += () => {
Log.Info("Connected");
Expand Down Expand Up @@ -57,7 +59,7 @@ private void OnMessage(string message) {

private HundredPercentState ParseLine(string line) {
try {
return JsonConvert.DeserializeObject<HundredPercentState>(line);
return _serializer.Deserialize<HundredPercentState>(line);
} catch (Exception err) {
Log.Error($"Error reading pipe message as JSON: {err.Message}");
return null;
Expand Down
89 changes: 89 additions & 0 deletions projects/LiveSplit/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<Project>

<PropertyGroup>
<IsNewProject Condition=" '$(MSBuildProjectName)' == 'Project' ">true</IsNewProject>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsNewProject)' == 'true' ">
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<TargetFramework>net472</TargetFramework>

<LiveSplitPath Condition=" !Exists('$(LiveSplitPath)') ">C:\Users\jakzo\Downloads\LiveSplit_1.8.28</LiveSplitPath>
<LiveSplitPath Condition=" !Exists('$(LiveSplitPath)') "></LiveSplitPath>

<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>default</LangVersion>
<IsPackable>false</IsPackable>
<NeutralLanguage>en-US</NeutralLanguage>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>

<DefineConstants>TRACE</DefineConstants>

<ComponentName>$([System.IO.Path]::GetFileName($(MSBuildProjectDirectory)))</ComponentName>
<RootNamespace>Sst.$(ComponentName)</RootNamespace>
<AssemblyName>$(ComponentName)</AssemblyName>
<OutputPath>bin\$(Configuration)\</OutputPath>
<OutputType>Library</OutputType>

<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
</PropertyGroup>

<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>

<PropertyGroup Condition=" '$(IsNewProject)' == 'true' and '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsNewProject)' == 'true' and '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<Target Name="CopyToGame" AfterTargets="PostBuildEvent"
Condition=" '$(IsNewProject)' == 'true' and '$(CopyIntoGameAfterBuild)' == 'true' and '$(GITHUB_ACTIONS)' != 'true' and '$(LiveSplitPath)' != '' ">
<Exec Condition=" '$(OS)' == 'Windows_NT' "
Command="COPY &quot;$(TargetPath)&quot; &quot;$(LiveSplitPath)\Components&quot;" />

<Exec Condition=" '$(OS)' != 'Windows_NT' "
Command="cp &quot;$(TargetPath)&quot; &quot;$(LiveSplitPath)/Components&quot;" />
</Target>

<ItemGroup Condition=" '$(IsNewProject)' == 'true' ">
<Reference
Include="..\..\..\references\LiveSplit\*.dll">
<HintPath>$(FullPath)</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>

</Project>

0 comments on commit c1ed3f1

Please sign in to comment.