Compare commits

...

10 Commits

Author SHA1 Message Date
BodgeMaster 4c651d1b6f Merge branch 'master' into cygwin 2023-01-09 21:54:23 +01:00
Shwoomple e627714b44 lib/file: Implement cut function. 2022-11-12 06:36:04 +01:00
Shwoomple 42b7e40f9d lib/file:Fix issue #71 (Out of Bounds access) 2022-11-12 06:36:04 +01:00
BodgeMaster 78880e1c20 setupenv: Fix spelling
Yeah, really important commit, I know.
2022-10-31 17:56:11 +01:00
BodgeMaster 1d899db889 scripts/clean: Add a link with the original file name of cygsockpp-0.dll
Otherwise, the dynamic linker complains that it can’t find the file.
2022-10-31 17:56:11 +01:00
BodgeMaster 3cc91ae33d Build system: Get sockpp to build on Cygwin
This is probably not the last time this issue needs attention
as it *builds* on Cygwin with these workarounds, but it doesn’t *work*
on Cygwin...
2022-10-31 17:56:11 +01:00
Shwoomple 63e1749ad1 lib/file: fix cutByte filesize bug 2022-10-31 17:23:02 +01:00
Shwoomple ea8e806366 lib/file.cpp: Implement cutByte function 2022-10-31 17:23:02 +01:00
BodgeMaster 18a9517370 Build system: Start working on Cygwin support 2022-10-30 19:39:46 +01:00
BodgeMaster cd93f4c4c6 gitignore: Ignore endianness check on Cygwin 2022-10-30 17:19:55 +01:00
4 changed files with 28 additions and 7 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@
# ignore endianness check
/.endianness
/resources/check_endianness
/resources/check_endianness.exe
# Java bytecode
*.class

View File

@ -28,9 +28,14 @@ create_directory ./bin/lib
create_directory ./bin/lib/net
create_directory ./include
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so bin/lib/
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so.0 bin/lib/
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so.0.7.1 bin/lib/
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
ln -vs ../../dependencies/sockpp-0.7.1/build/cygsockpp-0.dll bin/lib/libsockpp.so
ln -vs ../../dependencies/sockpp-0.7.1/build/cygsockpp-0.dll bin/lib/
else
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so bin/lib/
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so.0 bin/lib/
ln -vs ../../dependencies/sockpp-0.7.1/build/libsockpp.so.0.7.1 bin/lib/
fi
ln -vs ../dependencies/sockpp-0.7.1/include/sockpp/ ./include/
ln -vs ../dependencies/tiny-utf8-4.4.3/include/tinyutf8/ ./include/

View File

@ -92,8 +92,23 @@ echo "done"
echo ">>> Building sockpp... "
pushd dependencies/sockpp-0.7.1/ >/dev/null 2>&1
cmake -Bbuild .
cmake --build build
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
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
fi
popd >/dev/null 2>&1
echo ">>> Cleaning up..."

View File

@ -15,7 +15,7 @@
echo ">>> Loading shell environment for FOSS-VG development..."
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"
if [ -f "$PROJECT_BASE_DIR/.localenv.bashrc" ]; then
@ -43,7 +43,7 @@ echo "Added aliases and functions."
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."
echo "Adding Cygwin workaound for library path."
export PATH="$PROJECT_BASE_DIR/bin/lib:$PATH"
fi
echo "PATH is $PATH"