Add QT GUI install program

This commit is contained in:
longpanda 2021-09-13 16:41:51 +08:00
parent dd2411d7d4
commit d148139227
61 changed files with 6850 additions and 75 deletions

View file

@ -7,12 +7,17 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <linux/limits.h>
#include <ventoy_define.h>
#include <ventoy_util.h>
#include <ventoy_json.h>
#include <ventoy_disk.h>
#include <ventoy_http.h>
char g_log_file[PATH_MAX];
char g_ini_file[PATH_MAX];
int ventoy_log_init(void);
void ventoy_log_exit(void);
@ -30,6 +35,7 @@ void ventoy_signal_stop(int sig)
int main(int argc, char **argv)
{
int i;
int rc;
const char *ip = "127.0.0.1";
const char *port = "24680";
@ -50,6 +56,20 @@ int main(int argc, char **argv)
port = argv[2];
}
snprintf(g_log_file, sizeof(g_log_file), "log.txt");
snprintf(g_ini_file, sizeof(g_ini_file), "./Ventoy2Disk.ini");
for (i = 0; i < argc; i++)
{
if (argv[i] && argv[i + 1] && strcmp(argv[i], "-l") == 0)
{
snprintf(g_log_file, sizeof(g_log_file), "%s", argv[i + 1]);
}
else if (argv[i] && argv[i + 1] && strcmp(argv[i], "-i") == 0)
{
snprintf(g_ini_file, sizeof(g_ini_file), "%s", argv[i + 1]);
}
}
ventoy_log_init();
vlog("===============================================\n");