2018-02-21 19:36:38 +08:00
|
|
|
/**
|
|
|
|
* File: main.cc
|
|
|
|
* Author: Li XianJing <xianjimli@hotmail.com>
|
|
|
|
* Brief: generate theme date from xml
|
|
|
|
*
|
|
|
|
* Copyright (c) 2018 - 2018 Li XianJing <xianjimli@hotmail.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-02-22 11:37:13 +08:00
|
|
|
#include "base/mem.h"
|
2018-02-21 19:36:38 +08:00
|
|
|
#include "xml_theme_gen.h"
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
2018-04-27 18:12:12 +08:00
|
|
|
bool_t output_bin = argc > 3;
|
2018-02-22 11:37:13 +08:00
|
|
|
static uint32_t s_heap_mem[1024 * 1024];
|
2018-04-27 18:12:12 +08:00
|
|
|
|
2018-02-22 11:37:13 +08:00
|
|
|
mem_init(s_heap_mem, sizeof(s_heap_mem));
|
|
|
|
|
2018-04-27 18:12:12 +08:00
|
|
|
if (argc < 3) {
|
|
|
|
printf("Usage: %s input output [bin]\n", argv[0]);
|
2018-02-21 19:36:38 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-27 18:12:12 +08:00
|
|
|
xml_gen(argv[1], argv[2], output_bin);
|
2018-02-21 19:36:38 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|