Closed karasuhebi closed 7 years ago
@RomanHargrave Overkill changed the way their lua implemenation works to use __fastcalls and stuff. I don't think it'll affect the linux one, but the difference is we have to do some black magic assembly to restore the stack on each call.
@SirWaddles yeah, Linux is having no issue using a sensible calling convention.
I just meant it as a note if anyone wants to PR into upstream, the weirdness calling stuff needs to stay for the windows build, but at the moment it's only on the crimefest branch. @saltisgood recently fixed it up so it was tidied into the signature.h macros, so it should be simple to just replace those in an ifdef.
@SirWaddles ah, I see.
Yeah, there aren't any Linux compilers that support that convention, and as far as I know it's more just a leftover MSVC feature from the days of old. No idea why OVK is using it.
I'm not completely certain that they are, the changes we noticed that there were a lot of inlined lua functions now, and a lot of stuff being passed through registers. We added __fastcall to the signature.h macro, did the black magic assembly and it seemed to fix our post-crimefest release.
We got it working before the HoxHUD team, but I am curious how they went about the problem.
That update broke everyone's mods for about a week.
Well, __fastcall
tries to pass arguments in registers but is ignored (by VC) when compiling for amd64. So I suppose we are lucky here since the Linux build is 64bit and I suppose that GCC does the same on Linux.
Also I could imagine that __fastcall
is done automatically as an optimization, but cannot be sure of course.
Sorry, I've been out of town.
With the change to move the mods into a separate repo, and from what I read on @RomanHargrave's issue tracker, is it still worth trying to get both building here, or should we just keep the dll/so hooking code separate?
There are more utility functions I'd like to add to the build, things that can't necessarily be done in lua.
If you're happy to maintain those functions in the linux version, that's fine. I don't mind writing cross-platform code, I'm just not gonna write two versions of the same thing.
@Ozymandias117 I think that it would be more worthwhile if anyone that is willing to put work in to a modding system for Linux concentrated on one project, rather than two. You should already have organization-level access to blt4linux, so you are welcome to come over and help us out.
@SirWaddles what functionality were you thinking of implementing?
We've had a few ideas in the past, for example I wanted to build a means for different cliens to send messages back and forth without necessarily being in the same lobby. This was largely for the trading in GoonMod to work outside of a lobby.
Other things have been different kinds of audio playback and generation, I also briefly looked at an in-game mod manager (i.e. one that you can actually download new mods while in-game) that would've required some custom rendering.
Overall I'm not sure, we don't have a formal milestone plan or anything, but I'd like to keep the option open for new features.
@SirWaddles perhaps since we have two mods using the same LUA base, and hence exposing the same API, we should put some sort of spec document together.
It's basically just the global functions in the docs really, as well as the 'file' library.
So where's this at nowadays? Any hope?
@karasuhebi Yes you can find it at: https://github.com/blt4linux/blt4l
@karasuhebi it works 100%. As long as a BLT mod doesn't make any assumptions about the file system (like using \ instead of / or using drive letters), it will work on Linux.
@JamesWilko There is no mention of the linux build/repo on the README of this repo or on the official BLT site download page. Closing the issue decreases that visibility more(although makes sense). Could you at least link/mention the linux repo in the README?
Is this planned? :D