Coder Social home page Coder Social logo

yag's Introduction

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.

yag's People

Contributors

rayrapetyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

covax80

yag's Issues

xrandr: the best supported resolution

Not all resolutions are supported in different environments. We need to find the best supported resolution on a given system. E.g. for:

- screen:
    resolution: 1280,768

when:
xrandr returns:

   1920x1200     59.95*+
   1920x1080     60.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94

1280x960 should be used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.