From 92c44fb1c7b999b0e852cc94e99aad55dcccec3c Mon Sep 17 00:00:00 2001 From: turbocat Date: Wed, 10 Feb 2021 20:02:54 +0000 Subject: [PATCH] Weather: - Added to autobuild - Updated weather.json config path git-svn-id: svn://kolibrios.org@8586 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/other/Weather/Tupfile.lua | 10 ++++++++++ programs/other/Weather/weather.c | 2 +- programs/other/Weather/weather.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 programs/other/Weather/Tupfile.lua diff --git a/programs/other/Weather/Tupfile.lua b/programs/other/Weather/Tupfile.lua new file mode 100644 index 0000000000..1b600974b2 --- /dev/null +++ b/programs/other/Weather/Tupfile.lua @@ -0,0 +1,10 @@ +if tup.getconfig("NO_TCC") ~= "" then return end + +TCC="kos32-tcc" + +CFLAGS = "-I../../develop/ktcc/trunk/libc/include" +LDFLAGS = "-nostdlib ../../develop/ktcc/trunk/bin/lib/start.o -L../../develop/ktcc/trunk/bin/lib -Ljson" +LIBS = "-ljson -lck -limg -lhttp" + +COMMAND=string.format("%s %s %s %s %s ", TCC, CFLAGS, "%f -o %o", LDFLAGS, LIBS) +tup.rule("weather.c", COMMAND .. tup.getconfig("KPACK_CMD"), "weather") diff --git a/programs/other/Weather/weather.c b/programs/other/Weather/weather.c index d572e22a57..e7a5914076 100644 --- a/programs/other/Weather/weather.c +++ b/programs/other/Weather/weather.c @@ -228,7 +228,7 @@ void RedrawGUI() // Перересовываем интерфейс void get_config(char **City, char **Token, char **Units) // Загружаем конфиг { - FILE *config_j = fopen("weather.json", "rb"); + FILE *config_j = fopen("/sys/Settings/weather.json", "rb"); if(config_j==NULL){ notify_show("'Configuration file not found!' -E"); exit(0); diff --git a/programs/other/Weather/weather.json b/programs/other/Weather/weather.json index 90112ef81d..7742fb013b 100644 --- a/programs/other/Weather/weather.json +++ b/programs/other/Weather/weather.json @@ -2,6 +2,6 @@ "Celsius": true, "Location": "Moscow", "Token": "19ffa14b3dc0e238175829461d1788b8", - "Lang": "ru", + "Lang": "en", "AutoUpdate": 1 }