feat: rename app to Envision

This commit is contained in:
Gabriele Musco 2023-09-09 11:23:42 +02:00
parent 40f2538d16
commit 138b756d9e
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE
25 changed files with 76 additions and 74 deletions

44
Cargo.lock generated
View file

@ -184,6 +184,28 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "envision"
version = "0.1.0"
dependencies = [
"anyhow",
"gettext-rs",
"git2",
"gtk4",
"libusb",
"nix",
"phf",
"phf_macros",
"relm4",
"relm4-components",
"reqwest",
"serde",
"serde_json",
"sourceview5",
"tracker",
"uuid",
]
[[package]]
name = "equivalent"
version = "1.0.0"
@ -1532,28 +1554,6 @@ dependencies = [
"winreg",
]
[[package]]
name = "rex2"
version = "0.1.0"
dependencies = [
"anyhow",
"gettext-rs",
"git2",
"gtk4",
"libusb",
"nix",
"phf",
"phf_macros",
"relm4",
"relm4-components",
"reqwest",
"serde",
"serde_json",
"sourceview5",
"tracker",
"uuid",
]
[[package]]
name = "rustc-demangle"
version = "0.1.23"

View file

@ -1,5 +1,5 @@
[package]
name = "rex2"
name = "envision"
version = "0.1.0"
edition = "2021"

View file

@ -1,4 +1,4 @@
# Rex2
# Envision
# IMPORTANT NOTES!
@ -6,32 +6,30 @@ This is still highly experimental software, while it's unlikely that anything ba
Also consider that due to the unstable nature of the app, it's possible to encounter unexpected behavior that while in VR might cause motion sickness or physical injury. **Be very careful while in VR using this app!**
"Rex2" is a temporary name for the project and will probably change soon.
---
![](./data/icons/org.gabmus.rex2.svg)
![](./data/icons/org.gabmus.envision.svg)
UI for building, configuring and running Monado, the open source OpenXR runtime.
Download the latest AppImage snapshot: [GitLab Pipelines](https://gitlab.com/gabmus/rex2/-/pipelines)
Download the latest AppImage snapshot: [GitLab Pipelines](https://gitlab.com/gabmus/envision/-/pipelines)
## Running
```bash
git clone https://gitlab.com/gabmus/rex2
cd rex2
git clone https://gitlab.com/gabmusenvision/
cdenvision
meson setup build -Dprefix="$PWD/build/localprefix" -Dprofile=development
ninja -C build
ninja -C build install
./build/localprefix/bin/rex2
./build/localprefix/bin/envision
```
## Build AppImage
```bash
git clone https://gitlab.com/gabmus/rex2
cd rex2
git clone https://gitlab.com/gabmus/envision
cd envision
./dist/appimage/build_appimage.sh
```
@ -41,6 +39,6 @@ cd rex2
If you see this warning:
> Your current prefix is inside a partition mounted with the nosuid option. This will prevent the Rex2 runtime from acquiring certain privileges and will cause noticeable stutter when running XR applications.
> Your current prefix is inside a partition mounted with the nosuid option. This will prevent the Envision runtime from acquiring certain privileges and will cause noticeable stutter when running XR applications.
And you're using systemd-homed to manage your home partition, you need to disable it using homectl. To do so, log out, log in as root in a tty and run: `homectl update <username> --nosuid=false`.

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -10,7 +10,7 @@
id="svg11300"
sodipodi:version="0.32"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="org.gabmus.rex2.Source.svg"
sodipodi:docname="org.gabmus.envision.Source.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0"
style="display:inline;enable-background:new"

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -10,7 +10,7 @@
</description>
<!--screenshots>
<screenshot type="default">
<image>https://gitlab.com/gabmus/rex2/raw/main/misc/screenshots/screenshot1.png</image>
<image>https://gitlab.com/gabmus/envision/raw/main/misc/screenshots/screenshot1.png</image>
<caption>Main window</caption>
</screenshot>
</screenshots-->

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gabmus/rex2/">
<gresource prefix="/org/gabmus/envision/">
<file compressed="true">style.css</file>
<file compressed="true" preprocess="xml-stripblanks">icons/org.gabmus.rex2.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/org.gabmus.rex2-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/org.gabmus.envision.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/org.gabmus.envision-symbolic.svg</file>
</gresource>
</gresources>

View file

@ -18,7 +18,7 @@ cp dist/appimage/linuxdeploy-plugin-gtk.sh ./
--appdir AppDir \
--plugin gtk \
--output appimage \
--icon-file AppDir/usr/share/icons/hicolor/scalable/apps/org.gabmus.rex2.Devel.svg \
--desktop-file AppDir/usr/share/applications/org.gabmus.rex2.Devel.desktop
--icon-file AppDir/usr/share/icons/hicolor/scalable/apps/org.gabmus.envision.Devel.svg \
--desktop-file AppDir/usr/share/applications/org.gabmus.envision.Devel.desktop
rm ./linuxdeploy-plugin-gtk.sh

12
dist/arch/PKGBUILD vendored
View file

@ -1,11 +1,11 @@
# Maintainer: Gabriele Musco <gabmus@disroot.org>
pkgname=rex2-git
pkgname=envision-git
pkgver=r80.35b0ab9
pkgrel=1
pkgdesc='GUI for Monado'
arch=(x86_64 aarch64)
url='https://gitlab.com/gabmus/rex2'
url='https://gitlab.com/gabmus/envision'
license=(GPL)
depends=(
gtk4
@ -28,13 +28,13 @@ makedepends=(
meson
rust
)
provides=(rex2)
conflicts=(rex2)
provides=(envision)
conflicts=(envision)
source=("git+${url}.git")
b2sums=('SKIP')
pkgver() {
cd rex2
cd envision
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@ -42,7 +42,7 @@ pkgver() {
}
build() {
arch-meson rex2 build
arch-meson envision build
meson compile -C build
}

View file

@ -1,5 +1,5 @@
project(
'rex2',
'envision',
'rust',
version: '0.1.0',
meson_version: '>= 0.59',
@ -9,10 +9,10 @@ project(
i18n = import('i18n')
gnome = import('gnome')
base_id = 'org.gabmus.rex2'
pretty_name = 'Rex2'
upstream_repo = 'https://gitlab.com/gabmus/rex2'
author = 'The Rex2 Team'
base_id = 'org.gabmus.envision'
pretty_name = 'Envision'
upstream_repo = 'https://gitlab.com/gabmus/envision'
author = 'The Envision Team'
description = 'GUI for Monado' # temporary
dependency('glib-2.0', version: '>= 2.66')

View file

@ -1,2 +1,2 @@
data/org.gabmus.rex2.desktop.in.in
data/org.gabmus.rex2.metainfo.xml.in.in
data/org.gabmus.envision.desktop.in.in
data/org.gabmus.envision.metainfo.xml.in.in

View file

@ -1,12 +1,12 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the rex2 package.
# This file is distributed under the same license as the envision package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: rex2\n"
"Project-Id-Version: envision\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-18 11:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
@ -18,17 +18,17 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#. Translators: Do NOT translate or transliterate this text
#: data/org.gabmus.rex2.desktop.in.in:4
#: data/org.gabmus.envision.desktop.in.in:4
msgid "@PRETTY_NAME@"
msgstr ""
#: data/org.gabmus.rex2.desktop.in.in:5
#: data/org.gabmus.rex2.metainfo.xml.in.in:7
#: data/org.gabmus.rex2.metainfo.xml.in.in:9
#: data/org.gabmus.envision.desktop.in.in:5
#: data/org.gabmus.envision.metainfo.xml.in.in:7
#: data/org.gabmus.envision.metainfo.xml.in.in:9
msgid "GUI for Monado"
msgstr ""
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: data/org.gabmus.rex2.desktop.in.in:11
#: data/org.gabmus.envision.desktop.in.in:11
msgid "vr;virtual;reality;monado;"
msgstr ""

View file

@ -2,4 +2,4 @@ if [[ ! -d build ]]; then
meson setup build -Dprefix="$PWD/build/testdir"
fi
ninja -C build rex2-pot
ninja -C build envision-pot

View file

@ -1,6 +1,6 @@
#!/bin/bash
APPID="org.gabmus.rex2"
APPID="org.gabmus.envision"
rm po/POTFILES.in po/POTFILES.in.in

View file

@ -223,18 +223,18 @@ mod tests {
#[test]
fn can_run_command_and_read_env() {
let mut env = HashMap::new();
env.insert("REX2TEST".to_string(), "Lorem ipsum dolor".to_string());
env.insert("ENVISIONTEST".to_string(), "Lorem ipsum dolor".to_string());
let mut runner = CmdRunner::new(
Some(env),
"bash".into(),
vec!["-c".into(), "echo \"REX2TEST: $REX2TEST\"".into()],
vec!["-c".into(), "echo \"ENVISIONTEST: $ENVISIONTEST\"".into()],
);
runner.start();
sleep(time::Duration::from_millis(1000)); // TODO: ugly, fix
runner.terminate();
assert_eq!(runner.status(), RunnerStatus::Stopped(Some(0)));
let out = runner.consume_output();
assert_eq!(out, "REX2TEST: Lorem ipsum dolor\n");
assert_eq!(out, "ENVISIONTEST: Lorem ipsum dolor\n");
}
#[test]

View file

@ -17,7 +17,7 @@ pub fn get_developers() -> Vec<String> {
}
pub fn pkg_data_dir() -> String {
format!("{}/share/rex2", get_exec_prefix())
format!("{}/share/{}", get_exec_prefix(), CMD_NAME)
}
pub fn resources() -> String {

View file

@ -11,7 +11,7 @@ const CHUNK_SIZE: usize = 1024;
fn headers() -> HeaderMap {
let mut headers = HeaderMap::new();
headers.insert(USER_AGENT, "org.gabmus.rex2/1.0".parse().unwrap());
headers.insert(USER_AGENT, "org.gabmus.envision/1.0".parse().unwrap());
headers
}

View file

@ -17,6 +17,7 @@ pub fn get_set_amd_vr_pow_prof_cmd(card_dir: &str) -> String {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum GpuPowerProfile {
// 3D Full Screen, inverted cause can't start with number
BootupDefault,
Fullscreen3D,
PowerSaving,
Video,
@ -62,6 +63,9 @@ impl FromStr for GpuPowerProfile {
if s.contains("3d_full_screen") {
return Ok(Self::Fullscreen3D);
}
if s.contains("bootup_default") {
return Ok(Self::BootupDefault);
}
if s.contains("power_saving") {
return Ok(Self::PowerSaving);
}

View file

@ -77,7 +77,7 @@ fn main() -> Result<()> {
}
let provider = gtk::CssProvider::new();
provider.load_from_resource("/org/gabmus/rex2/style.css");
provider.load_from_resource("/org/gabmus/envision/style.css");
if let Some(display) = gdk::Display::default() {
gtk::style_context_add_provider_for_display(
&display,
@ -90,7 +90,7 @@ fn main() -> Result<()> {
let main_app = adw::Application::builder()
.application_id(APP_ID)
.flags(gio::ApplicationFlags::empty())
.resource_base_path("/org/gabmus/rex2")
.resource_base_path("/org/gabmus/envision")
.build();
let app = RelmApp::from_app(main_app.clone());
app.run::<App>(AppInit {

View file

@ -346,7 +346,7 @@ mod tests {
assert_eq!(profile.name, "Demo profile");
assert_eq!(profile.xrservice_path, "/home/user/monado");
assert_eq!(profile.opencomposite_path, "/home/user/opencomposite");
assert_eq!(profile.prefix, "/home/user/rex2prefix");
assert_eq!(profile.prefix, "/home/user/envisionprefix");
assert_eq!(
profile.features.libsurvive.path.as_deref(),
Some("/home/user/libsurvive")
@ -389,7 +389,7 @@ mod tests {
mercury_enabled: false,
},
environment: env,
prefix: String::from("/home/user/rex2prefix"),
prefix: String::from("/home/user/envisionprefix"),
editable: true,
..Default::default()
};

View file

@ -232,7 +232,7 @@ impl SimpleComponent for MainView {
set_label: concat!(
"Your current prefix is inside a partition ",
"mounted with the nosuid option. This will prevent ",
"the Rex2 runtime from acquiring certain privileges ",
"the Envision runtime from acquiring certain privileges ",
"and will cause noticeable stutter when running XR ",
"applications."
),

View file

@ -26,7 +26,7 @@
"XRT_COMPOSITOR_COMPUTE": "1",
"SURVIVE_GLOBALSCENESOLVER": "0"
},
"prefix": "/home/user/rex2prefix",
"prefix": "/home/user/envisionprefix",
"can_be_built": true,
"editable": true,
"pull_on_build": true