eskin: check skin exists 5 times with delay

git-svn-id: svn://kolibrios.org@7939 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2020-05-17 18:05:05 +00:00
parent 6649d8f84c
commit f871bfac83
5 changed files with 41 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -9,13 +9,13 @@
/SYS/SETUP BOOT 0 # Load device settings /SYS/SETUP BOOT 0 # Load device settings
/SYS/LOADDRV RDC 0 # videodriver for RDC M2010/M2012 /SYS/LOADDRV RDC 0 # videodriver for RDC M2010/M2012
/SYS/@TASKBAR "" 0 # Start taskbar /SYS/@TASKBAR "" 0 # Start taskbar
/SYS/@ICON "" 0 # Multithread icon
/SYS/ESKIN "" 0 # Set style /SYS/ESKIN "" 0 # Set style
/SYS/@DOCKY "" 0 # Start docky /SYS/@ICON "" 0 # Multithread icon
/SYS/NETWORK/NETCFG A 0 # /SYS/NETWORK/NETCFG A 0 #
/SYS/NETWORK/@ZEROCONF "" 0 # Network configuration /SYS/NETWORK/@ZEROCONF "" 0 # Network configuration
/SYS/@VOLUME "" 0 # Start volume daemon /SYS/@VOLUME "" 0 # Start volume daemon
/SYS/@SS ASSM 0 # Screensaver /SYS/@SS ASSM 0 # Screensaver
/SYS/@DOCKY "" 0 # Start docky
/SYS/TMPDISK A0 -1 # Add virtual RAM disk /tmp0/1 /SYS/TMPDISK A0 -1 # Add virtual RAM disk /tmp0/1
/SYS/SEARCHAP "" -1 # Search and mount additional system directory /SYS/SEARCHAP "" -1 # Search and mount additional system directory
/SYS/@HOTANGLES "" 0 # Start Hot Angles /SYS/@HOTANGLES "" 0 # Start Hot Angles

View File

