From af1d84cac7b4588c99d55186c4d28837ee632b3d Mon Sep 17 00:00:00 2001 From: RodrigoDornelles Date: Tue, 16 Jul 2024 10:15:29 -0300 Subject: [PATCH 01/12] chore: optmize std.math.max --- src/lib/common/math.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/common/math.lua b/src/lib/common/math.lua index 6f982fb..9f25e05 100644 --- a/src/lib/common/math.lua +++ b/src/lib/common/math.lua @@ -69,7 +69,7 @@ local function max(...) local value = nil local max_value = nil - if #args == 1 and type(args[1]) == "table" then + if #args == 1 then args = args[1] end From d1015d08b52f4fc8249d94c45ea6fc729a0bb475 Mon Sep 17 00:00:00 2001 From: RodrigoDornelles Date: Tue, 16 Jul 2024 10:15:58 -0300 Subject: [PATCH 02/12] fix: correction in fps_show ginga --- src/lib/ginga/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ginga/main.lua b/src/lib/ginga/main.lua index 2e7015f..b5d4600 100644 --- a/src/lib/ginga/main.lua +++ b/src/lib/ginga/main.lua @@ -154,7 +154,7 @@ local function setup(evt) game.width=w game.height=h game.fps_max = application.config and application.config.fps_max or 100 - game.fps_show = application.config and application.config.fps_max or 0 + game.fps_show = application.config and application.config.fps_show or 0 fps_obj.drop_time = application.config and application.config.fps_time or 1 fps_obj.drop_count = application.config and application.config.fps_drop or 2 application.callbacks.init(std, game) From db338553f5289c6ee187c2915c6cde0f4227df8d Mon Sep 17 00:00:00 2001 From: RodrigoDornelles Date: Tue, 16 Jul 2024 10:18:49 -0300 Subject: [PATCH 03/12] chore: rename core ginga_html5 to html5_ginga #15 --- src/cli/main.lua | 4 ++-- src/lib/{ginga_html5 => html5_ginga}/main.ncl | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename src/lib/{ginga_html5 => html5_ginga}/main.ncl (100%) diff --git a/src/cli/main.lua b/src/cli/main.lua index 108375f..b4134a0 100644 --- a/src/cli/main.lua +++ b/src/cli/main.lua @@ -30,11 +30,11 @@ local core_list = { 'src/lib/ginga/main.ncl' } }, - ginga_html5={ + html5_ginga={ src='src/lib/html5/main.lua', post_exe='ginga dist/main.ncl -s '..screen, extras={ - 'src/lib/ginga_html5/main.ncl', + 'src/lib/html5_ginga/main.ncl', 'src/lib/html5/index.html', 'src/lib/html5/index.html', 'src/lib/html5/engine.js', diff --git a/src/lib/ginga_html5/main.ncl b/src/lib/html5_ginga/main.ncl similarity index 100% rename from src/lib/ginga_html5/main.ncl rename to src/lib/html5_ginga/main.ncl From a91e9cec0faa6a5964550b3e21f8a12a98dd7d83 Mon Sep 17 00:00:00 2001 From: RodrigoDornelles Date: Tue, 16 Jul 2024 10:34:40 -0300 Subject: [PATCH 04/12] docs: upgrade plataform support list --- SUPPORT.md | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index e97b055..4dd5e12 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,27 +1,19 @@ Platform Support List ===================== -Tier 1 ------- - - - [X] [Ginga](https://github.com/TeleMidia/ginga) - - [X] [Love2D](https://github.com/love2d/love) - - [X] REPL - -Tier 2 ------- - - - [ ] Browser - -Tier 3 ------- - - - [ ] Curses - - [ ] Console - -Mayable ??? ---- - - - Roblox - - GameBoyAdvance - - ESP32 +| core | tier | native | url | +| :------------- | :----: | :----: | :-- | +| ginga | tier 1 | yes | +| love | tier 1 | nos | +| repl | tier 1 | yes | +| curses | tier ? | yes | +| html5 | tier 2 | no | +| html5_webos | tier 2 | no | +| html5_tizen | tier 2 | no | +| html5_ginga | tier ? | no | +| esp32 | tier ? | yes | +| roblox | tier ? | no | +| arkos | tier ? | yes | +| odroid | tier ? | yes | +| raylib | tier ? | no | +| gameboyadvance | tier ? | yes | From 273f5e475801d1a3e1c83572fefafe1271ea80a1 Mon Sep 17 00:00:00 2001 From: RodrigoDornelles Date: Wed, 17 Jul 2024 11:47:19 -0300 Subject: [PATCH 05/12] feat: add core htm5_webos and command meta --- src/cli/main.lua | 38 +++++++++++ src/cli/meta.lua | 104 +++++++++++++++++++++++++++++++ src/lib/html5/index.html | 2 +- src/lib/html5_webos/appinfo.json | 9 +++ src/lib/html5_webos/icon.png | Bin 0 -> 8572 bytes src/object/application.lua | 2 + 6 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 src/cli/meta.lua create mode 100644 src/lib/html5_webos/appinfo.json create mode 100644 src/lib/html5_webos/icon.png diff --git a/src/cli/main.lua b/src/cli/main.lua index b4134a0..ae385bb 100644 --- a/src/cli/main.lua +++ b/src/cli/main.lua @@ -1,5 +1,6 @@ local os = require('os') local zeebo_args = require('src/shared/args') +local zeebo_meta = require('src/cli/meta') local zeebo_fs = require('src/cli/fs') --! @cond @@ -30,9 +31,26 @@ local core_list = { 'src/lib/ginga/main.ncl' } }, + html5_webos={ + src='src/lib/html5/main.lua', + post_exe='webos24 $(pwd)/dist', + pipeline={ + zeebo_meta.late(game):file(dist..'index.html'):file(dist..'appinfo.json'):pipe() + }, + extras={ + 'src/lib/html5_webos/appinfo.json', + 'src/lib/html5_webos/icon.png', + 'src/lib/html5/index.html', + 'src/lib/html5/index.html', + 'src/lib/html5/engine.js', + } + }, html5_ginga={ src='src/lib/html5/main.lua', post_exe='ginga dist/main.ncl -s '..screen, + pipeline={ + zeebo_meta.late(game):file(dist..'index.html'):pipe() + }, extras={ 'src/lib/html5_ginga/main.ncl', 'src/lib/html5/index.html', @@ -42,6 +60,9 @@ local core_list = { }, html5={ src='src/lib/html5/main.lua', + pipeline={ + zeebo_meta.late(game):file(dist..'index.html'):pipe() + }, extras={ 'src/lib/html5/index.html', 'src/lib/html5/engine.js' @@ -57,6 +78,11 @@ if command == 'run' then os.exit(os.execute(core_list[core].exe) and 0 or 1) elseif command == 'clear' then zeebo_fs.clear(dist) +elseif command == 'meta' then + if core == 'ginga' then + core = '{{title}} {{version}}' + end + zeebo_meta.current(game):stdout(core):run() elseif command == 'bundler' then local path, file = game:match("(.-)([^/\\]+)$") zeebo_fs.bundler(path, file, dist..file) @@ -116,6 +142,18 @@ elseif command == 'build' then zeebo_fs.clear(dist..bundler) end + -- post process + if core.pipeline then + local index = 1 + while index <= #core.pipeline do + local eval = core.pipeline[index] + while type(eval) == 'function' do + eval = eval() + end + index = index + 1 + end + end + if run then if not core.post_exe then print('this core cannot be runned after build!') diff --git a/src/cli/meta.lua b/src/cli/meta.lua new file mode 100644 index 0000000..db86fbd --- /dev/null +++ b/src/cli/meta.lua @@ -0,0 +1,104 @@ +local application_default = require('src/object/application') + +local function replace(src, meta, default) + if src and #src > 0 then + return (src + :gsub('{{id}}', meta.id or default.id) + :gsub('{{title}}', meta.title or default.title) + :gsub('{{company}}', meta.title or default.company) + :gsub('{{version}}', meta.version or default.version) + :gsub('{{description}}', meta.description or default.description) + ) + end + return '' +end + +local function file(self, file) + local file_copy = string.format("%s", file) + self.pipeline[#self.pipeline + 1] = function() + if not self.loaded then return self end + + local file_meta = io.open(file_copy, 'r') + local file_temp = io.open(file_copy..'.tmp', 'w') + + repeat + local line = file_meta:read() + file_temp:write(replace(line, self.meta, application_default.meta), '\n') + until not line + + file_meta:close() + file_temp:close() + + os.remove(file_copy) + os.rename(file_copy..'.tmp', file_copy) + end + return self +end + +local function stdout(self, format) + local format_copy = string.format("%s", format) + if format_copy == 'json' then + format_copy = '{"id":"{{id}}","title":"{{title}}","company":"{{company}}",' + format_copy = format_copy..'"version":"{{version}}","description":"{{description}}"}' + end + self.pipeline[#self.pipeline + 1] = function() + if not self.loaded then return self end + print(replace(format_copy, self.meta, application_default.meta)) + end + return self +end + +local function pipe(self) + return function() + self:run() + end +end + +local function run(self) + local index = 1 + while index <= #self.pipeline do + self.pipeline[index]() + index = index + 1 + end + return self +end + +local function current(game, application) + local metadata = game and #game > 0 and dofile(game) + + if not application then + application = { + meta = application_default.meta, + pipeline={}, + file=file, + stdout=stdout, + pipe=pipe, + run=run + } + end + + if metadata then + application.loaded = true + application.meta = metadata.meta + end + + return application +end + +local function late(game) + local game_copy = string.format("%s", game) + local application = current() + local eval = application.run + application.run = function() + current(game_copy, application) + eval(application) + end + return application +end + +local P = { + current = current, + late = late +} + +return P diff --git a/src/lib/html5/index.html b/src/lib/html5/index.html index e84cca2..b79c9e9 100644 --- a/src/lib/html5/index.html +++ b/src/lib/html5/index.html @@ -1,7 +1,7 @@ - Lua Engine + {{title}} - {{version}} diff --git a/src/lib/html5_webos/appinfo.json b/src/lib/html5_webos/appinfo.json new file mode 100644 index 0000000..2979134 --- /dev/null +++ b/src/lib/html5_webos/appinfo.json @@ -0,0 +1,9 @@ +{ + "id": "{{id}}", + "version": "{{version}}", + "vendor": "{{company}}", + "type": "web", + "main": "index.html", + "title": "{{title}}", + "icon": "icon.png" +} diff --git a/src/lib/html5_webos/icon.png b/src/lib/html5_webos/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c1742ede0e2d5bcff3b46d234e58806b588c2fc0 GIT binary patch literal 8572 zcmV-?A%otDP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~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n3@Ndr% z1_*)ax`eZx1Y6%b@16bm_C#yL>(cWYeBk>1b?&%tuuSxCCgg5UhkT$ID7Eqnmxihq z++)sMw#F@xzkl~pLN%yvNzJNc9=ep1-=vuK~mQU}lmn8L#pE{1f__5emU;fCyZkJtX;2fDBM ztkc<4=cW=3I_Dq~KH~;cQ`gM88}WBz3_sk70(n3Th#96)p>(K}P*GW^ymD3`5-m3Z zMhqc>Iv0#cLn|BU_RD0v&F*P!)}GU=T(?8#m^R?YbZLKe}yy z%tl88;NTS04FU5?oqWT$RW&25QijTtqo^}l`?AuX)W%V^|KSk8hfcudbykjdI_vlR z$DNnGUOY+$JT-*L-yCMJgLPH`bH>2FMqukG+phzjz3jc3A(}Q=XWMuJsQpG8uV7;a zJN@ES2GDpJlWRt(Q#XYDqXBU6Gc_Zan8EMfIRaDbMp5UQ09*xZ@H?^X3IOi(0bDu4 z0BZdAzd59{mzQUUsL}6@0l=L@G-Lf$+Fw7y88f^Fpe*hx^H0VT% zM^Lksqp?9l)OQf{7q4OmCq0aL@-k}o`5+A)@YW&!zv$OlIYLPElwW7_2x@lN4<$x3 z!9!Jj=P24|jPKoC%6*&+yjgAncoV>z0RF0$|33gKAuVH!EkmOK0000 Date: Wed, 17 Jul 2024 12:08:24 -0300 Subject: [PATCH 06/12] chore: small improves in repo --- .gitattributes | 4 ++++ .gitignore | 3 ++- src/cli/main.lua | 2 +- src/cli/meta.lua | 2 +- src/lib/html5/index.html | 6 ++++++ 5 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6146740 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +*.html linguist-generated +*.css linguist-generated +*.sh linguist-generated +*.bat linguist-generated diff --git a/.gitignore b/.gitignore index 4f1656b..8831805 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ luacov.* vendor/ dist/ html/ -latex/ \ No newline at end of file +latex/ +.out \ No newline at end of file diff --git a/src/cli/main.lua b/src/cli/main.lua index ae385bb..0267816 100644 --- a/src/cli/main.lua +++ b/src/cli/main.lua @@ -157,7 +157,7 @@ elseif command == 'build' then if run then if not core.post_exe then print('this core cannot be runned after build!') - exit(1) + os.exit(1) end os.exit(os.execute(core.post_exe) and 0 or 1) end diff --git a/src/cli/meta.lua b/src/cli/meta.lua index db86fbd..7883bcf 100644 --- a/src/cli/meta.lua +++ b/src/cli/meta.lua @@ -5,7 +5,7 @@ local function replace(src, meta, default) return (src :gsub('{{id}}', meta.id or default.id) :gsub('{{title}}', meta.title or default.title) - :gsub('{{company}}', meta.title or default.company) + :gsub('{{company}}', meta.company or default.company) :gsub('{{version}}', meta.version or default.version) :gsub('{{description}}', meta.description or default.description) ) diff --git a/src/lib/html5/index.html b/src/lib/html5/index.html index b79c9e9..8773e80 100644 --- a/src/lib/html5/index.html +++ b/src/lib/html5/index.html @@ -4,6 +4,12 @@ {{title}} - {{version}} + + + + + +