From 30a00db9f9464dbdb6136a03200bb5becc8ee7ca Mon Sep 17 00:00:00 2001 From: dwu11 <43306630+dwu11@users.noreply.github.com> Date: Wed, 5 Jun 2024 18:26:01 -0400 Subject: [PATCH 1/5] Create build.sh These build commands worked for me --- build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..4c5d4cb --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +sudo steamos-readonly disable +curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --prefix /usr +sudo steamos-readonly enable +xhost +si:localuser:$USER >/dev/null +distrobox create && distrobox enter +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +sudo dnf install pkg-config openssl-devel +sudo dnf install llvm-devel +sudo dnf install gcc-c++.x86_64 +rustup update +rustup toolchain install 1.78.0 +cargo install --git https://github.com/ALEZ-DEV/Babylonia-terminal --bin From fda9a3b1fc65ab25a32e232b0a0c76c0f9150b72 Mon Sep 17 00:00:00 2001 From: ALEZ-DEV Date: Tue, 18 Jun 2024 19:19:54 +0200 Subject: [PATCH 2/5] It's been one week I forgot to commit that ??! --- babylonia_terminal_launcher/native/hub/src/game.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/babylonia_terminal_launcher/native/hub/src/game.rs b/babylonia_terminal_launcher/native/hub/src/game.rs index 6b85438..ce53786 100644 --- a/babylonia_terminal_launcher/native/hub/src/game.rs +++ b/babylonia_terminal_launcher/native/hub/src/game.rs @@ -49,12 +49,9 @@ pub async fn listen_game_installation() { .unwrap() .block_on(async { if GameState::get_game_dir().await.is_none() { - if let Err(e) = GameState::set_game_dir(Some( - GameState::get_config_directory() + if let Err(e) = + GameState::set_game_dir(Some(GameState::get_config_directory().await)) .await - .join("babylonia-terminal-config"), - )) - .await { ReportError { error_message: format!("Failed to set new path : {}", e), From d68664141dbc2a1c2a9461acf08c47dd7315a47d Mon Sep 17 00:00:00 2001 From: ALEZ-DEV Date: Thu, 27 Jun 2024 23:20:50 +0200 Subject: [PATCH 3/5] edit build.sh --- build.sh | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/build.sh b/build.sh index 4c5d4cb..e77c5b9 100644 --- a/build.sh +++ b/build.sh @@ -1,12 +1,34 @@ -sudo steamos-readonly disable -curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --prefix /usr -sudo steamos-readonly enable +#!/bin/bash + +while true; do + read -p "Are you on steam deck? (y/n): " confirm + if [[ $confirm =~ ^yes$|^y$|^Y$|^no$|^n$|^N$ ]]; then + if [[ $confirm =~ ^yes$|^y$|^Y$ ]]; then + isSteamdeck=true + else + isSteamdeck=false + fi + break + fi +done + +if $isSteamdeck; then + sudo steamos-readonly disable +fi + +if ! command -v distrobox &>/dev/null; then + curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh +fi + +if $isSteamdeck; then + sudo steamos-readonly enable +fi + xhost +si:localuser:$USER >/dev/null -distrobox create && distrobox enter -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -sudo dnf install pkg-config openssl-devel -sudo dnf install llvm-devel -sudo dnf install gcc-c++.x86_64 -rustup update -rustup toolchain install 1.78.0 -cargo install --git https://github.com/ALEZ-DEV/Babylonia-terminal --bin + +distroname="babylonia-terminal-image" +distrobox create --image registry.fedoraproject.org/fedora-toolbox:38 -Y --name $distroname +distrobox enter --name $distroname -- sudo dnf install -y pkg-config openssl-devel llvm-devel gcc-c++.x86_64 +distrobox enter --name $distroname -- rustup update +distrobox enter --name $distroname -- rustup toolchain install 1.78.0 +distrobox enter --name $distroname -- cargo install --git https://github.com/ALEZ-DEV/Babylonia-terminal --bin From 6ff7766ab1a8dfc896bc0c432c94910b93ffee2a Mon Sep 17 00:00:00 2001 From: ALEZ <38623465+ALEZ-DEV@users.noreply.github.com> Date: Mon, 1 Jul 2024 07:34:48 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 13d5f4c..c0678fa 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ and you can just run it by doing : ``` babylonia-terminal-cli ``` +If you have any issue installing it on Steam deck or any other distro, [go check the wiki](https://github.com/ALEZ-DEV/Babylonia-terminal/wiki) ## Special thank From c7c613c2617ee261b00d3014a7be769f8040f713 Mon Sep 17 00:00:00 2001 From: ALEZ-DEV Date: Mon, 8 Jul 2024 20:33:07 +0200 Subject: [PATCH 5/5] add nix environment for developpement --- shell.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..52608d7 --- /dev/null +++ b/shell.nix @@ -0,0 +1,22 @@ +{ pkgs ? import {} }: +pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + rustup + rustfmt + clippy + gcc + pkg-config + ]; + + buildInputs = with pkgs; [ + openssl + cabextract + ]; + + shellHook = '' + export OPENSSL_DIR="${pkgs.openssl.dev}" + export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig" + export OPENSSL_NO_VENDOR=1 + export OPENSSL_LIB_DIR="${pkgs.lib.getLib pkgs.openssl}/lib" + ''; +}