BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
643 stars 86 forks source link

Amiberry won't launch if not in its directory #121

Closed Voljega closed 7 years ago

Voljega commented 7 years ago

Hello, the following bug existed also in Chip's UAE4ARM : it seems impossible to launch the emulator from anywhere but it's directory because of an harcoded path to the data folder

(in the following examples my executable is renamed to uae4arm to keep using old scripts by made but it really is amiberry 2.1)

if it do the following from a terminal I get the error and then amiberry won't launch

# /tmp/amiga/uae4arm/uae4arm
Amiberry build 2017-01-08, by Dimitris (MiDWaN) Panokostas and Olly Aigner
Based on previous work by Chips and TomB (Pandora)
starting sound thread..
SDLTrueTypeFont::SDLTrueTypeFont. Couldn't open data/FreeSans.ttf
stopping sound thread..

if I do :

# cd /tmp/amiga/uae4arm
# ./uae4arm 

the emulator doesn't display the error about the font (data directory is accessible from there) and then launch

any way to bypass that error ? maybe there's a parameter to specify some paths on the command line ?

midwan commented 7 years ago

@Voljega This is a known limitation for now, the prefixes for some paths are "hardcoded" in the Makefile. You could change them in the Makefile and recompile to get around this, until it's fixed with a better approach in the future.

The relevant line in the makefile is: DEFS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\" Changing the DATA_PREFIX for example to something other than "./data/" should give you what you want. It will still be hardcoded to what you use of course...

Voljega commented 7 years ago

Thank you midwan ! Yes well hardcoding is fine if I can modify it to an absolute path I guess