Make url configurable

This commit is contained in:
Changhua
2023-04-08 18:58:10 +08:00
parent ac85c144bf
commit dd02c4b6ff
9 changed files with 33 additions and 23 deletions
+4 -4
View File
@@ -6,21 +6,21 @@
#include "log.h"
#include "sdk.h"
void help() { LOG_INFO("Usage: wcf.exe start|stop [debug]\n"); }
void help() { LOG_INFO("Usage: \n启动: wcf.exe start url [debug]\n关闭: wcf.exe stop"); }
int main(int argc, char *argv[])
{
int ret = -1;
bool debug = false;
if ((argc < 2) || (argc > 3)) {
if ((argc < 2) || (argc > 4)) {
help();
} else if (argc == 3) {
} else if (argc == 4) {
debug = (strcmp(argv[2], "debug") == 0);
}
if (strcmp(argv[1], "start") == 0) {
ret = WxInitSDK(debug);
ret = WxInitSDK(debug, argv[2]);
} else if (strcmp(argv[1], "stop") == 0) {
ret = WxDestroySDK();
} else {