Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,8 @@ paket-files/
# JetBrains Rider
.idea/
*.sln.iml


# Binaries
TorchBinaries
GameBinaries
25 changes: 25 additions & 0 deletions Essentials.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.8
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials", "Essentials\Essentials.csproj", "{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|x64.ActiveCfg = Debug|x64
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Debug|x64.Build.0 = Debug|x64
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|x64.ActiveCfg = Release|x64
{A4C5FC37-5848-4A75-8CDC-4A1ADB2E01A2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5A14432-44BA-480B-8B20-1AC78BEF79BC}
EndGlobalSection
EndGlobal
73 changes: 48 additions & 25 deletions Essentials/Essentials.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<OutputPath>$(SolutionDir)\bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<OutputPath>$(SolutionDir)\bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Expand All @@ -30,27 +30,34 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>packages\NLog.4.4.11\lib\net45\NLog.dll</HintPath>
<HintPath>..\packages\NLog.4.4.12\lib\net45\NLog.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Sandbox.Common">
<HintPath>..\..\Torch\GameBinaries\Sandbox.Common.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Common.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sandbox.Game">
<HintPath>..\..\Torch\GameBinaries\Sandbox.Game.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Game.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sandbox.Graphics">
<HintPath>..\..\Torch\GameBinaries\Sandbox.Graphics.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\Sandbox.Graphics.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SpaceEngineers.Game">
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.Game.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.Game.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SpaceEngineers.ObjectBuilders">
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.ObjectBuilders.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SpaceEngineers.ObjectBuilders.XmlSerializers">
<HintPath>..\..\Torch\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\SpaceEngineers.ObjectBuilders.XmlSerializers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -63,52 +70,68 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Torch">
<HintPath>..\..\Torch\bin\x64\Release\Torch.dll</HintPath>
<HintPath>$(SolutionDir)\TorchBinaries\Torch.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Torch.API">
<HintPath>..\..\Torch\bin\x64\Release\Torch.API.dll</HintPath>
<HintPath>$(SolutionDir)\TorchBinaries\Torch.API.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Torch.Server">
<HintPath>..\..\Torch\bin\x64\Release\Torch.Server.exe</HintPath>
<HintPath>$(SolutionDir)\TorchBinaries\Torch.Server.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage">
<HintPath>..\..\Torch\GameBinaries\VRage.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Audio">
<HintPath>..\..\Torch\GameBinaries\VRage.Audio.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Audio.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Dedicated">
<HintPath>..\..\Torch\GameBinaries\VRage.Dedicated.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Dedicated.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Game">
<HintPath>..\..\Torch\GameBinaries\VRage.Game.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Game.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Game.XmlSerializers">
<HintPath>..\..\Torch\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Game.XmlSerializers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Input">
<HintPath>..\..\Torch\GameBinaries\VRage.Input.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Input.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Library">
<HintPath>..\..\Torch\GameBinaries\VRage.Library.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Library.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Math">
<HintPath>..\..\Torch\GameBinaries\VRage.Math.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Math.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Native">
<HintPath>..\..\Torch\GameBinaries\VRage.Native.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Native.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.OpenVRWrapper">
<HintPath>..\..\Torch\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.OpenVRWrapper.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Render">
<HintPath>..\..\Torch\GameBinaries\VRage.Render.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Render.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Render11">
<HintPath>..\..\Torch\GameBinaries\VRage.Render11.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Render11.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VRage.Scripting">
<HintPath>..\..\Torch\GameBinaries\VRage.Scripting.dll</HintPath>
<HintPath>$(SolutionDir)\GameBinaries\VRage.Scripting.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Essentials/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.4.11" targetFramework="net461" />
<package id="NLog" version="4.4.12" targetFramework="net461" />
</packages>
22 changes: 22 additions & 0 deletions Jenkins/jenkins-grab-se.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pushd

$steamData = "C:/Steam/Data/"
$steamCMDPath = "C:/Steam/steamcmd/"
$steamCMDZip = "C:/Steam/steamcmd.zip"

Add-Type -AssemblyName System.IO.Compression.FileSystem

if (!(Test-Path $steamData)) {
mkdir "$steamData"
}
if (!(Test-Path $steamCMDPath)) {
if (!(Test-Path $steamCMDZip)) {
(New-Object System.Net.WebClient).DownloadFile("https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip", "$steamCMDZip");
}
[System.IO.Compression.ZipFile]::ExtractToDirectory($steamCMDZip, $steamCMDPath)
}

cd "$steamData"
& "$steamCMDPath/steamcmd.exe" "+login anonymous" "+force_install_dir $steamData" "+app_update 298740" "+quit"

popd
67 changes: 67 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
def test_with_torch(branch)
{
try {
stage('Acquire Torch ' + branch) {
bat 'IF EXIST TorchBinaries RMDIR /S /Q TorchBinaries'
bat 'mkdir TorchBinaries'
step([$class: 'CopyArtifact', projectName: "Torch/Torch/${branch}", filter: "**/Torch*.dll", flatten: true, fingerprintArtifacts: true, target: "TorchBinaries"])
step([$class: 'CopyArtifact', projectName: "Torch/Torch/${branch}", filter: "**/Torch*.exe", flatten: true, fingerprintArtifacts: true, target: "TorchBinaries"])
}

stage('Build + Torch ' + branch) {
bat "\"${tool 'MSBuild'}msbuild\" Essentials.sln /p:Configuration=Release /p:Platform=x64 /t:Clean"
// bat "\"${tool 'MSBuild'}msbuild\" Essentials.sln /p:Configuration=Release /p:Platform=x64 /t:TransformOnBuild"
bat "\"${tool 'MSBuild'}msbuild\" Essentials.sln /p:Configuration=Release /p:Platform=x64"
}

/*
stage('Test + Torch ' + branch) {
bat 'IF NOT EXIST reports MKDIR reports'
bat "\"packages/xunit.runner.console.2.2.0/tools/xunit.console.exe\" \"bin-test/x64/Release/Essentials.Tests.dll\" -parallel none -xml \"reports/Essentials.Tests.xml\""
step([
$class: 'XUnitBuilder',
thresholdMode: 1,
thresholds: [[$class: 'FailedThreshold', failureThreshold: '1']],
tools: [[
$class: 'XUnitDotNetTestType',
deleteOutputFiles: true,
failIfNotNew: true,
pattern: 'reports/*.xml',
skipNoTestFiles: false,
stopProcessingIfError: true
]]
])
}
*/
return true
} catch (e) {
return false
}
}

node {
stage('Checkout') {
checkout scm
}

stage('Acquire SE') {
bat 'powershell -File Jenkins/jenkins-grab-se.ps1'
bat 'IF EXIST GameBinaries RMDIR GameBinaries'
bat 'mklink /J GameBinaries "C:/Steam/Data/DedicatedServer64/"'
}

stage('Acquire NuGet Packages') {
bat 'nuget restore Essentials.sln'
}

resultMaster = test_with_torch("master")
resultStaging = test_with_torch("staging")
if (resultMaster || resultStaging) {
currentBuild.result = "SUCCESS"
stage('Archive') {
archiveArtifacts artifacts: "bin/x64/Release/Essentials.dll", caseSensitive: false, fingerprint: true, onlyIfSuccessful: true
}
}
else
currentBuild.result = "FAIL"
}
24 changes: 24 additions & 0 deletions Setup (run before opening solution).bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:: This script creates a symlink to the game binaries to account for different installation directories on different systems.

@echo off
set /p path="Please enter the folder location of your SpaceEngineersDedicated.exe: "
cd %~dp0
mklink /J GameBinaries %path%
if errorlevel 1 goto Error
echo Done!
goto End
:Error
echo An error occured creating the symlink.
goto EndFinal
:End

set /p path="Please enter the folder location of your Torch.Server.exe: "
cd %~dp0
mklink /J TorchBinaries %path%
if errorlevel 1 goto Error
echo Done! You can now open the Torch solution without issue.
goto EndFinal
:Error2
echo An error occured creating the symlink.
:EndFinal
pause