Fixing windows launcher executable not installed.

This commit is contained in:
sergiotarxz 2022-07-04 19:52:06 +02:00
parent c9088d8c45
commit 9a5b344c18
2 changed files with 7 additions and 3 deletions

View File

@ -49,6 +49,7 @@ endforeach
if is_windows
executable('recuento_launcher_windows',
launcher_sources,
install: true,
win_subsystem: 'windows',
)
endif

View File

@ -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;
}