From a5029119f26ccd4e2952f7429e99345bb04bfe3b Mon Sep 17 00:00:00 2001 From: nakst <> Date: Sun, 2 Jan 2022 10:16:34 +0000 Subject: [PATCH] minimal dependency builds --- desktop/api.cpp | 17 +++++++++++++++++ help/Build System.md | 14 ++++++++------ res/Fonts/Bitmap Sans Bold 9.font | Bin 2875 -> 2898 bytes res/Fonts/Bitmap Sans Regular 9.font | Bin 3011 -> 3034 bytes util/build.c | 8 ++++---- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/desktop/api.cpp b/desktop/api.cpp index 4e03a41..57d948a 100644 --- a/desktop/api.cpp +++ b/desktop/api.cpp @@ -2183,3 +2183,20 @@ EsProcessStartupInformation *ProcessGetStartupInformation() { return api.startupInformation; } #endif + +#ifndef USE_STB_SPRINTF +int EsCRTvsnprintf(char *, size_t, const char *, va_list) { + EsUnimplemented(); + return 0; +} + +int EsCRTsnprintf(char *, size_t, const char *, ...) { + EsUnimplemented(); + return 0; +} + +int EsCRTsprintf(char *, const char *, ...) { + EsUnimplemented(); + return 0; +} +#endif diff --git a/help/Build System.md b/help/Build System.md index 30ea730..9ac0ada 100644 --- a/help/Build System.md +++ b/help/Build System.md @@ -216,13 +216,15 @@ Options starting with `Driver.` are used to enable and disable drivers. The defa ### Dependency options -TODO +You can disable optional dependencies using these options. -- `Dependency.ACPICA` -- `Dependency.stb_image` -- `Dependency.stb_image_write` -- `Dependency.stb_sprintf` -- `Dependency.FreeTypeAndHarfBuzz` +- `Dependency.ACPICA` ACPICA is a kernel driver that provides power management through ACPI. Without it, the system will not be able to turn off the computer or provide thermal management. +- `Dependency.stb_image` stb\_image provides loading images of various formats. Without it, the system will only be able to load PNG images. +- `Dependency.stb_image_write` stb\_image\_write provides writing images of various formats. Without it, the system will not be able to save images. Note that the `Image Editor` application includes this library regardless of this setting. +- `Dependency.stb_sprintf` stb\_sprintf provides the printf-like API calls. Without it, these calls will be redirected to `EsUnimplemented`. Other optional dependencies may require this to be enabled. +- `Dependency.FreeTypeAndHarfBuzz` FreeType and HarfBuzz provide support for TrueType font rendering. Without it, the system will only be able to load bitmap fonts. + +Additionally, there is the MD4C library which is included by the `Markdown Viewer` application. ## a2l diff --git a/res/Fonts/Bitmap Sans Bold 9.font b/res/Fonts/Bitmap Sans Bold 9.font index f9c3c19e4af2f7887f400d62b24fde5dba41527c..6caa8b710b6e4f6504b6707eb61305957af64155 100644 GIT binary patch literal 2898 zcmZA3UuYaf9KiA4W$tD-$#SP6a&p(b{;_GaTCd%DNxgVy{ZqBoTL0D7KW%mO5_>VN zMr$=`BZxi-iXiwP;)96v#i9s(5&9D7i^T^85duCa7(q}$@j;>IcV_3*%wEXOe)5~y z-^~1OH%Grc@#kT==+Ys{%b##;&(!cGj%DmW#0_?VR0hv-W|Mu?ZWexib4!kX6_Xw0pgRtpm-tMHe>e-fEOxIKcMiMHvoEpxJ^KcGz_ahLz0Ugi{fIs2Y?!JUVjdT;eO_NZB(mSLBKDAH zmthZE3*C2hNLFKyxVZjaj$)5`aa*th&a$|Ij9~|@nL0D|my>bqkc-QnFG`x&W7Y~T zPRn-eaTk~M9h99|>c#EBp77%KV^4Z<2eFQ|fNzj_UWGD=O|FOw zat3?Gv$NQ<&I+u1o_n0fW}Rhwq~$B@IcsKJOk616W6!S`Ps>l(G0%R%UT{X)(NoJG z*l{oJFYLt?7Rtb|$V<-pxrEr9wb1R+kX(YzW4&Hx15|kxJK@ERU?;8h-;Dz@ij`Lz z%-(P2-Lnz9+_Ozs)tSjf6So;#<=IwjEoPp(CN59h7&c<#a&9jNWE-{tyU@$q8d5yn zo7l2_$%o89hz(^Irq*#mJKJ+5yRr4wvUjNYCN69@$ATz(h^ka7)6)x$#zLhMwz|Wu zsi|%&>@=J4#LP@mtW=84N~J}t&N`Tec8Ag>U5cW16ltw$N|npDrQ*aMaa825{5?+U z)?TGc9pFQh5snIUTv9g}uvqEz83sg%f)A60W_HLuldns(;X zG^JOXma?gpY~oQA&?N}y>?Yq{TwGr6EiEmklaoj0W@pou>6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@rGQ diff --git a/res/Fonts/Bitmap Sans Regular 9.font b/res/Fonts/Bitmap Sans Regular 9.font index fc14672a298eb91df3692bd4c5ac125b69c4fdd4..2def566bc0946db5df2e1463ec9afbdd31b8985c 100644 GIT binary patch literal 3034 zcmZA3Uu+ab90%~vYU`1N0_;}h{!`3*q26m%k8(?c4+YDRh*ml^sV>@6sIkp?N-my09W^DmR%JU$k zL$D3{+?a>?G6S2?aUml3`37_Xwh`x@PN3&ifDE33ZF1tyz$Uf*pTAdNw^%FZ&>OHR z$KHkAYOT!k`>@SU+()o2j(rBZ&8hnZY^!5m!?rnfzlYuK*w3(*H8a-~U4Y%;*l)1y z*2+Hr0lU+&KVf%S!!$;g6_KZd#qv|M6DPZzxV^B496JDe*s-Iq-P)90s|lTi zJ!0d`T2=HCY>yN7Dr~Pclb3+rgzeMDIp+OJ&|9$mHm=+c-iAG@EwFPur1xNt**Mc) zOdr77PTa?^$DO#(VNW=5=V1qIoJ96~Wa|>_;DR_sf5Dz~+WQA~NLysrsv^-vbl931 zM?zh&Bet%|RZKP5Q`XEnk7)_)X>DfxMi})V?5H&}-jGIN&p5UUHnYGKjl+&PHVJ#y z8jn`u9(!QN=Z*K>klL{4v_-h)_l%+=uoE_}?8`CO^N!8JX04fZ6w(~*q!V`zc4~ns zdJXo%yz#upGl!klR=)ER`VjUatkW?j@ILw!Hs{2hhn>;JZ&{ve9(@VxTgs^PbK`f< zSFnD^zJU!`;~YrDeG6OS*mtldjQ3rBzWh%90XCxJguXBD+&{vW!LD>T!~D+k=qK1k z{gUV1#{3re1?CUp0>XXf=X3!!tS!{PA$Zhhr}#KaLLVf!nNA1sK`=Bl+1))E$1?2+ z(ps%2mCc@>q&7B|hjASC$8j&}@ZQex+ib~u6<_n3=-h$>&F zxu~K>+Q>3)LZUu50nhV#ra~d`s>EH<2~YHeBJ67rHT+6e@xvG`Bh~d{A~HjZBJQ}9ejW$DAH=yG zd}C^=-JYIqwTi*v;nC66MV%`ZMP1(vL6vS?jdril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k zaz2#ro%b?+-@M;k{{D64G%1_S@b9TQu$Xig_)4cs-@xCoHXkdlJI13VRyt( cFHdO4iLsvIxY2N3S#K@Y>wU=jMVbEaAE6J-sQ>@~ diff --git a/util/build.c b/util/build.c index 580e186..cbe96c8 100644 --- a/util/build.c +++ b/util/build.c @@ -72,7 +72,7 @@ BuildFont fonts[] = { { "2i", "Inter Extra Light Italic.otf" }, { "3", "Inter Light.otf" }, { "3i", "Inter Light Italic.otf" }, - { "4", "Inter Regular.otf", .required = true }, + { "4", "Inter Regular.otf" }, { "4i", "Inter Regular Italic.otf" }, { "5", "Inter Medium.otf" }, { "5i", "Inter Medium Italic.otf" }, @@ -88,7 +88,7 @@ BuildFont fonts[] = { } }, { "Hack", "Hack License.md", "Mono", "Latn,Grek,Cyrl", (FontFile []) { - { "4", "Hack Regular.ttf", .required = true }, + { "4", "Hack Regular.ttf" }, { "4i", "Hack Regular Italic.ttf" }, { "7", "Hack Bold.ttf" }, { "7i", "Hack Bold Italic.ttf" }, @@ -112,8 +112,8 @@ BuildFont fonts[] = { } }, { "Bitmap Sans", "", "Sans", "Latn", (FontFile []) { - { "4", "Bitmap Sans Regular 9.font" }, - { "7", "Bitmap Sans Bold 9.font" }, + { "4", "Bitmap Sans Regular 9.font", .required = true }, + { "7", "Bitmap Sans Bold 9.font", .required = true }, {}, } },