Merge pull request #690 from jpcima/mingw-dwrite3
Workaround for MinGW CI to build custom font support
This commit is contained in:
commit
9d3be1ac94
5 changed files with 12316 additions and 6 deletions
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
|
|
@ -72,7 +72,8 @@ jobs:
|
||||||
-DSFIZZ_SHARED=OFF \
|
-DSFIZZ_SHARED=OFF \
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=OFF \
|
-DSFIZZ_STATIC_DEPENDENCIES=OFF \
|
||||||
-DSFIZZ_LV2=ON \
|
-DSFIZZ_LV2=ON \
|
||||||
-DCMAKE_CXX_STANDARD=17
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
@ -118,7 +119,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mod-plugin-builder /usr/local/bin/cmake "$GITHUB_WORKSPACE" \
|
mod-plugin-builder /usr/local/bin/cmake "$GITHUB_WORKSPACE" \
|
||||||
-DSFIZZ_SYSTEM_PROCESSOR=armv7-a \
|
-DSFIZZ_SYSTEM_PROCESSOR=armv7-a \
|
||||||
-DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_VST=OFF -DSFIZZ_LV2_UI=OFF
|
-DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_VST=OFF -DSFIZZ_LV2_UI=OFF \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
@ -161,6 +163,11 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
- name: Fix MinGW headers
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
||||||
|
/usr/i686-w64-mingw32/include/dwrite_3.h
|
||||||
- name: Fix VST sources
|
- name: Fix VST sources
|
||||||
shell: bash
|
shell: bash
|
||||||
# need to convert some includes to lower case (as of VST 3.7.1)
|
# need to convert some includes to lower case (as of VST 3.7.1)
|
||||||
|
|
@ -182,7 +189,8 @@ jobs:
|
||||||
-DSFIZZ_JACK=OFF \
|
-DSFIZZ_JACK=OFF \
|
||||||
-DSFIZZ_VST=ON \
|
-DSFIZZ_VST=ON \
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
||||||
-DCMAKE_CXX_STANDARD=17
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
@ -225,6 +233,11 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
- name: Fix MinGW headers
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
||||||
|
/usr/x86_64-w64-mingw32/include/dwrite_3.h
|
||||||
- name: Fix VST sources
|
- name: Fix VST sources
|
||||||
shell: bash
|
shell: bash
|
||||||
# need to convert some includes to lower case (as of VST 3.7.1)
|
# need to convert some includes to lower case (as of VST 3.7.1)
|
||||||
|
|
@ -246,7 +259,8 @@ jobs:
|
||||||
-DSFIZZ_JACK=OFF \
|
-DSFIZZ_JACK=OFF \
|
||||||
-DSFIZZ_VST=ON \
|
-DSFIZZ_VST=ON \
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
||||||
-DCMAKE_CXX_STANDARD=17
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,23 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
endif()
|
endif()
|
||||||
# Windows 10 RS2 DDI for custom fonts
|
# Windows 10 RS2 DDI for custom fonts
|
||||||
target_compile_definitions(sfizz_vstgui PRIVATE "NTDDI_VERSION=0x0A000003")
|
target_compile_definitions(sfizz_vstgui PRIVATE "NTDDI_VERSION=0x0A000003")
|
||||||
# disable custom fonts while dwrite3 API is unavailable in MinGW
|
# disable custom fonts if dwrite3 API is unavailable in MinGW
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
target_compile_definitions(sfizz_vstgui PRIVATE "VSTGUI_WIN32_CUSTOMFONT_SUPPORT=0")
|
check_cxx_source_compiles("
|
||||||
|
#include <windows.h>
|
||||||
|
#include <dwrite_3.h>
|
||||||
|
HRESULT FeatureCheck(IDWriteFontSet* self, const WCHAR* name, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch, DWRITE_FONT_STYLE style, IDWriteFontSet** fontset)
|
||||||
|
{
|
||||||
|
return self->GetMatchingFonts(name, weight, stretch, style, fontset);
|
||||||
|
}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}" SFIZZ_MINGW_SUPPORTS_DWRITE3)
|
||||||
|
if(NOT SFIZZ_MINGW_SUPPORTS_DWRITE3)
|
||||||
|
message(WARNING "This version of MinGW does not support DirectWrite 3. Custom font support is disabled.")
|
||||||
|
target_compile_definitions(sfizz_vstgui PRIVATE "VSTGUI_WIN32_CUSTOMFONT_SUPPORT=0")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,6 @@ cmake .. -G"Visual Studio 16 2019" -A"%RELEASE_ARCH%"^
|
||||||
-DSFIZZ_LV2=ON^
|
-DSFIZZ_LV2=ON^
|
||||||
-DSFIZZ_VST=ON^
|
-DSFIZZ_VST=ON^
|
||||||
-DCMAKE_BUILD_TYPE=Release^
|
-DCMAKE_BUILD_TYPE=Release^
|
||||||
|
-DBUILD_SHARED_LIBS=OFF^
|
||||||
-DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET%^
|
-DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET%^
|
||||||
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DSFIZZ_SHARED=OFF \
|
-DSFIZZ_SHARED=OFF \
|
||||||
-DSFIZZ_TESTS=ON \
|
-DSFIZZ_TESTS=ON \
|
||||||
-DCMAKE_CXX_STANDARD=14 \
|
-DCMAKE_CXX_STANDARD=14 \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DLV2PLUGIN_INSTALL_DIR=/ \
|
-DLV2PLUGIN_INSTALL_DIR=/ \
|
||||||
-DVSTPLUGIN_INSTALL_DIR=/ \
|
-DVSTPLUGIN_INSTALL_DIR=/ \
|
||||||
-DAUPLUGIN_INSTALL_DIR=/ \
|
-DAUPLUGIN_INSTALL_DIR=/ \
|
||||||
|
|
|
||||||
12280
scripts/mingw_dwrite_3.h
Normal file
12280
scripts/mingw_dwrite_3.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue