Skip to content

Amiberry directories

Dimitris Panokostas edited this page Dec 29, 2024 · 5 revisions

Overview

Amiberry has traditionally behaved as a "Portable" app, meaning that it was designed to expect everything under the same directory it started from. The startup path would determine where it would look for all the required sub-dirs and files (e.g. data, conf etc.). This has changed after versions 5.7.4 and 6.3.4. Below, you'll find a detailed description of all the changes.

If you want to keep the Portable mode behavior

If you prefer to keep the old behavior mentioned above, create an empty/dummy file named amiberry.portable in the same directory you run Amiberry from. If that file is detected on startup, Amiberry will automatically switch to Portable mode, and use the current directory as the HOME directory, expecting every other folder under that one.

Changes in newer versions

Newer Amiberry versions are installed system-wide, using standard DEB/RPM packages on Linux, or a DMG image on macOS. With this change, the directory handling has been updated to be more standardized, depending on the operating system. Instead of bundling empty directories for the user to place ROMs and other Amiga files into, these are now created automatically on startup. The exact location for each directory differs, depending on a few factors, as shown below. 

Directory mapping

This is the logic that Amiberry follows on startup, to initialize the paths:

DATA

The DATA directory (where the data folder and sub-dirs reside). On macOS, this is inside the Application bundle itself. The following checks only apply for Linux.

  • If an ENV variable named AMIBERRY_DATA_DIR is set, and the directory it points to actually exists, this will be used. This allows custom installations to modify the default expected path. The variable should point to the full path including the data folder at the end.
  • If there is no such ENV variable set, it will look at the /usr/share/amiberry directory (or any other PREFIX used, if you installed it manually) for a data folder and if found, that will be used. This is where the DEB/RPM package will install things.
  • If all the above checks failed, it will use the fallback method of expecting everything under the current directory + /data.

HOME

The HOME directory (where user-configurable files and folders reside, like floppies, harddrives, roms, etc.)

  • If an ENV variable named AMIBERRY_HOME_DIR is set, and it points to an existing directory, that will be used as the home directory.
  • If the above doesn't exist, it will look for $HOME/Amiberry instead. If that directory does not yet exist, it will be created. This is the most common scenario.
  • Finally, in the unlikely case that all the above checks failed, it will use the fallback method of expecting it under the current directory (Portable mode).

CONFIG

The CONFIG directory (where the application configs are saved, what used to be the conf directory)

  • If an ENV variable named AMIBERRY_CONFIG_DIR is found, and it points to an existing directory, it will be used.
  • Otherwise, $HOME/Amiberry/conf (or $HOME/Amiberry/Configurations on macOS) will be created and used.
  • In the unlikely scenario that all the above checks failed, it will use the fallback of expecting it under the current directory + /conf.

PLUGINS

The PLUGINS directory (where any extra plugin libraries are placed, like capsimage and libfloppybridge). On MacOS, these are included in the Application bundle itself, under Frameworks. The below only apply for Linux.

  • If an ENV variable named AMIBERRY_PLUGINS_DIR is found, and it points to an existing directory, then that will be used.
  • Otherwise, it will use the LIB prefix used during installation. By default, that would be something like /usr/lib/amiberry/ if you used the DEB/RPM package to install Amiberry.
  • If for some reason the LIB prefix wasn't found, it will create $HOME/Amiberry/plugins and use that.
  • In the unlikely scenario that all the above checks failed, it will use the fallback of expecting it under the current directory + /plugins.

Amiberry.conf

The Application-generated amiberry.conf file, where global Amiberry settings are saved, is no longer placed inside the conf directory. Instead, this will now be placed under $XDG_CONFIG_HOME/amiberry/amiberry.conf (which by default, would translate to ~/.config/amiberry/amiberry.conf)

Directories in XDG_DATA_HOME

The following directories are now created inside $XDG_DATA_HOME (or ~/.local/share/amiberry if that variable isn't set):

  • controllers (the bundled gamecontrollerdb.txt is copied in there when this is created)
  • whdboot (the bundled whdboot directory is copied there when this is created)
  • savestates
  • ripper
  • inputrecordings
  • screenshots
  • nvram
  • videos

Directories in HOME

The following directories are now created in the configured HOME path:

  • lha
  • floppies
  • harddrives
  • cdroms
  • roms (the bundled AROS roms are copied in there when this is created)
  • rp9

As well as the logfile (amiberry.log)

This standardizes the behavior as a normal Linux application, still allows the possibility to manually override the default locations if necessary.

Clone this wiki locally