A few tweaks needed to unzipfx
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
685e62df24
commit
c3a1888750
3 changed files with 8 additions and 8 deletions
2
deps/unzipfx/unzip.c
vendored
2
deps/unzipfx/unzip.c
vendored
|
@ -1338,7 +1338,7 @@ int uz_opts(__G__ pargc, pargv)
|
||||||
argc = *pargc;
|
argc = *pargc;
|
||||||
argv = *pargv;
|
argv = *pargv;
|
||||||
|
|
||||||
uO.exdir = sfx_get_tmp_path(0);
|
uO.exdir = sfx_get_tmp_path();
|
||||||
uO.overwrite_all = 1;
|
uO.overwrite_all = 1;
|
||||||
|
|
||||||
sfx_app_set_args(argc-1, argv+1);
|
sfx_app_set_args(argc-1, argv+1);
|
||||||
|
|
12
deps/unzipfx/unzipfx/appDetails.c
vendored
12
deps/unzipfx/unzipfx/appDetails.c
vendored
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
#else
|
||||||
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "appDetails.h"
|
#include "appDetails.h"
|
||||||
|
@ -26,7 +28,7 @@ int sfx_app_autorun_now()
|
||||||
int i, cmdBufLen = 0;
|
int i, cmdBufLen = 0;
|
||||||
char cmdBuf[CMD_BUF_LEN];
|
char cmdBuf[CMD_BUF_LEN];
|
||||||
|
|
||||||
const char* const path = sfx_get_tmp_path(1);
|
const char* const path = sfx_get_tmp_path();
|
||||||
chdir(path);
|
chdir(path);
|
||||||
|
|
||||||
strcpy(cmdBuf, path);
|
strcpy(cmdBuf, path);
|
||||||
|
@ -60,13 +62,12 @@ int sfx_app_autorun_now()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char* sfx_get_tmp_path(int withAppName)
|
char* sfx_get_tmp_path()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
GetTempPathA(512 - strlen(DISTRHO_PLUGIN_LABEL), sfx_tmp_path);
|
GetTempPathA(512 - strlen(DISTRHO_PLUGIN_LABEL), sfx_tmp_path);
|
||||||
|
|
||||||
if (withAppName == 1)
|
strcat(sfx_tmp_path, DISTRHO_PLUGIN_LABEL);
|
||||||
strcat(sfx_tmp_path, DISTRHO_PLUGIN_LABEL);
|
|
||||||
#else
|
#else
|
||||||
char* const tmp = getenv("TMP");
|
char* const tmp = getenv("TMP");
|
||||||
|
|
||||||
|
@ -75,8 +76,7 @@ char* sfx_get_tmp_path(int withAppName)
|
||||||
else
|
else
|
||||||
strcpy(sfx_tmp_path, "/tmp");
|
strcpy(sfx_tmp_path, "/tmp");
|
||||||
|
|
||||||
if (withAppName == 1)
|
strcat(sfx_tmp_path, "/" DISTRHO_PLUGIN_LABEL);
|
||||||
strcat(sfx_tmp_path, "/" DISTRHO_PLUGIN_LABEL);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return sfx_tmp_path;
|
return sfx_tmp_path;
|
||||||
|
|
2
deps/unzipfx/unzipfx/appDetails.h
vendored
2
deps/unzipfx/unzipfx/appDetails.h
vendored
|
@ -14,6 +14,6 @@
|
||||||
|
|
||||||
void sfx_app_set_args(int argc, char** argv);
|
void sfx_app_set_args(int argc, char** argv);
|
||||||
int sfx_app_autorun_now();
|
int sfx_app_autorun_now();
|
||||||
char* sfx_get_tmp_path(int withAppName);
|
char* sfx_get_tmp_path();
|
||||||
|
|
||||||
#endif // __APP_DETAILS_H__
|
#endif // __APP_DETAILS_H__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue