mirror of
https://github.com/wez/wezterm.git
synced 2024-12-22 21:01:36 +03:00
flatpak builder
Run `ci/flatpak.sh` to build a flatpak of just the gui. Run it via flatpak run org.wezfurlong.wezterm refs: https://github.com/wez/wezterm/issues/2229 Thanks to: @Imxset21
This commit is contained in:
parent
1df1f166ca
commit
3379a2b285
3
.gitignore
vendored
3
.gitignore
vendored
@ -46,3 +46,6 @@
|
||||
/perf.data*
|
||||
.idea/
|
||||
/winget-pkgs
|
||||
/repo
|
||||
/assets/flatpak/generated-sources.json
|
||||
/.flatpak-builder
|
||||
|
53
assets/flatpak/org.wezfurlong.wezterm.json
Normal file
53
assets/flatpak/org.wezfurlong.wezterm.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"app-id": "org.wezfurlong.wezterm",
|
||||
"runtime": "org.freedesktop.Platform",
|
||||
"runtime-version": "21.08",
|
||||
"sdk": "org.freedesktop.Sdk",
|
||||
"sdk-extensions" : [
|
||||
"org.freedesktop.Sdk.Extension.rust-stable"
|
||||
],
|
||||
"command": "wezterm",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--filesystem=host",
|
||||
"--filesystem=xdg-config",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--device=dri",
|
||||
"--share=network"
|
||||
],
|
||||
"build-options": {
|
||||
"append-path" : "/usr/lib/sdk/rust-stable/bin"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "wezterm",
|
||||
"buildsystem": "simple",
|
||||
"build-options": {
|
||||
"env": {
|
||||
"CARGO_HOME": "/run/build/wezterm/cargo"
|
||||
}
|
||||
},
|
||||
"build-commands": [
|
||||
"pwd",
|
||||
"cargo --offline fetch --manifest-path Cargo.toml --verbose",
|
||||
"cargo --offline build --release --verbose",
|
||||
"mkdir -p /app/share/icons/hicolor/128x128/apps/",
|
||||
"cp ./assets/icon/terminal.png /app/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png",
|
||||
"mkdir -p /app/share/metainfo/",
|
||||
"cp ./assets/wezterm.appdata.xml /app/share/metainfo/org.wezfurlong.wezterm.appdata.xml",
|
||||
"mkdir -p /app/share/applications/",
|
||||
"cp ./assets/wezterm.desktop /app/share/applications/org.wezfurlong.wezterm.desktop",
|
||||
"install -Dm755 ./target/release/wezterm -t /app/bin/",
|
||||
"install -Dm755 ./target/release/wezterm-gui -t /app/bin/"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../.."
|
||||
},
|
||||
"generated-sources.json"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
10
ci/flatpak.sh
Normal file
10
ci/flatpak.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install --noninteractive --user flathub org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 org.freedesktop.Sdk.Extension.rust-stable//21.08
|
||||
|
||||
python3 -m pip install toml aiohttp
|
||||
curl -L 'https://github.com/flatpak/flatpak-builder-tools/raw/master/cargo/flatpak-cargo-generator.py' > /tmp/flatpak-cargo-generator.py
|
||||
python3 /tmp/flatpak-cargo-generator.py Cargo.lock -o assets/flatpak/generated-sources.json
|
||||
flatpak-builder --install repo assets/flatpak/org.wezfurlong.wezterm.json --force-clean --user -y
|
Loading…
Reference in New Issue
Block a user