From ee7c61f931412df99f3c76ea68116899de006501 Mon Sep 17 00:00:00 2001 From: turbocat Date: Tue, 18 Jan 2022 17:51:08 +0000 Subject: [PATCH] Weather: now uses auto import(KX). git-svn-id: svn://kolibrios.org@9651 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/other/Weather/Tupfile.lua | 20 ++++++++++---------- programs/other/Weather/weather.c | 5 ----- 2 files changed, 10 insertions(+), 15 deletions(-) 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; // Указатели на токен, название города, систему мер