easier setup process

added MG Pipeline tool support
This commit is contained in:
Mike
2019-02-10 17:48:18 -08:00
parent 264f0efe18
commit 5e618eca79
8 changed files with 80 additions and 137 deletions

View File

@@ -1,17 +0,0 @@
# Compiles all .fx files found in the project's Content directory.
# Intended for usage with VS Code Build Tasks tooling.
# You may need to change the path to fxc.exe depending on your installation.
Write-Output "Starting build process..."
Get-ChildItem ".\Content\" -R -Filter *.fx |
Foreach-Object {
$fileFullname = $_.FullName
$fileBasename = $_.BaseName
$fileDirectory = $_.Directory.FullName
& 'C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x86\fxc.exe' `
/T fx_2_0 $fileFullname /Fo "$fileDirectory\$fileBasename.fxb"
Write-Output ""
}

View File

@@ -6,4 +6,12 @@
// This just circumvents annoying default behavior with the C# extension...
// If you really like Code Lens, feel free to change this.
"csharp.referencesCodeLens.enabled": false,
"files.exclude": {
"obj": true,
"bin": true,
"CompiledContent/bin": true,
"CompiledContent/obj": true,
"CompiledContent/.mgstats": true
}
}

View File

@@ -88,6 +88,28 @@
"command": "& ${workspaceFolder}/.vscode/buildEffects.ps1"
},
"problemMatcher": "$msCompile"
}
},
{
"label": "Build Content",
"type": "shell",
"group": "build",
"command": "mono /Applications/Pipeline.app/Contents/MonoBundle/MGCB.exe /@:Content.mgcb",
"options": {
"cwd": "${workspaceFolder}/CompiledContent"
},
"problemMatcher": "$msCompile"
},
{
"label": "Force Build Content",
"type": "shell",
"group": "build",
"command": "mono /Applications/Pipeline.app/Contents/MonoBundle/MGCB.exe /@:Content.mgcb -r",
"options": {
"cwd": "${workspaceFolder}/CompiledContent"
},
"problemMatcher": "$msCompile"
},
]
}

View File

@@ -0,0 +1,18 @@
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:DesktopGL
/config:
/profile:HiDef
/compress:False
#-------------------------------- References --------------------------------#
/reference:../../Nez.FNA/Nez/Nez.PipelineImporter/bin/Debug/Ionic.ZLib.dll
/reference:../../Nez.FNA/Nez/Nez.PipelineImporter/bin/Debug/Newtonsoft.Json.dll
/reference:../../Nez.FNA/Nez/Nez.PipelineImporter/bin/Debug/Nez.PipelineImporter.dll
/reference:../../Nez.FNA/Nez/Nez.PipelineImporter/bin/Debug/Nez.dll
#---------------------------------- Content ---------------------------------#

View File

@@ -19,6 +19,23 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<!-- Include the CompiledContent bin (MGCB output). Copy it to the Content folder in the build. -->
<ItemGroup>
<Content Include="CompiledContent/bin/DesktopGL/**/*.xnb">
<Link>Content/%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<!-- I can't seem to get msbuild to automatically handle content so these next two bits do nothing -->
<ItemGroup>
<MonoGameContentReference Include="CompiledContent\Content.mgcb" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<!-- Copy fnalib directories to output -->
<ItemGroup>