Commit d9da7e24 authored by Lyberta's avatar Lyberta

Merge branch 'master' into Lyberta/d0BuildFix

parents 379298ba 224e5590
......@@ -13,12 +13,12 @@ function(subproject id name)
endif ()
endfunction()
subproject(DAEMON daemon)
subproject(PKI d0_blind_id)
subproject(DAEMON daemon)
subproject(DP darkplaces)
subproject(DATA data/xonotic-data.pk3dir)
subproject(QCC gmqcc)
subproject(RADIANT netradiant)
subproject(DATA data/xonotic-data.pk3dir)
if (DOWNLOAD_MAPS)
add_custom_target(update-maps ALL
......
......@@ -57,14 +57,13 @@ data/data/wazat1.mapinfo for me. The file may look like:
_diameter 1966.839355
_spawnpoints 5
has weapons
cdtrack 5
cdtrack 5
gametype dm // defaults: timelimit=20 pointlimit=30 leadlimit=0
gametype dom // defaults: timelimit=20 pointlimit=200 teams=2 leadlimit=0
gametype lms // defaults: timelimit=20 lives=9 leadlimit=0
gametype arena // defaults: timelimit=20 pointlimit=10 leadlimit=0
As I see, the menu autodetected that my map may be suitable for deathmatch,
domination, last man standing and arena. But I want the map to be played in
domination, last man standing and keepaway. But I want the map to be played in
domination, deathmatch, team deathmatch only, and I also want different
timelimits/fraglimits, so I will change the "gametype" lines to:
......@@ -98,7 +97,6 @@ Team Deathmatch | gametype tdm [timelimit=...] [pointlimit=...] [teams=...] [lea
Domination | gametype dom [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...] | 2, 3, or 4 teams, only if map has no dom_team ents
CTF | gametype ctf [timelimit=...] [caplimit=...] [leadlimit=...] |
LMS | gametype lms [timelimit=...] [lives=...] [leadlimit=...] |
Arena | gametype arena [timelimit=...] [pointlinit=...] [leadlimit=...] |
Key Hunt | gametype kh [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...] | 2, 3, or 4 teams
Assault | gametype as [timelimit=...] | never uses points
Onslaught | gametype ons [timelimit=...] | never uses points
......
# nix-shell -A shell
# --argstr cc clang
{
nixpkgs ? <nixpkgs>,
pkgs ? (import nixpkgs) {},
cc ? null
}:
with pkgs;
let
VERSION = "0.8.2";
cmake = pkgs.cmake_2_8;
targets = rec {
xonotic = mkDerivation { pki = true; dp = true; data = true; } rec {
name = "xonotic-${version}";
version = VERSION;
src = lib.sourceFilesBySuffices ./. [
".txt" ".cmake" ".in"
".c" ".cpp" ".h"
".inc" ".def"
".qc" ".qh"
".sh"
];
env = {
QCC = "${gmqcc}/bin/gmqcc";
};
nativeBuildInputs = [
cmake # for building
git # for versioning
# unzip # for downloading maps
];
cmakeFlags = [
"-DDOWNLOAD_MAPS=0"
];
buildInputs = [
openssl # for d0_blind_id
SDL2 # for darkplaces
];
runtimeInputs = [
zlib
curl
libjpeg
libpng
freetype
libogg
libtheora
libvorbis
];
installPhase = ''
mkdir $out
exe=darkplaces/darkplaces
rpath=$(patchelf --print-rpath $exe)
rpath_firstparty=$out/d0_blind_id
rpath_thirdparty=${lib.makeLibraryPath runtimeInputs}
rpath=''${rpath:+$rpath:}$rpath_firstparty:$rpath_thirdparty
patchelf --set-rpath $rpath $exe
cp -r . $out
'';
dontPatchELF = true;
};
gmqcc = mkDerivation { qcc = true; } rec {
name = "gmqcc-${version}";
version = "xonotic-${VERSION}";
src = ./gmqcc;
installPhase = ''
mkdir -p $out/bin
cp gmqcc $out/bin
'';
};
netradiant = mkDerivation { radiant = true; } rec {
name = "netradiant-${version}";
version = VERSION;
src = ./netradiant;
nativeBuildInputs = [
cmake # for building
git # for versioning
];
cmakeFlags = [
"-DDOWNLOAD_MAPS=0"
];
buildInputs = [
pkgconfig
glib
pcre
libxml2
ncurses
libjpeg
libpng
minizip
mesa
xorg.libXt
xorg.libXmu
xorg.libSM
xorg.libICE
xorg.libpthreadstubs
xorg.libXdmcp
gnome3.gtk
gnome2.gtk
gnome2.gtkglext
];
};
};
stdenv = if (cc != null) then overrideCC pkgs.stdenv pkgs."${cc}" else pkgs.stdenv;
mkEnableTargets = args: {
XON_NO_PKI = !args?pki;
XON_NO_DP = !args?dp;
XON_NO_DATA = !args?data;
XON_NO_QCC = !args?qcc;
XON_NO_RADIANT = !args?radiant;
};
mkDerivation = targets: {env ? {}, shellHook ? "", runtimeInputs ? [], ...}@args:
stdenv.mkDerivation (
(mkEnableTargets targets)
// { enableParallelBuilding = true; }
// (removeAttrs args ["env" "shellHook" "runtimeInputs"]) # passthru
// env
// {
shellHook = ''
${shellHook}
${lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "export ${n}=${v}") env)}
export LD_LIBRARY_PATH=''${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${lib.makeLibraryPath runtimeInputs}
'';
}
);
shell = let inputs = (lib.mapAttrsToList (n: v: v) targets); in stdenv.mkDerivation (rec {
name = "xon-shell";
XON_NO_DAEMON = true;
nativeBuildInputs = builtins.map (it: it.nativeBuildInputs) inputs;
buildInputs = builtins.map (it: it.buildInputs) inputs;
shellHook = builtins.map (it: it.shellHook) (builtins.filter (it: it?shellHook) inputs);
});
in { inherit shell; } // targets
{ pkgs ? import <nixpkgs> {}, cc ? null }@args:
pkgs.callPackage ./derivation.nix args
This diff is collapsed.
......@@ -29,6 +29,8 @@ B 108.61.164.188:
B 85.25.139.30:
B 51.15.46.239:
B 163.172.104.191:
B 89.163.144.198:
B 51.38.113.134:
# Emergency packs. Specify as:
# E http://packurl/pack.pk3 file-in-pack.txt
......
......@@ -16,6 +16,7 @@ git reset --hard origin/master
# Mode parameter:
# po: just update the translations.
# all: also update the translation template. Will create a new commit every time, as the date header changes.
export BATCH=true
sh tx.sh po
if [ x"`git ls-files -dm`" = x".tx/merge-base" ]; then
......
......@@ -26,7 +26,7 @@ case "$cmd" in
cleandp=false
cleanqcc=false
cleanqc=false
compiled0=false
compiled0=
debug=debug
if [ -z "$CC" ]; then
export CC="gcc"
......@@ -38,6 +38,10 @@ case "$cmd" in
compiled0=true
shift
;;
-1)
compiled0=false
shift
;;
-c)
cleand0=true
cleandp=true
......@@ -183,7 +187,10 @@ case "$cmd" in
rm -f conftest
verbose cd "$d0/d0_blind_id"
if ! $compiled0; then
if [ -z "$compiled0" ]; then
# In doubt, compile.
compiled0=true
# compilation of crypto library failed
# use binaries then, if we can...
mkdir -p .libs
......@@ -191,15 +198,16 @@ case "$cmd" in
verbose cp "$d0/misc/buildfiles/win32/libd0_blind_id"-* .libs/
verbose cp "$d0/misc/buildfiles/win32/libd0_rijndael"-* .libs/
verbose cp "$d0/misc/buildfiles/win32/libgmp"-* .libs/
compiled0=false
else
case "`uname`" in
Darwin)
verbose cp "$d0/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_blind_id".* .libs/
verbose cp "$d0/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_rijndael".* .libs/
compiled0=false
;;
*)
msg "Always need to compile libd0_blind_id on `uname`."
compiled0=true
;;
esac
fi
......
......@@ -164,7 +164,8 @@ buildthemap()
blobhash=$4
commithash=$5
if lwp-request -m HEAD "$url$M-$blobhash.pk3"; then
continue
# already compiled
return
fi
git reset --hard
......@@ -237,13 +238,19 @@ screenshotthemap()
M=$3
blobhash=$4
commithash=$5
if ! [ -f "$bspdir/$M-$blobhash.pk3" ]; then
# not downloaded yet
return
fi
if lwp-request -m HEAD "$url$M-$blobhash/$M-000000.jpg"; then
continue
# already done
return
fi
if ! unzip -l "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp"; then
# no BSP file
continue
return
fi
rm -rf ~/.xonotic/data
......@@ -304,14 +311,12 @@ getthemap()
if ! curl -o "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then
rm -f "$bspdir/$M-$blobhash.pk3"
echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet"
getthemap_fail=true
return 0
fi
fi
if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then
rm -f "$bspdir/$M-$blobhash.pk3"
echo "WARNING: could not download $url$M-$blobhash.pk3, invalid zip file"
getthemap_fail=true
return 0
fi
}
......@@ -376,13 +381,17 @@ case "$1" in
git clean -xfd
git checkout -f "$HASH"
getthemap_fail=false
rundownload
allmaps "$HASH" screenshotthemap "$REFNAME" "$url_http"
if $getthemap_fail; then
# If any map fetch failed, we've skipped them and thus need to try again later.
# Note that we're not going to re-screenshot maps because of this as we'll check for uploaded screenshots first.
continue
fi
allmaps "$HASH" screenshotthemap "$REFNAME" "$url_http"
touch "$screenshot_cachedir/$HASH"
done
git checkout -f master
......
#!/bin/sh
set -euo pipefail
cd ${0%/*}
export VERSION_data_xonotic_data_pk3dir=$(cd $PWD/data/xonotic-data.pk3dir && git describe --tags --dirty --long --always)
exec nix-build $@
{
nixpkgs ? <nixpkgs>,
systems ? [ "i686-linux" "x86_64-linux" ],
}:
{
xonotic = (import <nixpkgs/lib>).genAttrs systems (system:
import ./default.nix {
pkgs = import nixpkgs { inherit system; };
}
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment