mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
Merge b4a4087afe into 2ca3b25b55
This commit is contained in:
commit
2511955a28
27
getFNA.ps1
27
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
|
checkMsbuild
|
||||||
|
|
||||||
if (Test-Path "${PSScriptRoot}\FNA")
|
if (Test-Path "${PSScriptRoot}\FNA")
|
||||||
@ -170,6 +187,14 @@ Set-Location Nez
|
|||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
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`t<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>" 18
|
||||||
|
add-line "${PSScriptRoot}\Nez\Nez.Persistence\Nez.FNA.Persistence.csproj" "`n`t`t<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>" 17
|
||||||
|
add-line "${PSScriptRoot}\Nez\Nez.ImGui\Nez.FNA.ImGui.csproj" "`n`t`t<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>" 17
|
||||||
|
|
||||||
"Restoring..."
|
"Restoring..."
|
||||||
Set-Location $PSScriptRoot
|
Set-Location $PSScriptRoot
|
||||||
dotnet restore "Nez/Nez.sln"
|
dotnet restore "Nez/Nez.sln"
|
||||||
@ -179,3 +204,5 @@ msbuild "Nez/Nez.sln"
|
|||||||
msbuild -t:restore $newProjectName
|
msbuild -t:restore $newProjectName
|
||||||
msbuild -t:buildcontent $newProjectName
|
msbuild -t:buildcontent $newProjectName
|
||||||
msbuild "${newProjectName}.sln"
|
msbuild "${newProjectName}.sln"
|
||||||
|
|
||||||
|
read-host “Press ENTER to exit...”
|
||||||
|
|||||||
@ -15,11 +15,6 @@ namespace project_name
|
|||||||
.SetPosition(new Vector2(150, 150))
|
.SetPosition(new Vector2(150, 150))
|
||||||
.AddComponent<DemoComponent>()
|
.AddComponent<DemoComponent>()
|
||||||
.AddComponent(new PrototypeSpriteRenderer(20, 20));
|
.AddComponent(new PrototypeSpriteRenderer(20, 20));
|
||||||
|
|
||||||
var logo = Content.Load<Texture2D>("nez-logo-black");
|
|
||||||
CreateEntity("logo")
|
|
||||||
.SetPosition(Screen.Center)
|
|
||||||
.AddComponent(new SpriteRenderer(logo));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user