diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13c9eb6b..4ced7214 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,69 +29,69 @@ jobs: name: vst_ubuntu path: vst_ubuntu - build-windows: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Run script - run: ci/ci_windows.ps1 - - name: Upload - if: ${{ startsWith(github.ref, 'refs/tags/') }} - uses: actions/upload-artifact@v3 - with: - name: vst_windows - path: vst_windows + # build-windows: + # runs-on: windows-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # submodules: recursive + # - name: Run script + # run: ci/ci_windows.ps1 + # - name: Upload + # if: ${{ startsWith(github.ref, 'refs/tags/') }} + # uses: actions/upload-artifact@v3 + # with: + # name: vst_windows + # path: vst_windows - build-macOS: - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Run script - run: ci/ci_macOS.sh - - name: Upload - if: ${{ startsWith(github.ref, 'refs/tags/') }} - uses: actions/upload-artifact@v3 - with: - name: vst_macOS - path: vst_macOS + # build-macOS: + # runs-on: macos-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # submodules: recursive + # - name: Run script + # run: ci/ci_macOS.sh + # - name: Upload + # if: ${{ startsWith(github.ref, 'refs/tags/') }} + # uses: actions/upload-artifact@v3 + # with: + # name: vst_macOS + # path: vst_macOS - release-packaging: - needs: [build-ubuntu, build-windows, build-macOS] - runs-on: ubuntu-latest - if: ${{ startsWith(github.ref, 'refs/tags/UhhyouPlugins') }} - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: - ref: ${{ github.ref }} - submodules: recursive - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: ${{ env.package_path }} - - name: Run package script - run: | - cd ${{ env.package_path }} - echo "Run pack.py" - python3 pack.py - echo "Run studiorack.py" - python3 studiorack.py - - name: Get Release Notes - run: 'echo "$(git tag -l --format="%(contents:body)" $GITHUB_REF_NAME)" > RELEASE_NOTES' - - name: Release - uses: softprops/action-gh-release@v1 - with: - body_path: RELEASE_NOTES - files: | - ${{ env.package_path }}/pack_macOS/*.zip - ${{ env.package_path }}/pack/*.zip - ${{ env.package_path }}/pack/*.png - ${{ env.package_path }}/pack/plugins.json - ${{ env.package_path }}/audiosample/*.flac + # release-packaging: + # needs: [build-ubuntu, build-windows, build-macOS] + # runs-on: ubuntu-latest + # if: ${{ startsWith(github.ref, 'refs/tags/UhhyouPlugins') }} + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # with: + # path: + # ref: ${{ github.ref }} + # submodules: recursive + # - name: Download Artifacts + # uses: actions/download-artifact@v3 + # with: + # path: ${{ env.package_path }} + # - name: Run package script + # run: | + # cd ${{ env.package_path }} + # echo "Run pack.py" + # python3 pack.py + # echo "Run studiorack.py" + # python3 studiorack.py + # - name: Get Release Notes + # run: 'echo "$(git tag -l --format="%(contents:body)" $GITHUB_REF_NAME)" > RELEASE_NOTES' + # - name: Release + # uses: softprops/action-gh-release@v1 + # with: + # body_path: RELEASE_NOTES + # files: | + # ${{ env.package_path }}/pack_macOS/*.zip + # ${{ env.package_path }}/pack/*.zip + # ${{ env.package_path }}/pack/*.png + # ${{ env.package_path }}/pack/plugins.json + # ${{ env.package_path }}/audiosample/*.flac diff --git a/ci/ci_ubuntu.sh b/ci/ci_ubuntu.sh index ef751378..03a2a761 100755 --- a/ci/ci_ubuntu.sh +++ b/ci/ci_ubuntu.sh @@ -10,10 +10,11 @@ sudo apt-get update sudo apt-get install cmake gcc "libstdc++6" libx11-xcb-dev libxcb-util-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libfontconfig1-dev libcairo2-dev libgtkmm-3.0-dev libsqlite3-dev libxcb-keysyms1-dev # Patch vst3sdk. -# - https://github.com/ryukau/VSTPlugins/issues/3 -cp \ - ci/linux_patch/cairocontext.cpp \ - lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/cairocontext.cpp +# - https://github.com/ryukau/VSTPlugins/issues/48 +# - https://github.com/steinbergmedia/vstgui/issues/126 +cd lib/vst3sdk/vstgui4/ +git apply ../../../ci/linux_patch/cairographicscontext.patch +cd ../../../ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build diff --git a/ci/linux_patch/cairographicscontext.patch b/ci/linux_patch/cairographicscontext.patch new file mode 100644 index 00000000..f741073a --- /dev/null +++ b/ci/linux_patch/cairographicscontext.patch @@ -0,0 +1,54 @@ +diff --git a/vstgui/lib/platform/linux/cairographicscontext.cpp b/vstgui/lib/platform/linux/cairographicscontext.cpp +index ab620cc9..f9b735bf 100644 +--- a/vstgui/lib/platform/linux/cairographicscontext.cpp ++++ b/vstgui/lib/platform/linux/cairographicscontext.cpp +@@ -406,15 +406,11 @@ bool CairoGraphicsDeviceContext::drawPolygon (const PointList& polygonPointList, + vstgui_assert (polygonPointList.empty () == false); + impl->doInContext ([&] () { + bool doPixelAlign = impl->state.drawMode.integralMode (); +- auto last = polygonPointList.back (); +- if (doPixelAlign) +- last = pixelAlign (impl->state.tm, last); +- cairo_move_to (impl->context, last.x, last.y); +- for (auto p : polygonPointList) ++ auto first = polygonPointList.front (); ++ cairo_move_to (impl->context, first.x, first.y); ++ for (auto p = polygonPointList.begin () + 1; p != polygonPointList.end (); ++p) + { +- if (doPixelAlign) +- p = pixelAlign (impl->state.tm, p); +- cairo_line_to (impl->context, p.x, p.y); ++ cairo_line_to (impl->context, (*p).x, (*p).y); + } + impl->draw (drawStyle); + }); +@@ -448,15 +444,17 @@ bool CairoGraphicsDeviceContext::drawRect (CRect rect, PlatformGraphicsDrawStyle + return true; + } + +-//------------------------------------------------------------------------ ++//------------------------------cairo_restore (------------------------------------------ + bool CairoGraphicsDeviceContext::drawArc (CRect rect, double startAngle1, double endAngle2, + PlatformGraphicsDrawStyle drawStyle) const + { + impl->doInContext ([&] () { ++ cairo_save (impl->context); + CPoint center = rect.getCenter (); + cairo_translate (impl->context, center.x, center.y); +- cairo_scale (impl->context, 2.0 / rect.getWidth (), 2.0 / rect.getHeight ()); +- cairo_arc (impl->context, 0, 0, 1, startAngle1, endAngle2); ++ cairo_scale (impl->context, rect.getWidth () /2.0 , rect.getHeight () / 2.0); ++ cairo_arc (impl->context, 0, 0, 1, startAngle1 / 180.0 * M_PI, endAngle2 / 180.0 * M_PI); ++ cairo_restore (impl->context); + impl->draw (drawStyle); + }); + return true; +@@ -468,7 +466,7 @@ bool CairoGraphicsDeviceContext::drawEllipse (CRect rect, PlatformGraphicsDrawSt + impl->doInContext ([&] () { + CPoint center = rect.getCenter (); + cairo_translate (impl->context, center.x, center.y); +- cairo_scale (impl->context, 2.0 / rect.getWidth (), 2.0 / rect.getHeight ()); ++ cairo_scale (impl->context, rect.getWidth () / 2.0, rect.getHeight () / 2.0); + cairo_arc (impl->context, 0, 0, 1, 0, 2 * M_PI); + impl->draw (drawStyle); + });