Skip to content

Commit 4d8a4fb

Browse files
committed
Update templates\build script
1 parent 972f24c commit 4d8a4fb

File tree

7 files changed

+49
-20
lines changed

7 files changed

+49
-20
lines changed

nuget/build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Remove-Item "*.nupkg","*.snupkg" -Force
44

55
# Build SadConsole
66
Write-Output "Building SadConsole Debug and Release"
7+
$output = Invoke-Expression "dotnet restore ..\SadConsole\SadConsole.csproj -c Debug --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
78
$output = Invoke-Expression "dotnet build ..\SadConsole\SadConsole.csproj -c Debug"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
9+
$output = Invoke-Expression "dotnet restore ..\SadConsole\SadConsole.csproj -c Release --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
810
$output = Invoke-Expression "dotnet build ..\SadConsole\SadConsole.csproj -c Release"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
911

1012
# Find the version we're using
@@ -56,7 +58,9 @@ if ($foundPackage){
5658

5759
# SadConsole Extended
5860
Write-Output "Building $project Debug and Release"
61+
$output = Invoke-Expression "dotnet restore ..\$project\$project.csproj -c Debug -p:UseProjectReferences=false --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
5962
$output = Invoke-Expression "dotnet build ..\$project\$project.csproj -c Debug -p:UseProjectReferences=false"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
63+
$output = Invoke-Expression "dotnet restore ..\$project\$project.csproj -c Release -p:UseProjectReferences=false --no-cache"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
6064
$output = Invoke-Expression "dotnet build ..\$project\$project.csproj -c Release -p:UseProjectReferences=false"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
6165

6266
# Push packages to nuget
@@ -65,7 +69,6 @@ if ($foundPackage){
6569

6670
foreach ($package in $sadConsolePackages) {
6771
$output = Invoke-Expression "dotnet nuget push `"$package`" -s nuget.org -k $nugetKey"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
68-
$output = Invoke-Expression "dotnet nuget push `"$package`" -s nuget.org -k $nugetKey"; if ($LASTEXITCODE -ne 0) { Write-Error "Failed"; Write-Output $output; throw }
6972
}
7073

7174
}

templates/SadConsole.Templates.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<PropertyGroup>
44
<PackageType>Template</PackageType>
5-
<PackageVersion>10.0.13</PackageVersion>
5+
<PackageVersion>10.0.14</PackageVersion>
66
<PackageId>SadConsole.Templates</PackageId>
77
<Title>SadConsole Game Templates</Title>
88
<Authors>Thraka</Authors>
99
<Description>Templates to create new SadConsole projects</Description>
1010
<PackageTags>dotnet-new;templates;template;sadconsole;roguelike;roguelikes;sadrogue;thesadrogue</PackageTags>
11-
<TargetFramework>net6.0</TargetFramework>
11+
<TargetFramework>net8.0</TargetFramework>
1212

1313
<IncludeContentInPack>true</IncludeContentInPack>
1414
<IncludeBuildOutput>false</IncludeBuildOutput>

templates/template_code/SadConsole.Examples.Demo.CSharp/DemoControls2.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,18 @@ public ControlsTest2() : base(GameSettings.ScreenDemoBounds.Width, GameSettings.
6060
//
6161
// Table control
6262
//
63-
Table tableControl = new Table(20, 10, 3);
63+
Table tableControl = new Table(20, 10, 4);
6464

6565
int counter = 0;
66+
tableControl.SetupScrollBar(Orientation.Vertical, 10, (tableControl.Width - 1, 0));
67+
tableControl.SetupScrollBar(Orientation.Horizontal, 10, (1, 0));
6668

67-
for (int y = 0; y < 10; y++)
69+
for (int y = 0; y < 15; y++)
6870
for (int x = 0; x < 20; x++)
6971
tableControl.Cells[y, x].Value = ++counter;
72+
tableControl.Position = (22, 2);
7073

71-
tableControl.Position = (1, 8);
72-
73-
//Controls.Add(tableControl);
74+
Controls.Add(tableControl);
7475

7576
//
7677
// Tab control showing two tabs
@@ -121,7 +122,7 @@ public ControlsTest2() : base(GameSettings.ScreenDemoBounds.Width, GameSettings.
121122
},
122123
35, 15) { Name = "tab" };
123124
tab.Position = (22, 2);
124-
Controls.Add(tab);
125+
//Controls.Add(tab);
125126

126127
// Create the radio buttons for blue/black themes
127128
RadioButton colorsBlack = new("Ansi Black")
@@ -181,10 +182,10 @@ protected void OnInvalidated()
181182
Surface.Fill(colors.ControlHostForeground, colors.ControlHostBackground, 0, 0);
182183

183184
Panel panel = (Panel)Controls["label panel"];
184-
TabControl tab = (TabControl)Controls["tab"];
185+
//TabControl tab = (TabControl)Controls["tab"];
185186

186187
this.Print(panel.Position.X, panel.Position.Y - 1, "PANEL WITH LABEL", colors.YellowDark);
187-
this.Print(tab.Position.X, tab.Position.Y - 1, "TAB CONTROL", colors.YellowDark);
188+
//this.Print(tab.Position.X, tab.Position.Y - 1, "TAB CONTROL", colors.YellowDark);
188189
this.Print(1, 21, "COLOR THEME", colors.YellowDark);
189190
this.Print(1, panel.Bounds.MaxExtentY + 1, "TOGGLE SWITCH", colors.YellowDark);
190191
}

