Make url configurable
This commit is contained in:
+4
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user