rockbox/apps/plugins
William Wilgus e4ee5980c6 lua add _fullpath and argument parsing
WIP for passing arguments to lua scripts

args are recognized by adding ?arg to the end of the script path
The easiest way to do this currently is to use the function rb.restart_lua

local sfile = rawget(_G, "_fullpath") or ""
local sArgs = rawget(_G, "_arguments")

if not sArgs then
    rb.restart_lua(sfile .. "?my arguments")
else
    rb.splash(1000, sfile .. "?" .. sArgs)
end

I'd eventually like to figure out a sensible way to do this from a
shortcut / quick list

Change-Id: I2b60fe3b8f1d04b57361fe532510bd6afee59fbf
2020-06-01 13:23:38 -05:00
..
beatbox Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
bitmaps Use full_path_subst on more places, to avoid replacing the wrong occurrences in 2019-07-28 21:00:57 +02:00
chessbox av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
clock Make fixepoint.c as a shared library (libfixedpoint.a). 2013-04-26 00:11:04 +02:00
doom pdbox/doom: Use -Wno-stringop-truncation with GCC >=8 2020-05-18 00:47:04 +02:00
fft av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
fractals av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
frotz Plugin Frotz: Match keymap and manual 2016-01-09 19:46:21 +01:00
goban xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
imageviewer av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
lib av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
lua lua add _fullpath and argument parsing 2020-06-01 13:23:38 -05:00
lua_scripts Lua add metadata and settings reading helper module 2019-09-07 03:10:59 +02:00
midi xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
mikmod mikmod: Use -Wno-stringop-truncation with GCC >=8 2020-05-18 01:15:42 +02:00
mpegplayer xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
pacbox xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
pdbox pdbox/doom: Use -Wno-stringop-truncation with GCC >=8 2020-05-18 00:47:04 +02:00
pictureflow av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
puzzles build: Fix puzzles build due to missing dependency 2019-07-20 10:06:12 -04:00
reversi xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
rockboy xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
sdl SDL: Silence a large number of compile warnings (WIP) 2020-04-11 19:29:47 +02:00
searchengine Second try: Introduce plugin_crt0.c that every plugin links. 2010-08-24 14:30:46 +00:00
shortcuts plugins: another round of making local functions static 2011-10-15 20:38:08 +00:00
sudoku av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
text_viewer av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
xworld Agptek Rocker: Build plugins 2018-06-12 10:31:15 +02:00
zxbox av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
2048.c 2048: Cleanup 2015-04-19 17:48:12 +02:00
alarmclock.c Implement time-based resume and playback start. 2014-03-10 04:12:30 +01:00
alpine_cdc.c Alpine CD changer emulation: Fix logic error in detecting non-playing status 2020-04-17 04:33:17 +02:00
battery_bench.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
bench_mem_jpeg.c plugins: use lcd_putsf/lcd_putsxyf 2010-08-28 21:46:45 +00:00
bench_scaler.c
blackjack.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
boomshine.lua Boomshine Fix rb.touchscreen_set_mode() 2019-06-17 16:03:57 -05:00
bounce.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
brickmania.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
bubbles.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
BUILD_OVERLAY
calculator.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
calendar.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
CATEGORIES lua add demo scripts, atexit handler, gui_scrollbar_draw 2019-07-29 02:51:29 -05:00
chessbox.c Second try: Introduce plugin_crt0.c that every plugin links. 2010-08-24 14:30:46 +00:00
chessclock.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
chip8.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
chopper.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
clix.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
codebuster.c plugins: use lcd_putsf/lcd_putsxyf 2010-08-28 21:46:45 +00:00
credits.c
credits.pl
crypt_firmware.c
cube.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
demystify.c plugins: another round of making local functions static 2011-10-15 20:38:08 +00:00
dice.c FS#7704 - Talk support for plugins 2019-07-20 08:48:35 +02:00
dict.c plugins: make local functions static for a subset of plugins 2011-09-17 17:20:27 +00:00
disktidy.c Fixed disktidy bug and added a couple of new features to disktidy. 2014-10-09 09:43:40 +02:00
disktidy.config Revert r31239 and r31250. Selecting ALL in disktidy used to be generally safe for most people, and these changes change that, making it easy to delete most or all of a user's music. This is a *very* bad idea. 2011-12-26 00:03:28 +00:00
duke3d.c Port of Duke Nukem 3D 2017-12-23 21:01:26 -05:00
elfdep.pl
euroconverter.c
fire.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
fireworks.c FS#7704 - Talk support for plugins 2019-07-20 08:48:35 +02:00
firmware_flash.c archos: Shut up a compiler warning by marking an inline function as static 2020-04-01 03:18:41 +02:00
flipit.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
goban.c Fix yellows/reds. Red where caused by preprocessor condition mismatch. 2010-08-24 15:01:33 +00:00
greyscale.c Add cleaned-up xDuoo X3 support 2018-07-28 10:56:31 -04:00
helloworld.c Update comments in the helloword plugin. 2010-08-30 20:58:38 +00:00
helloworld.lua
invadrox.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
iriver_flash.c Fix warning about using static vars in non static inline functions with gcc 4.5. 2010-12-27 10:46:29 +00:00
iriverify.c Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope. 2011-10-15 19:35:02 +00:00
jackpot.c plugins: another round of making local things static and adding missing #includes 2011-12-28 11:32:13 +00:00
jewels.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
keybox.c Keybox: display the entry name along with the password 2017-08-27 15:43:11 -04:00
lamp.c Lamp plugin: Allow toggling the button light using "select". 2015-02-22 12:22:40 +01:00
logo.c Fix some build errors and warnings. 2014-06-21 00:49:05 +02:00
lrcplayer.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
lua_scripts.lua lua add demo scripts, atexit handler, gui_scrollbar_draw 2019-07-29 02:51:29 -05:00
main_menu_config.c Speech enabled main menu config plugin 2019-08-05 02:33:37 +02:00
matrix.c matrix plugin: Fix out-of-bounds array access. Unify for-loop style. 2012-06-03 23:37:33 +02:00
maze.c Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope. 2011-10-15 19:35:02 +00:00
mazezam.c * Rename backlight_force_on to backlight_ignore_timeout to make it clear what the function does. 2011-01-24 12:29:16 +00:00
md5sum.c Ged rid of uisimulator/common/io.c for android builds. 2010-09-01 21:29:34 +00:00
metronome.c YH8xx,YH9xx: Keymap improvement 2015-11-15 23:46:39 +01:00
minesweeper.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
mosaique.c Plugin mosaique PLA integration (code + manual) 2012-03-03 16:37:47 +01:00
mp3_encoder.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
nim.c plugins: use lcd_putsf/lcd_putsxyf 2010-08-28 21:46:45 +00:00
oscilloscope.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
otp.c Undo hacks to meant to get around string formatting limitations 2017-11-21 05:01:14 -05:00
pegbox.c xDuoo X3II and X20 port 2020-04-06 18:15:41 +02:00
periodic_table.c Add tentative new element names, IUPAC approval expected around November 2016-12-04 18:05:51 +01:00
pictureflow.c
pitch_detector.c Revise the PCM callback system after adding multichannel audio. 2012-03-03 07:23:38 +01:00
pixel-painter.lua Lua fix pixel-painter score save 2018-11-05 07:18:08 +01:00
plasma.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
plugin.lds iPod Classic: disable IRAM1 2018-07-30 18:50:27 -04:00
plugin_crt0.c Commit to certain names for cache coherency APIs and discard the aliases. 2011-12-17 07:27:24 +00:00
plugins.make Use full_path_subst on more places, to avoid replacing the wrong occurrences in 2019-07-28 21:00:57 +02:00
pong.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
properties.c Voice enable properties plugin 2019-08-05 04:10:25 +02:00
quake.c sdl: Fix path substitution in log messages, fix game names in comments 2019-08-22 22:00:43 +03:00
random_folder_advance_config.c plugins: Add plugin_release_audio_buffer(). 2014-04-09 09:04:10 +02:00
remote_control.c Second try: Introduce plugin_crt0.c that every plugin links. 2010-08-24 14:30:46 +00:00
resistor.c scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api. 2013-12-14 23:11:30 +01:00
robotfindskitten.c robotfindskitten: clear message line before cinema scene 2019-07-28 01:30:29 +02:00
rockblox.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
rockblox1d.c rockblox1d's plugin PLA integration (main code + manual) 2012-02-18 23:57:22 +01:00
rockbox-fonts.config
rockbox_flash.c Improve rockbox_flash messages 2012-02-05 16:26:09 +01:00
rockboy.c Second try: Introduce plugin_crt0.c that every plugin links. 2010-08-24 14:30:46 +00:00
rocklife.c plugins: another round of making local functions static 2011-10-15 20:38:08 +00:00
rockpaint.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
search.c Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope. 2011-10-15 19:35:02 +00:00
settings_dumper.c EQ settings: Rework the settings to clean up the config file. 2013-02-09 13:05:32 +01:00
shopper.c Shopper: slightly improve plugin and manual 2015-09-24 23:15:24 +02:00
sliding_puzzle.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
snake.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
snake2.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
snake2.levels Removed executable flag 2007-01-09 23:22:14 +00:00
snow.c Plugin snow PLA integration (code + manual) 2012-03-03 10:48:22 +01:00
sokoban.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
sokoban.levels
solitaire.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
sort.c plugins: make local functions static for a subset of plugins 2011-09-17 17:20:27 +00:00
SOURCES Add support for Windows shortcuts (*.lnk files) 2019-08-11 22:26:49 +02:00
SOURCES.app_build iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
spacerocks.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
speedread.c Remove redundant code 2017-03-15 18:14:13 -04:00
splitedit.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
star.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
starfield.c Clean up peak calculating code. 2012-05-02 20:53:07 -04:00
stats.c stats's plugin PLA integration (main code + manual) 2012-02-22 09:15:50 +01:00
stopwatch.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
stopwatch.lua stopwatch.lua: Improve button layout. Enable on touchscreen RaaA. 2012-01-29 22:35:49 +01:00
SUBDIRS Enable SDL for native MIPS and hosted targets. 2020-04-05 01:34:24 +02:00
SUBDIRS.app_build lua add demo scripts, atexit handler, gui_scrollbar_draw 2019-07-29 02:51:29 -05:00
superdom.c Silence a build warning in the superdom plugin. 2020-04-13 17:26:22 -04:00
test_boost.c fix plugin test_boost not properly unboosting 2020-05-24 13:43:30 +02:00
test_codec.c Get test_codec synced with changes in 6c868dd 2017-12-08 21:32:54 -05:00
test_core_jpeg.c
test_disk.c Align test_disk buffer for DMA. 2016-04-01 19:57:44 +02:00
test_fps.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_gfx.c test_gfx: Add benchmark for put_line(). 2014-01-07 14:13:41 +01:00
test_grey.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_greylib_bitmap_scale.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_mem.c Fix IRAM overflow introduced in 7a8c9daf7e 2019-05-31 10:42:40 +02:00
test_mem_jpeg.c
test_resize.c
test_sampr.c Revise the PCM callback system after adding multichannel audio. 2012-03-03 07:23:38 +01:00
test_scanrate.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_touchscreen.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
test_viewports.c lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport. 2014-01-07 14:13:48 +01:00
test_viewports.lua
text_editor.c Fix Samsung YH92X/YH820 keypad conditional in text_editor 2017-05-06 21:34:21 -04:00
theme_remove.c Ged rid of uisimulator/common/io.c for android builds. 2010-09-01 21:29:34 +00:00
vbrfix.c Improvements for vbrfix plugin: 2019-08-13 17:07:07 +02:00
video.c Tweak paramters of mp3_play_data and callback. 2012-03-04 14:50:47 -05:00
viewers.config Add support for Windows shortcuts (*.lnk files) 2019-08-11 22:26:49 +02:00
vu_meter.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
wav2wv.c
wavplay.c Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead. 2011-02-02 17:43:32 +00:00
wavrecord.c FS#7704 - Talk support for plugins 2019-07-20 08:48:35 +02:00
wavview.c plugins: make local functions static for metronome, rockblox1d, wavview 2011-10-04 19:33:52 +00:00
windows_lnk.c Windows shortcuts: remove warnings 2019-08-11 22:57:08 +02:00
wolf3d.c sdl: Fix path substitution in log messages, fix game names in comments 2019-08-22 22:00:43 +03:00
wormlet.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
xobox.c av300: Continue cleaning out keymaps. 2020-04-13 22:59:29 +02:00
zxbox.c