diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cdffb26..e1fd6a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: fail-fast: false matrix: target: [win64] - variant: [gpl,lgpl,gpl-4.3,lgpl-4.3] + variant: [gpl,lgpl,gpl-vulkan,lgpl-vulkan,gpl-4.3,lgpl-4.3] steps: - name: Checkout uses: actions/checkout@v2 @@ -82,7 +82,7 @@ jobs: fail-fast: false matrix: target: [win64] - variant: [gpl,lgpl,gpl-4.3,lgpl-4.3] + variant: [gpl,lgpl,gpl-vulkan,lgpl-vulkan,gpl-4.3,lgpl-4.3] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/images/base/Dockerfile b/images/base/Dockerfile index ee8dcf5..451c2ba 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive RUN \ apt-get -y update && \ apt-get -y dist-upgrade && \ - apt-get -y install build-essential yasm nasm pkg-config git curl wget cmake unzip subversion autoconf automake libtool cmake clang texinfo texi2html gperf ragel libc6-dev gawk meson ninja-build && \ + apt-get -y install build-essential yasm nasm pkg-config git curl wget cmake unzip subversion autoconf automake libtool cmake clang texinfo texi2html gperf ragel libc6-dev gawk meson ninja-build p7zip-full && \ apt-get -y clean ADD run_stage.sh /usr/bin/run_stage diff --git a/scripts.d/45-vulkan.sh b/scripts.d/45-vulkan.sh new file mode 100755 index 0000000..0a7627b --- /dev/null +++ b/scripts.d/45-vulkan.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +LUNARG_VERSION="1.2.148.1" +LUNARG_SRC="https://sdk.lunarg.com/sdk/download/${LUNARG_VERSION}/windows/VulkanSDK-${LUNARG_VERSION}-Installer.exe" + +ffbuild_enabled() { + [[ $VARIANT != *vulkan* ]] && return -1 + return 0 +} + +ffbuild_dockerstage() { + to_df "ADD $SELF /stage.sh" + to_df "RUN run_stage" +} + +ffbuild_dockerbuild() { + mkdir vulkan && cd vulkan + + if [[ $TARGET == win64 ]]; then + wget --no-cookies -O vulkan.exe "$LUNARG_SRC" + 7z x vulkan.exe Include/vulkan Lib/vulkan-1.lib + + find . -type f -exec chmod 644 {} \; + find . -type d -exec chmod 755 {} \; + + mv Include/* "$FFBUILD_PREFIX"/include/. + mv Lib/* "$FFBUILD_PREFIX"/lib/. + + mkdir -p "$FFBUILD_PREFIX"/lib/pkgconfig + cat > "$FFBUILD_PREFIX"/lib/pkgconfig/vulkan.pc <