Moderators: sparcdr, torhu, Tequila
I thought it would be cool if I could host a 24/7 machine that sips around 3-4W totalto provide a low-powered, always-on Smokin' Guns server
Munny Shot wrote:I know from reading around that SG runs on top of ioquake. However I am not a coder, so I don't know how to differentiate between the vanilla ioquake engine and the Smokin Guns specific code. Is it, for example, a simple matter of compiling the CPU specific root binaries and then copying the .cfg and .pk3 in the 'baseq3' and 'smokinguns' subdirectories?
Cheers.
diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h
index 0fea8e8..e79e9a1 100644
--- a/code/qcommon/q_shared.h
+++ b/code/qcommon/q_shared.h
@@ -205,6 +205,11 @@ typedef int intptr_t;
#include <ctype.h>
#include <limits.h>
+#ifdef VCMODS_REPLACETRIG
+#define sin(f) sinf(f)
+#define cos(f) cosf(f)
+#endif
+
#ifdef _MSC_VER
#include <io.h>
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update 192
sudo apt-get install git gcc build-essential
mkdir ~/src && cd ~/src
git clone git://github.com/smokin-guns/SmokinGuns.git smokinguns
cd smokinguns
#!/bin/bash
# this script builds ioq3ded
# invoke with ./build.sh
# or ./build.sh clean to clean before build
# directory containing the ARM shared libraries (rootfs, lib/ of SD card)
ARM_LIBS=/opt/vc/lib
# directory to find khronos linux make files (with include/ containing
# headers! Make needs them.)
INCLUDES="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads"
# prefix of arm cross compiler installed
#CROSS_COMPILE=bcm2708-
# clean
if [ $# -ge 1 ] && [ $1 = clean ]; then
echo "clean build"
rm -rf build/*
fi
make -j4 -f Makefile ARCH=arm \
CC=""$CROSS_COMPILE"gcc" BUILD_CLIENT=0 BUILD_GAME_QVM=0 \
CFLAGS="-DVCMODS_REPLACETRIG $INCLUDES" \
LDFLAGS="-L"$ARM_LIBS" -lvchostif -lvmcs_rpc_client -lvcfiled_check -lbcm_host -lkhrn_static -lvchiq_arm -lvcos -lrt"
exit 0
LD build/release-linux-arm/smokinguns_dedicated.arm
/usr/bin/ld: cannot find -lvchostif
/usr/bin/ld: cannot find -lvmcs_rpc_client
/usr/bin/ld: cannot find -lvcfiled_check
/usr/bin/ld: cannot find -lbcm_host
/usr/bin/ld: cannot find -lkhrn_static
/usr/bin/ld: cannot find -lvchiq_arm
/usr/bin/ld: cannot find -lvcos
collect2: ld returned 1 exit status
make[2]: *** [build/release-linux-arm/smokinguns_dedicated.arm] Error 1
make[2]: Leaving directory `/home/pi/src/smokinguns'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/pi/src/smokinguns'
make: *** [release] Error 2
pi@raspberrypi ~/src/smokinguns $
pi@raspberrypi ~/src/smokinguns $ ./build/release-linux-arm/smokinguns_dedicated.arm
Smokin' Guns 1.1 linux-arm Nov 14 2012
----- FS_Startup -----
Current search path:
/home/pi/.smokinguns/smokinguns
./build/release-linux-arm/smokinguns
/home/pi/.smokinguns/baseq3
./build/release-linux-arm/baseq3
----------------------
0 files in pk3 files
Couldn't load default.cfg
pi@raspberrypi ~/src/smokinguns $
Munny Shot wrote:Does SG expect the same files and configs as expressed in the Raspbian Quake 3 guide, or are there some subtle differences (I'm guessing the latter)?