mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2026-02-01 11:00:16 +07:00
easier setup process
added MG Pipeline tool support
This commit is contained in:
17
project_name/.vscode/buildEffects.ps1
vendored
17
project_name/.vscode/buildEffects.ps1
vendored
@@ -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 ""
|
||||
}
|
||||
8
project_name/.vscode/settings.json
vendored
8
project_name/.vscode/settings.json
vendored
@@ -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
|
||||
}
|
||||
}
|
||||
24
project_name/.vscode/tasks.json
vendored
24
project_name/.vscode/tasks.json
vendored
@@ -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"
|
||||
},
|
||||
]
|
||||
}
|
||||
18
project_name/CompiledContent/Content.mgcb
Normal file
18
project_name/CompiledContent/Content.mgcb
Normal 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 ---------------------------------#
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user