Adding config dir to launcher.

This commit is contained in:
sergiotarxz 2022-07-08 18:17:00 +02:00
parent 8a87610caf
commit 7fd0870be1
2 changed files with 7 additions and 3 deletions

View File

@ -12,8 +12,11 @@ print $recuento_inner.'';
$recuento_inner->mkpath;
my $resources = $recuento_inner->child('resources');
$resources->mkpath;
copy_recursive('/usr/x86_64-w64-mingw32/usr/bin/*.{exe,dll,EXE,DLL}', $recuento_inner);
copy_recursive('/usr/x86_64-w64-mingw32/usr/share/recuento/', $resources);
copy_recursive('/home/sergio/recuento_root/usr/bin/*.{exe,dll,EXE,DLL}', $recuento_inner);
copy_recursive('/usr/lib/gcc/x86_64-w64-mingw32/11.3.0/libgcc_s_seh-1.dll', $recuento_inner);
copy_recursive('/usr/x86_64-w64-mingw32/usr/bin/libwinpthread-1.dll', $recuento_inner);
copy_recursive('/usr/lib/gcc/x86_64-w64-mingw32/11.3.0/libstdc++-6.dll', $recuento_inner);
copy_recursive('/home/sergio/recuento_root/usr/share/recuento/', $resources);
move_launcher ($recuento_inner, $destdir);
make_config ($destdir);
make_share ($destdir);
@ -50,7 +53,7 @@ sub make_config {
$etc_gtk->mkpath;
$etc_gtk->child('settings.ini')->spew(<<'EOF');
[Settings]
gtk-font-name=LiberationSans 20
gtk-font-name=Segoe UI 100
EOF
}

View File

@ -9,6 +9,7 @@ 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");
_putenv_s("XDG_CONFIG_DIRS", "etc");
int return_value = execvp(argument_list[0], argument_list);
if (return_value == -1) {
printf ("%s\n", strerror(errno));