diff --git a/programs/other/Weather/Tupfile.lua b/programs/other/Weather/Tupfile.lua index 76c00f81bb..58a05df788 100644 --- a/programs/other/Weather/Tupfile.lua +++ b/programs/other/Weather/Tupfile.lua @@ -1,10 +1,10 @@ -if tup.getconfig("NO_TCC") ~= "" then return end - -TCC="kos32-tcc" -CFLAGS = "-I../../develop/ktcc/trunk/libc.obj/include" -LDFLAGS = "-nostdlib -L../../develop/ktcc/trunk/bin/lib ../../develop/ktcc/trunk/bin/lib/crt0.o" - -LIBS = "-ltcc -limg -lhttp -lc.obj" - -COMMAND = string.format("%s %s %s %s %s ", TCC, CFLAGS, LDFLAGS, "%f -o %o", LIBS) -tup.rule({"weather.c", "json/json.c"}, COMMAND .. tup.getconfig("KPACK_CMD"), "weather") +if tup.getconfig("NO_TCC") ~= "" then return end +if tup.getconfig("HELPERDIR") == "" +then + HELPERDIR = "../../../programs" +end +tup.include(HELPERDIR .. "/use_tcc.lua") + +LIBS = "-lhttp -limg" + +link_tcc({"weather.c", "json/json.c"}, "weather"); diff --git a/programs/other/Weather/weather.c b/programs/other/Weather/weather.c index ec187d22bb..e2431042a7 100644 --- a/programs/other/Weather/weather.c +++ b/programs/other/Weather/weather.c @@ -318,11 +318,6 @@ void set_lang() int main() { win_pos = _ksys_get_mouse_pos(KSYS_MOUSE_SCREEN_POS); // Получаем позицию курсора - - if(!kolibri_libimg_init()){ // Загружаем libimg.obj - notify_show("Libimg.obj not loaded!' -E"); - exit(0); - } _ksys_get_system_colors(&sys_color_table); // Получаем таблица цветов char *city=NULL, *token=NULL, *units=NULL; // Указатели на токен, название города, систему мер