add raddbug files

This commit is contained in:
2026-02-25 10:40:05 -05:00
parent 7b4142e3c9
commit 789e2b678b
4 changed files with 49 additions and 5 deletions

1
.vscode/launch.json vendored
View File

@@ -8,6 +8,7 @@
"program": "${workspaceFolder}/build/autosample.exe",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"preLaunchTask": "build-debug"
}
]

29
autosample.raddbg Normal file
View File

@@ -0,0 +1,29 @@
// raddbg 0.9.24 project file
recent_file: path: "src/theme.cpp"
recent_file: path: "src/main.cpp"
recent_file: path: "nob.obj"
recent_file: path: "vendor/imgui/imgui.h"
recent_file: path: "src/platform/platform.h"
recent_file: path: "project.rad"
target:
{
executable: "build/autosample.exe"
working_directory: build
}
debug_info:
{
path: "C:/Users/mta/projects/autosample/build/autosample.pdb"
timestamp: 66207523114644
}
target:
{
executable: "build/autosample.exe"
working_directory: "build/"
enabled: 1
}
breakpoint:
{
source_location: "src/theme.cpp:4:1"
hit_count: 1
}

21
nob.c
View File

@@ -58,9 +58,9 @@ static bool build_imgui_lib(bool debug) {
nob_cmd_append(&cmd, "/Ivendor/imgui", "/Ivendor/imgui/backends");
if (debug) {
nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG");
nob_cmd_append(&cmd, "/MTd", "/Zi", "/Od", "/D_DEBUG");
} else {
nob_cmd_append(&cmd, "/O2", "/DNDEBUG");
nob_cmd_append(&cmd, "/MT", "/O2", "/DNDEBUG");
}
nob_cmd_append(&cmd, nob_temp_sprintf("/Fo:%s/", BUILD_DIR));
@@ -73,7 +73,7 @@ static bool build_imgui_lib(bool debug) {
// Archive .obj files into a .lib
cmd.count = 0;
nob_cmd_append(&cmd, "lib.exe", "/nologo");
nob_cmd_append(&cmd, "lib.exe", "/nologo", "/MACHINE:X64");
nob_cmd_append(&cmd, nob_temp_sprintf("/OUT:%s", lib_path));
for (size_t i = 0; i < NOB_ARRAY_LEN(imgui_files); i++)
@@ -92,8 +92,18 @@ int main(int argc, char **argv) {
NOB_GO_REBUILD_URSELF(argc, argv);
bool debug = false;
bool clean = false;
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "debug") == 0) debug = true;
else if (strcmp(argv[i], "clean") == 0) clean = true;
}
if (clean) {
nob_log(NOB_INFO, "Cleaning %s/", BUILD_DIR);
Nob_Cmd cmd = {0};
nob_cmd_append(&cmd, "cmd.exe", "/c", "if exist " BUILD_DIR " rmdir /s /q " BUILD_DIR);
if (!nob_cmd_run(&cmd)) return 1;
return 0;
}
if (!nob_mkdir_if_not_exists(BUILD_DIR)) return 1;
@@ -109,9 +119,9 @@ int main(int argc, char **argv) {
nob_cmd_append(&cmd, "/Isrc", "/Ivendor/imgui", "/Ivendor/imgui/backends");
if (debug) {
nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG");
nob_cmd_append(&cmd, "/MTd", "/Zi", "/Od", "/D_DEBUG");
} else {
nob_cmd_append(&cmd, "/Zi", "/O2", "/DNDEBUG");
nob_cmd_append(&cmd, "/MT", "/Zi", "/O2", "/DNDEBUG");
}
nob_cmd_append(&cmd, nob_temp_sprintf("/Fe:%s/autosample.exe", BUILD_DIR));
@@ -122,6 +132,7 @@ int main(int argc, char **argv) {
nob_cmd_append(&cmd, src_files[i]);
nob_cmd_append(&cmd, "/link");
nob_cmd_append(&cmd, "/MACHINE:X64");
nob_cmd_append(&cmd, "/SUBSYSTEM:CONSOLE");
nob_cmd_append(&cmd, nob_temp_sprintf("/PDB:%s/autosample.pdb", BUILD_DIR));
nob_cmd_append(&cmd, "/DEBUG");

View File

@@ -5,6 +5,7 @@
#include "renderer/renderer.h"
#include "imgui.h"
#include "imgui_internal.h"
#include <iostream>
// [cpp]
#include "platform/platform_win32.cpp"
@@ -33,6 +34,8 @@ static void build_default_layout(ImGuiID dockspace_id) {
int main(int argc, char **argv) {
std::cout << "Hello" << std::endl;
(void)argc;
(void)argv;