libretro / virtualjaguar-libretro

Hard fork of Virtual Jaguar (abandoned project) to Libretro
31 stars 34 forks source link

Add support for Visual Studio 2015 & 2017 #28

Closed djipi closed 6 years ago

djipi commented 6 years ago

The stdint.h file contains the Visual Studio 2015 & 2017 detection changes. The Visual Studio 2015 & 2017 projects can probably be put aside but I let you to decide.

inactive123 commented 6 years ago

Umm, please implement these as Makefile targets instead. We want to have to maintain zero Visual Studio solution files, and there are ways to get this compiling properly with a Makefile.

inactive123 commented 6 years ago

I can ask @bparker06 if he can do this at least for you since I understand it might not be a reasonable expectation to expect you to dig through all those files. We'll see what happens.

djipi commented 6 years ago

I understand, please let me know how @bparker06 feels about it. Otherwise, I will try to modify the makefile targets. Just for my curiosity, could you also tell me the reason(s) behind the zero Visual Studio solution files?

Alcaro commented 6 years ago

Because adding those two solutions means the procedure for adding a new source file changes from "create file, add to Makefile" to "create file, add to Makefile, Win-VS2015.vcxproj, Win-VS2015.vcxproj.filters, Win-VS2017.vcxproj and Win-VS2017.vcxproj.filters". We'd rather not deal with that maintenance burden. Especially when the build works for most of us if we forget the solutions.

If you can find a way to do wildcards in a VS project, I believe we'll have no objections.

(Obvious counterargument: add file to CMakelists.txt instead. We've considered and rejected that option too, but I don't remember the relevant argument.)

inactive123 commented 6 years ago

Hi there @djipi ,

I believe @bparker06 is going to add VS2015/2017 targets himself, so let's give him some time to get it done. After it is done, we can reconvene and you can tell us if you can get it easily compiling, and if so, we can close this issue. I will leave it open until then.

inactive123 commented 6 years ago

Hi there,

bparker added this -

https://github.com/libretro/virtualjaguar-libretro/commit/2b194953d35ab0a264cbdbea8a82db0b03c27a48

It should now be possible to compile with MSVC like this -

MSVC 2015 desktop x86

make -f Makefile platform=windows_msvc2015_x86

MSVC 2015 desktop x64

make -f Makefile platform=windows_msvc0215_x64

MSVC 2017 desktop x86

make -f Makefile platform=windows_msvc2017_desktop_x86

MSVC 2017 desktop x64

make -f Makefile platform=windows_msvc2017_desktop_x64

MSVC 2017 UWP x86

make -f Makefile platform=windows_msvc2017_uwp_x86

MSVC 2017 UWP x64

make -f Makefile platform=windows_msvc2017_uwp_x64

Let me know if this works for you @djipi. You might need MSYS2 installed in order to use make but that should be it.

djipi commented 6 years ago

Thank you for the modifications. I have tested the "MSVC 2017 desktop x64" under cygwin64 and it went well. I will check the another possibilities later. I have kept my changes in the stdint.h file, so I guess you will have to merge my line if you want to test the makefile at your side. Thanks.