Recuento/src/windows/launcher.c

20 lines
566 B
C
Raw Normal View History

2022-07-04 19:47:17 +02:00
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <windows.h>
int
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");
2022-07-08 18:17:00 +02:00
_putenv_s("XDG_CONFIG_DIRS", "etc");
int return_value = execvp(argument_list[0], argument_list);
if (return_value == -1) {
printf ("%s\n", strerror(errno));
return 1;
}
return 0;
2022-07-04 19:47:17 +02:00
}