aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2020-08-18 23:58:16 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-08-18 23:58:16 +0200
commitd53109eaa890ab807b66961a89291cea3cd3c003 (patch)
treea62382b32014266f5aecb6f639d0962bb1682bf0 /src/main.c
parent1753e2b151cbb4af75a4e9ea61720b3704b03805 (diff)
downloadpolecat-d53109eaa890ab807b66961a89291cea3cd3c003.tar.gz
polecat-d53109eaa890ab807b66961a89291cea3cd3c003.zip
first part of a proper lutris implementation and cleanup0.1.4
- remove all old build platform related variables - change behavior of clean - change tabs into spaces - make XDG fetching method static - replace strcpy and cat with strn alternative with proper bounds checking - add cache dir - reenable dxvk and download from ram - completely rework lutris fetching and convert it into an interal struct - only show http errors in debug - add sanity checks to methods with possible NULL return - change extracting methods to extract tar from ram
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index aa4f356..a10e00c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -11,7 +11,7 @@
const static struct Command main_commands[] = {
{ .name = "wine", .func = wine, .description = "manage wine versions" },
- //{ .name = "dxvk", .func = dxvk, .description = "manage dxvk versions (TODO)" },
+ { .name = "dxvk", .func = dxvk, .description = "manage dxvk versions" },
{ .name = "lutris", .func = lutris, .description = "run lutris instraller"},
{ .name = "info", .func = main_info, .description = "show some information about polecat" },
};
@@ -32,19 +32,20 @@ int main(int argc, char** argv)
int main_info(int argc, char** argv)
{
- char cfgdir[PATH_MAX];
- char datadir[PATH_MAX];
+ char cfgdir[PATH_MAX], datadir[PATH_MAX], cachedir[PATH_MAX];
- getConfigDir(cfgdir);
- getDataDir(datadir);
+ getConfigDir(cfgdir, sizeof(cfgdir));
+ getDataDir(datadir, sizeof(datadir));
+ getCacheDir(cachedir, sizeof(cachedir));
printf("version:\t\t%s\n"
"user-Agent:\t\t%s/%s\n"
"config dir\t\t%s\n"
- "data dir\t\t%s\n",
+ "data dir\t\t%s\n"
+ "cache dir\t\t%s\n",
VERSION,
NAME, VERSION,
- cfgdir, datadir);
+ cfgdir, datadir, cachedir);
return 0;
}