Compare commits

..

No commits in common. "ca150d0f054b68deaafc67d537b5414209fc8958" and "4c651d1b6f6738f2223c35f31fca1542f9f666fc" have entirely different histories.

4 changed files with 16 additions and 66 deletions

View File

@ -18,9 +18,7 @@ Immediate goals:
- [x] decode and encode data
## Working with the project
WINDOWS USERS READ THIS: [Windows-specific notes](doc/windows.md)
## Project Setup Instructions
### Prerequisites:

View File

@ -1,47 +0,0 @@
# Notes for Windows Users
FOSS-VG is focused on development on UNIX-like systems for UNIX-like systems.
The development environment is built in a way that requires UNIX tools.
There are two options to deal with this on Windows:
1) Use Cygwin to get a UNIX-like environment on Windows.
This is the option to choose if you want to develop FOSS-VG on Windows.
Working on FOSS-VG on Cygwin is pretty much the same as on other
operating systems with the exception that special care needs to be taken
setting up the development environment.
2) Use the `windows` branch.
This is the option to use when just building on Windows.
Might need some fixing up to actually work properly.
Don't commit new code to that branch as it cannot be merged back into master.
Merging from the `windows` branch into master would break master for all other
operating systems.
# Using Cygwin
The build system has special provisions built-in to deal with the Windows-iness
of Cygwin environments. But it still needs some specific setup to work properly.
When getting the prerequisites set up, make sure to install CMake on Windows,
NOT on Cygwin. CMake is used for dependencies that aren't easy to build
on Cygwin, therefore they are built on Windows.
You will also need MinGW tools on Windows that CMake can use to build the
dependencies. In case they aren't in your PATH variable, you can use the
`.localenv.bashrc` to automatically add them when loading the development
environment like so:
```sh
PATH=$PATH:/cygdrive/c/path/to/your/mingw/bin
```
Note that the mingw tools are added to the end of the path variable so they
don't override Cygwin's programs in regular use.
# Using the `windows` Branch
Good luck.
It's currently not actively being maintained as only building FOSS-VG is not
a task that is commonly needed.
This will probably change when Windows-only builds have to be performed
regularly.

View File

@ -95,10 +95,18 @@ 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."
PATH=$(echo $PATH | sed 's/:/\n/g' | grep cygdrive | tr '\n' ':') cmake -G "MinGW Makefiles" -DSOCKPP_BUILD_SHARED=ON -DSOCKPP_BUILD_STATIC=OFF -B build .
PATH=$(echo $PATH | sed 's/:/\n/g' | grep cygdrive | tr '\n' ':') cmake --build build
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 -B build .
cmake -Bbuild .
cmake --build build
fi
popd >/dev/null 2>&1

View File

@ -94,20 +94,11 @@ else
MISSING_DEPS=1
fi
if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then
if PATH=$(echo $PATH | sed 's/:/\n/g' | grep cygdrive | tr '\n' ':') command -v cmake > /dev/null 2>&1; then
true
else
echo "WARNING: \`cmake\` needs to be installed on Windows directly to build downloaded dependencies."
MISSING_DEPS=1
fi
if command -v cmake > /dev/null 2>&1; then
true
else
if command -v cmake > /dev/null 2>&1; then
true
else
echo "WARNING: \`cmake\` is needed to build downloaded dependencies."
MISSING_DEPS=1
fi
echo "WARNING: \`cmake\` is needed to build downloaded dependencies."
MISSING_DEPS=1
fi
if [ -z "$CXX" ]; then