Skip to content

Commit

Permalink
Add Linux build options and add start scripts for Linux with Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
TheStachelfisch committed Aug 23, 2021
1 parent be36f84 commit 7e899b6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ReleaseScripts/tModLoader64BitServer
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir sys 2> /dev/null
mv System*.dll* sys 2> /dev/null
mv WindowsBase.dll sys 2> /dev/null
mv Mono*.dll sys 2> /dev/null

mono "$(basename $0)".exe
26 changes: 23 additions & 3 deletions patches/64bit/Terraria.csproj.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/tModLoader/Terraria.csproj
+++ src/64bit/Terraria.csproj
@@ -2,65 +_,121 @@
@@ -2,65 +_,141 @@
<Import Project="..\TerrariaSteamPath.targets" />
<PropertyGroup>
<TargetFramework>net45</TargetFramework>
Expand All @@ -10,7 +10,7 @@
<Copyright>Copyright © Re-Logic 2017</Copyright>
<RootNamespace />
- <Configurations>WindowsDebug;WindowsServerDebug;WindowsRelease;WindowsServerRelease;MacRelease;MacServerRelease;LinuxRelease;LinuxServerRelease</Configurations>
+ <Configurations>XNADebug;XNAServerDebug;XNARelease;XNAServerRelease;FNARelease;FNADebug;FNAServerRelease;FNAServerDebug</Configurations>
+ <Configurations>XNADebug;XNAServerDebug;XNARelease;XNAServerRelease;FNARelease;FNADebug;FNAServerRelease;FNAServerDebug;FNAServerLinuxRelease;FNAServerLinuxDebug</Configurations>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <LangVersion>7.3</LangVersion>
Expand Down Expand Up @@ -46,6 +46,7 @@
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <Optimize>true</Optimize>
+ <OutputName>tModLoader64Bit</OutputName>
+ <Platforms>AnyCPU</Platforms>
+ </PropertyGroup>
+ <PropertyGroup Condition="$(Configuration.Contains('FNAServerRelease'))">
+ <OutputType>Exe</OutputType>
Expand Down Expand Up @@ -117,6 +118,25 @@
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='XNADebug|AnyCPU'">
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'FNARelease' ">
+ <DefineConstants>TRACE;CLIENT;FNA;FNAWINDOWS</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'FNADebug' ">
+ <DefineConstants>TRACE;DEBUG;CLIENT;FNA;FNAWINDOWS</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'FNAServerRelease' ">
+ <DefineConstants>TRACE;SERVER;FNA;FNAWINDOWS</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'FNAServerDebug' ">
+ <DefineConstants>TRACE;DEBUG;SERVER;FNA;FNAWINDOWS</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'FNAServerLinuxRelease' ">
+ <DefineConstants>TRACE;SERVER;FNA;LINUX</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'FNAServerLinuxDebug' ">
+ <DefineConstants>TRACE;DEBUG;SERVER;FNA;LINUX</DefineConstants>
+ <Optimize>false</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="FNA" Condition="$(DefineConstants.Contains('FNA'))">
Expand Down Expand Up @@ -213,7 +233,7 @@
+ <EmbeddedResource Include="..\..\references\ReLogic.64bit.dll">
+ <LogicalName>ReLogic.dll</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="..\..\references\Steamworks.NET.64bit.dll" Condition="$(DefineConstants.Contains('FNA'))">
+ <EmbeddedResource Include="..\..\references\Steamworks.NET.64bit.dll" Condition="$(DefineConstants.Contains('WINDOWS'))">
<LogicalName>Steamworks.NET.dll</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="..\..\references\Steamworks.NET.OSX.dll" Condition="$(DefineConstants.Contains('MAC'))">
Expand Down
6 changes: 6 additions & 0 deletions patches/64bit/Terraria.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Global
XNARelease|Any CPU = XNARelease|Any CPU
XNAServerDebug|Any CPU = XNAServerDebug|Any CPU
XNAServerRelease|Any CPU = XNAServerRelease|Any CPU
FNAServerLinuxRelease|Any CPU = FNAServerLinuxRelease|Any CPU
FNAServerLinuxDebug|Any CPU = FNAServerLinuxDebug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.FNADebug|Any CPU.ActiveCfg = FNADebug|Any CPU
Expand All @@ -33,6 +35,10 @@ Global
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.XNAServerDebug|Any CPU.Build.0 = XNAServerDebug|Any CPU
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.XNAServerRelease|Any CPU.ActiveCfg = XNAServerRelease|Any CPU
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.XNAServerRelease|Any CPU.Build.0 = XNAServerRelease|Any CPU
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.FNAServerLinuxRelease|Any CPU.ActiveCfg = FNAServerLinuxRelease|Any CPU
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.FNAServerLinuxRelease|Any CPU.Build.0 = FNAServerLinuxRelease|Any CPU
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.FNAServerLinuxDebug|Any CPU.ActiveCfg = FNAServerLinuxDebug|Any CPU
{3996D5FA-6E59-4FE4-9F2B-40EEEF9645D5}.FNAServerLinuxDebug|Any CPU.Build.0 = FNAServerLinuxDebug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 7e899b6

Please sign in to comment.