Add scripts to use local OpenTabletDriver (#6709)

This commit is contained in:
Kuuuube
2026-03-01 07:04:45 -05:00
committed by GitHub
parent ca40f0a4d3
commit 1652f6d19d
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# Run this script to use a local copy of OpenTabletDriver rather than fetching it from nuget.
# It expects the OpenTabletDriver directory to be at the same level as the osu-framework directory
#
# https://github.com/ppy/osu-framework/wiki/Testing-local-framework-checkout-with-other-projects
$FRAMEWORK_CSPROJ="osu.Framework/osu.Framework.csproj"
$SLN="osu-framework.sln"
dotnet remove $FRAMEWORK_CSPROJ reference OpenTabletDriver;
dotnet sln $SLN add ../OpenTabletDriver/OpenTabletDriver/OpenTabletDriver.csproj;
dotnet add $FRAMEWORK_CSPROJ reference ../OpenTabletDriver/OpenTabletDriver/OpenTabletDriver.csproj;
$TMP=New-TemporaryFile
$SLNF=Get-Content "osu-framework.Desktop.slnf" | ConvertFrom-Json
$SLNF.solution.projects += ("../OpenTabletDriver/OpenTabletDriver/OpenTabletDriver.csproj")
ConvertTo-Json $SLNF | Out-File $TMP -Encoding UTF8
Move-Item -Path $TMP -Destination "osu-framework.Desktop.slnf" -Force

20
UseLocalOpenTabletDriver.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
# Run this script to use a local copy of OpenTabletDriver rather than fetching it from nuget.
# It expects the OpenTabletDriver directory to be at the same level as the osu-framework directory
#
# https://github.com/ppy/osu-framework/wiki/Testing-local-framework-checkout-with-other-projects
FRAMEWORK_CSPROJ="osu.Framework/osu.Framework.csproj"
SLN="osu-framework.sln"
dotnet remove $FRAMEWORK_CSPROJ reference OpenTabletDriver
dotnet sln $SLN add ../OpenTabletDriver/OpenTabletDriver/OpenTabletDriver.csproj
dotnet add $FRAMEWORK_CSPROJ reference ../OpenTabletDriver/OpenTabletDriver/OpenTabletDriver.csproj
tmp=$(mktemp)
jq '.solution.projects += ["../OpenTabletDriver/OpenTabletDriver/OpenTabletDriver.csproj"]' osu-framework.Desktop.slnf > $tmp
mv -f $tmp osu-framework.Desktop.slnf