From 9a5b344c18d2b57227d23dbd7da5fe79e5d6b575 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Mon, 4 Jul 2022 19:52:06 +0200 Subject: [PATCH] Fixing windows launcher executable not installed. --- meson.build | 1 + src/windows/launcher.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 0cb49d9..6b85699 100644 --- a/meson.build +++ b/meson.build @@ -49,6 +49,7 @@ endforeach if is_windows executable('recuento_launcher_windows', launcher_sources, + install: true, win_subsystem: 'windows', ) endif diff --git a/src/windows/launcher.c b/src/windows/launcher.c index 86f7a56..d88ac9e 100644 --- a/src/windows/launcher.c +++ b/src/windows/launcher.c @@ -9,7 +9,10 @@ WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR pCmdLine, int nCmdShow) char* argument_list[] = { _fullpath(NULL, "recuento\\\\recuento.exe", 3000), NULL }; _putenv_s("DATADIR_RECUENTO", "recuento\\\\resources/"); _putenv_s("GSETTINGS_SCHEMA_DIR", "share\\\\glib-2.0\\\\schemas"); - int return_value = execvp(argument_list[0], argument_list); - if (return_value == -1) - printf ("%s\n", strerror(errno)); + int return_value = execvp(argument_list[0], argument_list); + if (return_value == -1) { + printf ("%s\n", strerror(errno)); + return 1; + } + return 0; }