Skip to content

Commit b5e63a4

Browse files
committed
small-improvements-and-cleanup
Co-authored-by: RX0FA <[email protected]> Co-committed-by: RX0FA <[email protected]>
1 parent 40b11c1 commit b5e63a4

File tree

7 files changed

+30
-13
lines changed

7 files changed

+30
-13
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Generate Tag
2121
id: tag_step
2222
run: |-
23-
program_version="$(echo 1.0.0)"
23+
program_version=$(./dist/raptor-cage -V | awk '{print $2}')
2424
tag_name="${program_version}-$(date +%y%m%d%H%M)-$(git rev-parse HEAD | head -c 7)"
2525
printf "tag_name=${tag_name}\nprogram_version=${program_version}\n" | tee -a "$GITHUB_OUTPUT"
2626
# https://github.com/ncipollo/release-action.

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "raptor-cage"
3-
version = "0.1.0"
3+
version = "1.0.1"
44
edition = "2021"
55
license = "CIL-1.0"
66

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ docker-build: clean
1212
mkdir -p dist
1313
docker build -f build.dockerfile . -t raptor-cage
1414
docker run --rm raptor-cage cat /builder/target/release/raptor-cage > dist/raptor-cage
15+
chmod +x dist/raptor-cage
1516
tar czf dist/raptor-cage.tgz -C dist raptor-cage
1617
sh -c 'cd dist && sha256sum raptor-cage.tgz | tee raptor-cage.sha256'

README.md

+23-8
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,37 @@
99

1010
## ⬇️ Installation
1111

12-
TODO
12+
### ArchLinux
13+
14+
```bash
15+
# Using paru.
16+
paru -S raptor-cage-bin
17+
18+
# Manual clone.
19+
git clone https://aur.archlinux.org/raptor-cage-bin.git
20+
cd raptor-cage-bin
21+
makepkg -sri
22+
```
23+
24+
### Manual Installation
25+
26+
```bash
27+
download_url="$(curl -sL 'https://api.github.com/repos/RX0FA/raptor-cage/releases/latest' | grep -E 'browser_download_url.+\.tgz' | grep -oP '"browser_download_url": "\K[^"]+')"
28+
curl -L -o raptor-cage.tgz "$download_url"
29+
tar xf raptor-cage.tgz
30+
sudo install -Dm755 raptor-cage "/usr/local/bin/rcage"
31+
```
1332

1433
## 💡 Usage
1534

1635
### Command Line
1736

1837
```bash
1938
# Run Windows game, runner and prefix paths are relative to Bottles data directory.
20-
raptor-cage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game -b game.exe
39+
rcage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game -b game.exe
2140

2241
# Run native binary, and pass custom parameters.
23-
raptor-cage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game -b native_binary -- --param1
42+
rcage run -r soda-9.0-1 -p my_prefix -d ~/games/some_game -b native_binary -- --param1
2443
```
2544

2645
## 📌 Frequently Asked Questions
@@ -65,19 +84,15 @@ cargo upgrade --dry-run
6584

6685
* Some games (like HC2, DXM) create a detached sub-process, since we are using `--die-with-parent`, said games will not run when executed directly (with `-b` parameter, executing a shell and launching manually still works); so we need to think in a way to detect child processes and wait for them, or at least add a flag to enable this feature. Disabling `--die-with-parent` is another option, but that would undermine security a bit and leave lingering wine processes all over the place. Maybe add a `--lead-process=NAME_EXE:TIMEOUT` to wait for another process inside the sandbox.
6786
* Implement bash autocompletion, should be able to autocomplete prefix and runner names based on the ones detected under Bottles.
68-
* If application binary `-b` does not end with `.exe`, do not prepend `wine`, it's possible that the user wants to run a custom command like `mangohud` or a native Linux game.
6987
* Add `integrate` sub-command to create integrations e.g., `.desktop` shortcut, entry on Heroic launcher.
70-
* Native wayland support, see https://www.phoronix.com/news/Wine-9.22-Released and https://wiki.archlinux.org/title/Wine#Wayland.
88+
* Native wayland support, see https://www.phoronix.com/news/Wine-9.22-Released and https://wiki.archlinux.org/title/Wine#Wayland. Also consider bringing back `--unshare-ipc` if using Wayland prevents the issue described in bwrap.rs#90.
7189
* Add `kill` sub-command to terminate all processes in a sandbox, need to connect to existing bwrap container.
7290
* Add argument to mount additional paths (needed for installers and maintenance), syntax can be similar to Docker's `-v PATH:FLAGS`.
7391
* When using the `integrate` sub-command to create a `.desktop` shortcut, extract executable icon and set it respectively. It can be done with a small windows executable calling a win32 API call or natively on Linux by using `wrestool`.
7492
* Add NTSYNC support, see also https://www.phoronix.com/news/Linux-6.14-NTSYNC-Driver-Ready.
7593

7694
#### Packaging
7795

78-
* AUR package, also add `mangohud` as optional dependency.
79-
* Setup GitHub Actions to automatically publish AUR package.
80-
* Normal binary release.
8196
* cURL install script.
8297
* Create deb package. It should depend on Steam libraries (similarly to Arch's `steam-native-runtime`), see https://packages.ubuntu.com/search?keywords=steam&searchon=names&suite=noble&section=all.
8398
* Make a reusable lib version (`Cargo.lock` needs to be ignored, see https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html).

packaging/PKGBUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ url='https://github.com/RX0FA/raptor-cage'
77
source_x86_64=("https://github.com/RX0FA/raptor-cage/releases/download/{{TAG_NAME}}/raptor-cage.tgz")
88
arch=('x86_64')
99
license=('CIL-1.0')
10-
depends=('steam-native-runtime')
10+
depends=('bubblewrap' 'steam-native-runtime')
1111
optdepends=('mangohud: vulkan overlay')
1212
sha256sums_x86_64=('{{SHA256SUM}}')
1313

1414
package() {
1515
cd "$srcdir/"
16-
install -Dm755 raptor-cage "${pkgdir}/usr/bin/raptor-cage"
16+
install -Dm755 raptor-cage "${pkgdir}/usr/bin/rcage"
1717
}

src/cli.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use clap::{ArgAction, Parser};
1010
use std::path::PathBuf;
1111

1212
#[derive(Debug, Parser)]
13+
#[command(version = env!("CARGO_PKG_VERSION"))]
1314
pub enum Commands {
1415
/// Run application sandboxed.
1516
#[command(arg_required_else_help = true)]

0 commit comments

Comments
 (0)