Final project for Exercise on Operating Systems
- TCP-based online multiplayer drawing board
- Cross platform, support Windows / Linux / macOS
- Random pencil color
- Support undo operation
git clone https://github.com/xqq/drawboard.git
cd drawboard
git submodule update --init
- Install msys2 & necessary packages
pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2
- Install packages by using vcpkg
vcpkg install sdl2:x86-windows
vcpkg install sdl2:x64-windows
- Use homebrew package manager
brew install cmake sdl2
sudo apt-get install cmake libsdl2-dev
mkdir build
cd build
cmake .. -G "Visual Studio 15" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_VCPKG>/scripts/buildsystems/vcpkg.cmake
cmake --build .
mkdir build
cd build
cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release
make -j8
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j8
Or using CLion (recommended)
Usage: drawboard [OPTIONS]
--client <host> --port <port>
--server <host> --port <port>
Start a drawboard server
./drawboard -s 0.0.0.0 -p 1919
Connect to a drawboard server
./drawboard -c 127.0.0.1 -p 1919
- Press Ctrl+Z can Undo last draw operation
MIT License
Copyright (c) 2020 xqq <xqq@xqq.im>