b2 icon indicating copy to clipboard operation
b2 copied to clipboard

Should be possibly to specify config when doing a HTTP launch

Open tom-seddon opened this issue 2 years ago • 2 comments

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.

tom-seddon avatar Dec 31 '22 16:12 tom-seddon

The console/GUI app distinction on Windows could be an issue.

tom-seddon avatar Jan 16 '23 22:01 tom-seddon

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.

tom-seddon avatar Feb 11 '24 15:02 tom-seddon