updated project files and created scripts
This commit is contained in:
22
.gitignore
vendored
22
.gitignore
vendored
@@ -11,16 +11,30 @@ x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
.bin/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Oo]ut/
|
||||
[Nn]uget/
|
||||
|
||||
# Temporary files
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
*.log
|
||||
[Tt]emp/
|
||||
[Tt]mp/
|
||||
*.tmp
|
||||
*.temp
|
||||
.old*/
|
||||
old/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
# IDE files
|
||||
.vs/
|
||||
.idea/
|
||||
.editorconfig
|
||||
*.user
|
||||
*.vcxproj.filters
|
||||
|
||||
#/Bin64/ symlink
|
||||
[Bb]in64/
|
||||
|
||||
#Files
|
||||
*.bat
|
||||
[Bb]in64
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 |
31
UplinkSE.sln
31
UplinkSE.sln
@@ -7,20 +7,31 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UplinkSE", "UplinkSE\Uplink
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UplinkLauncher", "UplinkLauncher\UplinkLauncher.csproj", "{2534AAEB-1F27-43F9-86C5-A1726DACB98D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFolder", "SolutionFolder", "{F9D624C2-7460-4672-AA31-1E8887084041}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
README.md = README.md
|
||||
UplinkSE_logo.ico = UplinkSE_logo.ico
|
||||
UplinkSE_logo.png = UplinkSE_logo.png
|
||||
install.sh = install.sh
|
||||
launch.sh = launch.sh
|
||||
build.sh = build.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Debug|x64 = Debug|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Release|x64.ActiveCfg = Release|x64
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Release|x64.Build.0 = Release|x64
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2534AAEB-1F27-43F9-86C5-A1726DACB98D}.Debug|x64.Build.0 = Debug|x64
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Release|x64.ActiveCfg = Release|x64
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Release|x64.Build.0 = Release|x64
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{28965A64-C9EC-4168-82E2-AE66B5D8A29F}.Debug|x64.Build.0 = Debug|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -1,13 +1,8 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using VRage.Plugins;
|
||||
|
||||
namespace Lunar.Uplink
|
||||
{
|
||||
namespace UplinkSE;
|
||||
|
||||
internal class UplinkSE : IHandleInputPlugin
|
||||
{
|
||||
public void Init(object gameInstance)
|
||||
@@ -30,4 +25,3 @@ namespace Lunar.Uplink
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,68 +1,37 @@
|
||||
<?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>{28965A64-C9EC-4168-82E2-AE66B5D8A29F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Lunar.Uplink</RootNamespace>
|
||||
<AssemblyName>UplinkSE</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' ">
|
||||
<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>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<PackageReference Include="Lib.Harmony" Version="2.4.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="UplinkSE.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="UplinkSE_logo.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\Bin64\0Harmony.dll</HintPath>
|
||||
<Reference Include="..\Bin64\Sandbox.Game.dll">
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="Sandbox.Game">
|
||||
<HintPath>..\Bin64\Sandbox.Game.dll</HintPath>
|
||||
<Reference Include="..\Bin64\SpaceEngineers.exe">
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="SpaceEngineers">
|
||||
<HintPath>..\Bin64\SpaceEngineers.exe</HintPath>
|
||||
<Reference Include="..\Bin64\SpaceEngineers.Game.dll">
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
<Reference Include="SpaceEngineers.Game">
|
||||
<HintPath>..\Bin64\SpaceEngineers.Game.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="VRage">
|
||||
<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 |
8
build.sh
Executable file
8
build.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
BUILD_PATH="bin"
|
||||
rm -rf "$BUILD_PATH"
|
||||
dotnet publish "UplinkLauncher/UplinkLauncher.csproj" -o "$BUILD_PATH" \
|
||||
-c Debug --arch x64
|
||||
tree -h bin
|
||||
10
install.sh
Executable file
10
install.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
# symlink to ???/SpaceEngineers/Bin64
|
||||
GAME_BIN64_PATH="Bin64"
|
||||
BUILD_PATH="bin"
|
||||
|
||||
for f in $(find "$BUILD_PATH" -type f); do
|
||||
cp -v "$f" "$GAME_BIN64_PATH"
|
||||
done
|
||||
Reference in New Issue
Block a user