forked from KolibriOS/kolibrios
Weather:
- Added to autobuild - Updated weather.json config path git-svn-id: svn://kolibrios.org@8586 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d2470c2ee6
commit
92c44fb1c7
10
programs/other/Weather/Tupfile.lua
Normal file
10
programs/other/Weather/Tupfile.lua
Normal file
@ -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")
|
@ -228,7 +228,7 @@ void RedrawGUI() // Перересовываем интерфейс
|
|||||||
|
|
||||||
void get_config(char **City, char **Token, char **Units) // Загружаем конфиг
|
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){
|
if(config_j==NULL){
|
||||||
notify_show("'Configuration file not found!' -E");
|
notify_show("'Configuration file not found!' -E");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"Celsius": true,
|
"Celsius": true,
|
||||||
"Location": "Moscow",
|
"Location": "Moscow",
|
||||||
"Token": "19ffa14b3dc0e238175829461d1788b8",
|
"Token": "19ffa14b3dc0e238175829461d1788b8",
|
||||||
"Lang": "ru",
|
"Lang": "en",
|
||||||
"AutoUpdate": 1
|
"AutoUpdate": 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user