Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support region-specific consoles with output path tokens #1375

Open
dirn opened this issue Oct 20, 2024 · 1 comment
Open

Support region-specific consoles with output path tokens #1375

dirn opened this issue Oct 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dirn
Copy link

dirn commented Oct 20, 2024

Is your feature request related to a problem?

Frontends like ES-DE support multiple system names for consoles released in multiple regions. For example, sfc and snes, megadrive and genesis. igir only supports ones of each of these names. In these examples it would pick snes and megadrive. I don't doubt that it's much more common for folks to keep all of the games together, but I prefer to keep them separate, partially for organization, partially because ES-DE will give me different console art when browsing through the systems.

Describe the solution you'd like

I would like a way to keep roms organized by region-specific system names. I realize there's no great way to do this as the systems will be in the same dat file. But there are region and language tokens; perhaps there's a way to factor one of those into selecting a system.

    new GameConsole(/(\W|^)SNES(\W|$)|Super (Nintendo Entertainment System|Famicom)/i, ['.sfc', '.smc'], {
      // ...
      emulationstation: {EUR: 'snes', JPN: 'sfc', USA: 'snes', WORLD: 'snes'},
      // ...
    }),

WORLD could serve as the default.

Additional context

No response

@dirn dirn added the enhancement New feature or request label Oct 20, 2024
@Europia79
Copy link

in the meantime, you can do your igir operations as-is...
...then afterwards, you can run a Linux, Mac, or Git-for-Windows script:

it would look something like this:

!#/bin/bash
THIS_FILE=$(realpath -P "${0}");
THIS_PATH=$(dirname "${THIS_FILE}");
roms_dir="${THIS_PATH}/roms";
us_dir="${roms_dir}/us";
eu_dir="${roms_dir}/eu";
jp_dir="${roms_dir}/jp";
wd_dir="${roms_dir}/world";

mkdir -p "${us_dir}";
mkdir -p "${eu_dir}";
mkdir -p "${jp_dir}";
mkdir -p "${wd_dir}";

find ${roms_dir} -type f -name "*" -print0 | while IFS= read -r -d '' file;
do
case "${file}" in
*Europe*|*Germany*|*France*|*Spain*|*Sweden*)
mv -- "${file}" "${eu_dir}/${file}"
;;
*Japan*|*Korea*|*China*|*Taiwan*|*Asia*)
mv -- "${file}" "${jp_dir}/${file}"
;;
*USA*)
mv -- "${file}" "${us_dir}/${file}"
;;
*Russia*|*Brazil*|*Australia*|*Argentina*|*Mexico*|*Unknown*)
mv -- "${file}" "${wd_dir}/${file}"
;;
*World*)
mv -- "${file}" "${wd_dir}/${file}"
;;
*)
mv -- "${file}" "${wd_dir}/${file}"
;;
done

Altho, this is just an example script:
You will need to modify it according to your personal preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants