You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
53 lines
1.8 KiB
Bash
Executable File
53 lines
1.8 KiB
Bash
Executable File
pkill -f "python.*mpremote"
|
|
|
|
appname="$1"
|
|
|
|
if [ -z "$appname" ]; then
|
|
echo "Usage: $0 [appname]"
|
|
echo "Example: $0"
|
|
echo "Example: $0 launcher"
|
|
echo "Example: $0 wificonf"
|
|
echo "Example: $0 appstore"
|
|
sleep 2
|
|
fi
|
|
|
|
pushd internal_filesystem/
|
|
|
|
if [ ! -z "$appname" ]; then
|
|
echo "Installing one app: $appname"
|
|
appdir="apps/com.example.$appname/"
|
|
target="apps/"
|
|
if [ ! -d "$appdir" ]; then
|
|
echo "$appdir doesn't exist so taking the builtin/"
|
|
appdir="builtin/apps/com.example.$appname/"
|
|
target="builtin/apps/"
|
|
if [ ! -d "$appdir" ]; then
|
|
echo "$appdir also doesn't exist, exiting..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r "$appdir" :/"$target"
|
|
echo "start_app(\"/$appdir\")"
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py
|
|
popd
|
|
exit
|
|
fi
|
|
|
|
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp boot.py :/boot.py
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp main.py :/main.py
|
|
|
|
#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp main.py :/system/button.py
|
|
#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp autorun.py :/autorun.py
|
|
#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r system :/
|
|
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r apps :/
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r builtin :/
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r lib :/
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r resources :/
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data :/
|
|
|
|
popd
|
|
|
|
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py reset
|