[WIP] Overhauled project to make Linux build work out of the box

TODO: fix the Windows build, fix the Debug builds, make OSX
configurations, work around a bug in MonoDevelop where copied content
files don't respect the original directory structure
This commit is contained in:
juanjp600
2017-12-15 08:31:07 -03:00
parent e17b5a195c
commit 4997ebf20d
19 changed files with 246 additions and 543 deletions
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseLinux</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Barotrauma</RootNamespace>
<AssemblyName>Barotrauma</AssemblyName>
<AssemblyName>BarotraumaClient</AssemblyName>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
@@ -28,37 +28,36 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\Windows\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS;CLIENT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Windows\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS;CLIENT</DefineConstants>
<AllowedReferenceRelatedFileExtensions>
<!-- Prevent default XML and PDB files copied to output in RELEASE.
Only *.allowedextension files will be included, which doesn't exist in my case.
-->
.allowedextension
</AllowedReferenceRelatedFileExtensions>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<ReleaseVersion>0.7.0.1</ReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseLinux|x86' ">
<Optimize>true</Optimize>
<OutputPath>..\bin\ReleaseLinux\</OutputPath>
<DefineConstants>TRACE;LINUX;CLIENT</DefineConstants>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugLinux|x86' ">
<Optimize>false</Optimize>
<OutputPath>..\bin\DebugLinux\</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|x86' ">
<Optimize>false</Optimize>
<OutputPath>..\bin\ReleaseWindows\</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWindows|x86' ">
<Optimize>false</Optimize>
<OutputPath>..\bin\DebugWindows\</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Source\Camera.cs" />
@@ -221,32 +220,38 @@
<Compile Include="Source\Utils\ToolBox.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libraries\NuGet\NVorbis.0.8.5.0\lib\NVorbis.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libraries\NuGet\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="RestSharp">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="SharpDX, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\SharpDX.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="RestSharp">
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
</ItemGroup>
<Choose>
<When Condition=" '$(Configuration)'=='ReleaseWindows' Or '$(Configuration)'=='DebugWindows' ">
<ItemGroup>
<Reference Include="MonoGame.Framework.WindowsDX">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="SharpDX">
<HintPath>..\..\Libraries\NuGet\SharpDX.4.0.1\lib\net45\SharpDX.dll</HintPath>
</Reference>
</ItemGroup>
</When>
<When Condition=" '$(Configuration)'=='ReleaseLinux' Or '$(Configuration)'=='DebugLinux' ">
<ItemGroup>
<Reference Include="MonoGame.Framework.DesktopGL">
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.6.0.1625\lib\net40\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
</When>
</Choose>
<ItemGroup>
<Content Include="freetype6.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -257,6 +262,17 @@
<Content Include="wrap_oal.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="MonoGame.Framework.dll.config">
<DeployService.Deploy>true</DeployService.Deploy>
<DeployService.UseProjectRelativePath>true</DeployService.UseProjectRelativePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="OpenTK.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="SharpFont.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
@@ -299,7 +315,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
@@ -312,4 +327,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib" />
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0" />
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0" />
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<dllmap dll="freetype6" os="linux" target="libfreetype.so.6" />
<dllmap dll="freetype6" os="osx" target="/Library/Frameworks/Mono.framework/Libraries/libfreetype.6.dylib" />
<dllmap dll="freetype6" os="freebsd" target="libfreetype.so.6" />
</configuration>
@@ -7,6 +7,7 @@ using System.Xml.Linq;
using System.Windows;
using System.Xml;
using System.Text;
using System.Windows.Forms;
namespace Barotrauma
{
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MonoGame.Framework.DesktopGL" version="3.6.0.1625" targetFramework="net45" />
<package id="MonoGame.Framework.WindowsDX" version="3.6.0.1625" targetFramework="net45" />
<package id="NVorbis" version="0.8.5.0" targetFramework="net45" />
<package id="OpenTK" version="2.0.0" targetFramework="net45" />
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
<package id="SharpDX" version="4.0.1" targetFramework="net45" />
</packages>
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseLinux</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{85232B20-074D-4723-B0C6-91495391E448}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -27,30 +27,35 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\Windows\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS;SERVER</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\bin\Windows\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS;SERVER</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<ReleaseVersion>0.7.0.1</ReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\BarotraumaShared\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseLinux|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\ReleaseLinux</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugLinux|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\DebugLinux</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\ReleaseWindows</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWindows|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\DebugWindows</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -19,6 +19,8 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MSBuildThisFileDirectory)Content\BackgroundSprites\BackgroundCreaturePrefabs.xml">
<DeployService.Deploy>true</DeployService.Deploy>
<DeployService.UseProjectRelativePath>true</DeployService.UseProjectRelativePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MSBuildThisFileDirectory)Content\BackgroundSprites\BackgroundSpritePrefabs.xml">
@@ -755,6 +757,8 @@
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)Content\blurshader.xnb">
<DeployService.Deploy>true</DeployService.Deploy>
<DeployService.UseProjectRelativePath>true</DeployService.UseProjectRelativePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)Content\Characters\Carrier\alarm1.ogg">
@@ -1522,4 +1526,4 @@
<Compile Include="$(MSBuildThisFileDirectory)Source\Utils\ToolBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Source\Utils\UpdaterUtil.cs" />
</ItemGroup>
</Project>
</Project>
@@ -3,6 +3,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>561357c2-db28-4e01-b275-6bf545f70491</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ReleaseVersion>0.7.0.1</ReleaseVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
Binary file not shown.
Binary file not shown.
+27 -23
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Configuration Condition=" '$(Configuration)' == '' ">ReleaseLinux</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -9,38 +9,42 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Launcher</RootNamespace>
<AssemblyName>Barotrauma Launcher</AssemblyName>
<AssemblyName>Launcher</AssemblyName>
<FileAlignment>512</FileAlignment>
<MonoGamePlatform>Windows</MonoGamePlatform>
<MonoGameContentBuilderExe>
</MonoGameContentBuilderExe>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\Windows\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Windows\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<ReleaseVersion>0.7.0.1</ReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseLinux|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\ReleaseLinux</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugLinux|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\DebugLinux</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\ReleaseWindows</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWindows|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\x86\DebugWindows</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile Include="LauncherMain.cs" />
<Compile Include="Program.cs" />