FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
551 stars 107 forks source link

Is there a release or a way / instructions to build for raspberry pi? #329

Closed Lion4K closed 6 years ago

Lion4K commented 6 years ago

I really wanna play half life and or counter strike on the pi.

Thanks and sorry if this is a bad place to ask this.

a1batross commented 6 years ago

As far as I know, there is an experimental GL driver for RPi. You can just compile default Linux version of engine and HLSDK(see hlsdk-xash3d repo). It's a easiest way, which will also give you some free framerate. :) I found a tutorial here: https://eltechs.com/how-to-enable-opengl-on-raspberry-pi/

If you want to use GLES, just pass -DXASH_GLES=1 to CMake while compiling engine and use glshim or nanogl, as GL to GLES translator.

Lion4K commented 6 years ago

I see, I'll give it a shot. Also I'm using retropie, it's a dedicated gaming distro, I believe that it's already enabled on the drivers.

a1batross commented 6 years ago

Any success here? :)

Lion4K commented 6 years ago

not really no, my board is dead, idk what i did. this is gonna wait till i have money to buy a new one, i'm unemployed too, so, it might take some while. :'-(

a1batross commented 6 years ago

Woah. I hope it's not because you have enabled extended driver?

Lion4K commented 6 years ago

No, I believe it was a power surge. Bc I tested the PSU with other device and the PSU was dead too.

Lion4K commented 6 years ago

And I belive the experimental GL is already turned on in those gaming distros such as retropie.

Lion4K commented 6 years ago

I didn't even managed to test any of this as I purchased the board, downloaded that image, used for a short while, had to go on a trip, but I forgot to take it out of the wall socket. when I got home it was already dead.

a1batross commented 6 years ago

It's sad. :(

Lion4K commented 6 years ago

yeah. Also, I just realized, I don't make any idea on how to compile anything to RPI.

The most I had compiled was once a Minecraft plugin from a github, and thats it.

Should I use Git for Windows to do this? Gonna try the RPI emulator.

a1batross commented 6 years ago

Compiling is easy.

Take a look at our wiki.

But if you want crosscompile from PC to RPi, you need to set up compilers for CMake manually. Look at CMake documentation.

Lion4K commented 6 years ago

so if I boot up to raspbian I should be able to compile just following the wiki?

mittorn commented 6 years ago

If raspbian supports GL and has development packages (such as libsdl2-dev), you may just build following the wiki. (I hope, cmake scripts will not add -m32 to cflags on arm? Otherwise build will fail)

a1batross, Try add nanogl/wes/regal support to cmake if still not. Something like -DWITH_NANOGL=/path/to/nanogl

Lion4K commented 6 years ago

My version does not even have the GL experimental option. lol. image

a1batross commented 6 years ago

@mittorn yeah, I forgot to add this case.

I recommend to not do it in QEMU. I don't think QEMU need same drivers.

mittorn commented 6 years ago

And SDL2 need GLES support too when using GLES. If SDL2 built with enabled desktop gl, it will not be possible to use GLES with it.

Lion4K commented 6 years ago

OK, so just to clarify.

Im at this part:

On 32 bit systems:

cmake -DHL_SDK_DIR=../hlsdk -DXASH_SDL=yes -DXASH_VGUI=yes ../ && make On 64 bit systems:

cmake -DHL_SDK_DIR=../hlsdk -DXASH_SDL=yes -DXASH_VGUI=yes -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m

on the RPI emulator. should I choose what?

Lion4K commented 6 years ago

using CMAKE btw, i installed it via apt-get

Lion4K commented 6 years ago

I got an Error using thr 32bit line.

http://pastebin.com/H6wMDc4Q

a1batross commented 6 years ago

Install libsdl2-dev.

I also recommend building from 0.19.x branch, it's a future 0.19.1 version. You can change branch by running

$ git checkout 0.19.x
Lion4K commented 6 years ago

inside the xash3d folder?

Lion4K commented 6 years ago

will libsdl1.2debian cut it? theres also a ton of others there but no libsdl2-dev

a1batross commented 6 years ago

Yes, run git inside xash3d folder.

sdl1.2 is a legacy version. You need sdl2. Use apt search to find sdl2 development package.

Lion4K commented 6 years ago

there is no sdl2 there. only libwsdl2-java a stripped down axis2 source bundle situable for running WSDL2C Whatever that ^ means lol

a1batross commented 6 years ago

I dunno why it isn't here. Try to use google on how to install SDL2 on your RPi distro.

Lion4K commented 6 years ago

Gonna try after the holidays. Have a nice xmas folks!!

a1batross commented 6 years ago

Installing on RPi should be like for other any Linux distro. RPi isn't special.