From 69b40f3234f458e4a07fffa832e1b36093d3b696 Mon Sep 17 00:00:00 2001 From: Roshan Patel Date: Tue, 18 May 2021 04:25:38 -0400 Subject: [PATCH 1/6] Fixed missing includes, extra MonoGame pipeline include, and Nez logo entity. --- getFNA.ps1 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/getFNA.ps1 b/getFNA.ps1 index 162c762..4a3c90d 100644 --- a/getFNA.ps1 +++ b/getFNA.ps1 @@ -97,6 +97,23 @@ function getLibs () } +function del-line($file, $start, $end) { + $i = 0 + $start-- + $end-- + (Get-Content $file) | where{ + ($i -lt $start -or $i -gt $end) + $i++ + } > $file + (Get-Content $file) +} + +function add-line($filePath, $textToAdd, $lineNumber) { + $fileContent = (Get-Content $filePath) + $fileContent[$lineNumber-1] += $textToAdd + $fileContent | Set-Content $filePath +} + checkMsbuild if (Test-Path "${PSScriptRoot}\FNA") @@ -170,6 +187,17 @@ Set-Location Nez git submodule init git submodule update +# Remove MonoGame pipeline include line. +del-line "${PSScriptRoot}\$newProjectName\$newProjectName.csproj" 54 58 + +# Add properties to fix errors. +add-line "${PSScriptRoot}\Nez\Nez.Portable\Nez.FNA.csproj" "`n`t`tfalse" 18 +add-line "${PSScriptRoot}\Nez\Nez.Persistence\Nez.FNA.Persistence.csproj" "`n`t`tfalse" 17 +add-line "${PSScriptRoot}\Nez\Nez.ImGui\Nez.FNA.ImGui.csproj" "`n`t`tfalse" 17 + +# Remove Nez logo entity +del-line "${PSScriptRoot}\$newProjectName\DefaultScene.cs" 18 22 + "Restoring..." Set-Location $PSScriptRoot dotnet restore "Nez/Nez.sln" @@ -179,3 +207,5 @@ msbuild "Nez/Nez.sln" msbuild -t:restore $newProjectName msbuild -t:buildcontent $newProjectName msbuild "${newProjectName}.sln" + +read-host “Press ENTER to exit...” \ No newline at end of file From 78d382b3383440cd59efdf7a379024199ec303f7 Mon Sep 17 00:00:00 2001 From: Roshan P Date: Tue, 18 May 2021 04:34:38 -0400 Subject: [PATCH 2/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3fcf4a..13ddbcd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# FNA VSCode Template -Start new FNA projects with Nez quickly and easily with handy setup scripts, a versatile boilerplate project, and convenient Visual Studio Code integration. +# Fixed FNA VSCode Template +Start new FNA projects with Nez quickly and easily with handy setup scripts, a versatile boilerplate project, and convenient Visual Studio Code integration. Differs from the original in that everything works out-of-the-box. No need to fix missing includes or move DLLs around. ## Features ## From d5d18fce93702de8e2fdaba36a164226409281b7 Mon Sep 17 00:00:00 2001 From: Roshan P Date: Tue, 18 May 2021 04:41:24 -0400 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13ddbcd..f351915 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Fixed FNA VSCode Template -Start new FNA projects with Nez quickly and easily with handy setup scripts, a versatile boilerplate project, and convenient Visual Studio Code integration. Differs from the original in that everything works out-of-the-box. No need to fix missing includes or move DLLs around. +Start new FNA projects with Nez quickly and easily with handy setup scripts, a versatile boilerplate project, and convenient Visual Studio Code integration. ## Features ## From 362c1a55c426007dbf6fa2489cccef59628eb374 Mon Sep 17 00:00:00 2001 From: Roshan P Date: Tue, 18 May 2021 04:42:49 -0400 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f351915..e3fcf4a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Fixed FNA VSCode Template +# FNA VSCode Template Start new FNA projects with Nez quickly and easily with handy setup scripts, a versatile boilerplate project, and convenient Visual Studio Code integration. From 36e227542a998940b3baeb9da7cd466f1c9867a7 Mon Sep 17 00:00:00 2001 From: Roshan P Date: Tue, 18 May 2021 05:13:48 -0400 Subject: [PATCH 5/6] Update DefaultScene.cs --- project_name/DefaultScene.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/project_name/DefaultScene.cs b/project_name/DefaultScene.cs index 937f2bb..564e3b4 100755 --- a/project_name/DefaultScene.cs +++ b/project_name/DefaultScene.cs @@ -15,11 +15,6 @@ namespace project_name .SetPosition(new Vector2(150, 150)) .AddComponent() .AddComponent(new PrototypeSpriteRenderer(20, 20)); - - var logo = Content.Load("nez-logo-black"); - CreateEntity("logo") - .SetPosition(Screen.Center) - .AddComponent(new SpriteRenderer(logo)); } } } From b4a4087afe6e78585528f1051e6008f7d1bc3de0 Mon Sep 17 00:00:00 2001 From: Roshan P Date: Tue, 18 May 2021 05:14:03 -0400 Subject: [PATCH 6/6] Update getFNA.ps1 --- getFNA.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/getFNA.ps1 b/getFNA.ps1 index 4a3c90d..6d005e3 100644 --- a/getFNA.ps1 +++ b/getFNA.ps1 @@ -195,9 +195,6 @@ add-line "${PSScriptRoot}\Nez\Nez.Portable\Nez.FNA.csproj" "`n`t`tfalse" 17 add-line "${PSScriptRoot}\Nez\Nez.ImGui\Nez.FNA.ImGui.csproj" "`n`t`tfalse" 17 -# Remove Nez logo entity -del-line "${PSScriptRoot}\$newProjectName\DefaultScene.cs" 18 22 - "Restoring..." Set-Location $PSScriptRoot dotnet restore "Nez/Nez.sln" @@ -208,4 +205,4 @@ msbuild -t:restore $newProjectName msbuild -t:buildcontent $newProjectName msbuild "${newProjectName}.sln" -read-host “Press ENTER to exit...” \ No newline at end of file +read-host “Press ENTER to exit...”