forked from KolibriOS/kolibrios
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:
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
@@ -9,13 +9,13 @@
|
||||
/SYS/SETUP BOOT 0 # Load device settings
|
||||
/SYS/LOADDRV RDC 0 # videodriver for RDC M2010/M2012
|
||||
/SYS/@TASKBAR "" 0 # Start taskbar
|
||||
/SYS/@ICON "" 0 # Multithread icon
|
||||
/SYS/ESKIN "" 0 # Set style
|
||||
/SYS/@DOCKY "" 0 # Start docky
|
||||
/SYS/@ICON "" 0 # Multithread icon
|
||||
/SYS/NETWORK/NETCFG A 0 #
|
||||
/SYS/NETWORK/@ZEROCONF "" 0 # Network configuration
|
||||
/SYS/@VOLUME "" 0 # Start volume daemon
|
||||
/SYS/@SS ASSM 0 # Screensaver
|
||||
/SYS/@DOCKY "" 0 # Start docky
|
||||
/SYS/TMPDISK A0 -1 # Add virtual RAM disk /tmp0/1
|
||||
/SYS/SEARCHAP "" -1 # Search and mount additional system directory
|
||||
/SYS/@HOTANGLES "" 0 # Start Hot Angles
|
||||
|
@@ -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("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("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("software_widget.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "software_widget.com")
|
||||
|
||||
|
@@ -19,32 +19,41 @@
|
||||
|
||||
_http http;
|
||||
proc_info Form;
|
||||
bool install_complete = false;
|
||||
sensor progress;
|
||||
|
||||
#define WINW 400
|
||||
#define WINH 300
|
||||
#define WINW 460
|
||||
|
||||
char accept_language[]="en"; //not used, necessary for http.get()
|
||||
//#define LANG_RUS 1
|
||||
|
||||
#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 T_INSTALL "<22><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
#define T_COMPLETE "<22><>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD>"
|
||||
#define WINH 345
|
||||
#define T_WINDOW_TITLE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS"
|
||||
#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 IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img"
|
||||
#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_COMPLETE "Update complete"
|
||||
#define T_EXIT "Exit"
|
||||
#define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img"
|
||||
#endif
|
||||
|
||||
|
||||
bool install_complete = false;
|
||||
char accept_language[]="en"; //not used, necessary for http.get()
|
||||
|
||||
void main()
|
||||
{
|
||||
word btn;
|
||||
//load_dll(libini, #lib_init,1);
|
||||
load_dll(libio, #libio_init,1);
|
||||
load_dll(libimg, #libimg_init,1);
|
||||
@@ -53,9 +62,7 @@ void main()
|
||||
loop() switch(WaitEventTimeout(300) & 0xFF)
|
||||
{
|
||||
case evButton:
|
||||
btn = GetButtonID();
|
||||
if (btn == 1) ExitProcess();
|
||||
else EventInstall();
|
||||
if (GetButtonID() == 1) ExitProcess(); else EventInstall();
|
||||
break;
|
||||
|
||||
case evKey:
|
||||
@@ -74,8 +81,9 @@ void main()
|
||||
case evNetwork:
|
||||
if (http.transfer <= 0) break;
|
||||
http.receive();
|
||||
if (http.content_length) DrawProgressBar(30, WINH-140, WINW-60, 20, sc.work, 0xC3C3C3,
|
||||
0x54B1D6, sc.work_text, 100 * http.content_received / http.content_length);
|
||||
if (http.content_length) {
|
||||
progress.draw_progress(http.content_length - http.content_received * progress.w / http.content_length);
|
||||
}
|
||||
if (http.receive_result == 0) EventDownloadComplete();
|
||||
}
|
||||
}
|
||||
@@ -84,10 +92,15 @@ void draw_window()
|
||||
{
|
||||
sc.get();
|
||||
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);
|
||||
WriteText(30, 20, 0x81, 0xEC008C, "ONLINE UPDATE");
|
||||
if (install_complete) DrawInstallComplete(); else DrawIntro();
|
||||
WriteText(30, 20, 0x81, 0xEC008C, T_TITLE_H1);
|
||||
if (install_complete) {
|
||||
DrawInstallComplete();
|
||||
} else {
|
||||
DrawIntro();
|
||||
progress.set_size(30, WINH-130, WINW-60, 20);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawIntro()
|
||||
@@ -115,16 +128,18 @@ void EventDownloadComplete()
|
||||
{
|
||||
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();
|
||||
|
||||
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 {
|
||||
slot_n = GetProcessSlot(unimg_id);
|
||||
pause(10);
|
||||
} 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();
|
||||
install_complete = true;
|
||||
|
@@ -1 +1 @@
|
||||
use32
|
||||
use32
|
Reference in New Issue
Block a user