Skip to content

Commit

Permalink
Don't add "&" at the end of the command
Browse files Browse the repository at this point in the history
Since Amiberry v3.4, that is moved into the emulator itself to make host-run more portable
  • Loading branch information
midwan committed Nov 10, 2020
1 parent 70c5134 commit 06e66f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 11 additions & 4 deletions 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
Expand Down
6 changes: 2 additions & 4 deletions src/host-run.c
Expand Up @@ -3,7 +3,7 @@
#include <stdlib.h>
#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[])
{
Expand All @@ -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);
}

0 comments on commit 06e66f7

Please sign in to comment.