From: Jean-Philippe Bruyère Date: Fri, 8 May 2020 00:35:56 +0000 (+0200) Subject: Squashed commit of the following: X-Git-Tag: v0.1-alpha~20 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=e301e8678b0361a3e95ed81c023e267e6d529c01;p=jp%2Fvkvg.git Squashed commit of the following: commit c73e59f0f46586d8c04f6330836d39a17319a040 Merge: 74dde08 122fe1f Author: Jean-Philippe Bruyère Date: Fri May 8 02:28:53 2020 +0200 merge windows tutorial commit 122fe1f61bcd4769af0f726fdb35a2cb63305950 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Tue May 5 11:31:53 2020 +0100 Update windows_build_tutorial.md commit a2d06d6426e276cab253b0bcc65cc929a9e9a7b0 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Tue May 5 10:56:14 2020 +0100 Update windows_build_tutorial.md commit ee3f662ca1b19e208aa0f8bb5c7f45987c2e756c Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Tue May 5 10:37:06 2020 +0100 Update windows_build_tutorial.md commit e758f83aada9f052096a9e2fc05de3e12ecc4084 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Tue May 5 10:29:33 2020 +0100 Update windows_build_tutorial.md commit 66acc7a99ec75c6de08070169a79bf65db3d0f40 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Tue May 5 09:48:06 2020 +0100 Update windows_build_tutorial.md commit 8db5764ac3fb38c3cbec25f42471c3436bb85c3f Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:31:57 2020 +0100 Update README.md commit a88e3127c503e744c729eab01c9a6c600902afd1 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:30:05 2020 +0100 Update windows_build_tutorial.md commit c3915c7ec99188587b65bb17f009db76f3cba203 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:24:20 2020 +0100 Rename windows_tutorial.md to windows_build_tutorial.md commit 80b4322420087e0d4e7976885178eeae8b6b89e7 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:23:58 2020 +0100 Rename linux_build_tutorial to linux_build_tutorial.md commit 0d2966fdcdf6fe0209dcfc5725a4f69c8c867131 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:23:39 2020 +0100 Update linux_build_tutorial commit 4ec91700dea33b7ce89c4dd020508ea96aa2cfb6 Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:22:25 2020 +0100 Create linux_build_tutorial commit 1b3d856eb84c908fe52469239c1c8e3d5fdac91a Author: João Oliveira <44142506+Joaopmoliveira@users.noreply.github.com> Date: Mon May 4 21:19:10 2020 +0100 Update README.md commit efd085cedc518e70dd350dace10ac53fd9514334 Author: = Date: Mon May 4 17:54:05 2020 +0100 adition of the windows tutorial to build the application --- diff --git a/README.md b/README.md index cdb8524..34cf9bd 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,16 @@ For API documentation and usage, please refer to the [Cairo](https://www.cairographics.org/) documentation for now. -### Current status: +

+ + + + + + +

+ +#### Current status: - Fill (stencil even-odd, non-zero with ear clipping). - Stroke. @@ -39,15 +48,6 @@ For API documentation and usage, please refer to the [Cairo](https://www.cairogr - Image loading and writing with [stb lib](https://github.com/nothings/stb) - Test includes svg rendering with [nanoSVG](https://github.com/memononen/nanosvg) -

- - - - - - -

- ### Requirements: - [CMake](https://cmake.org/): version > 12. @@ -64,15 +64,19 @@ if `glslc` or `xxd` are not present, a precompiled version of the shaders is sto ### Building ```bash -git clone https://github.com/jpbruyere/vkvg.git # Download source code from github -cd vkvg # Enter the source directory -git submodule update --init --recursive # Dowload vkhelpers sources -mkdir build # Create build directory +#fetch sources from github +git clone --recursive https://github.com/jpbruyere/vkvg.git +cd vkvg +# Create build directory +mkdir build cd build -cmake .. # Run CMake, optionaly setup glslc path -make # Run Make +# Run CMake, optionaly setup glslc path +cmake .. +make ``` +A [detailed tutorial](doc/windows_build_tutorial.md) is available for Windows. + ### To Do - [x] Use Scissor where possible. @@ -88,5 +92,3 @@ make # Run Make - [ ] Perf and memory checks. - [ ] Code clean and comment. - [ ] Documentations. - - diff --git a/doc/windows_build_tutorial.md b/doc/windows_build_tutorial.md new file mode 100644 index 0000000..8423f6e --- /dev/null +++ b/doc/windows_build_tutorial.md @@ -0,0 +1,44 @@ +# Build on Windows with Visual Studio IDE: + +(*Tested with VS 2017*) + +#### Build dependencies +Make sure that [Git](https://git-scm.com/download/win) is installed on your machine by typing on the command line (cmd): +```bash +> git --version +git version 2.19.1.windows.1 +``` +Install [vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2019) to build all required build dependencies: +```bash +git clone https://github.com/Microsoft/vcpkg.git +cd vcpkg +.\bootstrap-vcpkg.bat +``` +Then install the libraries required by vkvg: +```bash +vcpkg install fontconfig freetype harfbuzz vulkan +``` +Optionaly, install [GLFW] to build the samples: +```bash +vcpkg install glfw +``` +#### CMake configuration +Exit vcpkg directory and clone the vkvg repository: +```bash +git clone --recursive https://github.com/jpbruyere/vkvg.git +cd vkvg +#create a build directory +mkdir build +``` +To generate the solution file (.sln), use CMake IDE. Select the vkvg root folder as the source directory and the build folder we've just create in it. + +Configure the project and select the target build. (*for VS17 it should be something like `Visual Studio 15 2017 Win64`*). + +Also specify the **toolchain file** for cross-compiling provided by **vcpkg** (*C:\...\vcpkg\scripts\buildsystems\vcpkg.cmake*). + +On the bottom of the GUI there are some options related with the **vkvg** library. Unselect the **VKVG_LCD_FONT_FILTER** (FreeType is built without [lcd fonts](https://en.wikipedia.org/wiki/Subpixel_rendering) by default). + +Now generate the sln project and procede to open the project with Visual Studio.
+ +#### Build vkvg +To build the project (the **ALL BUILD** project should be the Start Up project) press **F7** or press build (top of the screen) and then press build solution. If everything goes well you finally have the .lib and .dll files to use in our projects. These files can be found in the *C:\...\vkvg\build\CMakeFiles\Debug* directory.