Skip to content

Commit

Permalink
Migrate to .NET 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
X9VoiD committed Dec 8, 2022
1 parent 428c4ba commit 72f00a0
Show file tree
Hide file tree
Showing 21 changed files with 135 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True

- name: Linux Publish
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True

- name: MacOS Publish
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True

- name: Windows Publish
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True

- name: Lint Changed Files
Expand All @@ -131,7 +131,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True

- name: Run tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True
- name: Debian Build
run: ./Debian/package
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0'
dotnet-version: '7.0'
include-prerelease: True
- name: Package
run: ./Windows/package.ps1
Expand All @@ -114,4 +114,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: OpenTabletDriver.win-x64.zip
path: ./Windows/OpenTabletDriver.win-x64.zip
path: ./Windows/OpenTabletDriver.win-x64.zip
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# IDE
.vs/
.vscode/
.vscode/**
!.vscode/launch.json
!.vscode/tasks.json
.idea/

# Build Artifacts
Expand Down
54 changes: 54 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Daemon",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build Daemon",
"program": "${workspaceFolder}/OpenTabletDriver.Daemon/bin/Debug/net7.0/OpenTabletDriver.Daemon.dll",
"args": [],
"cwd": "${workspaceFolder}/OpenTabletDriver.Daemon",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "UX (Wpf)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build UX (Wpf)",
"program": "${workspaceFolder}/OpenTabletDriver.UX.Wpf/bin/Debug/net7.0/OpenTabletDriver.UX.Wpf.dll",
"args": [],
"cwd": "${workspaceFolder}/OpenTabletDriver.UX.Wpf",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "UX (Gtk)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build UX (Gtk)",
"program": "${workspaceFolder}/OpenTabletDriver.UX.Gtk/bin/Debug/net7.0/OpenTabletDriver.UX.Gtk.dll",
"args": [],
"cwd": "${workspaceFolder}/OpenTabletDriver.UX.Gtk",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "UX (MacOS)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build UX (MacOS)",
"program": "${workspaceFolder}/OpenTabletDriver.UX.MacOS/bin/Debug/net7.0/OpenTabletDriver.UX.MacOS.dll",
"args": [],
"cwd": "${workspaceFolder}/OpenTabletDriver.UX.MacOS",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
53 changes: 53 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Daemon",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/OpenTabletDriver.Daemon/OpenTabletDriver.Daemon.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Build UX (Wpf)",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/OpenTabletDriver.UX.Wpf/OpenTabletDriver.UX.Wpf.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Build UX (Gtk)",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/OpenTabletDriver.UX.Gtk/OpenTabletDriver.UX.Gtk.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Build UX (MacOS)",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/OpenTabletDriver.UX.MacOS/OpenTabletDriver.UX.MacOS.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
]
}
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<VersionBase>0.7.0.0</VersionBase>
<FrameworkBase>net6.0</FrameworkBase>
<FrameworkLTS>net6.0</FrameworkLTS>
<FrameworkLatest>net7.0</FrameworkLatest>
<LangVersion>preview</LangVersion>
<VersionPrefix>$(VersionBase)</VersionPrefix>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup Label="Project Properties">
<OutputType>Exe</OutputType>
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project Properties">
<TargetFrameworks>net5.0;$(FrameworkBase)</TargetFrameworks>
<TargetFrameworks>$(FrameworkLTS);$(FrameworkLatest)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200</NoWarn>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.Console/OpenTabletDriver.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup Label="Project Properties">
<OutputType>Exe</OutputType>
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<NoWarn>VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.Daemon/OpenTabletDriver.Daemon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup Label="Project Properties">
<OutputType>Exe</OutputType>
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<NoWarn>VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.Desktop/OpenTabletDriver.Desktop.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project Properties">
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200</NoWarn>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.Native/OpenTabletDriver.Native.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project Properties">
<TargetFrameworks>net5.0;$(FrameworkBase)</TargetFrameworks>
<TargetFrameworks>$(FrameworkLTS);$(FrameworkLatest)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.Tests/OpenTabletDriver.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project Properties">
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.UX.Gtk/OpenTabletDriver.UX.Gtk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup Label="Project Properties">
<OutputType>Exe</OutputType>
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.UX.MacOS/OpenTabletDriver.UX.MacOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup Label="Project Properties">
<OutputType>Exe</OutputType>
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RuntimeIdentifiers>osx-x64;osx-arm64</RuntimeIdentifiers>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.UX.Wpf/OpenTabletDriver.UX.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup Label="Project Properties">
<OutputType>WinExe</OutputType>
<TargetFramework>$(FrameworkBase)-windows</TargetFramework>
<TargetFramework>$(FrameworkLatest)-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ApplicationIcon>../OpenTabletDriver.UX/Assets/otd.ico</ApplicationIcon>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver.UX/OpenTabletDriver.UX.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project Properties">
<TargetFramework>$(FrameworkBase)</TargetFramework>
<TargetFramework>$(FrameworkLatest)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenTabletDriver/OpenTabletDriver.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project Properties">
<TargetFrameworks>net5.0;$(FrameworkBase)</TargetFrameworks>
<TargetFrameworks>$(FrameworkLTS);$(FrameworkLatest)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>VSTHRD100; VSTHRD101; VSTHRD110; VSTHRD200</NoWarn>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ shift

config=(--configuration='Release')

options=(${config} --framework='net6.0' --self-contained='false' --verbosity=quiet --output='./bin' \
options=(${config} --framework='net7.0' --self-contained='false' --verbosity=quiet --output='./bin' \
/p:SuppressNETCoreSdkPreviewMessage=true /p:PublishTrimmed=false --runtime=$runtime -p:SourceRevisionId=$(git rev-parse --short HEAD))

# change dir to script root, in case people run the script outside of the folder
Expand Down
2 changes: 1 addition & 1 deletion generate-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SRC_ROOT=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
[ ! -d "${SRC_ROOT}" ] && exit 100;

PROJECT="${SRC_ROOT}/OpenTabletDriver.Tools.udev"
FRAMEWORK="net6.0"
FRAMEWORK="net7.0"

TABLET_CONFIGURATIONS="${SRC_ROOT}/OpenTabletDriver.Configurations/Configurations"
RULES_FILE="${SRC_ROOT}/bin/99-opentabletdriver.rules"
Expand Down

0 comments on commit 72f00a0

Please sign in to comment.