Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
0.7-alpha, add Xbox Cloud Gaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Chevek committed Mar 19, 2022
1 parent 5f2928e commit 4fe2b55
Show file tree
Hide file tree
Showing 17 changed files with 183 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.7-alpha
* Added Xbox Cloud Gaming: it use Miscrosoft Edge Web Browser BETA to connect to the cloud service. Add a .desktop file in the HOME user to get a better usability.
* Added icons: Xbox_Cloud_Gaming_Icon.jpg from Microsoft for the Steam Deck see https://www.reddit.com/r/MicrosoftEdge/comments/th77w9/microsoft_edge_beta_the_browser_for_xbox_cloud/ , for the script gaming-flatpat we will use this: applications-games-symbolic.svg from https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/blob/master/Adwaita/scalable/categories/applications-games-symbolic.svg (This work is licenced under the terms of either the GNU LGPL v3 or Creative Commons Attribution-Share Alike 3.0 United States License.)
* Added an exemple of .desktop for the script: gaming-flatpak.desktop. This is in use in Orchid Linux: https://github.com/wamuu-sudo/orchid
* Changed Minecraft safety commentary.

0.6-alpha
* Added Athenaeum, Minecraft, RetroArch, Fightcade.
* Removed : PCSX2, DuckStation as they are included in RetroArch.
Expand Down
95 changes: 95 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Gaming-Flatpak
Easy installation of gaming tools using Flatpak.

`fr:` Installation facile d'outils pour le jeu grâce à Flatpak.

## Flatpak for gaming [ALPHA] / Flatpak pour le jeu [ALPHA]
A set of gaming tools easily installable on as many distributions as possible using Flatpak.

`fr:` Un ensemble d'outils pour le jeu facilement installables sur le plus de distributions possibles grâce à Flatpak.

## You need / Vous avez besoin de :

