From 138b756d9ec0d05cff048144cfc6420e18d59f33 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Sat, 9 Sep 2023 11:23:42 +0200 Subject: [PATCH] feat: rename app to Envision --- Cargo.lock | 44 +++++++++---------- Cargo.toml | 2 +- README.md | 20 ++++----- ...c.svg => org.gabmus.envision-symbolic.svg} | 0 ...evel.svg => org.gabmus.envision.Devel.svg} | 0 ...rce.svg => org.gabmus.envision.Source.svg} | 2 +- ...abmus.rex2.svg => org.gabmus.envision.svg} | 0 ...n.in => org.gabmus.envision.desktop.in.in} | 0 ...=> org.gabmus.envision.metainfo.xml.in.in} | 2 +- data/resources.gresource.xml | 6 +-- dist/appimage/build_appimage.sh | 4 +- dist/arch/PKGBUILD | 12 ++--- meson.build | 10 ++--- po/POTFILES.in | 4 +- po/{rex2.pot => envision.pot} | 14 +++--- po/make-pot.sh | 2 +- po/update_potfiles.sh | 2 +- src/cmd_runner.rs | 6 +-- src/constants.rs.in | 2 +- src/downloader.rs | 2 +- src/gpu_profile.rs | 4 ++ src/main.rs | 4 +- src/profile.rs | 4 +- src/ui/main_view.rs | 2 +- test/files/profile.json | 2 +- 25 files changed, 76 insertions(+), 74 deletions(-) rename data/icons/{org.gabmus.rex2-symbolic.svg => org.gabmus.envision-symbolic.svg} (100%) rename data/icons/{org.gabmus.rex2.Devel.svg => org.gabmus.envision.Devel.svg} (100%) rename data/icons/{org.gabmus.rex2.Source.svg => org.gabmus.envision.Source.svg} (99%) rename data/icons/{org.gabmus.rex2.svg => org.gabmus.envision.svg} (100%) rename data/{org.gabmus.rex2.desktop.in.in => org.gabmus.envision.desktop.in.in} (100%) rename data/{org.gabmus.rex2.metainfo.xml.in.in => org.gabmus.envision.metainfo.xml.in.in} (92%) rename po/{rex2.pot => envision.pot} (69%) diff --git a/Cargo.lock b/Cargo.lock index 1fcddde..85ce43e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml index ad18ef1..2e8cee1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rex2" +name = "envision" version = "0.1.0" edition = "2021" diff --git a/README.md b/README.md index e85778d..cabdb33 100644 --- a/README.md +++ b/README.md @@ -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 --nosuid=false`. diff --git a/data/icons/org.gabmus.rex2-symbolic.svg b/data/icons/org.gabmus.envision-symbolic.svg similarity index 100% rename from data/icons/org.gabmus.rex2-symbolic.svg rename to data/icons/org.gabmus.envision-symbolic.svg diff --git a/data/icons/org.gabmus.rex2.Devel.svg b/data/icons/org.gabmus.envision.Devel.svg similarity index 100% rename from data/icons/org.gabmus.rex2.Devel.svg rename to data/icons/org.gabmus.envision.Devel.svg diff --git a/data/icons/org.gabmus.rex2.Source.svg b/data/icons/org.gabmus.envision.Source.svg similarity index 99% rename from data/icons/org.gabmus.rex2.Source.svg rename to data/icons/org.gabmus.envision.Source.svg index 1342c52..f1e930b 100644 --- a/data/icons/org.gabmus.rex2.Source.svg +++ b/data/icons/org.gabmus.envision.Source.svg @@ -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" diff --git a/data/icons/org.gabmus.rex2.svg b/data/icons/org.gabmus.envision.svg similarity index 100% rename from data/icons/org.gabmus.rex2.svg rename to data/icons/org.gabmus.envision.svg diff --git a/data/org.gabmus.rex2.desktop.in.in b/data/org.gabmus.envision.desktop.in.in similarity index 100% rename from data/org.gabmus.rex2.desktop.in.in rename to data/org.gabmus.envision.desktop.in.in diff --git a/data/org.gabmus.rex2.metainfo.xml.in.in b/data/org.gabmus.envision.metainfo.xml.in.in similarity index 92% rename from data/org.gabmus.rex2.metainfo.xml.in.in rename to data/org.gabmus.envision.metainfo.xml.in.in index 8ef6f9c..2bf8cdb 100644 --- a/data/org.gabmus.rex2.metainfo.xml.in.in +++ b/data/org.gabmus.envision.metainfo.xml.in.in @@ -10,7 +10,7 @@ diff --git a/data/resources.gresource.xml b/data/resources.gresource.xml index 9324408..040f799 100644 --- a/data/resources.gresource.xml +++ b/data/resources.gresource.xml @@ -1,9 +1,9 @@ - + style.css - icons/org.gabmus.rex2.svg - icons/org.gabmus.rex2-symbolic.svg + icons/org.gabmus.envision.svg + icons/org.gabmus.envision-symbolic.svg diff --git a/dist/appimage/build_appimage.sh b/dist/appimage/build_appimage.sh index 05dc217..3e6471b 100755 --- a/dist/appimage/build_appimage.sh +++ b/dist/appimage/build_appimage.sh @@ -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 diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index d424b29..12cde9a 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -1,11 +1,11 @@ # Maintainer: Gabriele Musco -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 } diff --git a/meson.build b/meson.build index 275ca6a..f9f34a6 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/po/POTFILES.in b/po/POTFILES.in index 463ed46..8aa65fb 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/po/rex2.pot b/po/envision.pot similarity index 69% rename from po/rex2.pot rename to po/envision.pot index 602328a..9ec7fb3 100644 --- a/po/rex2.pot +++ b/po/envision.pot @@ -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 , 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 "" diff --git a/po/make-pot.sh b/po/make-pot.sh index 1c993c2..2c70e37 100755 --- a/po/make-pot.sh +++ b/po/make-pot.sh @@ -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 diff --git a/po/update_potfiles.sh b/po/update_potfiles.sh index 81361e8..714095d 100755 --- a/po/update_potfiles.sh +++ b/po/update_potfiles.sh @@ -1,6 +1,6 @@ #!/bin/bash -APPID="org.gabmus.rex2" +APPID="org.gabmus.envision" rm po/POTFILES.in po/POTFILES.in.in diff --git a/src/cmd_runner.rs b/src/cmd_runner.rs index 627e78a..2060deb 100644 --- a/src/cmd_runner.rs +++ b/src/cmd_runner.rs @@ -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] diff --git a/src/constants.rs.in b/src/constants.rs.in index 8f8575e..79639a5 100644 --- a/src/constants.rs.in +++ b/src/constants.rs.in @@ -17,7 +17,7 @@ pub fn get_developers() -> Vec { } pub fn pkg_data_dir() -> String { - format!("{}/share/rex2", get_exec_prefix()) + format!("{}/share/{}", get_exec_prefix(), CMD_NAME) } pub fn resources() -> String { diff --git a/src/downloader.rs b/src/downloader.rs index c087913..bc78be6 100644 --- a/src/downloader.rs +++ b/src/downloader.rs @@ -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 } diff --git a/src/gpu_profile.rs b/src/gpu_profile.rs index 5ccf73d..a23744b 100644 --- a/src/gpu_profile.rs +++ b/src/gpu_profile.rs @@ -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); } diff --git a/src/main.rs b/src/main.rs index 830c58c..2a03a02 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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::(AppInit { diff --git a/src/profile.rs b/src/profile.rs index 57442d0..63886cb 100644 --- a/src/profile.rs +++ b/src/profile.rs @@ -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() }; diff --git a/src/ui/main_view.rs b/src/ui/main_view.rs index cd38ef4..adeb24f 100644 --- a/src/ui/main_view.rs +++ b/src/ui/main_view.rs @@ -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." ), diff --git a/test/files/profile.json b/test/files/profile.json index 831d21f..92a9adf 100644 --- a/test/files/profile.json +++ b/test/files/profile.json @@ -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