Merge branch 'master' into enable-arguments

This commit is contained in:
ALEZ-DEV 2024-07-17 19:28:55 +02:00
commit 29d8f7dccd
4 changed files with 59 additions and 5 deletions

View File

@ -35,6 +35,7 @@ and you can just run it by doing :
``` ```
babylonia-terminal-cli 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 ## Special thank

View File

@ -49,12 +49,9 @@ pub async fn listen_game_installation() {
.unwrap() .unwrap()
.block_on(async { .block_on(async {
if GameState::get_game_dir().await.is_none() { if GameState::get_game_dir().await.is_none() {
if let Err(e) = GameState::set_game_dir(Some( if let Err(e) =
GameState::get_config_directory() GameState::set_game_dir(Some(GameState::get_config_directory().await))
.await .await
.join("babylonia-terminal-config"),
))
.await
{ {
ReportError { ReportError {
error_message: format!("Failed to set new path : {}", e), error_message: format!("Failed to set new path : {}", e),

34
build.sh Normal file
View File

@ -0,0 +1,34 @@
#!/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
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

22
shell.nix Normal file
View File

@ -0,0 +1,22 @@
{ pkgs ? import <nixpkgs> {} }:
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"
'';
}