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

Windows Explorer File Association #9718

Open
xmha97 opened this issue Nov 14, 2019 · 14 comments
Open

Windows Explorer File Association #9718

xmha97 opened this issue Nov 14, 2019 · 14 comments

Comments

@xmha97
Copy link

xmha97 commented Nov 14, 2019

Hello, Please add Windows Explorer File Association.
For example:
smd.zip
Windows Explorer

@xmha97 xmha97 changed the title Can't OpenWith ROMs with RetroArch RetroArch File Association Nov 14, 2019
@xmha97 xmha97 changed the title RetroArch File Association Windows Explorer File Association Nov 14, 2019
@RobLoach
Copy link
Member

The problem I see here is determining what the intended core to load is. There was also this discussion to have retroarch.exe work without passing the -L core option: #746

@xmha97
Copy link
Author

xmha97 commented Nov 14, 2019

Cores should be loaded based on ROMs file extension.
For example, all .smd files (Sega Mega Drive) loaded with Genesis Plus GX.

C:\Users\Amir\AppData\Roaming\RetroArch\retroarch.exe -L C:\Users\Amir\AppData\Roaming\RetroArch\cores\genesis_plus_gx_libretro.dll "%1"

3E0F8EA2-2664-4781-B56D-B150BDFE6F17

@boomercore
Copy link

Seconding this. The only solution for now is for the end user to painstakingly make a series of custom association strings in the 3rd party Default Programs Editor. What's worse is that if you associate a lot of filetypes with "retroarch.exe" and then edit the association in DPE, I notice there's some sort of overlap and associations are lost as you add more. One way to get around this is to associate the filetypes with dummy executables from Explorer, and then edit them to face retroarch.exe in Default Programs Editor with the right core via -L and "%1". It's a HUGE pain.

Retroarch loading the only core capable of running the ROM file type, or in the case of multiple cores asking you which one you'd like to launch, on association would be EXTREMELY convenient. Thanks in advance.

@andres-asm
Copy link
Contributor

It's not possible. The extension is not enough because SEVERAL CORES may support the same extension.

@boomercore
Copy link

It's not possible. The extension is not enough because SEVERAL CORES may support the same extension.

Could it not just ask which one you want to use in that case? This is exactly what it does when you pick an extension from the file browser. The thing is, the file browser is not nearly as good as Windows is at quickly reaching a particular file. It would be preferable to cut the middle man, if possible.

@boomercore
Copy link

boomercore commented Nov 24, 2019

Alternatively, a search-within-subdirectories function would suffice. Either within the Desktop Menu or the Retroarch File Browser. That way one could search for Mario and get results for several systems, for instance. Better still, would be a random selection option, but I know that's a bit of a fluffy extra. Regardless, these things can be done easily within Windows Explorer, and an easier way to associate files to Retroarch would be nice. Thanks for the consideration.

@boomercore
Copy link

boomercore commented Nov 29, 2019

For those wanting this functionality in the likely event this gets closed:

Make a dummy exe file for EACH file extension you want to run. Otherwise things will get overwritten and won't stick. Like nes.exe for .nes, etc. Associate the filetype with it in explorer so the filetype is in the registry. Then use Default Programs Editor https://defaultprogramseditor.com and open the filetype, then edit the Open command with the following program: "C:\retroarch\retroarch.exe" -L "C:\retroarch\cores\core.dll" "%1" replacing the directory/drive with whatever applies to your machine. It's annoying, but possible to do.

Hopefully a simple association to Retroarch will be possible some day.

@boomercore
Copy link

Another alternative these days: you can just drag files into an open RA session and it'll ask which core to use or load the only one capable of playing it automatically. Simply associating files to RA and having them open the right core automatically, or with a prompt, would still be nicer.

@Maingron
Copy link

Maingron commented Nov 15, 2022

For me, I've now settled with creating a bunch of bat-files in a folder which then access a .lnk shortcut to Retroarch.
Not beautiful, but at least it's fairly maintainable, I guess.

Example Retroarch - NES.bat

start retroarch.lnk -L "mesen" %1
exit

Example Retroarch - SNES.bat

start retroarch.lnk -L "snes9x" %1
exit

And then just set Open With accordingly

I'm not very good with batch scripts, but I think this can be brought into one single file using if-statements. Maybe someone can share such a script?

@Maingron
Copy link

So, in addition to my previous comment, I've now created a script for that: https://github.com/Maingron/Open-with-Retroarch/tree/main

@BenMcLean
Copy link

BenMcLean commented Aug 13, 2023

I do not believe that this isn't possible. I'd want to hear a pretty compelling technical reason why it couldn't be done and done fairly easily and simply before I'd believe that. We just need someone to actually do it or accept a PR that does. It is just part of what supporting Windows as a platform means and the Windows side of this hasn't changed significantly in over 20 years.

If multiple cores support a file extension, show a dialog to choose a core, just like the file browser within RetroArch does. It is not a big ask to let Windows users have this and does not involve any secret proprietary Microsoft functionality.

This has always been an annoyance for Windows RetroArch users since RetroArch was first created.

@RobLoach
Copy link
Member

This Pull Request will really help. Would love some eyes on it: #15458

@BenMcLean
Copy link

Related issue #9275

@BenMcLean
Copy link

BenMcLean commented Aug 15, 2023

Might be nice to add a feature to automatically register all those file associations as something that could be selected in the RetroArch menu. (which is separate from being able to load ROMs without additional command line parameters)

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

No branches or pull requests

6 participants