MSRevive / MasterSwordRebirth

Continuation of Master Sword Classic/Continued.
https://msrebirth.net/
Other
9 stars 6 forks source link

Add linux compatibility #22

Closed SaintWish closed 2 years ago

SaintWish commented 2 years ago

It would be nice to support linux at-least for servers for obvious reasons.

BerntA commented 2 years ago

We can refer to the default SDK 2013 "building on Linux" guidelines (thankfully), also it seems like all the static libs are for the client only, seeing as they are either graphics or GUI related, which means we probably only have to fix:

SaintWish commented 2 years ago

Sounds good, I can run a game server for the game for testing the linux changes on my linux box. I'll make a list of all the files that requires windows headers.

The other stuff as far as I can tell that include windows headers already have compatibility for linux. though I could be completely wrong cause I don't have a lot of experience with c++ and HLSDK.

I'm going off the scriptcmd_alpha branch until I'm ready to merge it to main. I'll take a look at the hudmusic, soundsystem, and conproc to see if I can make them compatible for linux.

SaintWish commented 2 years ago

soundsystem.cpp and hudmusic.cpp requires windows.h and mmsystem.h for playing MIDI files. Relies on via the mmsystem mci and mdi functions and types for playing MIDI files, which will make it a pain to convert it over to linux.

BerntA commented 2 years ago

Is most of this logic client side? We can probably omit client side stuff, as long as we can compile the ms.so (server side part), only this is needed for the dedicated server I suppose.

SaintWish commented 2 years ago

Yeah, I was thinking about doing that as well, from the looks of it might compile for linux on server side already. I can't really test currently, but if it doesn't compile we should be super close.

BerntA commented 2 years ago

works so far, needs more testing to fix potential exceptions!