From 2d6696451b548bcfdabdc0bd578a601b251f14c3 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Tue, 8 Apr 2025 17:47:15 -0500 Subject: [PATCH] debugger: mark tool as deprecate --- .github/workflows/CI.yml | 2 +- CMakeLists.txt | 8 +++++++- README.md | 9 +++++---- projects/cxbx/CMakeLists.txt | 2 +- src/CxbxDebugger/CxbxDebuggerMain.Designer.cs | 17 +++++++++++++++-- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b6b47f051..bca9d12c3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,7 +38,7 @@ jobs: with: submodules: recursive - name: Generate CMake files - run: cmake -B build -A Win32,version=${{ matrix.sdkver }} -DCMAKE_SYSTEM_VERSION=${{ matrix.winver }} + run: cmake -B build -A Win32,version=${{ matrix.sdkver }} -DCMAKE_SYSTEM_VERSION=${{ matrix.winver }} -DBUILD_CXBXR_DEBUGGER=ON - name: Build run: cmake --build build --config ${{ matrix.configuration }} -j $env:NUMBER_OF_PROCESSORS - name: Prepare artifacts diff --git a/CMakeLists.txt b/CMakeLists.txt index b2ef0c9df..b1a999371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,6 +430,12 @@ file (GLOB CXBXR_SOURCE_EMU "${CXBXR_ROOT_DIR}/src/common/ReserveAddressRanges.cpp" ) + +option(BUILD_CXBXR_DEBUGGER "Build cxbxr-debugger tool (with cheat table support)") +if(BUILD_CXBXR_DEBUGGER) + message(DEPRECATION "The Cxbxr-Debugger tool will eventually be removed from the upstream branch.") +endif() + add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/projects/cxbx") add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/projects/cxbxr-ldr") @@ -454,7 +460,7 @@ endif() # Check if generator is Visual Studio then enable Cxbxr-Debugger project. # Since C# is currently supported with Visual Studio for now. -if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])" AND BUILD_CXBXR_DEBUGGER) # Issues with compile (the same with develop branch) and # for some reason did not put the files into virtual folder? # Might need to put the list in the source folder for workaround fix. diff --git a/README.md b/README.md index c3bd5c299..bf92545a6 100644 --- a/README.md +++ b/README.md @@ -96,10 +96,11 @@ Don't open `CMakeLists.txt` from Visual Studio, as it won't generate files in th ##### Generate Visual Studio files 1. If you don't have CMake installed, open `___ Native Tools Command Prompt for VS 20##`. 2. `cd` to the Cxbx-Reloaded directory. -3. Run these commands. - 1. `mkdir build & cd build` - 2. `cmake .. -G "Visual Studio 17 2022" -A Win32` - * VS2022 17.0 or later is required. +3. Run the following command: `cmake -B build -G "Visual Studio 17 2022" -A Win32` \ + **NOTES**: + * VS2022 17.0 or later is required. + * To build the Cxbx-Reloaded Debugger tool, add the variable `-DBUILD_CXBXR_DEBUGGER=ON` to the above command. + * _This debugger tool is deprecated and will be eventually removed, please use the Visual Studio debugger instead._ 4. Open `Cxbx-Reloaded.sln` from the `build` directory. 5. Select the Release configuration, then click Build. * Debug builds are **significantly slower, and only for developers**. diff --git a/projects/cxbx/CMakeLists.txt b/projects/cxbx/CMakeLists.txt index 3a3dbfa10..d2a2e9bb4 100644 --- a/projects/cxbx/CMakeLists.txt +++ b/projects/cxbx/CMakeLists.txt @@ -189,7 +189,7 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin ) -if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])" AND BUILD_CXBXR_DEBUGGER) add_dependencies(cxbx cxbxr-debugger) endif() diff --git a/src/CxbxDebugger/CxbxDebuggerMain.Designer.cs b/src/CxbxDebugger/CxbxDebuggerMain.Designer.cs index d6f811ba7..6cb9c040c 100644 --- a/src/CxbxDebugger/CxbxDebuggerMain.Designer.cs +++ b/src/CxbxDebugger/CxbxDebuggerMain.Designer.cs @@ -41,6 +41,7 @@ this.windowsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.lblStatusDeprecate = new System.Windows.Forms.ToolStripStatusLabel(); this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel(); this.menuStrip.SuspendLayout(); this.statusStrip1.SuspendLayout(); @@ -132,18 +133,29 @@ // this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.lblStatusDeprecate, this.lblStatus}); + this.statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow; this.statusStrip1.Location = new System.Drawing.Point(0, 339); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 9, 0); - this.statusStrip1.Size = new System.Drawing.Size(734, 22); + this.statusStrip1.Size = new System.Drawing.Size(734, 61); this.statusStrip1.TabIndex = 2; this.statusStrip1.Text = "statusStrip1"; // + // lblStatusDeprecate + // + this.lblStatusDeprecate.BackColor = System.Drawing.Color.Yellow; + this.lblStatusDeprecate.Name = "lblStatusDeprecate"; + this.lblStatusDeprecate.Size = new System.Drawing.Size(723, 15); + this.lblStatusDeprecate.Spring = true; + this.lblStatusDeprecate.Text = "WARNING: cxbxr-debugger will eventually be removed from upstream branch."; + this.lblStatusDeprecate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // lblStatus // this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(39, 17); + this.lblStatus.Size = new System.Drawing.Size(723, 15); this.lblStatus.Text = "Ready"; // // CxbxDebuggerMain @@ -180,6 +192,7 @@ private System.Windows.Forms.ToolStripMenuItem miSuspend; private System.Windows.Forms.ToolStripMenuItem miResume; private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel lblStatusDeprecate; private System.Windows.Forms.ToolStripStatusLabel lblStatus; } }