@@ -7,6 +7,7 @@ tup.rule("easyshot.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPAC
tup.rule("calypte.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "calypte.com") tup.rule("calypte.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "calypte.com")
tup.rule("mblocks.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "mblocks.com") tup.rule("mblocks.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "mblocks.com")
tup.rule("notify.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "notify.com") tup.rule("notify.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "notify.com")
tup.rule("osupdate.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "osupdate.com")
tup.rule("pipet.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pipet.com") tup.rule("pipet.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pipet.com")
tup.rule("software_widget.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "software_widget.com") tup.rule("software_widget.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "software_widget.com")

View File

@@ -19,32 +19,41 @@
_http http; _http http;
proc_info Form; proc_info Form;
bool install_complete = false;
sensor progress;
#define WINW 400 #define WINW 460
#define WINH 300
char accept_language[]="en"; //not used, necessary for http.get() //#define LANG_RUS 1
#ifdef LANG_RUS #ifdef LANG_RUS
#define T_INTRO "<22><><EFBFBD><EFBFBD><E0AEA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>㠫쭮<E3A0AB> <20><><EFBFBD><EFBFBD><E0ACAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>஥ ࠭<><E0A0AD><EFBFBD> <20><20><><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <20> KolibriNext."; #define WINH 345
#define T_INSTALL "<22><><EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD>" #define T_WINDOW_TITLE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS"
#define T_COMPLETE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" #define T_TITLE_H1 "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define T_INTRO "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᪠砥<E1AAA0> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS <20> <20><><EFBFBD><E1AFA0><EFBFBD><EFBFBD> <20><> <20><> RAM-<2D><><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><20><><EFBFBD><EFBFBD> <20><> <20><EFBFBD> <20><><EFBFBD><E0A5A7><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD><EFBFBD> <20><><20> <20><><EFBFBD><E0A5A7><EFBFBD><EFBFBD><E3A7A8><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><E0AEA9> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><20><><EFBFBD><E7A0AB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> RAM-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!";
#define T_INSTALL "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define T_COMPLETE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define T_EXIT "<22><>室" #define T_EXIT "<22><>室"
#define IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img" #define IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img"
#else #else
#define T_INTRO "This app will download the latest KolibriOS dirsto and update your RAM-disk with it. Kernel won't be restarted. Please close all opened apps before start."; #define WINH 305
#define T_WINDOW_TITLE "KolibriOS Online Updater"
#define T_TITLE_H1 "ONLINE UPDATE"
#define T_INTRO "This app will download the latest KolibriOS dirsto and update your RAM-disk with it. Kernel won't be restarted.
Please close all opened apps before start.
ALERT: All chages on RAM-disk will be lost!";
#define T_INSTALL "Update" #define T_INSTALL "Update"
#define T_COMPLETE "Update complete" #define T_COMPLETE "Update complete"
#define T_EXIT "Exit" #define T_EXIT "Exit"
#define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img" #define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img"
#endif #endif
char accept_language[]="en"; //not used, necessary for http.get()
bool install_complete = false;
void main() void main()
{ {
word btn;
//load_dll(libini, #lib_init,1); //load_dll(libini, #lib_init,1);
load_dll(libio, #libio_init,1); load_dll(libio, #libio_init,1);
load_dll(libimg, #libimg_init,1); load_dll(libimg, #libimg_init,1);
@@ -53,9 +62,7 @@ void main()
loop() switch(WaitEventTimeout(300) & 0xFF) loop() switch(WaitEventTimeout(300) & 0xFF)
{ {
case evButton: case evButton:
btn = GetButtonID(); if (GetButtonID() == 1) ExitProcess(); else EventInstall();
if (btn == 1) ExitProcess();
else EventInstall();
break; break;
case evKey: case evKey:
@@ -74,8 +81,9 @@ void main()
case evNetwork: case evNetwork:
if (http.transfer <= 0) break; if (http.transfer <= 0) break;
http.receive(); http.receive();
if (http.content_length) DrawProgressBar(30, WINH-140, WINW-60, 20, sc.work, 0xC3C3C3, if (http.content_length) {
0x54B1D6, sc.work_text, 100 * http.content_received / http.content_length); progress.draw_progress(http.content_length - http.content_received * progress.w / http.content_length);
}
if (http.receive_result == 0) EventDownloadComplete(); if (http.receive_result == 0) EventDownloadComplete();
} }
} }
@@ -84,10 +92,15 @@ void draw_window()
{ {
sc.get(); sc.get();
DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2, DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2,
WINW+9,WINH+skin_height,0x34,sc.work,"KolibriOS Online Updater",0); WINW+9,WINH+skin_height,0x34,sc.work,T_WINDOW_TITLE,0);
GetProcessInfo(#Form, -1); GetProcessInfo(#Form, -1);
WriteText(30, 20, 0x81, 0xEC008C, "ONLINE UPDATE"); WriteText(30, 20, 0x81, 0xEC008C, T_TITLE_H1);
if (install_complete) DrawInstallComplete(); else DrawIntro(); if (install_complete) {
DrawInstallComplete();
} else {
DrawIntro();
progress.set_size(30, WINH-130, WINW-60, 20);
}
} }
void DrawIntro() void DrawIntro()
@@ -115,16 +128,18 @@ void EventDownloadComplete()
{ {
dword unimg_id, slot_n; dword unimg_id, slot_n;
CreateFile(http.content_received, http.content_pointer, "/tmp0/1/last.img"); CreateFile(http.content_received, http.content_pointer, "/tmp0/1/latest.img");
http.free(); http.free();
unimg_id = RunProgram("/tmp0/1/unimg", "/tmp0/1/last.img -e"); unimg_id = RunProgram("/sys/unimg", "/tmp0/1/latest.img /tmp0/1/latest_img -e");
do { do {
slot_n = GetProcessSlot(unimg_id); slot_n = GetProcessSlot(unimg_id);
pause(10); pause(10);
} while (slot_n!=0); } while (slot_n!=0);
copyf("/tmp0/1/KOLIBRI.IMG", "/rd/1"); copyf("/rd/1/settings", "/tmp0/1/settings_backup");
copyf("/tmp0/1/latest_img", "/rd/1");
copyf("/tmp0/1/settings_backup", "/rd/1/settings");
RestartAllProcess(); RestartAllProcess();
install_complete = true; install_complete = true;

View File

@@ -1 +1 @@
use32 use32