diff --git a/CMakeLists.txt b/CMakeLists.txt index d3f51c1..a87dce3 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!") diff --git a/README.md b/README.md index 0e0bb71..daef006 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,20 @@ 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` + +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 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. @@ -42,7 +56,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 diff --git a/appveyor.yml b/appveyor.yml index 6a2e0ed..d7f76ba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,17 +1,22 @@ 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 --triplet x64-windows-static 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-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 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 diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..1d84fd6 --- /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 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 diff --git a/lib/ZenLib b/lib/ZenLib index 658b830..39a1480 160000 --- a/lib/ZenLib +++ b/lib/ZenLib @@ -1 +1 @@ -Subproject commit 658b8306ada08fb2e6cff95866d58d3218ea24db +Subproject commit 39a1480a47a1ffb61a01101d2591a4557ddafda9