From 69a85e119ab01e4283c835f0ebd41837813e7857 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Mon, 15 Apr 2019 20:39:29 +0200 Subject: [PATCH 01/10] Update ZenLib --- lib/ZenLib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ZenLib b/lib/ZenLib index 658b830..6c031be 160000 --- a/lib/ZenLib +++ b/lib/ZenLib @@ -1 +1 @@ -Subproject commit 658b8306ada08fb2e6cff95866d58d3218ea24db +Subproject commit 6c031bee412a7a6f9f6f7855d144077f88da3e6d From 7b6e8545903e54fe64e29f037b2cfcca06900231 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Mon, 15 Apr 2019 20:39:48 +0200 Subject: [PATCH 02/10] Update AppVeyor build script --- appveyor.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6a2e0ed..462f815 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,12 +1,23 @@ version: 0.1.{build} image: Visual Studio 2017 +cache: + - c:\tools\vcpkg\installed\ + +install: + - cd C:\tools\vcpkg + - git fetch + - git pull + - .\bootstrap-vcpkg.bat + - .\vcpkg.exe install physfs glm libsquish + - cd %APPVEYOR_BUILD_FOLDER% + build_script: - git submodule update --init --recursive - - mkdir build - cd build - - cmake -G"Visual Studio 15 2017 Win64" -DBSZENLIB_DOWNLOAD_BSF_BINARIES=On -DCMAKE_BUILD_TYPE=Release .. + - cmake -G"Visual Studio 15 2017 Win64" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DBSZENLIB_DOWNLOAD_BSF_BINARIES=On -DCMAKE_BUILD_TYPE=Release .. - cmake --build . --config Release -j 4 - - cp -r bsf-binaries/bin/* bin/Release From 164a41b089fbee3bfc9ee25db084e638bd8bd30c Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Mon, 15 Apr 2019 20:56:14 +0200 Subject: [PATCH 03/10] Update bs::f prebuilt binaries' URL --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c03fd41..5294b21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,17 +36,17 @@ if (BSZENLIB_DOWNLOAD_BSF_BINARIES) if (WIN32) FetchContent_Declare(bsfBinaries SOURCE_DIR ${bsf_INSTALL_DIR} - URL https://dilborceisv8p.cloudfront.net/bsf_2019.01.23_win64.zip + URL http://nightly.bsframework.io/releases/bsf_v1.1.0b_win64.zip ) elseif (APPLE) FetchContent_Declare(bsfBinaries SOURCE_DIR ${bsf_INSTALL_DIR} - URL https://dilborceisv8p.cloudfront.net/bsf_2019.01.23_osx.tar.gz + URL http://nightly.bsframework.io/releases/bsf_v1.1.0b_osx.tar.gz ) elseif (UNIX) FetchContent_Declare(bsfBinaries SOURCE_DIR ${bsf_INSTALL_DIR} - URL https://dilborceisv8p.cloudfront.net/bsf_2019.01.23_linux.tar.gz + URL http://nightly.bsframework.io/releases/bsf_v1.1.0b_linux.tar.gz ) else() message(FATAL_ERROR "No prebuilt binaries available for this platform!") From a4fe6a294563338c2bc6d42f01f3d4e6915b3aab Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Mon, 15 Apr 2019 21:05:02 +0200 Subject: [PATCH 04/10] Change vcpkg triplet --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 462f815..ffbc833 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ install: - git fetch - git pull - .\bootstrap-vcpkg.bat - - .\vcpkg.exe install physfs glm libsquish + - .\vcpkg.exe install --triplet x64-windows physfs glm libsquish - cd %APPVEYOR_BUILD_FOLDER% build_script: From 56be73b3ed9d41e9dcc1545ec7ee968f2ae394bd Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Mon, 15 Apr 2019 21:57:48 +0200 Subject: [PATCH 05/10] Build shared libs, copy dependencies --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ffbc833..61ba515 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,9 +17,10 @@ build_script: - - mkdir build - cd build - - cmake -G"Visual Studio 15 2017 Win64" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DBSZENLIB_DOWNLOAD_BSF_BINARIES=On -DCMAKE_BUILD_TYPE=Release .. + - cmake -G"Visual Studio 15 2017 Win64" -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DBSZENLIB_DOWNLOAD_BSF_BINARIES=On -DCMAKE_BUILD_TYPE=Release .. - cmake --build . --config Release -j 4 - + - cp -r C:/tools/vcpkg/installed/x64-windows/bin/* bin/Release - cp -r bsf-binaries/bin/* bin/Release - 7z a BsZenLib.zip bin/ - From 3b4628d1b84105e89fb7a86ed496cc0b5b7d057e Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Tue, 16 Apr 2019 11:58:30 +0200 Subject: [PATCH 06/10] Use static vcpkg libraries, do not push artifacts --- appveyor.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 61ba515..d7f76ba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ install: - git fetch - git pull - .\bootstrap-vcpkg.bat - - .\vcpkg.exe install --triplet x64-windows physfs glm libsquish + - .\vcpkg.exe install --triplet x64-windows-static physfs glm libsquish - cd %APPVEYOR_BUILD_FOLDER% build_script: @@ -17,13 +17,6 @@ build_script: - - mkdir build - cd build - - cmake -G"Visual Studio 15 2017 Win64" -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DBSZENLIB_DOWNLOAD_BSF_BINARIES=On -DCMAKE_BUILD_TYPE=Release .. + - cmake -G"Visual Studio 15 2017 Win64" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DBSZENLIB_DOWNLOAD_BSF_BINARIES=On -DCMAKE_BUILD_TYPE=Release .. - cmake --build . --config Release -j 4 - - - - cp -r C:/tools/vcpkg/installed/x64-windows/bin/* bin/Release - - cp -r bsf-binaries/bin/* bin/Release - - 7z a BsZenLib.zip bin/ - - - - mv BsZenLib.zip BsZenLib-%appveyor_repo_branch%-%APPVEYOR_BUILD_VERSION%-win32.zip - - appveyor PushArtifact BsZenLib-%appveyor_repo_branch%-%APPVEYOR_BUILD_VERSION%-win32.zip From 0984e229d73f17b8196b1e54915b13f043be0e83 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Sat, 20 Apr 2019 10:02:02 +0200 Subject: [PATCH 07/10] Add instructions to README --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e0bb71..66d9beb 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,18 @@ https://regoth-project.github.io/BsZenLib/index.html # Building +BsZenLib requires the following packages to be installed on the system: +`physfs-dev >= 3.0.0` `libsquish-dev` `libglm-dev` + +Most modern Linux distros provide a way to install them via the native package +manager. Ubuntu 18.04+ is known to ship recent enough versions, older distros do not +and installing from source may be necessary. + +Dependencies on Windows are best managed using [vcpkg](https://github.com/Microsoft/vcpkg), you can +find instructions on how to build it on the official repository. Once vcpkg is installed, you should +install the following packages `physfs glm libsquish` by running +`vcpkg.exe install --target x64-windows-static physfs glm libsquish` + You will need the bsframework for building BsZenLib. You can either download or compile it yourself, or have CMake download prebuilt binaries for you. @@ -42,7 +54,9 @@ cmake --build . -j 8 ## Note for Windows users Make sure to have CMake use the `Win64` kind of the Visual-Studio generator by passing `-G"Visual Studio 15 2017 Win64"` to it. -Otherwise linking with bs:f will likely fail, since the prebuilt binaries are all 64-bit. +Otherwise linking with bs:f will likely fail, since the prebuilt binaries are all 64-bit. Also, make +sure you add `-DDVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg/scripts/buildsystems/vcpkg.cmake` +in order for CMake to be able to find the vcpkg packages. ## Building the Documentation From cd54dd6ba6113bd00feb8ac58447b00d32adf195 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Sat, 20 Apr 2019 14:07:23 +0200 Subject: [PATCH 08/10] Add automated build script --- build.bat | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 build.bat diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..017082f --- /dev/null +++ b/build.bat @@ -0,0 +1,11 @@ +set CURRENT_DIR=%~dp0 +git clone https://github.com/Microsoft/vcpkg.git +cd vcpkg +call bootstrap-vcpkg.bat +set VCPKG_ROOT=%CURRENT_DIR%\vcpkg +vcpkg.exe install --triplet x64-windows-static glm physfs libsquish +cd .. +mkdir build +cd build +cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static "-DCMAKE_TOOLCHAIN_FILE=%CURRENT_DIR%\vcpkg\scripts\buildsystems\vcpkg.cmake" -DBSZENLIB_DOWNLOAD_BSF_BINARIES=ON -G "Visual Studio 15 2017 Win64" .. +cmake --build . -j 8 \ No newline at end of file From 1e0b8756fbf2281768b79aad55f46319bba5a615 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Sat, 20 Apr 2019 14:08:21 +0200 Subject: [PATCH 09/10] Mention build script on README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 66d9beb..e0ac0c0 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Most modern Linux distros provide a way to install them via the native package manager. Ubuntu 18.04+ is known to ship recent enough versions, older distros do not and installing from source may be necessary. +On Windows, just double-click on `build.bat`. It will manage everything automatically. + Dependencies on Windows are best managed using [vcpkg](https://github.com/Microsoft/vcpkg), you can find instructions on how to build it on the official repository. Once vcpkg is installed, you should install the following packages `physfs glm libsquish` by running From 18d4c869418abb38f1acf77e574a76d150c3e874 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Sat, 20 Apr 2019 14:56:32 +0200 Subject: [PATCH 10/10] Update ZenLib, removed GLM mentions --- README.md | 6 +++--- build.bat | 2 +- lib/ZenLib | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e0ac0c0..daef006 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ https://regoth-project.github.io/BsZenLib/index.html # Building BsZenLib requires the following packages to be installed on the system: -`physfs-dev >= 3.0.0` `libsquish-dev` `libglm-dev` +`physfs-dev >= 3.0.0` `libsquish-dev` Most modern Linux distros provide a way to install them via the native package manager. Ubuntu 18.04+ is known to ship recent enough versions, older distros do not @@ -19,8 +19,8 @@ On Windows, just double-click on `build.bat`. It will manage everything automati Dependencies on Windows are best managed using [vcpkg](https://github.com/Microsoft/vcpkg), you can find instructions on how to build it on the official repository. Once vcpkg is installed, you should -install the following packages `physfs glm libsquish` by running -`vcpkg.exe install --target x64-windows-static physfs glm libsquish` +install the following packages `physfs libsquish` by running +`vcpkg.exe install --target x64-windows-static physfs libsquish` You will need the bsframework for building BsZenLib. You can either download or compile it yourself, or have CMake download prebuilt binaries for you. diff --git a/build.bat b/build.bat index 017082f..1d84fd6 100644 --- a/build.bat +++ b/build.bat @@ -3,7 +3,7 @@ git clone https://github.com/Microsoft/vcpkg.git cd vcpkg call bootstrap-vcpkg.bat set VCPKG_ROOT=%CURRENT_DIR%\vcpkg -vcpkg.exe install --triplet x64-windows-static glm physfs libsquish +vcpkg.exe install --triplet x64-windows-static physfs libsquish cd .. mkdir build cd build diff --git a/lib/ZenLib b/lib/ZenLib index 6c031be..39a1480 160000 --- a/lib/ZenLib +++ b/lib/ZenLib @@ -1 +1 @@ -Subproject commit 6c031bee412a7a6f9f6f7855d144077f88da3e6d +Subproject commit 39a1480a47a1ffb61a01101d2591a4557ddafda9