diff --git a/README.md b/README.md index b5c59c9..08fc4de 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ An explanation for some of the options included in the `org.mamedev.MAME.yaml' m Currently these are the patches applied: +`inipath.patch` default ini paths include the home '~/.mame' directory and two relative paths '.' and 'ini'. The relative paths are not helpful inside the sandbox, and the '~/.mame' contents shouldn't be overwritten with each new MAME release. Instead the default ini search path is patched to '$HOME/.mame;/app/share/mame/ini'. This will allow a default base ini in '/app/share/mame/ini/mame.ini' and can be overridden in '~/.mame/mame.ini'. + `ldopts.patch` enables an option for the linker to strip debug symbols. `use-system-lib-flac.patch` works around FORTIFY_SOURCE compiler option that causes errors in the included libflac. + diff --git a/inipath.patch b/inipath.patch new file mode 100644 index 0000000..563c6e7 --- /dev/null +++ b/inipath.patch @@ -0,0 +1,13 @@ +diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp +index f238c7bd..dd6f2e4f 100644 +--- a/src/osd/sdl/sdlmain.cpp ++++ b/src/osd/sdl/sdlmain.cpp +@@ -58,7 +58,7 @@ + #elif defined(SDLMAME_MACOSX) + #define INI_PATH "$HOME/Library/Application Support/APP_NAME;$HOME/.APP_NAME;.;ini" + #else +- #define INI_PATH "$HOME/.APP_NAME;.;ini" ++ #define INI_PATH "$HOME/.APP_NAME;/app/share/APP_NAME/ini" + #endif // MACOSX + #endif // INI_PATH + diff --git a/mame.ini b/mame.ini new file mode 100644 index 0000000..ac1d304 --- /dev/null +++ b/mame.ini @@ -0,0 +1,33 @@ +# +# CORE SEARCH PATH OPTIONS +# +homepath $HOME/.mame +rompath /app/share/mame/roms +hashpath /app/share/mame/hash +samplepath /app/share/mame/samples +artpath /app/share/mame/artwork +ctrlrpath /app/share/mame/ctrlr +inipath $HOME/.mame;/app/share/mame/ini +fontpath /app/bin/ +cheatpath /app/share/mame/cheat +crosshairpath /app/share/mame/crosshair +pluginspath /app/share/mame/plugins +languagepath /app/share/mame/language +swpath /app/share/mame/software + +# +# CORE OUTPUT DIRECTORY OPTIONS +# +cfg_directory $HOME/.mame/cfg +nvram_directory $HOME/.mame/nvram +input_directory $HOME/.mame/inp +state_directory $HOME/.mame/sta +snapshot_directory $HOME/.mame/snap +diff_directory $HOME/.mame/diff +comment_directory $HOME/.mame/comments +share_directory $HOME/.mame/share + +# +# OSD VIDEO OPTIONS +# +video opengl diff --git a/org.mamedev.MAME.yaml b/org.mamedev.MAME.yaml index 217eacc..89ec6e0 100644 --- a/org.mamedev.MAME.yaml +++ b/org.mamedev.MAME.yaml @@ -39,6 +39,7 @@ modules: - cp -r hash/ ${FLATPAK_DEST}/share/mame/ - cp -r hlsl/ ${FLATPAK_DEST}/share/mame/ - cp -r ini/ ${FLATPAK_DEST}/share/mame/ + - install -Dm 0644 mame.ini ${FLATPAK_DEST}/share/mame/ini/mame.ini - cp -r language/ ${FLATPAK_DEST}/share/mame/ - cp -r plugins/ ${FLATPAK_DEST}/share/mame/ - cp -r roms/ ${FLATPAK_DEST}/share/mame/ @@ -53,7 +54,11 @@ modules: path: org.mamedev.MAME.desktop - type: file path: org.mamedev.MAME.metainfo.xml + - type: file + path: mame.ini - type: patch - path: use-system-lib-flac.patch + path: inipath.patch - type: patch path: ldopts.patch + - type: patch + path: use-system-lib-flac.patch