# try to create a hardlink
if ln -f "$release_src/.git/HEAD" "$release_dst/.hardlink-test"; then
rm -f "$release_dst/.hardlink-test"
- {
- verbose cd "$release_src"
- git ls-files HEAD -- "$@"
- } | {
+ git -C "$release_src" ls-files HEAD -- "$@" |
while IFS= read -r F; do
case "$F" in */*) mkdir -p "$release_dst/${F%/*}" ;; esac
verbose ln -f "$release_src/$F" "$release_dst/$F"
done
- }
+ git -C "$release_src" ls-tree -rd --name-only HEAD -- "$@" |
+ while IFS= read -r D; do
+ touch -cr "$release_src/$D" "$release_dst/$D"
+ done
else
{
verbose cd "$release_src"
verbose date +%Y%m%d > Xonotic/stamp.txt
verbose date +%Y%m%d > Xonotic/pk3stamp.txt
fi
- release_git_extract_dir "." "Xonotic" Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile misc/buildfiles key_0.d0pk COPYING GPL-2 GPL-3
+ release_git_extract_dir "." "Xonotic" Docs misc/buildfiles/osx misc/logos misc/tools server xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile key_0.d0pk COPYING GPL-2 GPL-3
(
verbose cd Xonotic
verbose mkdir data source source/darkplaces source/gmqcc source/d0_blind_id mapping
- verbose rm -rf misc/builddeps
- #verbose mv bin32/SDL.dll . || true # Leftover?
-
- # We're going to be building these later
- #verbose mv misc/buildfiles/win32 bin32 || true
- #verbose mv misc/buildfiles/win64 bin64 || true
-
verbose mv misc/buildfiles/osx/* . || true
verbose rm -rf misc/buildfiles
- verbose rm -rf misc/pki
+ verbose rm -rf misc/tools/all
)
release_git_extract_dir "darkplaces" "Xonotic/source/darkplaces" .
release_git_extract_dir "gmqcc" "Xonotic/source/gmqcc" .
release_git_extract_dir "data/xonotic-data.pk3dir" "Xonotic/source" qcsrc Makefile
release_git_extract_dir "d0_blind_id" "Xonotic/source/d0_blind_id" .
- (
- verbose cd Xonotic/source/d0_blind_id
- verbose sh autogen.sh
- )
+# bones_was_here: the main Makefile runs autogen.sh (and configure) when necessary
+# (
+# verbose cd Xonotic/source/d0_blind_id
+# verbose sh autogen.sh
+# )
rm -f Xonotic/key_15.d0pk
(
verbose cd Xonotic/mapping
srcdir=$5
depsdir=$6
targetfiles=$7
+ schroot=
set -x
if [ -z "$targetfiles" ]; then
exit
exit
;;
esac
- case " $HOSTS_THAT_ARE_MYSELF " in
+ case " $HOSTS_THAT_ARE_SCHROOT " in
+ *\ $host\ *)
+ schroot="schroot -c $host --"
+ ;;
+ esac
+ case " $HOSTS_THAT_ARE_MYSELF $HOSTS_THAT_ARE_SCHROOT " in
*\ $host\ *)
verbose rsync --delete -zLvaSHP "$srcdir"/ "$buildpath/"
verbose rsync --delete -zLvaSHP misc/logos/icons_ico/xonotic.ico "$buildpath"/darkplaces.ico
verbose rsync --delete -zLvaSHP "$depsdir"/*/ "$buildpath.deps/"
verbose ln -snf "$buildpath.deps" "$buildpath/.deps"
- verbose eval make -C "$buildpath" clean $maketargets $makeflags
+ verbose eval $schroot make -C "$buildpath" clean $maketargets $makeflags
for f in $targetfiles; do
verbose mv "$buildpath/${f%:*}" "${f##*:}" || true
done
mkdir -p "$targetdir"
(
cd "misc/buildsrc"
+ verbose ./dlls.sh clean "$buildpath"
verbose ./dlls.sh all "$buildpath" "$arch"
)
verbose cp -v $buildpath/out/$arch/* "$targetdir"
#verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false
#$good
verbose "$SELF" release-compile win32 \
- 'STRIP=: D3D=1 DP_MAKE_TARGET=mingw WIN32RELEASE=1 CC="i686-w64-mingw32-gcc -static -flto=auto -mstackrealign -Wl,--dynamicbase -Wl,--nxcompat -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" WINDRES="i686-w64-mingw32-windres" SDL_CONFIG="../../../.deps/bin/sdl2-config" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=dlopen' \
- release 'darkplaces.exe:Xonotic/xonotic-x86-wgl.exe darkplaces-sdl.exe:Xonotic/xonotic-x86.exe darkplaces-dedicated.exe:Xonotic/xonotic-x86-dedicated.exe'
+ 'DP_MAKE_TARGET=mingw WIN32RELEASE=1 CC="i686-w64-mingw32-gcc -static -flto=auto -mstackrealign -Wl,--dynamicbase -Wl,--nxcompat -I../../../.deps/include -L../../../.deps/lib" WINDRES="i686-w64-mingw32-windres" SDL_CONFIG="../../../.deps/bin/sdl2-config" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=dlopen' \
+ release 'darkplaces-sdl.exe:Xonotic/xonotic-x86.exe darkplaces-dedicated.exe:Xonotic/xonotic-x86-dedicated.exe'
;;
release-engine-win64)
release_common
#verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false
#$good
verbose "$SELF" release-compile win64 \
- 'STRIP=: D3D=1 DP_MAKE_TARGET=mingw WIN64RELEASE=1 CC="x86_64-w64-mingw32-gcc -static -flto=auto -Wl,--dynamicbase -Wl,--nxcompat -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" WINDRES="x86_64-w64-mingw32-windres" SDL_CONFIG="../../../.deps/bin/sdl2-config" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=dlopen' \
- release 'darkplaces.exe:Xonotic/xonotic-wgl.exe darkplaces-sdl.exe:Xonotic/xonotic.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated.exe'
+ 'DP_MAKE_TARGET=mingw WIN64RELEASE=1 CC="x86_64-w64-mingw32-gcc -static -flto=auto -Wl,--dynamicbase -Wl,--nxcompat -I../../../.deps/include -L../../../.deps/lib" WINDRES="x86_64-w64-mingw32-windres" SDL_CONFIG="../../../.deps/bin/sdl2-config" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=dlopen' \
+ release 'darkplaces-sdl.exe:Xonotic/xonotic.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated.exe'
;;
release-engine-osx)
release_common
#verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || good=false
#$good
# Note: travis build script also had SDLCONFIG_MACOSX* flags; need to check if they're still needed with osxcross.
+ # Note: Mac bins cannot be stripped by the standard tool.
verbose "$SELF" release-compile osx \
- 'STRIP=: DP_MAKE_TARGET=macosx CC="$HOME/osxcross/out/bin/o64-clang -flto -arch x86_64 -mmacosx-version-min=10.6 -Wl,-rpath -Wl,@loader_path/../Frameworks -Wl,-rpath -Wl,@loader_path -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" SDLCONFIG_MACOSXCFLAGS="-I../../../.deps/SDL2.framework/Headers" SDLCONFIG_MACOSXLIBS="-F../../../.deps -framework SDL2 -framework Cocoa -I../../../.deps/SDL2.framework/Headers" SDLCONFIG_MACOSXSTATICLIBS="-F../../../.deps -framework SDL2 -framework Cocoa -I../../../.deps/SDL2.framework/Headers" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=shared' \
- 'sv-release sdl-release' 'darkplaces-sdl:Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin darkplaces-dedicated:Xonotic/xonotic-osx-dedicated'
+ 'STRIP=: DP_MAKE_TARGET=macosx PATH="$HOME/osxcross/out/bin:$PATH" CC="$HOME/osxcross/out/bin/o64-clang -flto -arch x86_64 -mmacosx-version-min=10.6 -Wl,-rpath -Wl,@loader_path/../Frameworks -Wl,-rpath -Wl,@loader_path -I../../../.deps/include -L../../../.deps/lib" SDLCONFIG_MACOSXCFLAGS="-I../../../.deps/SDL2.framework/Headers" SDLCONFIG_MACOSXLIBS="-F../../../.deps -framework SDL2 -framework Cocoa -I../../../.deps/SDL2.framework/Headers" SDLCONFIG_MACOSXSTATICLIBS="-F../../../.deps -framework SDL2 -framework Cocoa -I../../../.deps/SDL2.framework/Headers" DP_LINK_CRYPTO=dlopen DP_LINK_CRYPTO_RIJNDAEL=dlopen DP_LINK_JPEG=dlopen DP_LINK_ODE=dlopen DP_LINK_ZLIB=shared' \
+ release 'darkplaces-sdl:Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin darkplaces-dedicated:Xonotic/xonotic-osx-dedicated'
;;
release-engine-linux64)
release_common
#verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false
#$good
verbose "$SELF" release-compile linux64 \
- 'STRIP=: CC="gcc -m64 -flto=auto -I../../../.deps/include -L../../../.deps/lib -DSUPPORTIPV6" DP_LINK_CRYPTO=shared LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_CRYPTO_RIJNDAEL=shared DP_LINK_JPEG=shared LIB_JPEG=/usr/lib/x86_64-linux-gnu/libjpeg.a DP_LINK_ODE=shared CFLAGS_ODE="-DUSEODE -DLINK_TO_LIBODE -DdDOUBLE" LIB_ODE="../../../.deps/lib/libode.a -lstdc++ -pthread" DP_LINK_ZLIB=shared' \
- release 'darkplaces-glx:Xonotic/xonotic-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
+ 'CC="gcc -m64 -flto=auto -I../../../.deps/include -L../../../.deps/lib" DP_LINK_CRYPTO=shared LIB_CRYPTO="../../../.deps/lib/libd0_blind_id.a ../../../.deps/lib/libgmp.a" DP_LINK_CRYPTO_RIJNDAEL=shared DP_LINK_JPEG=shared LIB_JPEG=/usr/lib/x86_64-linux-gnu/libjpeg.a DP_LINK_ODE=shared CFLAGS_ODE="-DUSEODE -DLINK_TO_LIBODE -DdDOUBLE" LIB_ODE="../../../.deps/lib/libode.a -lstdc++ -pthread" DP_LINK_ZLIB=shared' \
+ release 'darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
;;
release-engine)
release_common
release_common
stamp=`cat Xonotic/stamp.txt`
pk3stamp=`cat Xonotic/pk3stamp.txt`
- # exe and dll files do not need +x, so this makes them eligible for 7zip compression too
- chmod a-x Xonotic/*.exe Xonotic/*.dll || true
+ # exe and dll files do not need +x
+ chmod a-x Xonotic/*.exe Xonotic/*.dll Xonotic/bin64/*.dll Xonotic/bin32/*.dll || true
# build the archives
verbose mkzipr Xonotic-$stamp-enginesource.zip \
Xonotic/Makefile \