diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-05-08 23:24:08 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-05-08 23:24:08 +0200 |
commit | 6cc1ec3610ba98bada1fcd03a654b2925530f748 (patch) | |
tree | d772a02517cc8022100be2a89f8e4000559066ba /src/lutris.c | |
parent | 14e8bfdc0a83a1256f2efc92868ead7dbd26bc51 (diff) | |
download | polecat-6cc1ec3610ba98bada1fcd03a654b2925530f748.tar.gz polecat-6cc1ec3610ba98bada1fcd03a654b2925530f748.zip |
add work in progress windows support
to run lutris installers on windows soon
Diffstat (limited to 'src/lutris.c')
-rw-r--r-- | src/lutris.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/lutris.c b/src/lutris.c index da893d1..b43d20c 100644 --- a/src/lutris.c +++ b/src/lutris.c @@ -3,7 +3,8 @@ #include <stdio.h> #include <string.h> #include <unistd.h> -#include <linux/limits.h> +#include <limits.h> +#include <sys/stat.h> #include <libgen.h> #include "lutris.h" #include "net.h" @@ -16,7 +17,7 @@ static const struct Command lutris_commands[] = { }; static const struct Flag lutris_flags[] = { - { .name = "help", .variant = DOUBLE, .func = lutris_help, .description = "show this message"} + { .name = "help", .variant = TWO, .func = lutris_help, .description = "show this message"} }; char* getpwd() @@ -180,7 +181,7 @@ COMMAND(lutris, install) // TODO break; case CHMODX: - // TODO + chmod(installer.directives[i]->arguments[0], S_IXUSR); break; case EXECUTE: // TODO @@ -210,7 +211,11 @@ COMMAND(lutris, install) case TASK: parseVar(&installer.directives[i]->arguments[0], installer.variables, installer.variablecount); + #ifdef _WIN32 + #warning TODO + #else setenv("WINEPREFIX", installer.directives[i]->arguments[0], 1); + #endif switch(installer.directives[i]->task) { case WINEEXEC: @@ -223,9 +228,17 @@ COMMAND(lutris, install) case CREATE_PREFIX: printf("CREATE_PREFIX\n"); + #ifdef _WIN32 + #warning TODO + #else setenv("WINEDEBUG", "-all", 1); + #endif system("wineboot"); + #ifdef _WIN32 + #warning TODO + #else unsetenv("WINEDEBUG"); + #endif break; case SET_REGEDIT: |