Skip to content

Commit

Permalink
Change to .NET 8. (#94)
Browse files Browse the repository at this point in the history
* Change to .NET 8.

* WASM client: Fix css showing long version number

* Bump xunit and Microsoft.SourceLink.GitHub

* Bump Silk.NET
  • Loading branch information
highbyte authored Nov 25, 2023
1 parent 65737e7 commit 4b39099
Show file tree
Hide file tree
Showing 33 changed files with 102 additions and 90 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Add .NET 7.0 manually as github/codeql-action/autobuild below does not seem to support it.
# Add .NET manually as github/codeql-action/autobuild below does not seem to support it.
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-blazor-app-publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2
- uses: actions/checkout@v4


# Set version number (major.minor.revision) as current Year.Month.Day. Ex: 2022.11.19
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Install DotNet workload - WASM tools
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-push-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# - name: Clean package cache as a temporary workaround for actions/setup-dotnet#155
# run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Install DotNet workload - WASM tools
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonarscan-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: '0'

# Runs a single command using the runners shell
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.2.6
- name: SonarScanner for .NET 8 with pull request decoration support
uses: highbyte/sonarscan-dotnet@v2.3.0
with:
# The key of the SonarQube project
sonarProjectKey: highbyte_dotnet-6502
Expand Down
18 changes: 9 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"request": "launch",
"preLaunchTask": "build skia native app",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SilkNetNative/bin/Debug/net7.0/Highbyte.DotNet6502.App.SilkNetNative.dll",
"program": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SilkNetNative/bin/Debug/net8.0/Highbyte.DotNet6502.App.SilkNetNative.dll",
"args": [],
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SilkNetNative/bin/Debug/net7.0",
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SilkNetNative/bin/Debug/net8.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Blazor WASM Skia app - Launch and Debug",
"name": "Blazor WASM app - Launch and Debug",
"type": "blazorwasm",
"request": "launch",
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.WASM",
Expand All @@ -31,9 +31,9 @@
"request": "launch",
"preLaunchTask": "build console monitor app",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.ConsoleMonitor/bin/Debug/net7.0/Highbyte.DotNet6502.App.ConsoleMonitor.dll",
"program": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.ConsoleMonitor/bin/Debug/net8.0/Highbyte.DotNet6502.App.ConsoleMonitor.dll",
"args": [],
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.ConsoleMonitor/bin/Debug/net7.0",
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.ConsoleMonitor/bin/Debug/net8.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "externalTerminal",
"stopAtEntry": false
Expand All @@ -44,9 +44,9 @@
"request": "launch",
"preLaunchTask": "build console example",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/samples/ConsoleTestPrograms/bin/Debug/net7.0/ConsoleTestPrograms.dll",
"program": "${workspaceFolder}/samples/ConsoleTestPrograms/bin/Debug/net8.0/ConsoleTestPrograms.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/ConsoleTestPrograms/bin/Debug/net7.0",
"cwd": "${workspaceFolder}/samples/ConsoleTestPrograms/bin/Debug/net8.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "externalTerminal",
"stopAtEntry": false
Expand All @@ -57,9 +57,9 @@
"request": "launch",
"preLaunchTask": "build sadconsole app",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SadConsole/bin/Debug/net7.0/Highbyte.DotNet6502.App.SadConsole.dll",
"program": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SadConsole/bin/Debug/net8.0/Highbyte.DotNet6502.App.SadConsole.dll",
"args": [],
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SadConsole/bin/Debug/net7.0",
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.SadConsole/bin/Debug/net8.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "integratedTerminal",
"stopAtEntry": false
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
{
"label": "build skia blazor wasm app",
"label": "build blazor wasm app",
"command": "dotnet",
"type": "process",
"args": [
Expand All @@ -50,7 +50,7 @@
}
},
{
"label": "build skia native app",
"label": "build silk.net native app",
"command": "dotnet",
"type": "process",
"args": [
Expand Down
2 changes: 1 addition & 1 deletion doc/CPU_LIBRARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dotnet add package Highbyte.DotNet6502 --prerelease
- Clone this repo ```git clone https://github.com/highbyte/dotnet-6502.git```
- Change dir to library ```cd dotnet-6502/src/libraries/Highbyte.DotNet6502```
- Build library ```dotnet build```
- In your app, add .dll reference to ```./bin/Debug/net7.0/Highbyte.DotNet6502.dll```
- In your app, add .dll reference to ```./bin/Debug/net8.0/Highbyte.DotNet6502.dll```

## Example of basic usage of Highbyte.DotNet6502 library

Expand Down
4 changes: 2 additions & 2 deletions doc/DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

# Requirements
- Windows, Linux, or Mac.
- [.NET 7 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) installed.
- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) installed.
- Develop in
- VSCode (Windows, Linux, Mac)
- Visual Studio 2022 (Windows)
- Or other preferred editor.
- Specifics for Blazor WASM (WebAssembly) projects
- Visual Studio 2022: For building the WASM projects, add the component ".NET WebAssembly Build Tools" in Visual Studio Installer.
- VSCode / command line: For building the WASM projects, install the dotnet workload "wasm-tool", see instruction [here](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-7.0&pivots=windows#net-webassembly-build-tools).
- VSCode / command line: For building the WASM projects, install the dotnet workload "wasm-tool", see instruction [here](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=windows#net-webassembly-build-tools).

# Class diagram overview
See [here](SYSYEM_DIAGRAM.md)
Expand Down
12 changes: 6 additions & 6 deletions samples/BlazorWasmTest/BlazorWasmTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,11 +10,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="1.3.6" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.0" />
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="2.1.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion samples/BlazorWasmTest/Pages/DotNet6502EmulatorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Net.Http;
using System.Text;
using BlazorWasmTest.Helpers;
using Microsoft.Extensions.Logging.Abstractions;

namespace BlazorWasmTest
{
Expand Down Expand Up @@ -386,7 +387,7 @@ private GenericComputer InitDotNet6502Computer(byte[] prgBytes)
mem.StoreData(fileHeaderLoadAddress, codeAndDataActual);

// Initialize emulator with CPU, memory, and execution parameters
var computerBuilder = new GenericComputerBuilder();
var computerBuilder = new GenericComputerBuilder(new NullLoggerFactory());
computerBuilder
.WithCPU()
.WithStartAddress(fileHeaderLoadAddress)
Expand Down
4 changes: 2 additions & 2 deletions samples/ConsoleTestPrograms/ConsoleTestPrograms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
</ItemGroup>

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

</Project>
5 changes: 3 additions & 2 deletions samples/ConsoleTestPrograms/HostInteractionLab_Scroll_Text.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
 using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
using Highbyte.DotNet6502;
using Highbyte.DotNet6502.Systems.Generic;
using Microsoft.Extensions.Logging.Abstractions;

namespace ConsoleTestPrograms
{
Expand All @@ -29,7 +30,7 @@ public static void Run()
out ushort fileLength);

// Initialize emulator with CPU, memory, and execution parameters
var computerBuilder = new GenericComputerBuilder();
var computerBuilder = new GenericComputerBuilder(new NullLoggerFactory());
computerBuilder
.WithCPU()
.WithStartAddress(loadedAtAddress)
Expand Down
5 changes: 3 additions & 2 deletions samples/ConsoleTestPrograms/Run16bitMultiplyProgram.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System;
using System.Collections.Generic;
using Highbyte.DotNet6502;
using Highbyte.DotNet6502.Systems.Generic;
using Microsoft.Extensions.Logging.Abstractions;

namespace ConsoleTestPrograms
{
Expand Down Expand Up @@ -48,7 +49,7 @@ public static void Run()
Console.WriteLine($"{((ushort)(sourceAddressB + 1)).ToHex()} : {mem[(ushort)(sourceAddressB + 1)].ToHex()}");

// Initialize CPU, set PC to start position
var computerBuilder = new GenericComputerBuilder();
var computerBuilder = new GenericComputerBuilder(new NullLoggerFactory());
computerBuilder
.WithCPU()
.WithStartAddress(loadedAtAddress)
Expand Down
5 changes: 3 additions & 2 deletions samples/ConsoleTestPrograms/Run6502FunctionalTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System;
using Highbyte.DotNet6502;
using Highbyte.DotNet6502.Tests.Helpers;
using Highbyte.DotNet6502.Systems.Generic;
using Microsoft.Extensions.Logging.Abstractions;

namespace ConsoleTestPrograms
{
Expand Down Expand Up @@ -66,7 +67,7 @@ public void Run()
//Console.ReadLine();

// Initialize CPU, set PC to start position
var computerBuilder = new GenericComputerBuilder();
var computerBuilder = new GenericComputerBuilder(new NullLoggerFactory());
computerBuilder
.WithCPU()
.WithStartAddress(0x400)
Expand Down
5 changes: 3 additions & 2 deletions samples/ConsoleTestPrograms/RunSimple.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System;
using System.Collections.Generic;
using Highbyte.DotNet6502;
using Highbyte.DotNet6502.Systems.Generic;
using Microsoft.Extensions.Logging.Abstractions;

namespace ConsoleTestPrograms
{
Expand Down Expand Up @@ -41,7 +42,7 @@ public static void Run()
mem[codeInsAddress++] = 0x00; // BRK (Break/Force Interrupt) - emulator configured to stop execution when reaching this instruction

// Initialize emulator with CPU, memory, and execution parameters
var computerBuilder = new GenericComputerBuilder();
var computerBuilder = new GenericComputerBuilder(new NullLoggerFactory());
computerBuilder
.WithCPU()
.WithStartAddress(codeAddress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -14,8 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
<PackageReference Include="SadConsole" Version="9.2.2" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -19,10 +19,10 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="NativeFileDialogSharp" Version="0.5.0" />
<PackageReference Include="Silk.NET.Input" Version="2.17.1" />
<PackageReference Include="Silk.NET.OpenGL" Version="2.17.1" />
<PackageReference Include="Silk.NET.Windowing" Version="2.17.1" />
<PackageReference Include="Silk.NET.OpenGL.Extensions.ImGui" Version="2.17.1" />
<PackageReference Include="Silk.NET.Input" Version="2.19.0" />
<PackageReference Include="Silk.NET.OpenGL" Version="2.19.0" />
<PackageReference Include="Silk.NET.Windowing" Version="2.19.0" />
<PackageReference Include="Silk.NET.OpenGL.Extensions.ImGui" Version="2.19.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/apps/Highbyte.DotNet6502.App.SilkNetNative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Currently issue with ImGui library on M1 Macs (ARM64).
https://github.com/mellinoe/ImGui.NET/issues/350
Fix:
Go to bin directory:
cd ./bin/Debug/net70
cd ./bin/Debug/net80

Copy runtime file from osx-universal to arm64:
cp runtimes/osx-universal/native/libcimgui.dylib runtimes/osx-arm64/native
Expand Down
Loading

0 comments on commit 4b39099

Please sign in to comment.