updated project files and created scripts

This commit is contained in:
2025-12-27 00:00:15 +05:00
parent 7c4c0d4776
commit 46d99f5baf
13 changed files with 172 additions and 190 deletions

View File

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

View File

@@ -1,38 +1,58 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VRage.Plugins;
using SpaceEngineers;
using System.IO;
using System.Reflection;
using System.Threading;
using DTLib.Demystifier;
namespace UplinkLauncher;
namespace Lunar.UplinkLauncher
internal static class UplinkLauncher
{
internal class UplinkLauncher
public static readonly string PluginsLocalDir = "Plugins\\Local";
public static void Main(string[] args)
{
public static int Main(string[] args)
try
{
string exeLocation = Path.GetDirectoryName(Path.GetFullPath(Assembly.GetExecutingAssembly().Location));
Console.WriteLine("Starting Uplink SE");
Console.WriteLine(new string('-', Console.WindowWidth));
//MANUALLY ADDED, REMOVE LATER
string[] enabledPlugins =
{
"ModelSwap.dll",
"DontTellMeWhatToBuild.dll"
};
List<string> plugins = new List<string>();
//MANUALLY ADDED, REMOVE LATER
plugins.Add("C:\\Users\\Lunar\\Games\\Steam\\steamapps\\common\\SpaceEngineers\\Bin64\\Plugins\\Local\\ModelSwap.dll");
plugins.Add("C:\\Users\\Lunar\\Games\\Steam\\steamapps\\common\\SpaceEngineers\\Bin64\\Plugins\\Local\\DontTellMeWhatToBuild.dll");
if (!Directory.Exists(PluginsLocalDir))
Directory.CreateDirectory(PluginsLocalDir);
foreach (string plugin in enabledPlugins)
{
Console.WriteLine("Adding plugin: " + plugin);
plugins.Add(Path.GetFullPath(Path.Combine(PluginsLocalDir, plugin)));
}
MyPlugins.RegisterUserAssemblyFiles(plugins);
string appIdFile = Path.Combine(exeLocation, "steam_appid.txt");
// why this file isn't created automatically?
// how game handles this without this magnificent launcher???
string appIdFile = "steam_appid.txt";
if (!File.Exists(appIdFile))
{
Console.WriteLine($"Could not find '{appIdFile}', creating new file");
File.WriteAllText(appIdFile, "244850");
}
// finally start ze game!!!
MyProgram.Main(args);
return 0;
}
catch (Exception e)
{
Console.WriteLine("Crashed with exception:");
Console.WriteLine(e.ToStringDemystified());
Console.WriteLine("\nPress enter to exit...");
Console.ReadLine();
}
}
}
}

View File

@@ -1,77 +1,39 @@
<?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')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2534AAEB-1F27-43F9-86C5-A1726DACB98D}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Lunar.UplinkLauncher</RootNamespace>
<AssemblyName>UplinkLauncher</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</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>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputType>Exe</OutputType>
<TargetFramework>net48</TargetFramework>
<Configurations>Release;Debug</Configurations>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>UplinkSE_logo.ico</ApplicationIcon>
<LangVersion>latest</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>..\UplinkSE_logo.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Include="App.config" />
<PackageReference Include="DTLib.Demystifier" Version="1.1.1" />
<PackageReference Include="Lib.Harmony" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<Compile Include="UplinkLauncher.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="UplinkSE_logo.ico" />
</ItemGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\..\SpaceEngineersLauncher\Bin64\0Harmony.dll</HintPath>
<Reference Include="..\Bin64\Sandbox.Game.dll">
<Private>false</Private>
</Reference>
<Reference Include="Sandbox.Game, Version=0.1.1.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Bin64\Sandbox.Game.dll</HintPath>
<Reference Include="..\Bin64\SpaceEngineers.exe">
<Private>false</Private>
</Reference>
<Reference Include="SpaceEngineers, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Bin64\SpaceEngineers.exe</HintPath>
<Reference Include="..\Bin64\SpaceEngineers.Game.dll">
<Private>false</Private>
</Reference>
<Reference Include="SpaceEngineers.Game, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Bin64\SpaceEngineers.Game.dll</HintPath>
</Reference>
<Reference Include="Steamworks.NET, Version=20.1.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Bin64\Steamworks.NET.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="VRage, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Bin64\VRage.dll</HintPath>
<Reference Include="..\Bin64\VRage.dll">
<Private>false</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB