| @@ -1,14 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <!-- | |||
| - Import settings that can be overridden by the user | |||
| --> | |||
| <Import Condition="Exists('$(LolEngineDir)\build.config')" | |||
| Project="$(LolEngineDir)\build.config" /> | |||
| <Import Condition="Exists('$(SolutionDir)\build.config') And ('$(SolutionDir)' != '$(LolEngineDir)')" | |||
| Project="$(SolutionDir)\build.config" /> | |||
| <!-- | |||
| - Import defaults settings from Visual Studio | |||
| --> | |||
| @@ -49,12 +41,6 @@ | |||
| <PlatformToolset>v143</PlatformToolset> | |||
| </PropertyGroup> | |||
| <!-- | |||
| - Secret stuff for platforms under NDA | |||
| --> | |||
| <Import Condition="Exists('$(LolEngineDir)lol-switch\msbuild\nx.config.props')" | |||
| Project="$(LolEngineDir)lol-switch\msbuild\nx.config.props" /> | |||
| <!-- | |||
| - Import final settings from Visual Studio | |||
| --> | |||
| @@ -1,37 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup | |||
| Condition="'$(LolFxCompileBeforeTargets)' == '' and '$(LolFxCompileAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'"> | |||
| <LolFxCompileBeforeTargets>Midl</LolFxCompileBeforeTargets> | |||
| <LolFxCompileAfterTargets>CustomBuild</LolFxCompileAfterTargets> | |||
| </PropertyGroup> | |||
| <PropertyGroup> | |||
| <LolFxCompileDependsOn | |||
| Condition="'$(ConfigurationType)' != 'Makefile'">_SelectedFiles;$(LolFxCompileDependsOn)</LolFxCompileDependsOn> | |||
| </PropertyGroup> | |||
| <ItemDefinitionGroup> | |||
| <LolFxCompile> | |||
| <CommandLineTemplate>@echo off | |||
| set D=$(IntDir)%(Filename)%(Extension).cpp | |||
| set "name=lolfx_resource_%(RelativeDir)%(Filename)" | |||
| set "name=%name:\=_%" | |||
| set "name=%name:-=_%" | |||
| set "name=%name:.=_%" | |||
| echo /* This file was autogenerated. DO NOT MODIFY IT. */ > "%D%" | |||
| echo extern "C" { char const *%name% = >> "%D%" | |||
| setlocal disabledelayedexpansion | |||
| for /F "tokens=1,* delims=`" %%L in ('type "%(Fullpath)"') do ( | |||
| set "line=%%L" | |||
| setlocal enabledelayedexpansion | |||
| echo "!line:"=\"!\n" >> "%D%" | |||
| endlocal | |||
| ) | |||
| endlocal | |||
| echo ;} >> "%D%"</CommandLineTemplate> | |||
| <Outputs>$(IntDir)%(FileName)%(Extension).cpp</Outputs> | |||
| <ExecutionDescription>%(FileName)%(Extension)</ExecutionDescription> | |||
| </LolFxCompile> | |||
| </ItemDefinitionGroup> | |||
| </Project> | |||
| @@ -1,80 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <ItemGroup> | |||
| <PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" /> | |||
| <AvailableItemName Include="LolFxCompile"> | |||
| <Targets>LolFxCompile</Targets> | |||
| </AvailableItemName> | |||
| </ItemGroup> | |||
| <PropertyGroup> | |||
| <ComputeCompileInputsTargets> | |||
| $(ComputeCompileInputsTargets); | |||
| ComputeLolFxCompileOutput; | |||
| </ComputeCompileInputsTargets> | |||
| </PropertyGroup> | |||
| <UsingTask | |||
| TaskName="LolFxCompile" | |||
| TaskFactory="XamlTaskFactory" | |||
| AssemblyName="Microsoft.Build.Tasks.v4.0"> | |||
| <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task> | |||
| </UsingTask> | |||
| <Target | |||
| Name="LolFxCompile" | |||
| BeforeTargets="$(LolFxCompileBeforeTargets)" | |||
| AfterTargets="$(LolFxCompileAfterTargets)" | |||
| Condition="'@(LolFxCompile)' != ''" | |||
| DependsOnTargets="$(LolFxCompileDependsOn);ComputeLolFxCompileOutput" | |||
| Outputs="@(LolFxCompile->Metadata('CompileOut')->Distinct())" | |||
| Inputs="@(LolFxCompile);%(LolFxCompile.AdditionalDependencies);$(MSBuildProjectFile)"> | |||
| <ItemGroup | |||
| Condition="'@(SelectedFiles)' != ''"> | |||
| <LolFxCompile | |||
| Remove="@(LolFxCompile)" | |||
| Condition="'%(Identity)' != '@(SelectedFiles)'" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <LolFxCompile_tlog | |||
| Include="%(LolFxCompile.Outputs)" | |||
| Condition="'%(LolFxCompile.Outputs)' != '' and '%(LolFxCompile.ExcludedFromBuild)' != 'true'"> | |||
| <Source>@(LolFxCompile, '|')</Source> | |||
| </LolFxCompile_tlog> | |||
| </ItemGroup> | |||
| <Message | |||
| Importance="High" | |||
| Text="%(LolFxCompile.ExecutionDescription)" /> | |||
| <WriteLinesToFile | |||
| Condition="'@(LolFxCompile_tlog)' != '' and '%(LolFxCompile_tlog.ExcludedFromBuild)' != 'true'" | |||
| File="$(IntDir)$(ProjectName).write.1.tlog" | |||
| Lines="^%(LolFxCompile_tlog.Source);@(LolFxCompile_tlog->'%(Fullpath)')" /> | |||
| <ItemGroup> | |||
| <LolFxCompile> | |||
| </LolFxCompile> | |||
| </ItemGroup> | |||
| <LolFxCompile | |||
| Condition="'@(LolFxCompile)' != '' and '%(LolFxCompile.ExcludedFromBuild)' != 'true'" | |||
| CommandLineTemplate="%(LolFxCompile.CommandLineTemplate)" | |||
| Outputs="%(LolFxCompile.Outputs)" | |||
| IntDir="$(IntDir)" | |||
| FileName="%(FileName)" | |||
| Inputs="@(LolFxCompile)" /> | |||
| </Target> | |||
| <Target Name="ComputeLolFxCompileOutput" Condition="'@(LolFxCompile)' != ''"> | |||
| <ItemGroup> | |||
| <ClCompile Include="@(LolFxCompile->Metadata('CompileOut')->Distinct()->ClearMetadata())" Condition="'%(LolFxCompile.ExcludedFromBuild)' != 'true'"> | |||
| <CompileAs>CompileAsC</CompileAs> | |||
| </ClCompile> | |||
| <ClCompile Include="%(LolFxCompile.Outputs)" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <LolFxCompile> | |||
| <CompileOut>$(IntDir)\%(FileName).lolfx.cpp</CompileOut> | |||
| </LolFxCompile> | |||
| </ItemGroup> | |||
| </Target> | |||
| </Project> | |||
| @@ -1,79 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback"> | |||
| <Rule | |||
| Name="LolFxCompile" | |||
| PageTemplate="tool" | |||
| DisplayName="Lol Fx Build Rule v0.0" | |||
| Order="200"> | |||
| <Rule.DataSource> | |||
| <DataSource | |||
| Persistence="ProjectFile" | |||
| ItemType="LolFxCompile" /> | |||
| </Rule.DataSource> | |||
| <Rule.Categories> | |||
| <Category | |||
| Name="General"> | |||
| <Category.DisplayName> | |||
| <sys:String>General</sys:String> | |||
| </Category.DisplayName> | |||
| </Category> | |||
| <Category | |||
| Name="Command Line" | |||
| Subtype="CommandLine"> | |||
| <Category.DisplayName> | |||
| <sys:String>Command Line</sys:String> | |||
| </Category.DisplayName> | |||
| </Category> | |||
| </Rule.Categories> | |||
| <StringListProperty | |||
| Name="Inputs" | |||
| Category="Command Line" | |||
| IsRequired="true" | |||
| Switch=" "> | |||
| <StringListProperty.DataSource> | |||
| <DataSource | |||
| Persistence="ProjectFile" | |||
| ItemType="LolFxCompile" | |||
| SourceType="Item" /> | |||
| </StringListProperty.DataSource> | |||
| </StringListProperty> | |||
| <StringListProperty | |||
| Name="IntDir" | |||
| Category="Command Line" | |||
| IsRequired="true" | |||
| Switch=" "> | |||
| <StringListProperty.DataSource> | |||
| <DataSource | |||
| Persistence="ProjectFile" | |||
| ItemType="LolFxCompile" | |||
| SourceType="Item" /> | |||
| </StringListProperty.DataSource> | |||
| </StringListProperty> | |||
| <StringListProperty | |||
| Name="FileName" | |||
| Category="Command Line" | |||
| IsRequired="true" | |||
| Switch=" "> | |||
| </StringListProperty> | |||
| <StringProperty | |||
| Name="Outputs" | |||
| Category="Command Line" | |||
| IsRequired="true" | |||
| Switch=" " /> | |||
| <StringProperty | |||
| Name="CommandLineTemplate" | |||
| DisplayName="Command Line" | |||
| Visible="False" | |||
| IncludeInCommandLine="False" /> | |||
| </Rule> | |||
| <ItemType | |||
| Name="LolFxCompile" | |||
| DisplayName="Lol Fx Build Rule v0.0" /> | |||
| <FileExtension | |||
| Name="*.lolfx" | |||
| ContentType="LolFxCompile" /> | |||
| <ContentType | |||
| Name="LolFxCompile" | |||
| DisplayName="Lol Fx Build Rule v0.0" | |||
| ItemType="LolFxCompile" /> | |||
| </ProjectSchemaDefinitions> | |||
| @@ -91,9 +91,6 @@ | |||
| <Win32Defines>LOL_USE_SDL_MIXER;LOL_USE_SDL_IMAGE;$(Win32Defines)</Win32Defines> | |||
| </PropertyGroup> | |||
| <!-- Kinc --> | |||
| <Import Condition="'$(enable_kinc)'!='no'" Project="kinc.vars.props" /> | |||
| <!-- FFmpeg --> | |||
| <PropertyGroup Condition="'$(enable_ffmpeg)'!='no'" Label="UserMacros"> | |||
| <FfmpegDir>$(ExternalDir)\ffmpeg-20190130</FfmpegDir> | |||
| @@ -160,12 +157,6 @@ | |||
| <BuildMacro Include="OrbisDefines"><Value>$(OrbisDefines)</Value></BuildMacro> | |||
| </ItemGroup> | |||
| <!-- | |||
| - Secret stuff for platforms under NDA | |||
| --> | |||
| <Import Condition="Exists('$(LolEngineDir)\src\private\nx\msbuild\nx.vars.props')" | |||
| Project="$(LolEngineDir)\src\private\nx\msbuild\nx.vars.props" /> | |||
| <PropertyGroup> | |||
| <BinDir>$(SolutionDir)binaries\</BinDir> | |||
| <OutDir>$(BinDir)$(Platform.ToLower())-$(PlatformToolset.ToLower())-$(Configuration.ToLower())\</OutDir> | |||
| @@ -12,41 +12,82 @@ | |||
| </PropertyGroup> | |||
| <!-- | |||
| - | |||
| - Build configuration | |||
| --> | |||
| <Import Project="$(LolEngineDir)build\msbuild\lol.config.props" /> | |||
| <!-- Settings that can be defined by the user in a build.config file --> | |||
| <Import Condition="exists('$(LolEngineDir)build.config')" | |||
| Project="$(LolEngineDir)build.config" /> | |||
| <Import Condition="exists('$(SolutionDir)build.config') and '$(SolutionDir)'!='$(LolEngineDir)'" | |||
| Project="$(SolutionDir)build.config" /> | |||
| <!-- NDA platforms --> | |||
| <Import Project="$(LolEngineDir)lol-switch/msbuild/config.props" | |||
| Condition="exists('$(LolEngineDir)lol-switch/msbuild/config.props')" /> | |||
| <Import Project="$(LolEngineDir)lol-playstation/msbuild/config.props" | |||
| Condition="exists('$(LolEngineDir)lol-playstation/msbuild/config.props')" /> | |||
| <Import Project="$(LolEngineDir)build/msbuild/config.props" /> | |||
| <!-- | |||
| - Build variables | |||
| --> | |||
| <ImportGroup Label="PropertySheets"> | |||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" | |||
| Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||
| <Import Project="$(LolEngineDir)build\msbuild\lol.vars.props" /> | |||
| <Import Project="$(UserRootDir)Microsoft.Cpp.$(Platform).user.props" | |||
| Condition="exists('$(UserRootDir)Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||
| <!-- NDA platforms --> | |||
| <Import Project="$(LolEngineDir)lol-switch/msbuild/vars.props" | |||
| Condition="exists('$(LolEngineDir)lol-switch/msbuild/vars.props')" /> | |||
| <Import Project="$(LolEngineDir)lol-playstation/msbuild/vars.props" | |||
| Condition="exists('$(LolEngineDir)lol-playstation/msbuild/vars.props')" /> | |||
| <Import Project="$(LolEngineDir)build/msbuild/kinc.vars.props" | |||
| Condition="'$(enable_kinc)'!='no'" /> | |||
| <Import Project="$(LolEngineDir)build/msbuild/vars.props" /> | |||
| </ImportGroup> | |||
| <PropertyGroup Label="UserMacros" /> | |||
| <Import Project="$(LolEngineDir)build\msbuild\lol.rules.props" /> | |||
| <!-- | |||
| - Build rules | |||
| --> | |||
| <Import Project="$(LolEngineDir)build/msbuild/rules.props" /> | |||
| <ItemDefinitionGroup /> | |||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |||
| <!-- | |||
| - Target definitions | |||
| --> | |||
| <Import Project="$(VCTargetsPath)Microsoft.Cpp.targets" /> | |||
| <ImportGroup Label="ExtensionTargets"> | |||
| <Import Condition="'$(enable_kinc)'!='no'" | |||
| Project="$(LolEngineDir)build\msbuild\kinc.targets" /> | |||
| Project="$(LolEngineDir)build/msbuild/kinc.targets" /> | |||
| </ImportGroup> | |||
| <!-- | |||
| - Lol Engine dependency | |||
| --> | |||
| <ItemGroup> | |||
| <ProjectReference Include="$(LolEngineDir)src/lolengine.vcxproj" Condition="'$(ProjectName)'!='lolengine'"> | |||
| <Project>{9e62f2fe-3408-4eae-8238-fd84238ceeda}</Project> | |||
| </ProjectReference> | |||
| </ItemGroup> | |||
| <ItemGroup Condition="'$(enable_kinc)'!='no'"> | |||
| <ItemGroup Condition="'$(ProjectName)'!='lolengine' and '$(enable_kinc)'!='no'"> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Sources/kinc/**/*.cpp" /> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Sources/kinc/**/*.c" /> | |||
| <GLSLShader Include="$(KINC_SDK_PATH)/GLSLShaders/**/*.glsl" /> | |||
| </ItemGroup> | |||
| <ItemGroup Condition="'$(enable_kinc)'!='no' And '$(Platform)'=='x64'"> | |||
| <ItemGroup Condition="'$(ProjectName)'!='lolengine' and '$(enable_kinc)'!='no' and '$(Platform)'=='x64'"> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Backends/Audio2/WASAPI/Sources/kinc/backend/**/*.cpp" /> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Backends/Audio2/WASAPI/Sources/kinc/backend/**/*.c" /> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Backends/Graphics4/Direct3D11/Sources/kinc/backend/**/*.cpp" /> | |||
| @@ -61,7 +102,7 @@ | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Backends/System/Windows/Libraries/DirectShow/BaseClasses/**/*.c" /> | |||
| </ItemGroup> | |||
| <ItemGroup Condition="'$(enable_kinc)'!='no' And '$(Platform)'=='NX64'"> | |||
| <ItemGroup Condition="'$(ProjectName)'!='lolengine' and '$(enable_kinc)'!='no' and '$(Platform)'=='NX64'"> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Backends/Graphics4/G4onG5/Sources/kinc/backend/**/*.cpp" /> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/Backends/Graphics4/G4onG5/Sources/kinc/backend/**/*.c" /> | |||
| <ClCompile Include="$(KINC_SDK_PATH)/../Backends/Switch/Sources/kinc/backend/**/*.cpp" /> | |||
| @@ -79,19 +120,19 @@ | |||
| <Target Name="LolEngineSanityChecks"> | |||
| <Error Condition="!Exists('$(LolEngineDir)')" | |||
| <Error Condition="!exists('$(LolEngineDir)')" | |||
| Text="Lol Engine directory '$(LolEngineDir)' was not found" /> | |||
| <Error Condition="'$(KINC_SDK_PATH)'==''" | |||
| Text="KINC_SDK_PATH is not set" /> | |||
| <Error Condition="!Exists('$(KINC_SDK_PATH)/make')" | |||
| <Error Condition="!exists('$(KINC_SDK_PATH)/make')" | |||
| Text="KINC_SDK_PATH is set, but '$(KINC_SDK_PATH)/make' was not found" /> | |||
| <Error Condition="('$(Platform)'=='NX64' Or '$(Platform)'=='NX32') And !Exists('$(LolEngineDir)lol-switch')" | |||
| <Error Condition="('$(Platform)'=='NX64' or '$(Platform)'=='NX32') and !exists('$(LolEngineDir)lol-switch')" | |||
| Text="platform '$(Platform)' selected, but '$(LolEngineDir)lol-switch' was not found" /> | |||
| <Error Condition="('$(Platform)'=='ORBIS' Or '$(Platform)'=='Prospero') And !Exists('$(LolEngineDir)lol-playstation')" | |||
| <Error Condition="('$(Platform)'=='ORBIS' or '$(Platform)'=='Prospero') and !exists('$(LolEngineDir)lol-playstation')" | |||
| Text="platform '$(Platform)' selected, but '$(LolEngineDir)lol-playstation' was not found" /> | |||
| </Target> | |||