From 6c2574c722793bdb8929116c3facc65bd010506d Mon Sep 17 00:00:00 2001 From: Macocian Alexandru Victor Date: Mon, 29 Jun 2026 14:05:05 +0200 Subject: [PATCH] Debug scripts improvements (#1553) Co-authored-by: Alexandru Macocian --- .gitignore | 4 ++-- .nvim.lua | 4 ++-- Daybreak.Linux/Daybreak.Wayland.sh | 0 Scripts/PublishLinuxWineX86.sh | 0 Scripts/SetupWinePrefix.sh | 0 Scripts/StageX86ForDebug.sh | 22 +++++++++++++++------- 6 files changed, 19 insertions(+), 11 deletions(-) mode change 100644 => 100755 Daybreak.Linux/Daybreak.Wayland.sh mode change 100644 => 100755 Scripts/PublishLinuxWineX86.sh mode change 100644 => 100755 Scripts/SetupWinePrefix.sh mode change 100644 => 100755 Scripts/StageX86ForDebug.sh diff --git a/.gitignore b/.gitignore index a41f6d3b..f16e39f4 100644 --- a/.gitignore +++ b/.gitignore @@ -181,8 +181,8 @@ DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html -# Click-Once directory -publish/ +# Click-Once / local publish directories +[Pp]ublish/ # Publish Web Output *.[Pp]ublish.xml diff --git a/.nvim.lua b/.nvim.lua index b1fef7ec..8ea4b707 100644 --- a/.nvim.lua +++ b/.nvim.lua @@ -72,7 +72,7 @@ end vim.api.nvim_create_user_command('DaybreakStageX86', function(opts) local config = opts.args ~= '' and opts.args or 'Debug' local progress = start_progress('Daybreak StageX86', 'Building x86 components (' .. config .. ')…') - vim.fn.jobstart({ scripts .. '/StageX86ForDebug.sh', config }, { + vim.fn.jobstart({ scripts .. '/StageX86ForDebug.sh', config, '' }, { cwd = repo, on_exit = function(_, code) vim.schedule(function() @@ -102,7 +102,7 @@ end, { -- bindings work. vim.api.nvim_create_user_command('DaybreakRunLinux', function() vim.cmd('enew') - vim.fn.termopen({ 'dotnet', 'run', '--project', 'Daybreak.Linux/Daybreak.Linux.csproj' }, + vim.fn.termopen({ 'dotnet', 'run', '--project', 'Daybreak.Linux/Daybreak.Linux.csproj', '-c', 'Debug' }, { cwd = repo }) vim.cmd('startinsert') end, { desc = 'Run Daybreak.Linux via dotnet run in the current window' }) diff --git a/Daybreak.Linux/Daybreak.Wayland.sh b/Daybreak.Linux/Daybreak.Wayland.sh old mode 100644 new mode 100755 diff --git a/Scripts/PublishLinuxWineX86.sh b/Scripts/PublishLinuxWineX86.sh old mode 100644 new mode 100755 diff --git a/Scripts/SetupWinePrefix.sh b/Scripts/SetupWinePrefix.sh old mode 100644 new mode 100755 diff --git a/Scripts/StageX86ForDebug.sh b/Scripts/StageX86ForDebug.sh old mode 100644 new mode 100755 index 8aa1f7cf..002bb371 --- a/Scripts/StageX86ForDebug.sh +++ b/Scripts/StageX86ForDebug.sh @@ -5,13 +5,13 @@ # easy-dot-net's "Run Daybreak.Linux") picks them up. # # Layout produced (matches VerifyNativeComponentsAction / DaybreakInjector): -# Daybreak.Linux/bin///net10.0/linux-x64/Injector/Daybreak.Injector.exe -# Daybreak.Linux/bin///net10.0/linux-x64/Api/Daybreak.API.dll -# Daybreak.Linux/bin///net10.0/linux-x64/Api/gwca.dll +# Daybreak.Linux/bin//net10.0/linux-x64/Injector/Daybreak.Injector.exe +# Daybreak.Linux/bin//net10.0/linux-x64/Api/Daybreak.API.dll +# Daybreak.Linux/bin//net10.0/linux-x64/Api/gwca.dll # # Usage: Scripts/StageX86ForDebug.sh [Configuration] [Platform] # Configuration: Debug (default) or Release -# Platform: x64 (default) +# Platform: optional; pass x64 only when running with -p:Platform=x64 # # NativeAOT is built in Debug by default to match the Windows dev workflow # (Scripts/PublishWindowsX86.ps1 stages Debug AOT into the Daybreak.Linux @@ -23,13 +23,17 @@ set -euo pipefail DAYBREAK_CONFIG="${1:-Debug}" -DAYBREAK_PLATFORM="${2:-x64}" +DAYBREAK_PLATFORM="${2:-}" STAGE_AOT_CONFIG="${STAGE_AOT_CONFIG:-Debug}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" cd "$REPO_ROOT" -DEST_ROOT="$REPO_ROOT/Daybreak.Linux/bin/$DAYBREAK_PLATFORM/$DAYBREAK_CONFIG/net10.0/linux-x64" +if [[ -n "$DAYBREAK_PLATFORM" ]]; then + DEST_ROOT="$REPO_ROOT/Daybreak.Linux/bin/$DAYBREAK_PLATFORM/$DAYBREAK_CONFIG/net10.0/linux-x64" +else + DEST_ROOT="$REPO_ROOT/Daybreak.Linux/bin/$DAYBREAK_CONFIG/net10.0/linux-x64" +fi mkdir -p "$DEST_ROOT/Injector" "$DEST_ROOT/Api" echo "=== Building x86 components ($STAGE_AOT_CONFIG) via wine ===" @@ -66,4 +70,8 @@ ls -la "$DEST_ROOT/Injector/" | sed 's/^/ /' echo ls -la "$DEST_ROOT/Api/" | sed 's/^/ /' echo -echo "Now: dotnet run --project Daybreak.Linux -c $DAYBREAK_CONFIG -p:Platform=$DAYBREAK_PLATFORM" +if [[ -n "$DAYBREAK_PLATFORM" ]]; then + echo "Now: dotnet run --project Daybreak.Linux -c $DAYBREAK_CONFIG -p:Platform=$DAYBREAK_PLATFORM" +else + echo "Now: dotnet run --project Daybreak.Linux -c $DAYBREAK_CONFIG" +fi