README : remplacement de la documentation d'installation par une description du Makefile
This commit is contained in:
parent
b2fe707cd4
commit
d44d8ddd8c
1 changed files with 13 additions and 22 deletions
35
README.md
35
README.md
|
@ -75,36 +75,27 @@ For ease of use, you need to grant every user in the `qemu` group via
|
|||
`sudo` the right to execute commands as `qemu`. You can find an example
|
||||
`sudoers` rule in this repo's `etc/sudoers.d` folder.
|
||||
|
||||
### Add `qemush` in the `PATH`
|
||||
### Via `Makefile` (recommended)
|
||||
|
||||
Use your preferred way to add the `qemush` script to a folder of `PATH`.
|
||||
Recommended: copy the script in `/usr/local/bin` to make it effortlessly
|
||||
system wide.
|
||||
|
||||
### Add `qemush` modules in `~qemu/bin`
|
||||
|
||||
`qemush` needs reusable script modules like `diskpath` in its custom `bin`
|
||||
folder located at `~qemu/bin`. You can add them directly via `qemush` from
|
||||
this repo via the following command :
|
||||
Just run the following command at the root of this repository to install
|
||||
`qemush` (previous step is **mandatory**) :
|
||||
|
||||
```sh
|
||||
qemush do 'mkdir -p ~/bin && cp -v qemu/bin/* "$_"'
|
||||
make
|
||||
```
|
||||
|
||||
### Extra: add `first-free-port` in `PATH`
|
||||
> And what if I don't want to bindly run this obscure `Makefile` ???
|
||||
|
||||
`first-free-port` is a small C program designed accordingly to the Unix
|
||||
philosophy to show in `stdout` the first free (not listening) TCP port
|
||||
after `argv[1]`, or `argv[1]` if it is free. You will need it to allocate
|
||||
ports to protocols like SPICE in your launching scripts (example in
|
||||
`qemu/bin/*-spice`).
|
||||
You'd be right. The next section is the exhaustive list of steps handled
|
||||
by the `Makefile` for the installation process.
|
||||
|
||||
Example `qemush` command to add the program to a local `qemu` `bin` folder
|
||||
:
|
||||
### Manual installation (what does the `Makefile` do)
|
||||
|
||||
```sh
|
||||
qemush do 'mkdir ~/bin && cc -o "${_}/first-free-port" src/first-free-port.c'
|
||||
```
|
||||
- Create `images`, `launchers` and `bin` directories in `~qemu`
|
||||
- Copy `qemush` scripts parts from `qemu/bin` in `~qemu/bin` with mode
|
||||
`740`
|
||||
- Compile C programs from `src` in `~qemu/bin` with mode `740`
|
||||
- Copy `bin/qemush` to `/usr/local/bin/qemush` with mode `755`
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
Loading…
Reference in a new issue