Skip to content

Ansible-based package manager (mostly for games)

Notifications You must be signed in to change notification settings

rayrapetyan/yag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yag

Build Status

Welcome to yag, a powerful Ansible-based package manager for FreeBSD and Linux! It allows to install popular apps (mostly games) from any source (e.g. DRM-free GOG's distributions or original media (CD) images).

Install

Make sure your user is in a sudoers group. Admin permissions are required only when installing system-wide packages (e.g. wine or p7zip) as part of the app setup.

From OS packages

TODO

From sources

Prerequisites

You need Python 3.6+ and an appropriate pip installed in your system.

Ubuntu 18.04 (Bionic Beaver):

sudo apt install -y python3-pip
pip3 install --upgrade pip

FreeBSD 12

sudo pkg install -y python py37-pip git

Clone repo

cd /tmp
git clone https://github.com/rayrapetyan/yag.git

Configuration

You can find configuration file in acme/group_vars/all. Feel free to change any parameters there (e.g. root_folder).

Build

cd yag
sudo python3 -m pip install -e .

FreeBSD also requires ansible collections to be installed separately:

ansible-galaxy collection install community.general

Now you can start using yag.

Usage

Search app (TODO)

yag search machinar

Outputs list of supported distributions and other app-related info, e.g.

machinarium (Machinarium, 2009):
    gog
    steam
    humble
    1DVD

Install new app

yag install machinarium --source="/images/machinarium/setup_machinarium_2844-a_(18752).exe" Installs app into {apps_common.base_folder}/app_name folder. Source parameter is optional, for some apps yag just wraps native app manager (e.g. yag install 7zip will invoke pkg install p7zip on FreeBSD or apt install p7zip-full on Debian). When specified, source format is detected automatically.

Run installed app

yag run machinarium

Remove installed app

yag remove machinarium

All saved data will be preserved in {apps_common.data_folder}/app_name folder.

Adding a new port

First create a new sub-folder in an appropriate folder in the acme tree structure. For example let's add support for an old classic adventure game - Golden Gate which was distributed on 1CD. Make sure you have a valid image of original CD. Create a new folder goldengate in the acme\ports\games so you get a following data structure:

acme:
    games:
        goldengate:
            files:
                ...
            tasks:
                install_image.yml
                main.yml
                run.yml
            vars:
                main.yml
            info.yml

Start with info.yml. Please specify as much information as possible. This info will be used in the yag search output. We'll put GOLDENGA.EXE into files directory (this is the latest available patch for the game).

main.yml is an entry point - here you'll receive all the input information about source (image or installer) as well as other available system parameters.

Put your install\run playbook logic here. You are free to unleash a full power of the Ansible modules and playbook's language here but try to keep things as simple and clear as possible.

Golden Gate uses an ancient QuickTime 2 (provided on original CD), so you need to setup it as a part of installation. Also, add QT into wine_recipe (see vars/main.yml) to avoid conflicts with other wine environments requiring other versions of QT. See wine module documentation for more details.

Please try to avoid interaction with user as much as possible, though it could be not possible for QT 2 (but QT 7 setup can be fully scripted).

Test new port

Try to check your apps in different environments, e.g. Linux and FreeBSD. Ideally they should be freshly installed with no additional packages. Checklist:

  • Make sure app installs.
  • Make sure app runs.
  • For games, make sure "saves" are properly stored in a portable data folder.

About

Ansible-based package manager (mostly for games)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published