mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2026-02-01 11:00:16 +07:00
push everything up one directory so vs code works more betters
This commit is contained in:
20
project_name/.vscode/buildEffects.sh
vendored
20
project_name/.vscode/buildEffects.sh
vendored
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
# buildEffects
|
||||
# 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.
|
||||
|
||||
printf "Starting build process...\n"
|
||||
|
||||
for file in `find ./Content/** -name "*.fx"` ;
|
||||
do
|
||||
# Hush, wine...
|
||||
export WINEDEBUG=fixme-all,err-all
|
||||
|
||||
# Build the effect
|
||||
wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ DirectX\ SDK\ \(June\ 2010\)/Utilities/bin/x86/fxc.exe\
|
||||
/T fx_2_0 $file /Fo "`dirname $file`/`basename $file .fx`.fxb"
|
||||
|
||||
echo ""
|
||||
|
||||
done
|
||||
28
project_name/.vscode/launch.json
vendored
28
project_name/.vscode/launch.json
vendored
@@ -1,28 +0,0 @@
|
||||
{
|
||||
// Change "mono" to "clr" for 64-bit .NET Framework debugging on Windows.
|
||||
// (See: https://github.com/OmniSharp/omnisharp-vscode/wiki/Desktop-.NET-Framework)
|
||||
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch",
|
||||
"type": "mono",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/bin/Debug/project_name.exe",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"preLaunchTask": "Build (Debug)",
|
||||
"osx":{
|
||||
"env": {
|
||||
"DYLD_LIBRARY_PATH": "${workspaceFolder}/bin/Debug/osx/"
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Attach",
|
||||
"type": "mono",
|
||||
"request": "attach",
|
||||
"address": "localhost",
|
||||
"port": 55555
|
||||
}
|
||||
]
|
||||
}
|
||||
16
project_name/.vscode/processT4Templates.sh
vendored
16
project_name/.vscode/processT4Templates.sh
vendored
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
# buildEffects
|
||||
# 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.
|
||||
|
||||
printf "Starting T4 processing...\n"
|
||||
|
||||
for file in `find ./T4Templates/** -name "*.tt"` ;
|
||||
do
|
||||
# Build the template
|
||||
t4 -r=System.dll -r=mscorlib.dll -r=netstandard.dll -r=System.IO.FileSystem.dll -r=System.Linq.dll -r=System.Text.RegularExpressions.dll `dirname $file`/`basename $file` -o `dirname $file`/Output/`basename $file .tt`.cs
|
||||
|
||||
echo "Built `basename $file`"
|
||||
|
||||
done
|
||||
20
project_name/.vscode/settings.json
vendored
20
project_name/.vscode/settings.json
vendored
@@ -1,20 +0,0 @@
|
||||
{
|
||||
// This prevents Omnisharp from prematurely creating obj and bin directories.
|
||||
// Change this to true after changing the name of the csproj file and running Restore Project.
|
||||
"omnisharp.autoStart": true,
|
||||
|
||||
// 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,
|
||||
"*.csproj.user": true,
|
||||
"*.csproj": true,
|
||||
"*.sln": true
|
||||
}
|
||||
}
|
||||
132
project_name/.vscode/tasks.json
vendored
132
project_name/.vscode/tasks.json
vendored
@@ -1,132 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Restore Project",
|
||||
"type": "shell",
|
||||
"command": "msbuild /t:restore",
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Clean Project",
|
||||
"type": "shell",
|
||||
"command": "msbuild /t:clean /p:configuration=Debug ; msbuild /t:clean /p:configuration=Release",
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile",
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Build (Debug)",
|
||||
"type": "shell",
|
||||
"command": "msbuild",
|
||||
"args": [
|
||||
"/p:configuration=Debug",
|
||||
"/t:build"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile",
|
||||
"dependsOn": "Build Content",
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Build (Release)",
|
||||
"type": "shell",
|
||||
"command": "msbuild",
|
||||
"args": [
|
||||
"/p:configuration=Release",
|
||||
"/t:build"
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile",
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Build and Run (Debug)",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"osx":{
|
||||
"command": "DYLD_LIBRARY_PATH=${workspaceFolder}/bin/Debug/osx/ mono ${workspaceFolder}/bin/Debug/project_name.exe"
|
||||
},
|
||||
"windows":{
|
||||
"command": "cmd",
|
||||
"args": [
|
||||
"/k",
|
||||
"${workspaceFolder}/bin/Debug/project_name.exe"
|
||||
]
|
||||
},
|
||||
"dependsOn": "Build (Debug)",
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Build and Run (Release)",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"osx":{
|
||||
"command": "DYLD_LIBRARY_PATH=${workspaceFolder}/bin/Release/osx/ mono ${workspaceFolder}/bin/Release/project_name.exe"
|
||||
},
|
||||
"windows":{
|
||||
"command": "cmd",
|
||||
"args": [
|
||||
"/k",
|
||||
"${workspaceFolder}/bin/Release/project_name.exe"
|
||||
]
|
||||
},
|
||||
"dependsOn": "Build (Release)",
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Build Effects",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"osx":{
|
||||
"command": "${workspaceFolder}/.vscode/buildEffects.sh"
|
||||
},
|
||||
"windows":{
|
||||
"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"
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Open Pipeline Tool",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "export MONOGAME_PIPELINE_PROJECT=${workspaceFolder}/CompiledContent/Content.mgcb && /Applications/Pipeline.app/Contents/MacOS/Pipeline",
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
|
||||
{
|
||||
"label": "Process T4 Templates",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/.vscode/processT4Templates.sh",
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile",
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -49,6 +49,9 @@ namespace Nez
|
||||
|
||||
|
||||
<#+
|
||||
// all the valid file extensions we should add to the output file
|
||||
private string[] fileExtensionsToCopy = new string[] { ".xnb", ".png", ".ogg", ".wav", ".fxb" };
|
||||
|
||||
// C# reserved keywords
|
||||
private System.Collections.Generic.List<string> keywords = new System.Collections.Generic.List<string>
|
||||
{
|
||||
@@ -63,7 +66,7 @@ namespace Nez
|
||||
void printDirectoryClass( string dir, int depth, string sourceFolder )
|
||||
{
|
||||
var dirInfo = new DirectoryInfo( dir );
|
||||
var firstIndent = new string( ' ', depth * 5 );
|
||||
var firstIndent = new string( ' ', depth * 4 );
|
||||
var className = generateClassName( dirInfo.Name, true );
|
||||
WriteLine( "{0}public static class {1}\n{2}{{", firstIndent, className, firstIndent );
|
||||
|
||||
@@ -81,10 +84,10 @@ namespace Nez
|
||||
// prints a const string for each file in the directory
|
||||
void printContentFiles( string dir, int depth, string sourceFolder )
|
||||
{
|
||||
var firstIndent = new string( '\t', depth );
|
||||
var firstIndent = new string( ' ', depth * 4 );
|
||||
|
||||
var files = Directory.EnumerateFiles( dir )
|
||||
.Where( s => s.EndsWith( ".xnb" ) || s.EndsWith( ".png" ) || s.EndsWith( ".ogg" ) || s.EndsWith( ".wav" ) || s.EndsWith( ".fxb" ) );
|
||||
.Where( s => Array.IndexOf( fileExtensionsToCopy, Path.GetExtension( s ) ) >= 0 );
|
||||
foreach( var file in files )
|
||||
{
|
||||
// clear out all of the path up to the sourceFolder so we get just the relative path to the Content folder
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "project_name", "project_name.csproj", "{BD11109C-8FD1-4FFE-A3EF-8390A1EAE1A1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FNA", "../FNA/FNA.csproj", "{35253CE1-C864-4CD3-8249-4D1319748E8F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nez.FNA", "../Nez.FNA/Nez.FNA/Nez.FNA.csproj", "{11A5855C-B12C-4F8D-B935-56F3D0B671C3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nez.PipelineImporter", "../Nez.FNA/Nez/Nez.PipelineImporter/Nez.PipelineImporter.csproj", "{63E831F4-B847-4150-B5AF-CBE059EE27B8}"
|
||||
EndProject
|
||||
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BD11109C-8FD1-4FFE-A3EF-8390A1EAE1A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BD11109C-8FD1-4FFE-A3EF-8390A1EAE1A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BD11109C-8FD1-4FFE-A3EF-8390A1EAE1A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BD11109C-8FD1-4FFE-A3EF-8390A1EAE1A1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user