[Flatpak](https://flatpak.org/setup/)

## Installation
Grab the latest release ".tar.gz" from the right panel and decompress it.
Either double-click the script "gaming-flatpak.sh" directly, or open a terminal in the script's folder and from there :

`$ ./gaming-flatpak.sh`

`fr:` Prenez le dernier ".tar.gz" dans la section "Release" à droite et décompressez le fichier.
Soit vous double-clickez directement sur le script "gaming-flatpak.sh", soit vous ouvrez un terminal dans le dossier où se trouve le script et de là vous tapez :

`$ ./gaming-flatpak.sh`

## Features / Fonctionnalités
* Install flatpaks, using a special selection for gaming on GNU/Linux.
* `fr:` Installe les flatpaks, avec une sélection taillée pour le jeu sur GNU/Linux.
* Support as much distributions as possible, if it can install flatpak.
* `fr:` supporte la plus part des distributions ; tant qu'elles peuvent installer flatpak.
* Interface for Gnome (Zenity), KDE (Kdialog) and Command line (Bash).
* `fr:` Interface pour Gnome (Zenity), KDE (Kdialog) et la ligne de commande (Bash).
![Gnome](img/gf-zenity-0.6.png)
![KDE](img/gf-kdialog-0-6.png)
![Cli](img/gf-cli-en-0-6.png)

* Multi language support (currently French and mostly English)
* `fr:` Support multi-langues (français et plus ou moins l'anglais)

## Options
```
$ ./gaming-flatpak.sh -h
Usage : ./gaming-flatpak.sh [options]
Install Flatpak packages for gaming
Options :
--gui Force GUI (default=zenity)
--gui=VAR Choose 'zenity' or 'kdialog' for the GUI
--nogui Text installation
-h, --help Display this help
-v, --version Display version and exit
```

`fr:`
```
$ ./gaming-flatpak.sh -h
Utilisation : ./gaming-flatpak.sh [options]
Installe des paquets Flatpak pour le jeu
Options :
--gui Force l'utilisation de fenêtres graphiques (défaut=zenity)
--gui=VAR Choisissez 'zenity' ou 'kdialog' pour vos fenêtres
--nogui Installation en mode texte
-h, --help Écrit cette aide
-v, --version Écrit la version et sort
```

## Flatpak Sources:
- Steam: https://flathub.org/apps/details/com.valvesoftware.Steam
- Lutris: https://github.com/flathub/net.lutris.Lutris
- HeroicGamesLauncher: https://flathub.org/apps/details/com.heroicgameslauncher.hgl
- Proton-GE: https://github.com/flathub/com.valvesoftware.Steam.CompatibilityTool.Proton-GE
- ProtonUp-Qt: https://flathub.org/apps/details/net.davidotek.pupgui2
- Athenaeum: https://flathub.org/apps/details/com.gitlab.librebob.Athenaeum
- Xbox Cloud Gaming: https://github.com/flathub/com.microsoft.Edge/
- RPCS3: https://flathub.org/apps/details/net.rpcs3.RPCS3
- Yuzu: https://flathub.org/apps/details/org.yuzu_emu.yuzu
- xemu: https://flathub.org/apps/details/app.xemu.xemu
- GNOME Games: https://flathub.org/apps/details/org.gnome.Games
- RetroArch: https://flathub.org/apps/details/org.libretro.RetroArch
- DOSBox Staging: https://flathub.org/apps/details/io.github.dosbox-staging
- Minecraft: https://flathub.org/apps/details/com.mojang.Minecraft
- Fightcade: https://flathub.org/apps/details/com.fightcade.Fightcade
- Flatseal: https://flathub.org/apps/details/com.github.tchx84.Flatseal
- Mangohud: https://github.com/flathub/org.freedesktop.Platform.VulkanLayer.MangoHud
- Discord: https://flathub.org/apps/details/com.discordapp.Discord
- TeamSpeak: https://flathub.org/apps/details/com.teamspeak.TeamSpeak
- AntiMicroX: https://flathub.org/apps/details/io.github.antimicrox.antimicrox
- OpenRGB: https://flathub.org/apps/details/org.openrgb.OpenRGB
- Coolero: https://flathub.org/apps/details/org.coolero.Coolero
- Spotify: https://flathub.org/apps/details/com.spotify.Client
- OBS Studio: https://github.com/flathub/com.obsproject.Studio
- Kdenlive: https://flathub.org/apps/details/org.kde.kdenlive
- GtkStressTesting: https://flathub.org/apps/details/com.leinardi.gst
- GNOME Boxes: https://flathub.org/apps/details/org.gnome.Boxes
8 changes: 8 additions & 0 deletions desktop/gaming-flatpak.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Gaming Flatpak
Comment=Bash Script to install Tools for gaming using Flatpaks
Exec=/usr/share/orchid/tools/Gaming-Flatpak/gaming-flatpak.sh
#Icon=/path/to/icon
Terminal=false
Type=Application

16 changes: 16 additions & 0 deletions desktop/xbox.cloud.gaming.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Xbox Gaming Pass
GenericName=Cloud Gaming
Comment=Access the Cloud Xbox Gaming Pass
Exec=/usr/bin/flatpak run --branch=beta --arch=x86_64 --command=/app/bin/edge --file-forwarding com.microsoft.Edge --kiosk "https://www.xbox.com/play" @@u %U @@
StartupNotify=true
Terminal=false
Icon=~/.local/share/applications/Xbox_Cloud_Gaming_Icon.jpg
StartupWMClass=microsoft-edge-beta
Type=Application
Categories=WebBrowser;
X-Flatpak-Tags=proprietary;
X-Flatpak=com.microsoft.Edge

61 changes: 54 additions & 7 deletions gaming-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
############################################################################################
# Initialize variables
GAMING_FLATPAK_VERSION=0.6
GAMING_FLATPAK_VERSION=0.7

# Commands to install
FLATPAKS="# This is where you put the Flatpaks commands to install softwares and their descriptions in various langages:
Expand All @@ -23,7 +23,7 @@ FLATPAKS="# This is where you put the Flatpaks commands to install softwares and
####################################
## ##
## Gaming Profile ##
## 2022 - 03 - 13 ##
## 2022 - 03 - 19 ##
## ##
####################################
profile:gaming
Expand Down Expand Up @@ -110,6 +110,25 @@ en:A libre replacement for Steam.
security:[✓]
flatpak install --assumeyes --noninteractive flathub com.gitlab.librebob.Athenaeum
# Xbox Cloud Gaming
name:Xbox Cloud Gaming
url:https://github.com/flathub/com.microsoft.Edge/
fr:Microsoft Edge BETA for Xbox Cloud Gaming.
en:Microsoft Edge BETA for Xbox Cloud Gaming.
security:Vient du dépôt flathub-beta.
dependencies:flatpak remote-add --if-not-exists --system flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
dependencies:flatpak update --assumeyes --noninteractive
# Why do we need Godot?!
dependencies:flatpak install --assumeyes --noninteractive --system flathub-beta org.godotengine.Godot
# Gamepad support:
postinstall:flatpak --user override --filesystem=/run/udev:ro com.microsoft.Edge
# We place a .desktop to get a nice Xbox cloud gaming launcher, with its logo:
postinstall:cp $PWD/img/Xbox_Cloud_Gaming_Icon.jpg $HOME/.local/share/applications/
postinstall:cp $PWD/desktop/xbox.cloud.gaming.desktop $HOME/.local/share/applications/
# The icon is in the HOME folder, we need to get the absolute path, replacing ~ with it:
postinstall:sed -i 's;~;$HOME;g' $HOME/.local/share/applications/xbox.cloud.gaming.desktop
flatpak install --assumeyes --noninteractive --system flathub-beta com.microsoft.Edge
# RPCS3
name:RPCS3
url:https://flathub.org/apps/details/net.rpcs3.RPCS3
Expand Down Expand Up @@ -196,7 +215,7 @@ name:Minecraft
url:https://flathub.org/apps/details/com.mojang.Minecraft
fr:Minecraft
en:Minecraft
security:[✓]
security:Potentiellement non fiable : code propriétaire
flatpak install --assumeyes --noninteractive flathub com.mojang.Minecraft
# Fightcade
Expand Down Expand Up @@ -315,6 +334,7 @@ declare -a SOFTWARE_NAME
declare -a SOFTWARE_SECURITY
declare -a SELECTED_SOFTWARES_TO_INSTALL
declare -a DEPENDENCIES_FLATPAK
declare -a POSTINSTALL_FLATPAK
declare -a CHOICES

# set the password variable to empty
Expand Down Expand Up @@ -407,6 +427,12 @@ do
DEPENDENCIES_FLATPAK[$i]+="${line/dependencies:/}|"
#echo "#$i#${DEPENDENCIES_FLATPAK[$i]}"
;;
postinstall:*)
# In some cases, we might want to override flatpak configuration
# We append all postinstall here, using "|" as a separator (and there will be an extra | at the end)
POSTINSTALL_FLATPAK[$i]+="${line/postinstall:/}|"
#echo "#$i#${POSTINSTALL_FLATPAK[$i]}"
;;
flatpak*)
# Flatpak command
if [[ -z "${UPSTREAM_URLS[$i]}" ]]; then
Expand All @@ -418,6 +444,12 @@ do
DEPENDENCIES_FLATPAK[$i]=${DEPENDENCIES_FLATPAK[$i]::-1}
#echo "*$i*${DEPENDENCIES_FLATPAK[$i]}"
fi
# postinstall: if any, we delete the last character which is an extra | (separator)
if [[ ! -z "${POSTINSTALL_FLATPAK[$i]}" ]]; then
POSTINSTALL_FLATPAK[$i]=${POSTINSTALL_FLATPAK[$i]::-1}
#echo "*$i*${POSTINSTALL_FLATPAK[$i]}"
fi

