diff --git a/nob.c b/nob.c index 4f4b699..0bc7bdf 100644 --- a/nob.c +++ b/nob.c @@ -327,6 +327,12 @@ bool build_musializer(Config config) nob_log(NOB_ERROR, "TODO: hotreloading is not supported on %s yet", NOB_ARRAY_GET(target_names, config.target)); nob_return_defer(false); } else { + cmd.count = 0; + nob_cmd_append(&cmd, "rc"); + nob_cmd_append(&cmd, "/fo", "./build/musializer.res"); + nob_cmd_append(&cmd, "./src/musializer.rc"); + // NOTE: Do not change the order of commandline arguments to rc. Their argparser is weird. + if (!nob_cmd_run_sync(cmd)) nob_return_defer(false); cmd.count = 0; nob_cmd_append(&cmd, "cl.exe"); if (config.microphone) nob_cmd_append(&cmd, "/DFEATURE_MICROPHONE"); @@ -337,13 +343,12 @@ bool build_musializer(Config config) "./src/plug.c", "./src/ffmpeg_windows.c" // TODO: building resource file is not implemented for TARGET_WIN64_MSVC - //"./build/musializer.res" ); nob_cmd_append(&cmd, "/link", nob_temp_sprintf("/LIBPATH:build/raylib/%s", NOB_ARRAY_GET(target_names, config.target)), "raylib.lib"); - nob_cmd_append(&cmd, "Winmm.lib", "gdi32.lib", "User32.lib", "Shell32.lib"); + nob_cmd_append(&cmd, "Winmm.lib", "gdi32.lib", "User32.lib", "Shell32.lib", "./build/musializer.res"); // TODO: is some sort of `-static` flag needed for MSVC to get a statically linked executable //nob_cmd_append(&cmd, "-static"); if (!nob_cmd_run_sync(cmd)) nob_return_defer(false); diff --git a/src/musializer.rc b/src/musializer.rc index 142751d..882890e 100644 --- a/src/musializer.rc +++ b/src/musializer.rc @@ -1 +1,3 @@ -id ICON "./resources/logo/logo-256.ico" \ No newline at end of file +#include +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "utf8.xml" +id ICON "./resources/logo/logo-256.ico"