issues
search
pete-gordon
/
oricutron
Portable Oric-1/Atmos/Telestrat and Pravetz 8D emulator
http://www.petergordon.org.uk/oricutron/
GNU General Public License v2.0
69
stars
25
forks
source link
Revise path handling to address issue #188
#194
Closed
erik-persson
closed
9 months ago
erik-persson
commented
9 months ago
Purpose of this change:
To make Oricutron runnable without cd'ing to its directory first
To support relative paths with the -t option
On macOS, to help command line users by not requiring a bundled app, allow "./oricutron" in the source directory much like under Linux.
Code changes:
Factor out FILEPREFIX from ROMPREFIX and IMAGEPREFIX constants
Apply FILEPREFIX for all filenames in oricutron.cfg which was done previously only for the keymap path
Let function get_fileprefix() replace the FILEPREFIX constant, and use run-time concatenation instead of compile-time
For Linux let get_fileprefix() return program binary's directory
For macOS, let get_fileprefix() return parent of .app bundle if the program is bundled, otherwise do as in Linux.
Purpose of this change:
Code changes: