jrassa / EmulationStation

This is primarily a dev/working repo. All PRs should be submitted upstream.
MIT License
165 stars 33 forks source link

Build of emulationstation's forward slashes not working with fbalpha_libretro.dll #7

Closed rubenjavier closed 6 years ago

rubenjavier commented 6 years ago

Hello.

This is all tested in windows 10 64bits and retroarch 1.7.1 as the title says, Portable Game Station with the emulationstation from march 12 https://github.com/jrassa/EmulationStation/releases is not working because even if the label have backward slashes, the lauch command writhes the path with forward slashes. fbalpha_libretro.dll its the only core that is failing in my testing so far because of the slashes

this works: C:\Portable-Game-Station.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:\fba\mslug.zip

this does not work: C:\Portable-Game-Station.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:/fba/mslug.zip

I've tested nes, snes, atari, gb, gbc, mastersystem, megadrive, nds, n64 and those cores are working correctly with the forward slashes that emulationstation/Portable-Game-Station are forcing

Update: For what I could find, its "%ROM_RAW%" not working correctly, in a post from 2015, ROM_RAW behaviour was changed to be able to write the slashes correctly according to the O.S. because VLC asked for this, but seems to be broken in this last version of emulationstation https://emulationstation.org/news/?p=17

maybe something was changed in the emulationstation code because now all of the paths that show on the log have forward slashes an none have the O.S. backward slashes.. Also I have found that fbalpha_lobretro care only about the last slahs, the one just begore the rom name

this works: C:\Portable-Game-Station>.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:/fba\mslug.zip

this does not works: C:\Portable-Game-Station>.emulationstation\systems\retroarch\retroarch.exe -L C:\Portable-Game-Station.emulationstation\systems\retroarch\cores\fbalpha_libretro.dll M:/fba/mslug.zip

Thanks in advance best regards

rubenjavier commented 6 years ago

Hello @jrassa I think I've found whats missing, int the 2015 version of emulationstation from Aloshi where the slashes where fixed (unstable branch), you can see that he uses an extra function called make_preferred() on the ROM_RAW string

https://github.com/Aloshi/EmulationStation/blob/unstable/es-app/src/SystemData.cpp const std::string rom_raw = fs::path(game.getPath()).make_preferred().string();

He also uses this funcion on a windows ifdef on the same file

ifdef WIN32

// windows escapes stuff by just putting everything in quotes
return '"' + fs::path(path).make_preferred().string() + '"';

else

The function make_preferred() from Boost is the one that fixes the slashes https://theboostcpplibraries.com/boost.filesystem-paths

Thanks in advance Best regards

rubenjavier commented 6 years ago

Updated info @jrassa, HerbFargus just told me that boost was removed, he proposes a find and replace on the slashes as a workaround for windows

Thanks in advance Best regards

jrassa commented 6 years ago

@rubenjavier sorry for not responding to your original issue over on the RetroPie github. I have a test build with a fix. Can you download and test it out and report back? Thanks.

https://ci.appveyor.com/project/jrassa/emulationstation/build/2.8.0-201854120354/job/y5qv6vcxg9hklu5d/artifacts

rubenjavier commented 6 years ago

@jrassa dont worry and thanks for your efforts with the project, Im at work right now, but I'll test it later when I get home and get back to you Thanks in advance Best regards

rubenjavier commented 6 years ago

@jrassa I've tested fba and every single emulator I have and this version is loading everyting, from Atari to GameCube. Thanks a lot!