templates/template_code/SadConsole.Examples.Demo.CSharp/Examples.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<RootNamespace>SadConsole.Examples</RootNamespace>
@@ -27,10 +27,10 @@
2727

2828
<!-- SadConsole related NuGet packages. -->
2929
<ItemGroup>
30-
<PackageReference Condition=" '$(GameHost)' == 'monogame' " Include="SadConsole.Host.MonoGame" Version="10.0.0" />
31-
<PackageReference Condition=" '$(GameHost)' == 'sfml' " Include="SadConsole.Host.SFML" Version="10.0.0" />
32-
<PackageReference Include="SadConsole.Extended" Version="10.0.0" />
33-
<PackageReference Include="SadConsole" Version="10.0.0" />
30+
<PackageReference Condition=" '$(GameHost)' == 'monogame' " Include="SadConsole.Host.MonoGame" Version="10.0.3" />
31+
<PackageReference Condition=" '$(GameHost)' == 'sfml' " Include="SadConsole.Host.SFML" Version="10.0.3" />
32+
<PackageReference Include="SadConsole.Extended" Version="10.0.3" />
33+
<PackageReference Include="SadConsole" Version="10.0.3" />
3434
</ItemGroup>
3535

3636
<!-- MonoGame host requires you to choose which library you want to use. -->

templates/template_code/SadConsole.Project.MonoGame.CSharp/MyGame.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<RootNamespace>SadConsoleGame</RootNamespace>
@@ -17,7 +17,7 @@
1717

1818
<ItemGroup>
1919
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
20-
<PackageReference Include="SadConsole.Host.MonoGame" Version="10.0.0" />
20+
<PackageReference Include="SadConsole.Host.MonoGame" Version="10.0.3" />
2121
</ItemGroup>
2222

2323
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.002.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyGame", "MyGame.csproj", "{28BD4D81-BE23-4DDB-95A1-4FF3E00EFFE3}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{28BD4D81-BE23-4DDB-95A1-4FF3E00EFFE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{28BD4D81-BE23-4DDB-95A1-4FF3E00EFFE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{28BD4D81-BE23-4DDB-95A1-4FF3E00EFFE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{28BD4D81-BE23-4DDB-95A1-4FF3E00EFFE3}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {94CC880C-3027-4370-AF2E-EB285EA847E7}
24+
EndGlobalSection
25+
EndGlobal

templates/template_code/SadConsole.Project.SFML.CSharp/MyGame.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<RootNamespace>SadConsoleGame</RootNamespace>
@@ -16,7 +16,7 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="SadConsole.Host.SFML" Version="10.0.0" />
19+
<PackageReference Include="SadConsole.Host.SFML" Version="10.0.3" />
2020
</ItemGroup>
2121

2222
</Project>

0 commit comments

Comments
 (0)