Added msxhub support with caching.

This commit is contained in:
Willem Cazander 2021-07-04 02:12:48 +02:00
parent 32a797273e
commit adaf62b8f3
6 changed files with 162 additions and 122 deletions

View file

@ -5,39 +5,74 @@ Utils to use openMSX in build pipelines.
You can use these scripts as-is. But as always, feel free to extend it
for your specific needs or contribute a fix or feature.
## Makefile features
## Features
* SDCC msx build steps
* Headless openMSX buildpipe on max speed.
* SDCC msx build steps.
* Allows headless openMSX buildpipe.
* openMSX safe exit failure guards.
* Automatic disk image import + export per build step.
* wgets resources from msxhub
* Downloads and caches resources from msxhub.com
## TCL Scripts
## Dependencies
Tcl scripts for safe openMSX integrations as reliable build step
in compiling/packing/testing msx software natively.
But managed from external build tool like make or scripts.
This means that great care is given to make sure that openMSX
exits correctly.
* make
* openmsx
* sdcc
* hex2bin
* wget
The use this, pass the one or more scripts on the command line and
set the optional environment variables when executing openMSX:
## Usage
FAIL_AFTER_BOOT=30 \
FAIL_AFTER_PATH=bin/myapp \
BOOT_HDD_PATH=bin/myapp/disk \
BOOT_HDD_IMAGE=bin/myapp/disk.img \
JOYPORTA=mouse \
openmsx \
-script <path-to>/boot_env.tcl \
-script <path-to>/boot_hdd.tcl \
-script <path-to>/fail_after.tcl \
-machine ...
Include the msxbuild.mk file from your Makefile.
And override the required paths;
* PATH_SDCC ?= /usr/bin
* PATH_HEX2BIN ?= /usr/bin
* PATH_OPENMSX ?= /opt/openMSX/bin/
* PATH_MSXBUILD ?= /opt/msxbuild
Check the scripts source code for more (technical) details.
Then build result based compile rules see an example in; "test/ahello/0module.mk"
## Functions
Current set is WIP.
* mb_compile_asm
* mb_link_asm_lib
* mb_link_asm
* mb_link_asm_0000 = call mb_link_asm,$(1),$(2),0x0000
* mb_link_asm_0100
* mb_link_asm_1000
* mb_link_asm_4000
* mb_link_asm_8000
* mb_link_asm_C000
* mb_link_asm_dos = alias for mb_link_asm_0100
* mb_hex2com
* mb_hex2dat
* mb_openmsx_dos2
* mb_msxhub_file
* mb_msxhub_get_dos2_sys
* mb_msxhub_get_dos2_com
* mb_assert_file_equals = note: text file only
* mb_autoexec_append_cmd
* mb_autoexec_append_echo
* mb_autoexec_append_rem
* mb_autoexec_append_gui_mode
* mb_autoexec_append_stop_fail
* mb_autoexec_append_exit
* mb_autoexec_write_default
* mb_autoexec_open_gui
* mb_autoexec_open_gui_cmd
* mb_autoexec_cmd
* mb_autoexec_cmd_test
* mb_clean
* mb_mkdir
* mb_delete
* mb_copy
* mb_create_dist
## Errata
TODO: current wget safes in local msxbuild folder.
replace with seperate fetch script/exe which caches in ~/.cache/msxhub/repro/....
* Doesn't work on windows
* Missing dos1 support
* Missing c support