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).
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.
TODO
You need Python 3.6+ and an appropriate pip installed in your system.
sudo apt install -y python3-pip
pip3 install --upgrade pip
sudo pkg install -y python py37-pip git
cd /tmp
git clone https://github.com/rayrapetyan/yag.git
You can find configuration file in acme/group_vars/all.
Feel free to change any parameters there (e.g. root_folder
).
cd yag
sudo python3 -m pip install -e .
ansible-galaxy collection install community.general
Now you can start using yag.
yag search machinar
Outputs list of supported distributions and other app-related info, e.g.
machinarium (Machinarium, 2009):
gog
steam
humble
1DVD
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.
yag run machinarium
yag remove machinarium
All saved data will be preserved in {apps_common.data_folder}/app_name
folder.
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).
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.