# The command to install
COMMANDS_TO_INSTALL[$i]=${line}
if [[ -z "${LABELS_TO_COMMANDS[$i]}" && ! -z "${DEFAULT_LABELS_TO_COMMANDS}" ]]; then
Expand Down Expand Up @@ -468,7 +500,7 @@ case ${GAMING_FLATPAK_GUI} in
ZENITY_LIST=$(eval zenity --list \
--title="Choisissez\ les\ flatpaks\ à\ installer"\
--width 880\
--height 770\
--height 790\
--checklist \
--column "Sélection" \
--column "Nom" \
Expand Down Expand Up @@ -509,7 +541,7 @@ case ${GAMING_FLATPAK_GUI} in
done
KDIALOG_LIST=$(eval kdialog --separate-output \
--checklist "Choisissez\ les\ flatpaks\ à\ installer" \
"$B" --geometry 880x770 )
"$B" --geometry 880x790 )
if [ -z "$KDIALOG_LIST" ]; then
echo "Fatal error: Nothing to install"
echo "Exiting"
Expand Down Expand Up @@ -683,8 +715,8 @@ fi

Install_using_flatpak()
{
echo "Trying to install: $*" >> gaming-flatpak.log.txt
ANY_ERROR=$($* 2>&1)
echo "Trying to do: $*" >> gaming-flatpak.log.txt
ANY_ERROR=$(eval $* 2>&1)
echo "$ANY_ERROR" >> gaming-flatpak.log.txt
Deal_with_errors_on_installation $*
}
Expand All @@ -701,6 +733,20 @@ if [[ ! -z "${DEPENDENCIES_FLATPAK[$j]}" ]]; then
done <<< "${DEPENDENCIES_FLATPAK[$j]}"
fi
}

Is_there_any_postinstall()
{
if [[ ! -z "${POSTINSTALL_FLATPAK[$j]}" ]]; then
l=""
while IFS='|' read -ra NAMES; do
for l in "${NAMES[@]}"; do
echo "Post-installation de la dépendance de ${SOFTWARE_NAME[$j]}: $l" >> gaming-flatpak.log.txt
Install_using_flatpak "${l}"
done
done <<< "${POSTINSTALL_FLATPAK[$j]}"
fi
}

###########################################################################################
# Script start here:

Expand Down Expand Up @@ -790,6 +836,7 @@ do
# Is there any dependencies?
Is_there_any_dependencies
Install_using_flatpak "${COMMANDS_TO_INSTALL[$j]}"
Is_there_any_postinstall
done
# We do not want to store the password any more than necessary!
unset PASSWRD
Expand Down
Binary file added img/Xbox_Cloud_Gaming_Icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions img/applications-games-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-cli-en-0-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-cli-en-0.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-kdialog-0-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-kdialog-0-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-kdialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-zenity-0.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-zenity-0.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-zenity-0.6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/gf-zenity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4fe2b55

Please sign in to comment.