Skip to content

Commit

Permalink
Merge pull request #112 from tsoding/remove-external-duplicates
Browse files Browse the repository at this point in the history
Remove duplicates of external deps from raylib
  • Loading branch information
rexim authored Jun 9, 2024
2 parents 12048dd + a9767c2 commit 8e7b64e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 101,352 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/nob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
path: build/
windows:
runs-on: windows-latest
strategy:
matrix:
hotreload:
- "/DMUSIALIZER_HOTRELOAD"
- ""
steps:
- name: Clone GIT repo
uses: actions/checkout@v4
Expand All @@ -48,7 +53,7 @@ jobs:
# https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut
run: |
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
cl.exe -o nob.exe nob.c
cl.exe ${{ matrix.hotreload }} -o nob.exe nob.c
- name: Run nob
shell: cmd
run: |
Expand Down
11 changes: 8 additions & 3 deletions nob.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ bool generate_resource_bundle(void)
genf(out, "Resource resources[] = {");
for (size_t i = 0; i < NOB_ARRAY_LEN(resources); ++i) {
genf(out, " {.file_path = \"%s\", .offset = %zu, .size = %zu},",
resources[i].file_path, resources[i].offset, resources[i].size);
resources[i].file_path, resources[i].offset, resources[i].size);
}
genf(out, "};");

genf(out, "unsigned char bundle[] = {");
size_t row_size = 20;
for (size_t i = 0; i < bundle.count; ){
for (size_t i = 0; i < bundle.count; ) {
fprintf(out, " ");
for (size_t col = 0; col < row_size && i < bundle.count; ++col, ++i) {
fprintf(out, "0x%02X, ", (unsigned char)bundle.items[i]);
Expand Down Expand Up @@ -236,7 +236,7 @@ int main(int argc, char **argv)
}

if (!nob_procs_wait(procs)) return 1;
} else if (strcmp(subcommand, "help") == 0){
} else if (strcmp(subcommand, "help") == 0) {
log_available_subcommands(program, NOB_INFO);
} else {
nob_log(NOB_ERROR, "Unknown subcommand %s", subcommand);
Expand Down Expand Up @@ -287,7 +287,12 @@ void generate_default_config(Nob_String_Builder *content)

nob_sb_append_cstr(content, "\n");
nob_sb_append_cstr(content, "//// Moves everything in src/plug.c to a separate \"DLL\" so it can be hotreloaded. Works only for Linux right now\n");
// TODO: FIX ASAP! This requires bootstrapping nob with additional flags which goes against its philosophy!
#ifdef MUSIALIZER_HOTRELOAD
nob_sb_append_cstr(content, "#define MUSIALIZER_HOTRELOAD\n");
#else
nob_sb_append_cstr(content, "// #define MUSIALIZER_HOTRELOAD\n");
#endif
nob_sb_append_cstr(content, "\n");
nob_sb_append_cstr(content, "//// Don't bundle resources/ folder with the executable and load the resources directly from the folder.\n");
nob_sb_append_cstr(content, "// #define MUSIALIZER_UNBUNDLE\n");
Expand Down
Loading

0 comments on commit 8e7b64e

Please sign in to comment.