Simple Retroarch launcher 1.3+
For Win7 x86 or newer.

-----

Changelog:

20231231

- added JSON config. It uses for neocd_libretro.dll as for now but can be configured to any core in neocd.json. For "launcher.exe" and "launcher-winxp.exe" cores info are hardcoded (yet).
If you rename neocd.exe then you also should rename neocd.json. You can rename neocd.exe to genesis.exe for example and then edit genesis.json to use core you wanted.
This exe can be launched from command line or be associated with files.

-----

How it works:

This is a C++ program that launches RetroArch and loads a ROM file. It uses the Windows API and the Common Dialog Box Library to open a file dialog and allow the user to select a ROM file. Alternatively, the program can also accept a file path as a command-line argument.

The program first checks the file extension of the selected file and determines the corresponding core that should be used to run the ROM. It reads the core information from a JSON file called "cores.json" located in the RetroArch installation directory.

Once the core path is determined, the program constructs the command line to launch RetroArch with the selected core and ROM file. It uses the `CreateProcessW` function to start RetroArch as a new process. After RetroArch is launched, the program waits for the RetroArch process to exit before terminating.

Note that this program assumes that RetroArch is installed and configured correctly on the system. The RetroArch executable should be located in the RetroArch installation directory, and the ".json" file should be present in the same directory and with the same name as executable.

To compile and run the program, you'll need a C++ compiler such as GCC. It was compiled in MinGW-W64 GCC 13.2.0.

You'll also need to link against the Common Dialog Box Library by adding the "comdlg32.lib" library to the linker options.
Flags are used:
-static-libgcc -lcomdlg32 -std=c++20 -lshlwapi -m32

-----

Purpose of this app:

1. It easier to associate file extensions with RetroArch and run ROMs in one click
2. Portable
3. Faster to configure RetroArch with it
4. No gimmicks

-----

Made in USSR (with love), 2024. CC0