From 06e66f7a6dddc788798696fd700aef6c71b30034 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Tue, 10 Nov 2020 13:52:13 +0100 Subject: [PATCH] Don't add "&" at the end of the command Since Amiberry v3.4, that is moved into the emulator itself to make host-run more portable --- README.md | 15 +++++++++++---- src/host-run.c | 6 ++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cb68c07..aa4abe4 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,23 @@ -# What is it? +# What is it + Host-run is a tiny AmigaOS tool, which allows you to have Amiberry execute a command on the underlying Linux operating system. Think AmiKit's RabbitHole feature, only running on Amiberry and Linux (instead of WinUAE and Windows). -# How does it work? +## How does it work + * You can get the pre-compiled binary from the Releases page. * Place it somewhere in your path (e.g. C: is a good idea) * Use it from an AmigaOS Shell, script or icon (must be a Project type and use IconX), to execute a Linux command with any parameters. * If Amiberry's option to allow host-run is enabled, it will execute that command along with any parameters for you. +* Since Amiberry v3.4, AmigaOS device and volume names are automatically translated to the underlying host paths. This allows you to provide the full path to a file with host-run, and as long as the location is accessible from the Linux side (i.e. it's not in a hardfile), it will find and access it. + +## Examples -# Examples * Running Firefox from an AmigaOS shell: `host-run firefox` * Running Chromium browser with a specific website: `host-run chromium-browser https://github.com/midwan/amiberry` -* ### Create an icon to launch VLC: +* Launching VLC to play a video (assuming Work: is a directory on the Linux filesystem): `host-run vlc Work:videos/my_video.mkv` + +* ### Create an icon to launch VLC + * Create a new text file, with these contents: `host-run vlc` * Create a new icon or copy one you like, give it the same name as your text file above. * Edit the icon's Information and make sure the Type is set to Project diff --git a/src/host-run.c b/src/host-run.c index 7ab0c9d..7f3bc4f 100644 --- a/src/host-run.c +++ b/src/host-run.c @@ -3,7 +3,7 @@ #include #include "uae_pragmas.h" -static const char version[] = "$VER: Host-Run v1.2"; +static const char version[] = "$VER: Host-Run v1.3"; int main(int argc, char *argv[]) { @@ -28,11 +28,9 @@ int main(int argc, char *argv[]) if (i != argc - 1) strcat(command, " "); - else - strcat(command, " &\n"); } // printf("DEBUG: %s", command); - ExecuteOnHost((UBYTE*)&command); + ExecuteOnHost((UBYTE *)&command); memset(command, '\0', 255); } \ No newline at end of file