b2
b2 copied to clipboard
Should be possibly to specify config when doing a HTTP launch
Not used for the file association mechanism. (Though https://github.com/tom-seddon/b2/issues/245 could apply, if there's per-disk settings.)
At the moment the only way to get a HTTP launch is to supply 1 arg on the command line. Add a command line option, --launch
, that sets Options::launch
. Now you can specify --config
, -1
, etc. - though I suppose --launch
should override -0
. (Or maybe tidy things up a bit, so that all this stuff only ever uses Options::discs[]
to store the disk image paths.)
Need a --use-existing
option, so that you can force b2 to always reuse an existing process. You don't want to have your build script blocked waiting for the new copy of b2 to exit.
This would then let you replace curl use in a build script with something like:
b2 --config "BBC B/Acorn 1770" --launch "<<my disk>>" --use-existing
Which is a bit tidier, and you don't have to faff about with the HTTP stuff.
The console/GUI app distinction on Windows could be an issue.
If using ?launch=
, get full path of disk before sending it! The working folder of the existing process probably won't be the same as that of the initiating process.
But probably worth loading the disk image at the sender end, so that some obvious issues (missing file, failed to read, etc.) can be report back to the caller immediately via the process exit code.