Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
BodgeMaster | 2609342198 | |
BodgeMaster | cac0fd47ef |
10
README.md
10
README.md
|
@ -1,3 +1,13 @@
|
||||||
|
# WARNING: This is the Windows branch.
|
||||||
|
|
||||||
|
- Do NOT work on this branch. It is intended for building only.
|
||||||
|
- Do NOT merge back to master. This branch contains changes that would break the master branch.
|
||||||
|
- Original commits on this branch should only ever be made regarding fixes
|
||||||
|
to the build system or otherwise necessary changes to get FOSS-VG to build
|
||||||
|
and run on Windows.
|
||||||
|
- This branch will only be maintained as needed.
|
||||||
|
|
||||||
|
|
||||||
# FOSS-VG (FOSS Voxel Generator)
|
# FOSS-VG (FOSS Voxel Generator)
|
||||||
|
|
||||||
This is a WIP Minecraft clone.
|
This is a WIP Minecraft clone.
|
||||||
|
|
|
@ -92,23 +92,10 @@ echo "done"
|
||||||
|
|
||||||
echo ">>> Building sockpp... "
|
echo ">>> Building sockpp... "
|
||||||
pushd dependencies/sockpp-0.7.1/ >/dev/null 2>&1
|
pushd dependencies/sockpp-0.7.1/ >/dev/null 2>&1
|
||||||
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
|
|
||||||
echo "Adding Cygwin workaound for building sockpp."
|
|
||||||
|
|
||||||
for FILE in "$(find ./ -type f)"; do
|
cmake -G "MinGW Makefiles" -Bbuild .
|
||||||
sed -i -e 's/_WIN32/PLEASE_DO_NOT_DEFINE_THIS_MACRO/g' $FILE
|
|
||||||
done
|
|
||||||
mv ./include/sockpp/socket.h ./include/sockpp/socket.h_original
|
|
||||||
echo '#include <sys/time.h>
|
|
||||||
#include "socket.h_original"' > ./include/sockpp/socket.h
|
|
||||||
sed -i -e 's/SO_REUSEPORT/SO_REUSEADDR/g' ./src/acceptor.cpp
|
|
||||||
|
|
||||||
CFLAGS="-D_XOPEN_SOURCE=700" CXXFLAGS="-D_XOPEN_SOURCE=700" cmake -Bbuild
|
|
||||||
CFLAGS="-D_XOPEN_SOURCE=700" CXXFLAGS="-D_XOPEN_SOURCE=700" cmake --build build
|
|
||||||
else
|
|
||||||
cmake -Bbuild .
|
|
||||||
cmake --build build
|
cmake --build build
|
||||||
fi
|
|
||||||
popd >/dev/null 2>&1
|
popd >/dev/null 2>&1
|
||||||
|
|
||||||
echo ">>> Cleaning up..."
|
echo ">>> Cleaning up..."
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# version 3 along with this program.
|
# version 3 along with this program.
|
||||||
# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html
|
# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||||
|
|
||||||
echo ">>> Loading shell environment for FOSS-VG development..."
|
echo ">>> Loading Windows-specific shell environment for FOSS-VG development..."
|
||||||
|
|
||||||
export PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
|
export PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
echo "Project base directory is $PROJECT_BASE_DIR"
|
echo "Project base directory is $PROJECT_BASE_DIR"
|
||||||
|
@ -42,18 +42,12 @@ function build {
|
||||||
echo "Added aliases and functions."
|
echo "Added aliases and functions."
|
||||||
|
|
||||||
export PATH="$PROJECT_BASE_DIR/bin:$PROJECT_BASE_DIR/bin/tools:$PROJECT_BASE_DIR/scripts/tools:$PATH"
|
export PATH="$PROJECT_BASE_DIR/bin:$PROJECT_BASE_DIR/bin/tools:$PROJECT_BASE_DIR/scripts/tools:$PATH"
|
||||||
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
|
|
||||||
echo "Adding Cygwin workaound for library path."
|
|
||||||
export PATH="$PROJECT_BASE_DIR/bin/lib:$PATH"
|
|
||||||
fi
|
|
||||||
echo "PATH is $PATH"
|
|
||||||
|
|
||||||
if [ -z "$LD_LIBRARY_PATH" ]; then
|
# Windows workaround:
|
||||||
export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib
|
# Windows doesn't have LD_LIBRARY_PATH and searches for libraries on PATH instead.
|
||||||
else
|
export PATH="$PROJECT_BASE_DIR/bin/lib:$PATH"
|
||||||
export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib:"$LD_LIBRARY_PATH"
|
|
||||||
fi
|
echo "PATH is $PATH"
|
||||||
echo "LD_LIBRARY_PATH is $LD_LIBRARY_PATH"
|
|
||||||
|
|
||||||
echo ">>> Checking for dependencies..."
|
echo ">>> Checking for dependencies..."
|
||||||
MISSING_DEPS=0
|
MISSING_DEPS=0
|
||||||
|
|
Loading…
Reference in New Issue