xtreme8000 / BetterSpades

BetterSpades, an Ace of Spades client targeted at low end systems (GL/ES 1.1). Runs on your grandmother's rig!
https://aos.party/jenkins/job/BetterSpades/
GNU General Public License v3.0
243 stars 40 forks source link

Help #118

Closed humanopi closed 9 months ago

humanopi commented 3 years ago

how to build on linux? im using a raspberry pi sorry if this is a common question, but i cant understand how to compile on linux

xtreme8000 commented 3 years ago

If you don't have a basic building setup yet, install these:

sudo apt install build-essential git cmake

First build libdeflate like this:

git clone https://github.com/ebiggers/libdeflate
cd libdeflate
make

Now clone this project and install libraries:

git clone https://github.com/xtreme8000/BetterSpades
sudo apt install libgl1-mesa libgl1-mesa-dev libopenal1 libopenal-dev libglfw-dev libenet-dev libglew-dev

Copy libdeflate/libdeflate.a to BetterSpades/deps Then in BetterSpades/:

cd build
cmake ..
make -j 4

This should leave the finished binary as BetterSpades/build/BetterSpades/client

Note: this way of building only works on a Raspberry Pi with full OpenGL driver enabled (see raspi-config).

humanopi commented 3 years ago

-- The C compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Compiler is -- Build type is -- Downloading ini.c -- Downloaded ini.c successfully -- Downloading ini.h -- Downloaded ini.h successfully -- Downloading lodepng/lodepng.c -- Downloaded lodepng/lodepng.c successfully -- Downloading lodepng/lodepng.h -- Downloaded lodepng/lodepng.h successfully -- Downloading dr_wav.c CMake Error at src/CMakeLists.txt:11 (message): Failed to download dr_wav.c ("Couldn't resolve host name") Call Stack (most recent call first): src/CMakeLists.txt:20 (download_file_if_it_doesnt_exist)

-- Configuring incomplete, errors occurred! See also "/home/pi/libdeflate/BetterSpades/build/CMakeFiles/CMakeOutput.log".

humanopi commented 3 years ago

i got this erro

xtreme8000 commented 3 years ago

Looks like your internet connection is unstable. Maybe try downloading dr_wav.h by yourself and place it in BetterSpades/src/dr_wav.c. Note that it has to be renamed to dr_wav.c.

humanopi commented 3 years ago

it installed, but now im getting another errror:

pi@raspberrypi:~/libdeflate/BetterSpades/build $ cmake .. -- Compiler is -- Build type is CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find glfw3 (missing: glfw3_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) cmake/Modules/Findglfw3.cmake:32 (find_package_handle_standard_args) src/CMakeLists.txt:120 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/pi/libdeflate/BetterSpades/build/CMakeFiles/CMakeOutput.log".

xtreme8000 commented 3 years ago

did you sudo apt install libglfw-dev?

ghost commented 3 years ago

@xtreme8000 can you release a linux x86_64 binary please. Im also having trouble building it from AUR

nonperforming commented 2 years ago

Stale issue - @xtreme8000 close issue? (I have success with building BetterSpades on Linux as well if needed)