diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 221c7297..d371758a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -170,6 +170,11 @@ jobs: ref: v${{ matrix.wxWidgets }} submodules: 'recursive' + - name: Prepare package repos + if: matrix.wxw_type == 'embed' + run: | + sudo apt-get update + - name: Set up build environment if: matrix.wxw_type != 'embed' run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebdefc4b..66b045a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -347,6 +347,11 @@ jobs: ref: v${{ matrix.wxWidgets }} submodules: 'recursive' + - name: Prepare package repos + if: ${{ matrix.os == 'ubuntu-22.04' && matrix.wxw_type == 'embed' }} + run: | + sudo apt-get update + - name: Set up build environment if: ${{ matrix.build && matrix.wxw_type != 'embed' }} run: | diff --git a/rakelib/lib/director/graphics_object.rb b/rakelib/lib/director/graphics_object.rb index 0930ec80..c2db082e 100644 --- a/rakelib/lib/director/graphics_object.rb +++ b/rakelib/lib/director/graphics_object.rb @@ -14,15 +14,26 @@ class GraphicsObject < Director def setup super - spec.items.concat %w[wxGraphicsPen wxGraphicsBrush wxGraphicsPath wxGraphicsFont wxGraphicsMatrix wxGraphicsBitmap] + spec.items.concat %w[wxGraphicsPen wxGraphicsBrush wxGraphicsPath wxGraphicsFont wxGraphicsMatrix wxGraphicsBitmap wxGraphicsRenderer] spec.disable_proxies - spec.ignore 'wxGraphicsObject::GetRenderer' spec.ignore 'wxGraphicsMatrix::Concat(const wxGraphicsMatrix &)' spec.ignore 'wxGraphicsMatrix::IsEqual(const wxGraphicsMatrix &)' spec.ignore 'wxGraphicsMatrix::GetNativeMatrix' spec.ignore 'wxGraphicsBitmap::GetNativeBitmap' spec.ignore 'wxGraphicsPath::GetNativePath', 'wxGraphicsPath::UnGetNativePath' + spec.ignore 'wxGraphicsRenderer::CreateContextFromNativeHDC', + 'wxGraphicsRenderer::CreateBitmapFromNativeBitmap', + 'wxGraphicsRenderer::CreateContextFromNativeContext', + 'wxGraphicsRenderer::CreateContextFromNativeWindow', + 'wxGraphicsRenderer::CreateContext(const wxEnhMetaFileDC&)' + unless Config.instance.features_set?('USE_CAIRO') + spec.ignore 'wxGraphicsRenderer::GetCairoRenderer' + end + unless Config.instance.features_set?('WXMSW') + spec.ignore 'wxGraphicsRenderer::GetGDIPlusRenderer', + 'wxGraphicsRenderer::GetDirect2DRenderer' + end # Deal with GraphicsMatrix#get method spec.map_apply 'double *OUTPUT' => [ 'wxDouble *a', 'wxDouble *b', 'wxDouble *c', 'wxDouble *d', @@ -30,6 +41,8 @@ def setup spec.ignore 'wxGraphicsPath::GetBox() const', 'wxGraphicsPath::GetCurrentPoint(wxDouble*,wxDouble*) const' spec.map_apply 'double * OUTPUT' => 'wxDouble *' + # wxGraphicsRenderer::GetVersion + spec.map_apply 'int * OUTPUT' => ['int *major', 'int *minor', 'int *micro'] if Config.platform == :mingw # it seems for WXMSW there is a problem cleaning up GraphicsObjects in GC after # the wxApp has ended (probably because some other wxWidgets cleanup already diff --git a/rakelib/lib/extractor/function.rb b/rakelib/lib/extractor/function.rb index 9b72814b..5bc9326f 100644 --- a/rakelib/lib/extractor/function.rb +++ b/rakelib/lib/extractor/function.rb @@ -293,7 +293,7 @@ def extract(element) @is_static = element['static'] == 'yes' @is_virtual = %w[virtual pure-virtual].include?(element['virt']) @is_pure_virtual = (element['virt'] == 'pure-virtual') - @args_string.sub!(/\s*=0/, '') if @is_pure_virtual + @args_string.sub!(/\)(\s*const)?\s*=0/, ')\1') if @is_pure_virtual @is_override = !!element.at_xpath('reimplements') @is_const = (element['const'] == 'yes') @is_ctor = (@name == @class_name)