RetroAchievements / RALibretro

RALibretro is a multi-emulator used to develop RetroAchievements.
https://retroachievements.org
GNU General Public License v3.0
177 stars 35 forks source link

Add support for Linux, macOS (and potentially other OSes) #383

Open dgchrt opened 1 year ago

dgchrt commented 1 year ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I want to join the achievement developer community but then I realise I'd need a Windows machine to do it, which I do not possess.

Describe the solution you'd like Porting the emulator to other OSes or making it Multiplatform at the core would solve the issue.

Describe alternatives you've considered I don't really see much alternative.

Additional context Most emulators under the Sun are already multi-platform, so having the emulator that can be used to create achievements bound to a single platform is very limiting.

wescopeland commented 1 year ago

It is not a perfect solution, but I know in the past some Linux users have had success using Wine. On macOS, I've had success using Parallels even on Apple Silicon hardware.

Jamiras commented 1 year ago

I'm pretty sure RAlibretro itself could be compiled and used on Linux. It's using SDL as a compatibility layer.

The problem is the toolkit (https://github.com/RetroAchievements/RAIntegration/), which you're prompted to download when launching RAlibretro for the first time. It is currently very Windows dependent. Much of the UI-related code calls the Win32 APIs directly (it's not even using MFC or a similar Microsoft-provided UI layer).

The discussion for updating the DLL is here.

As suggested above, many users have been able to develop on Linux using WINE.

dgchrt commented 11 months ago

Thanks for the answers so far. Apparently, running it on a Mac goes beyond the OS problem, which can be circumvented by using WINE as aforementioned. I get these errors, though:

[ERROR] [OGL] Error in getProcAddress: symbol glGenVertexArrays not found
[ERROR] [OGL] Error in getProcAddress: symbol glDeleteVertexArrays not found
[ERROR] [OGL] Error in getProcAddress: symbol glBindVertexArray not found
[ERROR] [OGL] Error in getProcAddress: symbol glBindSampler not found

Which seem to be related to the fact that Apple supports OpenGL up to version 2.1, which does not include vertex arrays (apparently, an OpenGL 3.0 thing). And I'm not sure the bundled SDL2.dll would ever support Metal (a Windows DLL supporting Metal? Very unlikely).

Maybe an older version of RALibRetro could bundle an older version of libSDL that would support OpenGL 2.1? But I couldn't find anything about it in its releases.

CasualPokePlayer commented 11 months ago

macOS supports higher OpenGL versions, even as far as OpenGL 4.1 according to their documentation, but only if you request a core profile and use the newer NSOpenGL interface.

Looking at RALibretro, it doesn't appear to explicitly require a verison (although it does request a core profile here, although regardless it probably should set the version here). This likely just results in the older OpenGL 2.1 interface being used in WINE.

(also, a more concerning issue wrt versions is glBindSampler, which is OpenGL 3.3)