fix compatibility with CringeLauncher
This commit is contained in:
44
.github/workflows/build.yml
vendored
Normal file
44
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
compute-version:
|
||||
name: Compute Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- id: version
|
||||
uses: paulhatch/semantic-version@v5.3.0
|
||||
with:
|
||||
tag_prefix: ''
|
||||
major_pattern: 'Add project files'
|
||||
minor_pattern: 'feature:'
|
||||
bump_each_commit: true
|
||||
enable_prerelease_mode: false
|
||||
|
||||
build-nuget:
|
||||
name: Build Nuget package
|
||||
runs-on: ubuntu-latest
|
||||
needs: [compute-version]
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
|
||||
- run: dotnet restore ./SeamlessClient.csproj --locked-mode
|
||||
name: Restore Project
|
||||
|
||||
- run: dotnet pack -c Release -o ./pub ./SeamlessClient.csproj --no-restore -p:Version="${{ needs.compute-version.outputs.version }}"
|
||||
name: Pack Project
|
||||
|
||||
- name: Push Project
|
||||
run: dotnet nuget push -s https://ng.zznty.ru/v3/index.json -k ${{ secrets.NUGET_API_KEY }} ./pub/*.nupkg
|
@@ -19,3 +19,7 @@ Simply install the plguin loader, and check this plugins box to be added to the
|
||||
|
||||
## Known issues
|
||||
Obviously this is not an issue free-system. Currently since im doing no mod unloading or loading there could be issues if your servers dont have the exact same mods, or the mods dont properly work right. Please do not swarm mod authors with faults if seamless doesnt play nice with it. ***Its not their fault*** its ***mine***. I will be trying to implement mod unloading and loading switching between servers, just no ETA.
|
||||
|
||||
|
||||
## Fork Changes
|
||||
This fork changes how components are loaded to be compatible with [CringeLauncher](https://git.zznty.ru/PvE/se-launcher).
|
@@ -1,4 +1,5 @@
|
||||
using HarmonyLib;
|
||||
using CringePlugins.Utils;
|
||||
using HarmonyLib;
|
||||
using NLog.Fluent;
|
||||
using Sandbox;
|
||||
using Sandbox.Game.Localization;
|
||||
@@ -33,7 +34,6 @@ namespace SeamlessClient
|
||||
public static ushort SeamlessClientNetId = 2936;
|
||||
|
||||
private List<ComponentBase> allComps = new List<ComponentBase>();
|
||||
private Assembly thisAssembly => typeof(Seamless).Assembly;
|
||||
private bool Initilized = false;
|
||||
public static bool isSeamlessServer { get; private set; } = false;
|
||||
public static bool isDebug = false;
|
||||
@@ -56,11 +56,9 @@ namespace SeamlessClient
|
||||
private void GetComponents()
|
||||
{
|
||||
int failedCount = 0;
|
||||
foreach (Type type in thisAssembly.GetTypes())
|
||||
foreach (Type type in IntrospectionContext.Global.CollectDerivedTypes<ComponentBase>(typeof(Seamless).Module))
|
||||
{
|
||||
|
||||
if (type.BaseType != typeof(ComponentBase))
|
||||
continue;
|
||||
|
||||
try
|
||||
{
|
||||
|
@@ -1,135 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{883B492D-823E-4CC3-BD35-07FEF06F8359}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SeamlessClient</RootNamespace>
|
||||
<AssemblyName>SeamlessClient</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony, Version=2.3.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Lib.Harmony.2.3.3\lib\net48\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>GameBinaries\NLog.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ProtoBuf.Net">
|
||||
<HintPath>GameBinaries\ProtoBuf.Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ProtoBuf.Net.Core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>GameBinaries\ProtoBuf.Net.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Sandbox.Common">
|
||||
<HintPath>GameBinaries\Sandbox.Common.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Sandbox.Game">
|
||||
<HintPath>GameBinaries\Sandbox.Game.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Sandbox.Game.XmlSerializers">
|
||||
<HintPath>GameBinaries\Sandbox.Game.XmlSerializers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Sandbox.Graphics">
|
||||
<HintPath>GameBinaries\Sandbox.Graphics.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SpaceEngineers.Game">
|
||||
<HintPath>GameBinaries\SpaceEngineers.Game.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="VRage">
|
||||
<HintPath>GameBinaries\VRage.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VRage.Game">
|
||||
<HintPath>GameBinaries\VRage.Game.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VRage.Input">
|
||||
<HintPath>GameBinaries\VRage.Input.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VRage.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
|
||||
<Reference Include="VRage.Math">
|
||||
<HintPath>GameBinaries\VRage.Math.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="VRage.Render">
|
||||
<HintPath>GameBinaries\VRage.Render.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Components\EntityPerformanceImprovements.cs" />
|
||||
<Compile Include="Components\LoadingScreenComponent.cs" />
|
||||
<Compile Include="Components\MyGUIScreenMedicalsPatch.cs" />
|
||||
<Compile Include="Components\MyHudTimeTracker.cs" />
|
||||
<Compile Include="Components\ServerSwitcherComponentOLD.cs" />
|
||||
<Compile Include="GUI\Screens\GUILoadingScreen.cs" />
|
||||
<Compile Include="Messages\OnlinePlayerData.cs" />
|
||||
<Compile Include="Utilities\UtilExtensions.cs" />
|
||||
<Compile Include="Utilities\PatchUtils.cs" />
|
||||
<Compile Include="Messages\ClientMessage.cs" />
|
||||
<Compile Include="Messages\TransferData.cs" />
|
||||
<Compile Include="Messages\WorldRequestData.cs" />
|
||||
<Compile Include="OnlinePlayersWindow\OnlineNexusPlayersWindow.cs" />
|
||||
<Compile Include="Components\PlayersWindowComponent.cs" />
|
||||
<Compile Include="Seamless.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Components\ServerSwitcherComponent.cs" />
|
||||
<Compile Include="Utilities\AsyncInvoke.cs" />
|
||||
<Compile Include="Utilities\MessageUtils.cs" />
|
||||
<Compile Include="Utilities\ComponentBase.cs" />
|
||||
<Compile Include="Utilities\Types.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="SetupSolution.bat">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="ServerSwitching\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SeamlessClient.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<Nullable>disable</Nullable>
|
||||
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||
<PackageType>CringePlugin</PackageType>
|
||||
<RestoreAdditionalProjectSources>https://ng.zznty.ru/v3/index.json</RestoreAdditionalProjectSources>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Authors>Casimir</Authors>
|
||||
<PackageId>Plugin.Casimir255.SeamlessClient</PackageId>
|
||||
<AssemblyName>Plugin.Casimir255.SeamlessClient</AssemblyName>
|
||||
<Title>Nexus Seamless Switcher</Title>
|
||||
<Description>This plugin allows seamless transfers between Nexus enabled servers. Some mods or plugins may not play nice with switching between servers. Be cautious when using!</Description>
|
||||
<PackageProjectUrl>https://git.zznty.ru/PvE/SeamlessClient</PackageProjectUrl>
|
||||
<RepositoryUrl>https://git.zznty.ru/PvE/SeamlessClient</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CringePlugins" Version="*" ExcludeAssets="runtime; native"/>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" ExcludeAssets="runtime; native" PrivateAssets="all"/>
|
||||
<PackageReference Include="Steamworks.NET" Version="20.1.0" ExcludeAssets="runtime; native" PrivateAssets="all"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name="CopyFiles" AfterTargets="PostBuildEvent">
|
||||
<PropertyGroup>
|
||||
<AppdataPath>$([System.Environment]::GetFolderPath(SpecialFolder.ApplicationData))</AppdataPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<OutputFiles Include="$(OutputPath)\*"/>
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(OutputFiles)" DestinationFolder="$(AppdataPath)\CringeLauncher\plugins\$(ProjectName)" OverwriteReadOnlyFiles="true"/>
|
||||
</Target>
|
||||
|
||||
|
||||
</Project>
|
Reference in New Issue
Block a user