Update for Half-Life 1.1.1.1 and client library for Mac/Linux
Milanium
Join Date: 2012-12-27 Member: 176388Members
http://store.steampowered.com/app/70/ is available for Mac/Linux now. You can install the Linux server binary, but it won't start from the Steam GUI.
If you try to do so via the command-line it backfalls to Half-Life 1 (player models are barneys, VGUI is broken, ...) because the cl_dlls is Windows-only.
As a huge fan I offer my help to port Natural-Selection 1. Can you publish the source code of the client library?
If you try to do so via the command-line it backfalls to Half-Life 1 (player models are barneys, VGUI is broken, ...) because the cl_dlls is Windows-only.
As a huge fan I offer my help to port Natural-Selection 1. Can you publish the source code of the client library?
Comments
What about creating a linux shared object .so that "tunnels" the client.dll through it, returning whatever function calls the game needs to the linux binaries?
I could be wrong though.
MPlayer does something similar with video codecs from win32 dll's using winelib, so I don't see why it's not possible here.
Here's a list of function calls from ns/cl_dlls/client.dll
http://bordersonabsurd.com/ns/Exported Functions List.html
Call the client.dll into a .so and divert the calls from vgui.dll to vgui.so or something.
Also, check this out. http://wine-wiki.org/index.php/WineLib#Running_a_Dll
So long as client.dll doesn't call kernel32.dll (It doesn't as far as I can tell) it should be possible.
I have, with that, created a shared object from the dll, edited liblist.gam to include cldlls_linux, but the engine doesn't load it.
http://bordersonabsurd.com/ns/cl_dlls.tar.gz
Also, what command did you use to launch NS (albeit broken) from the terminal?
According to the README he added some patches Valve added without releasing a new SDK version and silenced gcc compiler warnings.
Steam has to be running.
according to http://www.reddit.com/r/linux_gaming/comments/17ahm3/how_to_install_and_run_half_life_mods_on_steam/ but you can short it up with
It won't work for me, too. Says "could not load library /home/matthias/.local/share/Steam/SteamApps/common/Half-Life/./ns/cl_dlls/client.so" if I try to load the game with client.so copied to cl_dlls folder. This is my liblist.gam:
My guess is that this is not a real wrapper, but still depended on Wine somehow. Is there anything left to do with those files except copying them to ~/.local/share/Steam/SteamApps/common/Half-Life/ns/cl_dlls/?
Ignore the .so I posted earlier.
I'm using 64 bit Ubuntu, which has been causing trouble. I set up a 32 bit install last night.
I don't suppose there are any more experienced programmers who care to comment?
Also, here is the output of '# objdump -x' on valve/cl_dlls/client.[so/dll]
:edit: jjust text files, BTW
http://bordersonabsurd.com/ns/client.dll.lookatme
http://bordersonabsurd.com/ns/client.so.lookatme
It looks like the dll IS linked to kernel32.dll after all...
KERNEL32.dll
USER32.dll
vgui.dll
WSOCK32.dll and
SDL.dll
then, make a client.so that depends on winelib and windows.h
Use LoadLibrary("client.dll") then to call only the functions from ns's client.dll that are specific to, or significantly differ in some way from valve's.
But, as I said, I'm by no means an expert, just an optimist.
:edit 2:
ns's client.dll depends on:
WINMM.dll Joystick stuff
WS2_32.dll
vgui.dll
KERNEL32.dll
SER32.dll
GDI32.dll
If someone could objdump -x the 1.1.1.0 dll, I'd bet the SDL stuff isn't there so really, just need to call the ns specific game functions, I think, unless my understanding of computers is wrong, which it may be.
I guess the first step then would to build a vanilla client.so like it was a new mod.
After that, the build was looking better but I realised fairly quickly that I only archived the main NS source repository and not the tools repository, which contains all our dependent libraries. I disabled some of the ones that aren't really necessary ( Lua??? ) but I can't find the library we used for managing particle systems. FYI, I'm simply trying to rebuild the linux server to start with before I even consider looking at building the linux client. I'm wondering if it will be even possible to do this cleanly. Do any of you know of another HL1 Mod that has realised a client.so since Valve released a native linux client for steam? I'm worried that there are some updates to the SDK that haven't been released to the public yet.
I might send a mail off to some of our old contacts at valve.. but last time we spoke the dinosaurs roamed the earth.. so I doubt they'll even recognise my name.
I guess the other option is to build a clean windows client.dll. NS makes some direct windows32 calls to do some stuff to files and sockets etc, and back when we did the work to get NS on linux we rewrote all that stuff to use the Steam equivalent. I'm guessing that if I rebuild for windows with no direct calls to win32 that you guys will have a lot easier a time getting ns to run in a wrapper.
It looks like they replaced Winsock with libpthreads, and it also looks like you guys used winsock2 (I honestly don't know how significant that is). They also use SDL instead of GDI it appears for both Windows and Linux now.
The whole winelib thing still confuses me a bit, though.
The other possibility I see is you Open Source everything preferably on http://www.github.com so that the community can help fix up the build and whatever else is broken.
I don't think any mods have been released with Linux/Mac support yet.
Apparently an updated SDK will be released once everything is more stable. It didn't say whether this SDK update would include Mac/Linux support but I'd assume it would.
I can't make an progress until we resurrect the original NS1 sources from source control. Looking at that repo anyway, it is just HL SDK 2.3, which is years old and doesn't provide anything for building on the new platforms anyway.
Hey there,
Is there any development in the case of porting the mod into GNU/Linux and OS X? I have applied the installation which was proposed in Reddit and as Jan 2014 the results are more or less the same as the beginning of last year.
- I extracted the mod files via WINE/PlayOnLinux.
- I moved the "ns" folder into "~/.local/share/Steam/SteamApps/common/Half-Life" folder.
- I copied the "ns_i386.so" file to "~/.local/share/Steam/SteamApps/common/Half-Life/valve/dlls" from "~/.local/share/Steam/SteamApps/common/Half-Life/ns/dlls".
The mod appears on Steam and is successfully launched. However; it lacks both Marine and Alien models; there's no crosshair; weapon and malee attack sounds are missing; marine weapons cannot be reloaded...
In short, the mod works but not in playable level.
I use Linux Mint 13 32 bit and here is the version output of the Half-Life that I have:
That would be wonderful if I can play my favourite Half-Life mod after many years. I own Natural Selection 2 but my computer is 7 years old and can never run it. I have no plan to return unreliable Windows and not in a condition to buy a new computer in near future...
So, is that still not possible to port the mod for GNU/Linux and OS X?
Thank you.