From 036bb48ceb706f3b259ae4b8b0f2c38a47f3d481 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 18 Feb 2016 23:28:04 +0000 Subject: [PATCH] upload app_plus and add it to autobuild git-svn-id: svn://kolibrios.org@6250 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 2 + data/common/settings/app_plus.ini | 19 ++++ programs/cmm/app_plus/Tupfile.lua | 6 + programs/cmm/app_plus/app_plus.c | 103 ++++++++++++++++++ programs/cmm/app_plus/compile_en.bat | 10 ++ programs/cmm/app_plus/compile_ru.bat | 10 ++ programs/cmm/app_plus/scr.png | Bin 0 -> 1659 bytes programs/cmm/app_plus/scr.raw_8bit | Bin 0 -> 24624 bytes programs/cmm/installer/installer.c | 5 +- .../add_appl_dir.c => lib/added_sysdir.c} | 2 +- 10 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 data/common/settings/app_plus.ini create mode 100644 programs/cmm/app_plus/Tupfile.lua create mode 100644 programs/cmm/app_plus/app_plus.c create mode 100644 programs/cmm/app_plus/compile_en.bat create mode 100644 programs/cmm/app_plus/compile_ru.bat create mode 100644 programs/cmm/app_plus/scr.png create mode 100644 programs/cmm/app_plus/scr.raw_8bit rename programs/cmm/{installer/add_appl_dir.c => lib/added_sysdir.c} (76%) diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 2efbd5235b..4d9472ef62 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -201,6 +201,7 @@ extra_files = { {"kolibrios/media/zsea/zsea.ini", PROGS .. "/media/zsea/zSea.ini"}, {"kolibrios/media/zsea/buttons/buttons.png", PROGS .. "/media/zsea/buttons.png"}, {"kolibrios/res/skins/", "../skins/authors.txt"}, + {"kolibrios/settings/app_plus.ini", "common/settings/app_plus.ini"}, {"kolibrios/utils/appearance", PROGS .. "/cmm/appearance/appearance.com"}, } if build_type == "rus" then tup.append_table(extra_files, { @@ -509,6 +510,7 @@ tup.append_table(img_files, { {"TMPDISK", PROGS .. "/cmm/tmpdisk/tmpdisk.com"}, {"GAME_CENTER", PROGS .. "/cmm/software_widget/software_widget.com"}, {"SYSPANEL", PROGS .. "/cmm/software_widget/software_widget.com"}, + {"APP_PLUS", PROGS .. "/cmm/app_plus/app_plus.com"}, }) end -- tup.getconfig('NO_CMM') ~= 'full' diff --git a/data/common/settings/app_plus.ini b/data/common/settings/app_plus.ini new file mode 100644 index 0000000000..9ac29ba8c9 --- /dev/null +++ b/data/common/settings/app_plus.ini @@ -0,0 +1,19 @@ +[Config] +window_width=600 +cell_w=82 +cell_h=78 +window_title=KolibriOS Additional Software + +[Media] +zSea=/kolibrios/media/zsea/zsea,46 + +[3D Tools] +Info3DsPro=/kolibrios/3d/info3ds/info3ds,75 +Info3DsUser=/kolibrios/3d/info3ds/info3ds_u,75 +voxel_editor=/kolibrios/3d/voxel_editor/voxel_editor + +[3D Demos] +3dsHeart=/kolibrios/3d/3dsheart,78 + +[Other] +Life=/kolibrios/demos/life2,13 diff --git a/programs/cmm/app_plus/Tupfile.lua b/programs/cmm/app_plus/Tupfile.lua new file mode 100644 index 0000000000..d9b37dae75 --- /dev/null +++ b/programs/cmm/app_plus/Tupfile.lua @@ -0,0 +1,6 @@ +if tup.getconfig("NO_CMM") ~= "" then return end +if tup.getconfig("LANG") == "ru" +then C_LANG = "LANG_RUS" +else C_LANG = "LANG_ENG" -- this includes default case without config +end +tup.rule("app_plus.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "app_plus.com") diff --git a/programs/cmm/app_plus/app_plus.c b/programs/cmm/app_plus/app_plus.c new file mode 100644 index 0000000000..cf35d4289c --- /dev/null +++ b/programs/cmm/app_plus/app_plus.c @@ -0,0 +1,103 @@ +#ifndef AUTOBUILD +#include "lang.h--" +#endif + +#define MEMSIZE 4096*20 +#include "..\lib\strings.h" +#include "..\lib\mem.h" +#include "..\lib\io.h" +#include "..\lib\gui.h" +#include "..\lib\obj\proc_lib.h" +#include "..\lib\patterns\simple_open_dialog.h" +#include "..\lib\added_sysdir.c" + +char default_dir[] = "/rd/1"; +od_filter filter2 = {"",0}; + +proc_info Form; + +dword scr = FROM "scr.raw_8bit"; +dword scr_pal[] = {0xFFFFFF,0xBBDDFF,0x4166B5,0xE0E4E6,0xAFBEDD,0xC4D4E8,0x52ACDD,0x000000, +0xE9DAB2,0xC99811,0xFDF9D4,0xF8B93C,0xFDEEBE,0xFBEBA6,0xDFAF4F,0xF3D57C}; + + + +void CheckKosMounted() +{ + if (isdir("/kolibrios/")) + { + io.run("syspanel", "/kolibrios/settings/app_plus.ini"); + ExitProcess(); + } +} + +void RunAutosearch() +{ + dword searchap_run_id; + searchap_run_id = io.run("/sys/searchap",0); + while (GetProcessSlot(searchap_run_id)) pause(10); +} + +void main() +{ + word id; + + CheckKosMounted(); + RunAutosearch(); + CheckKosMounted(); + + o_dialog.type = 2; + load_dll(Proc_lib, #OpenDialog_init,0); + OpenDialog_init stdcall (#o_dialog); + + loop() switch(WaitEvent()) + { + case evButton: + id=GetButtonID(); + if (id==1) ExitProcess(); + if (id==10) + { + OpenDialog_start stdcall (#o_dialog); + if (o_dialog.status) SetAdditionalSystemDirectory("kolibrios", #openfile_path); + pause(3); + CheckKosMounted(); + } + break; + + case evReDraw: + draw_window(); + } +} + +#define WINDOW_TITLE_TEXT "Error" +#define CONTENT_HEADER_TEXT "/KOLIBRIOS/ NOT MOUNTED" +#define DESCRIPTION_TEXT "Try to find it manually. It should look +like image on the right. +Note: this action can be done only once +per 1 session of the OS running. If you +will choose the wrong folder then you +need to reboot system to try again." +#define MANUALLY_BUTTON_TEXT "Choose /kolibrios/ folder..." + + +void draw_window() +{ + incn y; + dword x=30; + y.n=0; + system.color.get(); + DefineAndDrawWindow(screen.width-570/2, 100, 570, 280+skin_height, 0x34, system.color.work, WINDOW_TITLE_TEXT); + GetProcessInfo(#Form, SelfInfo); + WriteTextB(x+2,y.inc(20)+2,0x81,MixColors(system.color.work, 0xB92234,220),CONTENT_HEADER_TEXT); + WriteTextB(x,y.n,0x81,0xB92234,CONTENT_HEADER_TEXT); + + WriteTextLines(x,y.inc(50),0x90,system.color.work_text,DESCRIPTION_TEXT,20); + + PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal); + DrawRectangle(Form.cwidth-180-1,y.n-1, 144+1,171+1, system.color.work_graph); + + DrawCaptButton(x,Form.cheight-66,300,30,10,system.color.work_button,system.color.work_button_text,MANUALLY_BUTTON_TEXT); +} + + +stop: diff --git a/programs/cmm/app_plus/compile_en.bat b/programs/cmm/app_plus/compile_en.bat new file mode 100644 index 0000000000..3d04d83600 --- /dev/null +++ b/programs/cmm/app_plus/compile_en.bat @@ -0,0 +1,10 @@ +@del lang.h-- +@echo #define LANG_ENG 1 >lang.h-- + +@del app_plus +cls +c-- app_plus.c +@rename app_plus.com app_plus +@del warning.txt +@del lang.h-- +@pause diff --git a/programs/cmm/app_plus/compile_ru.bat b/programs/cmm/app_plus/compile_ru.bat new file mode 100644 index 0000000000..769dda8ca2 --- /dev/null +++ b/programs/cmm/app_plus/compile_ru.bat @@ -0,0 +1,10 @@ +@del lang.h-- +@echo #define LANG_RUS 1 >lang.h-- + +@del app_plus +cls +c-- app_plus.c +@rename app_plus.com app_plus +@del warning.txt +@del lang.h-- +@pause diff --git a/programs/cmm/app_plus/scr.png b/programs/cmm/app_plus/scr.png new file mode 100644 index 0000000000000000000000000000000000000000..71c1e18c33e6bf1f2b767d727e42dc29ad9492d0 GIT binary patch literal 1659 zcmaJ?dpOfw93Rs#Q{>i`F;a<;nOnllCAzSccUGR%V#v}&NiMy@ilWde@?fLTYnt0g zF1_()ZZUateek?#mKNobl@0Gt^*r^*+xy4)p7Wf~dCvKq&*yWVlY;l$s|-azK_HN_ zhr7!mpic){sR9J3DH4r-5D0?vaB=dE8lE0?Oh&qbc(ZY~>_hO6yGX(M2`BUr6;+DC zdJ4T@JJnK!1lQ<3Qn8}pedx(8uP^J9f^B3Y&E3=)Oar%M7tdsU7kYY06`Cs=^|H?jr6Jic0862w+!a&|dcg~CmP@6x zxAwmxJM+v#%fJhZpV;APZ~Wv{nUoMDv))QfY!Y&B<@*F0c#=ESVSEus2inx0)M5Vs zSTP4_lkTH6l$%N2WaYL*nRPAKryHMBPNEzk2;&n#PMPw-;`$9$#&%|p8l%SlsjYk= zp9hy%=#wwTcjpe@wO@Q$d|T^GUYxCDPQt0;-SpF417Cqg2baZf$6iQ9Ir+#QXZ23ZNoTPO_J-n$(HNdtUZGRo1>zQ8AHPJ z7JCQaC8>e_h-ecAyeYe7g3GA$Bplq}Z(EceHeCg^#skNKZTyB9 zq~PFM#q#Z@Cl400e#%z#aS0zOKlQ@~ zTrPN{tem1u!kR8WSY(%Z1Ln#DdtF(-~^ z<@-S??{7cR1`L1BwDdKrv%te^9g4Pxu-Kcb18L>_9jQ5-K6P$40k-5Q>n(P;Z=4M> z2Om7V0HPB$=aE80@Dd5|llZ?jKh)@WT({faqYUqMVr}o8lh^!NAv;&a4ko=mhKGsT zqHt*8O2!pGq9L{ZHEAFLPBkbBDhJVPn%|?r+#`vqEeJ}QOD&y5tQBmvz(@a-B4K&LdcvNu|y&KpMY4m|r*rF=22=pYwDq9=CdpFzJ<#N>7z9xh)lN@R~>S9-P`- zVr8MWu6kji5_e=ocV}5nTPq9qffI0b{!0~0 utN`9z3n`F9ugDDQN4)%x`vLisDnHBUoY6hz6b5`MAP-khmq)l03I75v(C-fb literal 0 HcmV?d00001 diff --git a/programs/cmm/app_plus/scr.raw_8bit b/programs/cmm/app_plus/scr.raw_8bit new file mode 100644 index 0000000000000000000000000000000000000000..8564583b31aef18b8b885891a24c3c5fde30e5cf GIT binary patch literal 24624 zcmeI30du1u5QVL2V@%#KUv^X_=zsPDT z=R;)lx6eh;1@!c{ug^tLdp#tF^r)cbdLRdSoS@cv?tL%$>iauJQ)@jW;bPUxF& zIg@Se?D6x5^M!GQ0i;S=>!AAfJmT?-VrSLc+F+W2$(1v-axPol}=+SJ=I<8p{RMjuz zJWjt_oF2{>Nok~KRyn`d@F&pIc>K&`pr`TYYkYd8{qslWFMS4GU>>{qrT*vJBEGi+ z#$);X8IK+Lqt8O#yNg@Q>=HWWF|@bUv*j_&r=UZj){dup)TP}SSZo*b7%-K1)ln=LWt?5ShLjBy<&^r%0gYw?E;D-d<8XB|H>uGJYBRz78;@mPKc z`Z#vWUutK~fzSctvCxt2vGLf}kMJm7AHx+Z|E#s}&N9dE!efjaWR%bc91}v5_Ht~t z$77^~Cv(;#Y{pw@FE`Q0yx|;i0|z@SC-RCb+~RiURe>Rt(8D|?ab0*|A|#=(9@-aT zvsjNC8xofojAN4)w5y(SY-T)09_NbjSk4_gci@2WSl%Gxu_J#{>tn$^JW&K~g$~m^ z76#KvG;BZrIR3s;Sb{78V^BbSogX{ZW0J=JJnmluJ>mKoVB$)89H+9TJ7v%1EamR` zZD}6UEI|$F5fVE;c%nz+v4kmplku4EhSmSm0pqc}Va8)e{=C3r`7Ta9`x=j(8Zz5i zn#W`g#hQ5+Wn34IJtyjZF9|)oK8Dq>MGq4i z^-*X|%vTrd5ogpNs6w5g%q`jZ_n%!)@>m5Q_TGogU-}H<-;a?SnxMVA3bq@M6*Twn zcWpeD&$02?kw5w@>mJ4^-bK?8T!+VNeU_4gT-oM_t@mM~?#$!kR z?C}`Z5!`oA`18F|+2=7|gI_NzEaox9rWbGnTMmzH9X5-3jAe+X&9=@&AM?hZ9{5w9 uJra8KH~buY%@?PPHf2k!hkRgU#eNw@Qmx^St&imsZakLv$IiZ!1OEUie`WOm literal 0 HcmV?d00001 diff --git a/programs/cmm/installer/installer.c b/programs/cmm/installer/installer.c index fbb1608b6a..67920acba5 100644 --- a/programs/cmm/installer/installer.c +++ b/programs/cmm/installer/installer.c @@ -5,8 +5,7 @@ #include "..\lib\copyf.h" #include "..\lib\patterns\restart_process.h" - -#include "add_appl_dir.c"; +#include "..\lib\added_sysdir.c"; ?define T_END "\'Установка KolibriN успешно завершена.\' -O" ?define T_LESS_RAM "Мало свободной оперативной памяти. Могут возникнуть проблемы" @@ -14,7 +13,7 @@ void main() { - SetAddApplDir("kolibrios", abspath("install/kolibrios")+1); + SetAdditionalSystemDirectory("kolibrios", abspath("install/kolibrios")+1); io.run("/sys/media/kiv", "\\S__/kolibrios/res/Wallpapers/In the wind there is longing.png"); io.del("/sys/docpack"); copyf(abspath("install/sys"), "/sys"); diff --git a/programs/cmm/installer/add_appl_dir.c b/programs/cmm/lib/added_sysdir.c similarity index 76% rename from programs/cmm/installer/add_appl_dir.c rename to programs/cmm/lib/added_sysdir.c index 18a2831b37..ddcf914d26 100644 --- a/programs/cmm/installer/add_appl_dir.c +++ b/programs/cmm/lib/added_sysdir.c @@ -6,7 +6,7 @@ struct sysdir } sysdir; -:int SetAddApplDir(dword tName, tPath) +:int SetAdditionalSystemDirectory(dword tName, tPath) { int i; strcpy(#sysdir.name, tName);