diff --git a/apps.json b/apps.json index 23769e299..2362c2e9d 100644 --- a/apps.json +++ b/apps.json @@ -169,17 +169,18 @@ }, { "id": "welcome", - "name": "Welcome (Bangle.js 1)", + "name": "Welcome", "shortName": "Welcome", - "version": "0.12", + "version": "0.13", "description": "Appears at first boot and explains how to use Bangle.js", "icon": "app.png", "tags": "start,welcome", - "supports": ["BANGLEJS"], + "supports": ["BANGLEJS","BANGLEJS2"], "allow_emulator": true, "storage": [ {"name":"welcome.boot.js","url":"boot.js"}, - {"name":"welcome.app.js","url":"app.js"}, + {"name":"welcome.app.js","url":"app-bangle1.js","supports": ["BANGLEJS"]}, + {"name":"welcome.app.js","url":"app-bangle2.js","supports": ["BANGLEJS2"]}, {"name":"welcome.settings.js","url":"settings.js"}, {"name":"welcome.img","url":"app-icon.js","evaluate":true} ], @@ -203,24 +204,6 @@ ], "data": [{"name":"mywelcome.json"}] }, - { - "id": "welcome2", - "name": "Welcome (Bangle.js 2)", - "shortName": "Welcome", - "version": "0.13", - "description": "Appears at first boot and explains how to use Bangle.js 2", - "icon": "app.png", - "tags": "start,welcome", - "supports": ["BANGLEJS2"], - "allow_emulator": true, - "storage": [ - {"name":"welcome2.boot.js","url":"boot.js"}, - {"name":"welcome2.app.js","url":"app.js"}, - {"name":"welcome2.settings.js","url":"settings.js"}, - {"name":"welcome2.img","url":"app-icon.js","evaluate":true} - ], - "data": [{"name":"welcome2.json"}] - }, { "id": "gbridge", "name": "Gadgetbridge", diff --git a/apps/welcome/ChangeLog b/apps/welcome/ChangeLog index 519222c52..f72f77a4b 100644 --- a/apps/welcome/ChangeLog +++ b/apps/welcome/ChangeLog @@ -14,3 +14,4 @@ 0.10: Tweaks to reduce memory usage 0.11: Fix initial screen fill colour 0.12: Fix swipe direction (#800) +0.13: Mods for Bangle.js 2 diff --git a/apps/welcome/app.js b/apps/welcome/app-bangle1.js similarity index 97% rename from apps/welcome/app.js rename to apps/welcome/app-bangle1.js index 047b0cdb2..949750b38 100644 --- a/apps/welcome/app.js +++ b/apps/welcome/app-bangle1.js @@ -290,14 +290,6 @@ setWatch(()=>{ }, BTN2, {repeat:true,edge:"falling"}); setWatch(()=>move(-1), BTN1, {repeat:true}); -(function migrateSettings(){ - let global_settings = require('Storage').readJSON('setting.json', 1) - if (global_settings) { - delete global_settings.welcomed - require('Storage').write('setting.json', global_settings) - } -})() - Bangle.setLCDTimeout(0); Bangle.setLCDPower(1); move(0); diff --git a/apps/welcome2/app.js b/apps/welcome/app-bangle2.js similarity index 97% rename from apps/welcome2/app.js rename to apps/welcome/app-bangle2.js index d9a967d8a..93d1c5657 100644 --- a/apps/welcome2/app.js +++ b/apps/welcome/app-bangle2.js @@ -243,14 +243,6 @@ setWatch(()=>{ move(1); }, BTN1, {repeat:true}); -(function migrateSettings(){ - let global_settings = require('Storage').readJSON('setting.json', 1) - if (global_settings) { - delete global_settings.welcomed - require('Storage').write('setting.json', global_settings) - } -})() - Bangle.setLCDTimeout(0); Bangle.setLCDPower(1); move(0); diff --git a/apps/welcome2/ChangeLog b/apps/welcome2/ChangeLog deleted file mode 100644 index f72f77a4b..000000000 --- a/apps/welcome2/ChangeLog +++ /dev/null @@ -1,17 +0,0 @@ -0.01: New App! -0.02: Animate balloon intro -0.03: BTN3 now won't restart when at the end -0.04: Fix regression after tweaks to Storage.readJSON -0.05: Move configuration into App/widget settings -0.06: Move loader into welcome.boot.js -0.07: Run again when updated - Don't run again when settings app is updated (or absent) - Add "Run Now" option to settings -0.08: Don't overwrite existing settings on app update -0.09: Allow welcome to run after a fresh install - More useful app menu - BTN2 now goes to menu on release -0.10: Tweaks to reduce memory usage -0.11: Fix initial screen fill colour -0.12: Fix swipe direction (#800) -0.13: Mods for Bangle.js 2 diff --git a/apps/welcome2/app-icon.js b/apps/welcome2/app-icon.js deleted file mode 100644 index 5c1373e17..000000000 --- a/apps/welcome2/app-icon.js +++ /dev/null @@ -1 +0,0 @@ -require("heatshrink").decompress(atob("mEwxH+AH4A/AH4AU5gAEFtoxnEwXN53WAAXO5oJB42Wy26AAIueFoPXFggAD4AwEGTQiB6otBFgwAD3QvFGC5dCFxiRGGClhrdbv67BXAIuLMBIwPsIABF4OpLwXOFxjBCF6gtBw2r1mHXoXWFxqQWFwOH62rL4IeB6xeOAAIvHGBYuC6+rR4QvCXpovXw3X1i/DR4QuPR5AvKFQOs6+GF4eod4IvPd5AvLwvWLwQvCv4fBR54vURwOHF4iQCX0yOCF4aQBX0QvHSAoAN3SOSd4WyF4yQPLyhgD1YvDMCJeIFxhgCF47BN4BeHFxpgDSAiRORpAuPMIYAFGBYuaF5aSHFwQvEFqQwOeggSBLa4xNF4X+4wAC/xeCFjIADrYwGBIIvlMQiPDBAOk0gDBz2XF8BlEF4eIxADFF8lcF9n+wIrFF05bHF9AsGF9wupGAYv/F8QupGAov/F/4wOF1gA/AH4Ap")) diff --git a/apps/welcome2/app.png b/apps/welcome2/app.png deleted file mode 100644 index ebbf254bd..000000000 Binary files a/apps/welcome2/app.png and /dev/null differ diff --git a/apps/welcome2/boot.js b/apps/welcome2/boot.js deleted file mode 100644 index 07b7386f1..000000000 --- a/apps/welcome2/boot.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - let s = require('Storage').readJSON('welcome2.json', 1) || {}; - if (!s.welcomed) { - setTimeout(() => { - require('Storage').write('welcome2.json', {welcomed: true}) - load('welcome2.app.js') - }) - } -})() diff --git a/apps/welcome2/settings.js b/apps/welcome2/settings.js deleted file mode 100644 index d87cf4b55..000000000 --- a/apps/welcome2/settings.js +++ /dev/null @@ -1,18 +0,0 @@ -(function(back) { - let settings = require('Storage').readJSON('welcome2.json', 1) - || require('Storage').readJSON('setting.json', 1) || {} - E.showMenu({ - '': { 'title': 'Welcome App' }, - 'Run next boot': { - value: !settings.welcomed, - format: v => v ? 'Yes' : 'No', - onchange: v => require('Storage').write('welcome2.json', {welcomed: !v}), - }, - 'Run Now': () => load('welcome2.app.js'), - 'Turn off & run next': () => { - require('Storage').write('welcome2.json', {welcomed: false}); - Bangle.off(); - }, - '< Back': back, - }) -}) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index ef795871d..9c5f4c916 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -133,9 +133,9 @@ apps.forEach((app,appIdx) => { if (isGlob(file.name)) ERROR(`App ${app.id} storage file ${file.name} contains wildcards`); let char = file.name.match(FORBIDDEN_FILE_NAME_CHARS) if (char) ERROR(`App ${app.id} storage file ${file.name} contains invalid character "${char[0]}"`) - if (fileNames.includes(file.name)) + if (fileNames.includes(file.name) && !file.supports) // assume that there aren't duplicates if 'supports' is set ERROR(`App ${app.id} file ${file.name} is a duplicate`); - if (!file.supports) fileNames.push(file.name); // assume that there aren't duplicates if 'supports' is set + fileNames.push(file.name); allFiles.push({app: app.id, file: file.name}); if (file.url) if (!fs.existsSync(appDir+file.url)) ERROR(`App ${app.id} file ${file.url} doesn't exist`); if (!file.url && !file.content && !app.custom) ERROR(`App ${app.id} file ${file.name} has no contents`);