-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
540 additions
and
279 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def main(): | ||
from .LibreGaming import main | ||
from .__main__ import main | ||
return main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,64 @@ | ||
from .LibreGaming import main | ||
main() | ||
from .LibreGaming import LibreGaming | ||
import os, argparse | ||
|
||
#Parse commandline arguments | ||
def parse_arguments(): | ||
parser = argparse.ArgumentParser(usage="%(prog)s <arguments>", description="Install Gaming Packages with ease", | ||
epilog="GPLv3 - Repo : https://github.com/Ahmed-Al-Balochi/LibreGaming.git") | ||
parser.add_argument('-g', '--gaming', action='store_true', help='Install all the Gaming Packages(Steam,Wine-Staging,Gamemode,Lutris,Heroic,MangoHud & Goverlay)') | ||
parser.add_argument('-b', '--basic', action='store_true', help='Install Basic Gaming Packages(Steam,Wine-Staging,Gamemode)') | ||
parser.add_argument('-ath', '--athenaeum', action='store_true', help='Install Athenaeum Launcher') | ||
parser.add_argument('-o', '--overlays', action='store_true', help='Install Mangohud & Goverlay') | ||
parser.add_argument('-p', '--proton', action='store_true', help='Install/Update ProtonGE(You must run Steam once before installing ProtonGE)') | ||
parser.add_argument('-l', '--list', action='store_true', help='List installed ProtonGE Releases') | ||
parser.add_argument('-t', '--tag', action='store',type=str, default=None, help='Install a specific ProtonGE Release') | ||
parser.add_argument('-r', '--rem', action='store', type=str, default=None, metavar='TAG', help='remove a specific ProtonGE Release') | ||
parser.add_argument('--releases', action='store_true', help='List ProtonGE Releases') | ||
parser.add_argument('--tui', action='store_true', help='use a Terminal User Interface to install Packages ') | ||
parser.add_argument('--heroic', action='store_true', help='Install Heroic Launcher') | ||
parser.add_argument('--lutris', action='store_true', help='Install Lutris Launcher') | ||
parser.add_argument('--minigalaxy', action='store_true', help='Install Minigalaxy Launcher') | ||
parser.add_argument('--itch', action='store_true', help='Install itch.io Launcher') | ||
parser.add_argument('--stl', action='store_true', help='Install Steam Tinker Launch(For Arch Linux only)') | ||
return parser.parse_args() | ||
|
||
# Main execution | ||
def main(): | ||
LibreGaming_Object = LibreGaming() | ||
args = parse_arguments() | ||
if args.tui: | ||
dir = os.path.dirname(__file__) | ||
# Gets the path to the TUI.py file | ||
tui = os.path.join(dir, 'TUI.py') | ||
os.system("python3 "+tui) | ||
if args.proton: | ||
LibreGaming_Object.protonup_Install_Latest() | ||
if args.releases: | ||
LibreGaming_Object.protonup_Show_Releases() | ||
if args.list: | ||
LibreGaming_Object.protonup_List() | ||
if args.tag: | ||
LibreGaming_Object.protonup_Install_Specific() | ||
if args.rem: | ||
LibreGaming_Object.protonup_Remove() | ||
if args.gaming: | ||
LibreGaming_Object.installAllPkgs() | ||
if args.basic: | ||
LibreGaming_Object.BasicPkgs() | ||
if args.overlays: | ||
LibreGaming_Object.Overlays() | ||
if args.lutris: | ||
LibreGaming_Object.Lutris() | ||
if args.minigalaxy: | ||
LibreGaming_Object.Minigalaxy() | ||
if args.heroic: | ||
LibreGaming_Object.Heroic() | ||
if args.itch: | ||
LibreGaming_Object.Common_Pkgs_Object.itch() | ||
if args.stl: | ||
LibreGaming_Object.STL() | ||
if args.athenaeum: | ||
LibreGaming_Object.Common_Pkgs_Object.Athenaeum() | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import subprocess | ||
|
||
class Arch: | ||
""" | ||
Here are all the pkgs that LibreGaming installs for Arch Linux | ||
""" | ||
|
||
# Saves the Arch package manager or AUR helpers. For example: pacman, yay | ||
PackageManager = "" | ||
|
||
# For installing Basic Packages like Steam, Wine, Gamemode. For those not using an AUR Helper | ||
Arch_Basics = " pacman -Syu python-pip wine-staging winetricks steam gamemode giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader -y --needed --noconfirm" | ||
|
||
# For installing Lutris | ||
def Arch_Lutris(self): | ||
Install_Lutris = self.PackageManager + " -S python-evdev lutris -y --needed --noconfirm" | ||
return Install_Lutris | ||
|
||
# The PackageManager variable uses the updated PackageManager only in functions. otherwise its values will be blank | ||
def Arch_AUR_Basics(self): | ||
AUR_Basics = self.PackageManager + " -Syu python-pip wine-staging winetricks steam gamemode giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader -y --needed --noconfirm" | ||
return AUR_Basics | ||
|
||
# For installing Minigalaxy | ||
def Arch_AUR_Minigalaxy(self): | ||
AUR_Minigalaxy = self.PackageManager + " -S minigalaxy -y --needed --noconfirm" | ||
return AUR_Minigalaxy | ||
|
||
# For installing Heroic | ||
def Arch_AUR_Heroic(self): | ||
AUR_Heroic = self.PackageManager + " -S heroic-games-launcher-bin -y --needed --noconfirm" | ||
return AUR_Heroic | ||
|
||
# For installing The FPS programs and overlays | ||
def Arch_AUR_Overlays(self): | ||
AUR_Overlays = self.PackageManager + " -S pkg-config cmake goverlay-bin -y --needed --noconfirm" | ||
return AUR_Overlays | ||
|
||
# For installing Steam Tinker Lanuch | ||
def Arch_AUR_STL(self): | ||
AUR_STL = self.PackageManager + " -S steamtinkerlaunch -y --needed --noconfirm" | ||
return AUR_STL | ||
|
||
def __init__(self, PackageManager): | ||
if PackageManager == "yay" or PackageManager == "paru": | ||
whoami = str(subprocess.getoutput("whoami")) | ||
if whoami == "root": | ||
print("\n\tPlease run LibreGaming without the sudo or doas command if you use an AUR Helper\n") | ||
exit(0) | ||
else: | ||
self.PackageManager = PackageManager | ||
else: | ||
self.PackageManager = PackageManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import os, subprocess | ||
|
||
class Common_Pkgs: | ||
""" | ||
Here are all the pkgs that are distro agnostic | ||
""" | ||
|
||
# TO check if LibreGaming is executed with root or not | ||
def whoami(self, authorize): | ||
whoami = str(subprocess.getoutput("whoami")) | ||
if whoami == "root" and authorize == False: | ||
print("\n\tPlease run LibreGaming without sudo or doas command for this flag\t") | ||
exit(0) | ||
elif whoami != "root" and authorize == True: | ||
print("\n\tPlease run LibreGaming with sudo or doas command for this flag\n") | ||
exit(0) | ||
|
||
# installation for Itch.io store | ||
def itch(self): | ||
self.whoami(False) | ||
print('Downloading itch.io') | ||
os.system("wget 'https://itch.io/app/download?platform=linux' -O itch-setup") | ||
os.system("chmod +x itch-setup && ./itch-setup") | ||
|
||
# installation for Athenaeum store For FOSS games | ||
def Athenaeum(self): | ||
self.whoami(False) | ||
os.system("flatpak install flathub com.gitlab.librebob.Athenaeum -y") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import subprocess | ||
|
||
class Fedora: | ||
""" | ||
Here are all the pkgs that LibreGaming installs for Fedora | ||
""" | ||
|
||
# For installing Minigalaxy | ||
Fedora_Minigalaxy = " dnf install minigalaxy -y" | ||
|
||
# For fedora 33 and above | ||
# For installing Basic Packages like Steam, Wine, Gamemode | ||
# ReleaseNumber Saves the Fedora release number. For example: Fedora 35 | ||
Fedora_33_Basics = [ | ||
"wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks", #installing winetricks here | ||
"chmod -744 winetricks", | ||
"mv winetricks /usr/local/bin/", | ||
"dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/"+ str(subprocess.getoutput("lsb_release -rs")) +"/winehq.repo", | ||
"dnf update -y", | ||
"dnf install python3-pip wine-staging gamemode steam alsa-plugins-pulseaudio.i686 glibc-devel.i686 glibc-devel libgcc.i686 libX11-devel.i686 freetype-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXext-devel.i686 libXxf86vm-devel.i686 libXrandr-devel.i686 libXinerama-devel.i686 mesa-libGLU-devel.i686 mesa-libOSMesa-devel.i686 libXrender-devel.i686 libpcap-devel.i686 ncurses-devel.i686 libzip-devel.i686 lcms2-devel.i686 zlib-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 cups-devel.i686 libxml2-devel.i686 openldap-devel.i686 libxslt-devel.i686 gnutls-devel.i686 libpng-devel.i686 flac-libs.i686 json-c.i686 libICE.i686 libSM.i686 libXtst.i686 libasyncns.i686 liberation-narrow-fonts.noarch libieee1284.i686 libogg.i686 libsndfile.i686 libuuid.i686 libva.i686 libvorbis.i686 libwayland-client.i686 libwayland-server.i686 llvm-libs.i686 mesa-dri-drivers.i686 mesa-filesystem.i686 mesa-libEGL.i686 mesa-libgbm.i686 nss-mdns.i686 ocl-icd.i686 pulseaudio-libs.i686 sane-backends-libs.i686 tcp_wrappers-libs.i686 unixODBC.i686 samba-common-tools.x86_64 samba-libs.x86_64 samba-winbind.x86_64 samba-winbind-clients.x86_64 samba-winbind-modules.x86_64 mesa-libGL-devel.i686 fontconfig-devel.i686 libXcomposite-devel.i686 libtiff-devel.i686 openal-soft-devel.i686 mesa-libOpenCL-devel.i686 opencl-utils-devel.i686 alsa-lib-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pulseaudio-libs-devel.i686 pulseaudio-libs-devel gtk3-devel.i686 libattr-devel.i686 libva-devel.i686 libexif-devel.i686 libexif.i686 glib2-devel.i686 mpg123-devel.i686 mpg123-devel.x86_64 libcom_err-devel.i686 libcom_err-devel.x86_64 libFAudio-devel -y" | ||
] | ||
|
||
# For fedora 32 and less | ||
# For installing Basic Packages like Steam, Wine, Gamemode | ||
Fedora_32_Basics = [ | ||
"wget https://raw.githubusercontent.com/winetricks/winetricks/master/src/winetricks", #installing winetricks here | ||
"chmod -744 winetricks", | ||
"mv winetricks /usr/local/bin/", | ||
"dnf update -y", | ||
"dnf install python3-pip wine gamemode steam alsa-plugins-pulseaudio.i686 glibc-devel.i686 glibc-devel libgcc.i686 libx11-devel.i686 freetype-devel.i686 libxcursor-devel.i686 libxi-devel.i686 libxext-devel.i686 libxxf86vm-devel.i686 libxrandr-devel.i686 libxinerama-devel.i686 mesa-libglu-devel.i686 mesa-libosmesa-devel.i686 libxrender-devel.i686 libpcap-devel.i686 ncurses-devel.i686 libzip-devel.i686 lcms2-devel.i686 zlib-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 cups-devel.i686 libxml2-devel.i686 openldap-devel.i686 libxslt-devel.i686 gnutls-devel.i686 libpng-devel.i686 flac-libs.i686 json-c.i686 libice.i686 libsm.i686 libxtst.i686 libasyncns.i686 liberation-narrow-fonts.noarch libieee1284.i686 libogg.i686 libsndfile.i686 libuuid.i686 libva.i686 libvorbis.i686 libwayland-client.i686 libwayland-server.i686 llvm-libs.i686 mesa-dri-drivers.i686 mesa-filesystem.i686 mesa-libegl.i686 mesa-libgbm.i686 nss-mdns.i686 ocl-icd.i686 pulseaudio-libs.i686 sane-backends-libs.i686 tcp_wrappers-libs.i686 unixodbc.i686 samba-common-tools.x86_64 samba-libs.x86_64 samba-winbind.x86_64 samba-winbind-clients.x86_64 samba-winbind-modules.x86_64 mesa-libgl-devel.i686 fontconfig-devel.i686 libxcomposite-devel.i686 libtiff-devel.i686 openal-soft-devel.i686 mesa-libopencl-devel.i686 opencl-utils-devel.i686 alsa-lib-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pulseaudio-libs-devel.i686 pulseaudio-libs-devel gtk3-devel.i686 libattr-devel.i686 libva-devel.i686 libexif-devel.i686 libexif.i686 glib2-devel.i686 mpg123-devel.i686 mpg123-devel.x86_64 libcom_err-devel.i686 libcom_err-devel.x86_64 libFAudio-devel -y" | ||
] | ||
|
||
# For installing Lutris | ||
Fedora_Lutris = "dnf install lutris -y" | ||
|
||
# For installing Heroic | ||
Fedora_Heroic = [ | ||
"dnf copr enable atim/heroic-games-launcher -y", | ||
"dnf update -y", | ||
"dnf install heroic-games-launcher-bin -y" | ||
] | ||
# For installing The FPS programs and overlays | ||
Fedora_Overlays = "dnf install goverlay -y" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import os, subprocess, wget, requests | ||
|
||
class OpenSUSE: | ||
""" | ||
Here are all the pkgs that LibreGaming installs for OpenSUSE | ||
""" | ||
|
||
# For installing Basic Packages like Steam, Wine, Gamemode | ||
OpenSUSE_Basics = [ | ||
" zypper install -y steam wine-staging gamemoded libgamemode0 libgamemode0-32bit", | ||
" zypper update -y" | ||
] | ||
|
||
# For installing Minigalaxy | ||
OpenSUSE_Minigalaxy = " zypper install -y minigalaxy" | ||
|
||
# For installing Lutris | ||
OpenSUSE_Lutris = " zypper install -y lutris" | ||
|
||
# For installing The FPS programs and overlays | ||
OpenSUSE_Overlays = " zypper install -y goverlay" | ||
|
||
# For installing Heroic | ||
def OpenSUSE_Heroic(self): | ||
whoami = str(subprocess.getoutput("whoami")) | ||
if whoami == "root": | ||
print("\n\tPlease run LibreGaming for OpenSUSE Heroic without sudo or doas command, so that it installs correctly\n") | ||
else: | ||
print('Downloading Heroic latest AppImage') | ||
url = 'https://api.github.com/repos/Heroic-Games-Launcher/HeroicGamesLauncher/releases/latest' | ||
r = requests.get(url).json() | ||
for i in r['assets']: | ||
if i['name'].endswith('.AppImage'): | ||
url= i['browser_download_url'] | ||
wget.download(url, "heroic.AppImage") | ||
os.system("chmod +x heroic.AppImage && mv heroic.AppImage ~/Downloads && cd ~/Downloads && ./heroic.AppImage") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import os, subprocess, wget, requests | ||
|
||
class Ubuntu: | ||
""" | ||
Here are all the pkgs that LibreGaming installs for Ubuntu | ||
""" | ||
|
||
# Saves the Ubuntu release codename. For example: focal fossa | ||
ReleaseCodename = "" | ||
|
||
# For installing Minigalaxy | ||
Ubuntu_Minigalaxy = " apt install minigalaxy -y" | ||
|
||
# For installing Lutris | ||
Ubuntu_Lutris = [ | ||
" dpkg --add-architecture i386", | ||
" add-apt-repository ppa:lutris-team/lutris -y", | ||
" apt update", | ||
" apt install lutris -y" | ||
] | ||
|
||
# For installing The FPS programs and overlays | ||
Ubuntu_Overlay = [ | ||
" dpkg --add-architecture i386", | ||
" add-apt-repository ppa:flexiondotorg/mangohud -y", | ||
" apt update", | ||
" apt install goverlay -y" | ||
] | ||
|
||
# For installing Basic Packages like Steam, Wine, Gamemode | ||
def Ubuntu_Basics(self): | ||
basic_pkgs = [ | ||
" dpkg --add-architecture i386", | ||
"wget -nc https://dl.winehq.org/wine-builds/winehq.key", | ||
" apt-key add winehq.key", | ||
" add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ "+ self.ReleaseCodename +" main' -y", | ||
" add-apt-repository multiverse -y", | ||
" apt update", | ||
" apt install --install-recommends winehq-staging -y", | ||
" apt install steam winetricks python3-pip gawk curl meson libsystemd-dev zstd pkg-config ninja-build git libdbus-1-dev libinih-dev dbus-user-session libgnutls30:i386 libldap-2.5-0:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386 -y" | ||
] | ||
return basic_pkgs | ||
|
||
# For installing Heroic | ||
def Ubuntu_Heroic(self): | ||
print('Downloading Heroic latest dpkg') | ||
url = 'https://api.github.com/repos/Heroic-Games-Launcher/HeroicGamesLauncher/releases/latest' | ||
r = requests.get(url).json() | ||
for i in r['assets']: | ||
if i['name'].endswith('.deb'): | ||
url= i['browser_download_url'] | ||
wget.download(url, "heroic.deb") | ||
os.system(" dpkg -i heroic.deb") | ||
|
||
def __init__(self): | ||
distroName = str(subprocess.getoutput("lsb_release -is")) | ||
if distroName == "Ubuntu": | ||
self.ReleaseCodename = str(subprocess.getoutput("lsb_release -cs")) | ||
if distroName == "Pop": | ||
self.ReleaseCodename = str(subprocess.getoutput("lsb_release -cs")) | ||
else: | ||
self.ReleaseCodename = str(subprocess.getoutput("grep -oP '(?<=DISTRIB_CODENAME=)\w+' /etc/upstream-release/lsb-release")) |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include LibreGaming/*.sh | ||
include LibreGaming/TUI.py | ||
include LibreGaming/distro_pkgs/*.py |
Oops, something went wrong.