awtk/tools/theme_gen/main.cc

46 lines
1.0 KiB
C++
Raw Normal View History

2018-02-21 19:36:38 +08:00
/**
* File: main.cc
2018-05-15 09:31:58 +08:00
* Author: AWTK Develop Team
2018-02-21 19:36:38 +08:00
* Brief: generate theme date from xml
*
2019-01-07 10:58:36 +08:00
* Copyright (c) 2018 - 2019 Guangzhou ZHIYUAN Electronics Co.,Ltd.
2018-02-21 19:36:38 +08:00
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2018-01-19 Li XianJing <xianjimli@hotmail.com> adapted from ftk.
*
*/
#include "tkc/mem.h"
2018-11-02 11:51:14 +08:00
#include "common/utils.h"
2018-02-21 19:36:38 +08:00
#include "xml_theme_gen.h"
int main(int argc, char* argv[]) {
bool_t output_bin = argc > 3;
2018-11-02 11:51:14 +08:00
const char* in_filename = NULL;
const char* out_filename = NULL;
2018-05-04 11:45:09 +08:00
TKMEM_INIT(4 * 1024 * 1024)
if (argc < 3) {
printf("Usage: %s input output [bin]\n", argv[0]);
2018-02-21 19:36:38 +08:00
return 0;
}
2018-11-02 11:51:14 +08:00
in_filename = argv[1];
out_filename = argv[2];
exit_if_need_not_update(in_filename, out_filename);
xml_gen(in_filename, out_filename, output_bin);
2018-02-21 19:36:38 +08:00
return 0;
}