forge: Initial version of application to help developers

pull/3093/head
Pavel Machek 2023-10-12 22:01:53 +02:00
parent 726a81d54f
commit 3004106991
6 changed files with 56 additions and 0 deletions

1
apps/forge/ChangeLog Normal file
View File

@ -0,0 +1 @@
0.01: attempt to import

8
apps/forge/README.md Normal file
View File

@ -0,0 +1,8 @@
# App Forge
This should help with your hacks. Sometimes, you want to work on an
application, you'd want to use the stable version, but you'd also want
to use latest development version.
Well, this makes it easy. Just save your development version as
a.name.js, and you should be able to run it from the menu system.

1
apps/forge/app-icon.js Normal file
View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("mEwgIhe/AEDgOKAocDwgFDgUEAokKAokTAohDEg0hgEgAoMEoMIoAFCgME4AFCwUCwAFBgoeChEAg8GAoMYEYMECIM4AoMMgFAuEAhv4gkg+EAhPghExAoIACg4FEh4FEj4FEn56Ev/8iAFC///CQUBAoPgQoQFBLYUHAoJbCh4FBFwf//wuD//8Fwf/GoYuNAoUGGggMCGgQeCbIl+Aol8Aol4Aoh2EgFgf5kAA"))

BIN
apps/forge/app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

33
apps/forge/forge.app.js Normal file
View File

@ -0,0 +1,33 @@
// Devel app -- app forge?
st = require('Storage');
l = /^a\..*\.js$/;
//l = /.*\.js/;
l = st.list(l, {sf:false});
print(l);
function on_load(x)
{
print("Loading", x);
Bangle.buzz(50, 1); // Won't happen because load() is quicker
g.reset().clear()
.setFont("Vector", 40)
.drawString("Loading", 0, 30)
.drawString(x, 0, 80);
g.flip();
load(x);
}
var menu = {
"< Back" : Bangle.load
};
if (Object.keys(l).length==0) Object.assign(menu, {"No apps":""});
else for (let id in l) {
let i = id;
menu[l[id]]=()=>{ on_load(l[i]); };
}
g.clear();
E.showMenu(menu);

13
apps/forge/metadata.json Normal file
View File

@ -0,0 +1,13 @@
{ "id": "forge",
"name": "App Forge",
"version":"0.01",
"description": "Easy way to run development versions of your apps",
"icon": "app.png",
"readme": "README.md",
"supports" : ["BANGLEJS2"],
"tags": "tool",
"storage": [
{"name":"forge.app.js","url":"forge.app.js"},
{"name":"forge.img","url":"app-icon.js","evaluate":true}
]
}