From d69dfb9fff8658451f92fa1b9b40a1b968d526c9 Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Thu, 16 May 2024 14:15:18 +0200 Subject: [PATCH 01/11] add support for distro release differences --- rakelib/lib/config/pkgman/linux.rb | 39 ++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/rakelib/lib/config/pkgman/linux.rb b/rakelib/lib/config/pkgman/linux.rb index 2bde10c1..ece839da 100644 --- a/rakelib/lib/config/pkgman/linux.rb +++ b/rakelib/lib/config/pkgman/linux.rb @@ -14,11 +14,33 @@ module Platform module PkgManager + class PlatformDependencies + def initialize(*defaults) + @dependencies = ::Hash.new + @dependencies.default = ::Hash.new(defaults.flatten) + end + + def add(distro, *deps, release: nil) + @dependencies[distro] ||= ::Hash.new + if release + @dependencies[distro][release] = deps.flatten + else + @dependencies[distro].default = deps.flatten + end + self + end + + def get(distro, release: nil) + @dependencies[distro][release] + end + end + PLATFORM_DEPS = { - debian: %w[libgtk-3-dev libwebkit2gtk-4.0-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev], - rhel: %w[expat-devel findutils gspell-devel gstreamer1-plugins-base-devel gtk3-devel libcurl-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel], - suse: %w[gtk3-devel webkit2gtk3-devel gspell-devel gstreamer-devel gstreamer-plugins-base-devel libcurl-devel libsecret-devel libnotify-devel libSDL-devel zlib-devel libjpeg-devel libpng-devel], - arch: %w[pkg-config gtk3 webkit2gtk gspell libunwind gstreamer curl libsecret libnotify libpng12] + debian: PlatformDependencies.new(%w[libgtk-3-dev libwebkit2gtk-4.0-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev]) + .add('ubuntu', %w[libgtk-3-dev libwebkit2gtk-4.1-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev], release: '24.04'), + rhel: PlatformDependencies.new(%w[expat-devel findutils gspell-devel gstreamer1-plugins-base-devel gtk3-devel libcurl-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel]), + suse: PlatformDependencies.new(%w[gtk3-devel webkit2gtk3-devel gspell-devel gstreamer-devel gstreamer-plugins-base-devel libcurl-devel libsecret-devel libnotify-devel libSDL-devel zlib-devel libjpeg-devel libpng-devel]), + arch: PlatformDependencies.new(%w[pkg-config gtk3 webkit2gtk gspell libunwind gstreamer curl libsecret libnotify libpng12]) } PLATFORM_ALTS = { suse: { 'g++' => 'gcc-c++' }, @@ -41,7 +63,7 @@ def install(pkgs) Make sure the following packages (or equivalent) are installed and than try again with `--no-autoinstall`: #{pkgs.join(', ')} - __ERROR_TXT + __ERROR_TXT exit(1) end # can we install? @@ -63,7 +85,7 @@ def install(pkgs) #{pkgs.join(', ')} Install these packages and try again. - __ERROR_TXT + __ERROR_TXT exit(1) end # do the actual install @@ -73,7 +95,7 @@ def install(pkgs) #{pkgs.join(', ')} Fix any problems or install these packages yourself and try again. - __ERROR_TXT + __ERROR_TXT if WXRuby3.config.run_silent? $stderr.puts "For error details check #{WXRuby3.config.silent_log_name}" end @@ -90,7 +112,8 @@ def pkgman end def platform_pkgs - PLATFORM_DEPS[WXRuby3.config.sysinfo.os.variant.to_sym] || [] + deps = PLATFORM_DEPS[WXRuby3.config.sysinfo.os.variant.to_sym] + deps ? deps.get(WXRuby3.config.sysinfo.os.variant.distro, release: WXRuby3.config.sysinfo.os.release) : [] end def add_platform_pkgs(pkgs) From a39e6f756898f2d65de6e5c82e4c51f0e9622e02 Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Thu, 16 May 2024 14:20:16 +0200 Subject: [PATCH 02/11] fix typo --- rakelib/lib/config/pkgman/linux.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rakelib/lib/config/pkgman/linux.rb b/rakelib/lib/config/pkgman/linux.rb index ece839da..774cdaec 100644 --- a/rakelib/lib/config/pkgman/linux.rb +++ b/rakelib/lib/config/pkgman/linux.rb @@ -113,7 +113,7 @@ def pkgman def platform_pkgs deps = PLATFORM_DEPS[WXRuby3.config.sysinfo.os.variant.to_sym] - deps ? deps.get(WXRuby3.config.sysinfo.os.variant.distro, release: WXRuby3.config.sysinfo.os.release) : [] + deps ? deps.get(WXRuby3.config.sysinfo.os.distro, release: WXRuby3.config.sysinfo.os.release) : [] end def add_platform_pkgs(pkgs) From ffaac43d55fb8b0eb50469526ef9b4815f20e6e7 Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Thu, 16 May 2024 18:48:32 +0200 Subject: [PATCH 03/11] support newer Ubuntu release --- tools/scripts/cirrus/setup-ubuntu.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/scripts/cirrus/setup-ubuntu.sh b/tools/scripts/cirrus/setup-ubuntu.sh index 7cc3a8a3..867b3ace 100755 --- a/tools/scripts/cirrus/setup-ubuntu.sh +++ b/tools/scripts/cirrus/setup-ubuntu.sh @@ -3,5 +3,13 @@ apt-get update apt-get install -y git make gcc gpg xvfb xfonts-75dpi curl procps if [ "$1" == "test" ]; then - apt-get install -y 'libgtk-3-[0-9]+' 'libwebkit2gtk-4.0-[0-9]+' 'libgspell-1-[0-9]+' libnotify4 'libsecret-1-[0-9]+' curl + source /etc/os-release + case $VERSION_ID in + 24.04) + apt-get install -y 'libgtk-3-[0-9]+' 'libwebkit2gtk-4.1-[0-9]+' 'libgspell-1-[0-9]+' libnotify4 'libsecret-1-[0-9]+' curl + ;; + *) + apt-get install -y 'libgtk-3-[0-9]+' 'libwebkit2gtk-4.0-[0-9]+' 'libgspell-1-[0-9]+' libnotify4 'libsecret-1-[0-9]+' curl + ;; + esac fi From 107e5f7653457aaa80084b7b7b7e63392a666b64 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 31 May 2024 19:29:26 +0200 Subject: [PATCH 04/11] prevent unwanted proxy --- rakelib/lib/director/window.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rakelib/lib/director/window.rb b/rakelib/lib/director/window.rb index dc979e2c..9a5549e3 100644 --- a/rakelib/lib/director/window.rb +++ b/rakelib/lib/director/window.rb @@ -315,6 +315,11 @@ def process(gendoc: false) "#{spec.class_name(citem)}::WarpPointer", "#{spec.class_name(citem)}::AdjustForLayoutDirection", "#{spec.class_name(citem)}::IsTransparentBackgroundSupported") + if Config.instance.features_set?('USE_ACCESSIBILITY') + if Config.instance.wx_version > '3.2.4' + spec.no_proxy "#{spec.class_name(citem)}::CreateAccessible" + end + end end end if spec.module_name == 'wxWindow' From 2d6aff38c50a35cbe0a4f0e32cbb5107c44404a2 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 31 May 2024 19:30:02 +0200 Subject: [PATCH 05/11] reduce unwanted and problematic lib dependencies --- rakelib/lib/config/mingw.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rakelib/lib/config/mingw.rb b/rakelib/lib/config/mingw.rb index d8cb2374..254c732e 100644 --- a/rakelib/lib/config/mingw.rb +++ b/rakelib/lib/config/mingw.rb @@ -198,6 +198,10 @@ def find_exe(path, exe) fp end + def wx_configure + bash('./configure --prefix=`pwd`/install --disable-tests --without-subdirs --without-regex --with-expat=builtin --with-zlib=builtin --disable-debug_info') + end + def wx_make bash('make && make install') end From 244da149a3a66703d3f11f7c98f1d06edf27259d Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 1 Jun 2024 09:59:46 +0200 Subject: [PATCH 06/11] install mingw deps through Plat4M package manager --- rakelib/lib/config/mingw.rb | 202 +++++++++++++++-------------- rakelib/lib/config/pkgman/mingw.rb | 112 ++++++++++++++++ 2 files changed, 214 insertions(+), 100 deletions(-) create mode 100644 rakelib/lib/config/pkgman/mingw.rb diff --git a/rakelib/lib/config/mingw.rb b/rakelib/lib/config/mingw.rb index 254c732e..a45a16c5 100644 --- a/rakelib/lib/config/mingw.rb +++ b/rakelib/lib/config/mingw.rb @@ -7,6 +7,7 @@ ### require_relative './unixish' +require_relative 'pkgman/mingw' require 'uri' @@ -26,12 +27,12 @@ module Config module Platform - SWIG_URL = 'https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.2.0/swigwin-4.2.0.zip/download' - SWIG_ZIP = 'swigwin-4.2.0.zip' - - DOXYGEN_URL = 'https://www.doxygen.nl/files/doxygen-1.10.0.windows.x64.bin.zip' - - GIT_URL = 'https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/MinGit-2.43.0-64-bit.zip' + # SWIG_URL = 'https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.2.0/swigwin-4.2.0.zip/download' + # SWIG_ZIP = 'swigwin-4.2.0.zip' + # + # DOXYGEN_URL = 'https://www.doxygen.nl/files/doxygen-1.10.0.windows.x64.bin.zip' + # + # GIT_URL = 'https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/MinGit-2.43.0-64-bit.zip' def self.included(base) base.class_eval do @@ -85,70 +86,71 @@ def check_tool_pkgs def install_prerequisites pkg_deps = super - unless pkg_deps.empty? - # autoinstall or not? - unless wants_autoinstall? - STDERR.puts <<~__ERROR_TXT - ERROR: This system lacks installed versions of the following required software packages: - #{pkg_deps.join(', ')} - - Install these packages and try again. - __ERROR_TXT - exit(1) - end - # if SWIG was not found in the PATH - if pkg_deps.include?('swig') - $stdout.print 'Installing SWIG...' if run_silent? - # download and install SWIG - fname = download_and_install(SWIG_URL, SWIG_ZIP, 'swig.exe') - $stdout.puts 'done!' if run_silent? - Config.instance.log_progress("Installed #{fname}") - set_config('swig', fname) - Config.save - end - # if doxygen was not found in the PATH - if pkg_deps.include?('doxygen') - $stdout.print 'Installing Doxygen...' if run_silent? - # download and install doxygen - fname = download_and_install(DOXYGEN_URL, File.basename(URI(DOXYGEN_URL).path), 'doxygen.exe', 'doxygen') - $stdout.puts 'done!' if run_silent? - Config.instance.log_progress("Installed #{fname}") - set_config('doxygen', fname) - Config.save - end - # if git was not found in the PATH - if pkg_deps.include?('git') - $stdout.print 'Installing Git...' if run_silent? - # download and install doxygen - fname = download_and_install(GIT_URL, File.basename(URI(GIT_URL).path), 'git.exe', 'git') - $stdout.puts 'done!' if run_silent? - Config.instance.log_progress("Installed #{fname}") - set_config('git', fname) - Config.save - end - end + PkgManager.install(pkg_deps) + # unless pkg_deps.empty? + # # autoinstall or not? + # unless wants_autoinstall? + # STDERR.puts <<~__ERROR_TXT + # ERROR: This system lacks installed versions of the following required software packages: + # #{pkg_deps.join(', ')} + # + # Install these packages and try again. + # __ERROR_TXT + # exit(1) + # end + # # if SWIG was not found in the PATH + # if pkg_deps.include?('swig') + # $stdout.print 'Installing SWIG...' if run_silent? + # # download and install SWIG + # fname = download_and_install(SWIG_URL, SWIG_ZIP, 'swig.exe') + # $stdout.puts 'done!' if run_silent? + # Config.instance.log_progress("Installed #{fname}") + # set_config('swig', fname) + # Config.save + # end + # # if doxygen was not found in the PATH + # if pkg_deps.include?('doxygen') + # $stdout.print 'Installing Doxygen...' if run_silent? + # # download and install doxygen + # fname = download_and_install(DOXYGEN_URL, File.basename(URI(DOXYGEN_URL).path), 'doxygen.exe', 'doxygen') + # $stdout.puts 'done!' if run_silent? + # Config.instance.log_progress("Installed #{fname}") + # set_config('doxygen', fname) + # Config.save + # end + # # if git was not found in the PATH + # if pkg_deps.include?('git') + # $stdout.print 'Installing Git...' if run_silent? + # # download and install doxygen + # fname = download_and_install(GIT_URL, File.basename(URI(GIT_URL).path), 'git.exe', 'git') + # $stdout.puts 'done!' if run_silent? + # Config.instance.log_progress("Installed #{fname}") + # set_config('git', fname) + # Config.save + # end + # end [] end - # only called after src gem build - def cleanup_prerequisites - tmp_tool_root = File.join(ENV['HOME'].gsub("\\", '/'), '.wxruby3') - path = get_cfg_string('swig') - unless path.empty? || !path.start_with?(tmp_tool_root) - path = File.dirname(path) while File.dirname(path) != tmp_tool_root - rm_rf(path) - end - path = get_cfg_string('doxygen') - unless path.empty? || !path.start_with?(tmp_tool_root) - path = File.dirname(path) while File.dirname(path) != tmp_tool_root - rm_rf(path) - end - path = get_cfg_string('git') - unless path.empty? || !path.start_with?(tmp_tool_root) - path = File.dirname(path) while File.dirname(path) != tmp_tool_root - rm_rf(path) - end - end + # # only called after src gem build + # def cleanup_prerequisites + # tmp_tool_root = File.join(ENV['HOME'].gsub("\\", '/'), '.wxruby3') + # path = get_cfg_string('swig') + # unless path.empty? || !path.start_with?(tmp_tool_root) + # path = File.dirname(path) while File.dirname(path) != tmp_tool_root + # rm_rf(path) + # end + # path = get_cfg_string('doxygen') + # unless path.empty? || !path.start_with?(tmp_tool_root) + # path = File.dirname(path) while File.dirname(path) != tmp_tool_root + # rm_rf(path) + # end + # path = get_cfg_string('git') + # unless path.empty? || !path.start_with?(tmp_tool_root) + # path = File.dirname(path) while File.dirname(path) != tmp_tool_root + # rm_rf(path) + # end + # end def expand(cmd) super("bash -c \"#{cmd}\"") @@ -164,39 +166,39 @@ def bash(*cmd, **kwargs) private - def download_and_install(url, zip, exe, unpack_to=nil) - # make sure the download destination exists - tmp_tool_root = File.join(ENV['HOME'].gsub("\\", '/'), '.wxruby3') - dest = unpack_to ? File.join(tmp_tool_root, unpack_to) : File.join(tmp_tool_root, File.basename(zip, '.*')) - mkdir(tmp_tool_root) unless File.directory?(tmp_tool_root) - # download - chdir(tmp_tool_root) do - unless download_file(url, zip) - STDERR.puts "ERROR: Failed to download installation package for #{exe}" - exit(1) - end - # unpack - unless sh("powershell Expand-Archive -LiteralPath '#{zip}' -DestinationPath #{dest} -Force") - STDERR.puts "ERROR: Failed to unpack installation package for #{exe}" - exit(1) - end - # cleanup - rm_f(zip) - end - # find executable - find_exe(dest, exe) - end - - def find_exe(path, exe) - fp = Dir.glob(File.join(path, '*')).find { |p| File.file?(p) && File.basename(p) == exe } - unless fp - Dir.glob(File.join(path, '*')).each do |p| - fp = find_exe(p, exe) if File.directory?(p) - return fp if fp - end - end - fp - end + # def download_and_install(url, zip, exe, unpack_to=nil) + # # make sure the download destination exists + # tmp_tool_root = File.join(ENV['HOME'].gsub("\\", '/'), '.wxruby3') + # dest = unpack_to ? File.join(tmp_tool_root, unpack_to) : File.join(tmp_tool_root, File.basename(zip, '.*')) + # mkdir(tmp_tool_root) unless File.directory?(tmp_tool_root) + # # download + # chdir(tmp_tool_root) do + # unless download_file(url, zip) + # STDERR.puts "ERROR: Failed to download installation package for #{exe}" + # exit(1) + # end + # # unpack + # unless sh("powershell Expand-Archive -LiteralPath '#{zip}' -DestinationPath #{dest} -Force") + # STDERR.puts "ERROR: Failed to unpack installation package for #{exe}" + # exit(1) + # end + # # cleanup + # rm_f(zip) + # end + # # find executable + # find_exe(dest, exe) + # end + # + # def find_exe(path, exe) + # fp = Dir.glob(File.join(path, '*')).find { |p| File.file?(p) && File.basename(p) == exe } + # unless fp + # Dir.glob(File.join(path, '*')).each do |p| + # fp = find_exe(p, exe) if File.directory?(p) + # return fp if fp + # end + # end + # fp + # end def wx_configure bash('./configure --prefix=`pwd`/install --disable-tests --without-subdirs --without-regex --with-expat=builtin --with-zlib=builtin --disable-debug_info') diff --git a/rakelib/lib/config/pkgman/mingw.rb b/rakelib/lib/config/pkgman/mingw.rb new file mode 100644 index 00000000..fdaf3ab3 --- /dev/null +++ b/rakelib/lib/config/pkgman/mingw.rb @@ -0,0 +1,112 @@ +# Copyright (c) 2023 M.J.N. Corino, The Netherlands +# +# This software is released under the MIT license. + +### +# wxRuby3 buildtools platform pkg manager base +### + +module WXRuby3 + + module Config + + module Platform + + module PkgManager + + XTRA_PLATFORM_DEPS = %w[python] + + class << self + + def install(pkgs) + # do we need to install anything? + if !pkgs.empty? || builds_wxwidgets? + # check windows distro compatibility + unless no_autoinstall? || pkgman + # do we need to build wxWidgets? + pkgs.concat(XTRA_PLATFORM_DEPS) if builds_wxwidgets? + $stderr.puts <<~__ERROR_TXT + ERROR: Do not know how to install required packages for distro type '#{WXRuby3.config.sysinfo.os.variant}'. + + Make sure the following packages (or equivalent) are installed and than try again with `--no-autoinstall`: + #{pkgs.join(', ')} + __ERROR_TXT + exit(1) + end + # can we install? + unless no_autoinstall? || pkgman + $stderr.puts 'ERROR: Do not know how to check for or install required packages. Please install manually and than try again with `--no-autoinstall`.' + exit(1) + end + # do we need to build wxWidgets? + if builds_wxwidgets? + # add platform specific packages for wxWidgets + pkgs.concat(XTRA_PLATFORM_DEPS) + end + # do we actually have any packages to install? + unless pkgs.empty? + # autoinstall or not? + unless wants_autoinstall? + $stderr.puts <<~__ERROR_TXT + ERROR: This system may lack installed versions of the following required software packages: + #{pkgs.join(', ')} + + Install these packages and try again. + __ERROR_TXT + exit(1) + end + # do the actual install + unless run(pkgman.make_install_command(*pkgs)) + $stderr.puts <<~__ERROR_TXT + ERROR: Failed to install all or some of the following required software packages: + #{pkgs.join(', ')} + + Fix any problems or install these packages yourself and try again. + __ERROR_TXT + if WXRuby3.config.run_silent? + $stderr.puts "For error details check #{WXRuby3.config.silent_log_name}" + end + exit(1) + end + end + end + end + + private + + def pkgman + @pkgman ||= WXRuby3.config.sysinfo.os.pkgman + end + + def builds_wxwidgets? + Config.get_config('with-wxwin') && Config.get_cfg_string('wxwin').empty? + end + + def no_autoinstall? + Config.get_config('autoinstall') == false + end + + def wants_autoinstall? + WXRuby3.config.wants_autoinstall? + end + + def run(cmd) + $stdout.print "Running #{cmd}..." + rc = WXRuby3.config.bash(cmd) + $stderr.puts(rc ? 'done!' : 'FAILED!') + rc + end + + def expand(cmd) + `#{is_root? ? '' : 'sudo '}#{cmd}` + end + + end + + end + + end + + end + +end From 4a3a66c64b6eb1705ca179c9d57e699067a8c750 Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 1 Jun 2024 13:46:27 +0200 Subject: [PATCH 07/11] update plat4m gem dependencies --- Gemfile | 2 +- rakelib/gem.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index e616ea46..6b8e0c0b 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem 'rake' gem 'nokogiri', '~> 1.12' gem 'minitest', '~> 5.15' gem 'test-unit', '~> 3.5' -gem 'plat4m', '~> 1.0' +gem 'plat4m', '~> 1.1' group :develop, optional: true do gem 'ruby_memcheck', '~> 1.2' end diff --git a/rakelib/gem.rake b/rakelib/gem.rake index d2e68e99..578794f0 100644 --- a/rakelib/gem.rake +++ b/rakelib/gem.rake @@ -79,7 +79,7 @@ file WXRuby3::Gem.gem_file => WXRuby3::Gem.manifest do gem.add_dependency 'rake' gem.add_dependency 'minitest', '~> 5.15' gem.add_dependency 'test-unit', '~> 3.5' - gem.add_dependency 'plat4m', '~> 1.0' + gem.add_dependency 'plat4m', '~> 1.1' gem.rdoc_options << '--exclude=\\.dll' << '--exclude=\\.so' << From a31914a79b3a6b0bd163c0d821f9d26b2c71e8fc Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 1 Jun 2024 13:49:09 +0200 Subject: [PATCH 08/11] cleanup --- rakelib/lib/config/mingw.rb | 103 ------------------------------------ 1 file changed, 103 deletions(-) diff --git a/rakelib/lib/config/mingw.rb b/rakelib/lib/config/mingw.rb index a45a16c5..b5d3d22a 100644 --- a/rakelib/lib/config/mingw.rb +++ b/rakelib/lib/config/mingw.rb @@ -27,13 +27,6 @@ module Config module Platform - # SWIG_URL = 'https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.2.0/swigwin-4.2.0.zip/download' - # SWIG_ZIP = 'swigwin-4.2.0.zip' - # - # DOXYGEN_URL = 'https://www.doxygen.nl/files/doxygen-1.10.0.windows.x64.bin.zip' - # - # GIT_URL = 'https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/MinGit-2.43.0-64-bit.zip' - def self.included(base) base.class_eval do include Config::UnixLike @@ -87,71 +80,9 @@ def check_tool_pkgs def install_prerequisites pkg_deps = super PkgManager.install(pkg_deps) - # unless pkg_deps.empty? - # # autoinstall or not? - # unless wants_autoinstall? - # STDERR.puts <<~__ERROR_TXT - # ERROR: This system lacks installed versions of the following required software packages: - # #{pkg_deps.join(', ')} - # - # Install these packages and try again. - # __ERROR_TXT - # exit(1) - # end - # # if SWIG was not found in the PATH - # if pkg_deps.include?('swig') - # $stdout.print 'Installing SWIG...' if run_silent? - # # download and install SWIG - # fname = download_and_install(SWIG_URL, SWIG_ZIP, 'swig.exe') - # $stdout.puts 'done!' if run_silent? - # Config.instance.log_progress("Installed #{fname}") - # set_config('swig', fname) - # Config.save - # end - # # if doxygen was not found in the PATH - # if pkg_deps.include?('doxygen') - # $stdout.print 'Installing Doxygen...' if run_silent? - # # download and install doxygen - # fname = download_and_install(DOXYGEN_URL, File.basename(URI(DOXYGEN_URL).path), 'doxygen.exe', 'doxygen') - # $stdout.puts 'done!' if run_silent? - # Config.instance.log_progress("Installed #{fname}") - # set_config('doxygen', fname) - # Config.save - # end - # # if git was not found in the PATH - # if pkg_deps.include?('git') - # $stdout.print 'Installing Git...' if run_silent? - # # download and install doxygen - # fname = download_and_install(GIT_URL, File.basename(URI(GIT_URL).path), 'git.exe', 'git') - # $stdout.puts 'done!' if run_silent? - # Config.instance.log_progress("Installed #{fname}") - # set_config('git', fname) - # Config.save - # end - # end [] end - # # only called after src gem build - # def cleanup_prerequisites - # tmp_tool_root = File.join(ENV['HOME'].gsub("\\", '/'), '.wxruby3') - # path = get_cfg_string('swig') - # unless path.empty? || !path.start_with?(tmp_tool_root) - # path = File.dirname(path) while File.dirname(path) != tmp_tool_root - # rm_rf(path) - # end - # path = get_cfg_string('doxygen') - # unless path.empty? || !path.start_with?(tmp_tool_root) - # path = File.dirname(path) while File.dirname(path) != tmp_tool_root - # rm_rf(path) - # end - # path = get_cfg_string('git') - # unless path.empty? || !path.start_with?(tmp_tool_root) - # path = File.dirname(path) while File.dirname(path) != tmp_tool_root - # rm_rf(path) - # end - # end - def expand(cmd) super("bash -c \"#{cmd}\"") end @@ -166,40 +97,6 @@ def bash(*cmd, **kwargs) private - # def download_and_install(url, zip, exe, unpack_to=nil) - # # make sure the download destination exists - # tmp_tool_root = File.join(ENV['HOME'].gsub("\\", '/'), '.wxruby3') - # dest = unpack_to ? File.join(tmp_tool_root, unpack_to) : File.join(tmp_tool_root, File.basename(zip, '.*')) - # mkdir(tmp_tool_root) unless File.directory?(tmp_tool_root) - # # download - # chdir(tmp_tool_root) do - # unless download_file(url, zip) - # STDERR.puts "ERROR: Failed to download installation package for #{exe}" - # exit(1) - # end - # # unpack - # unless sh("powershell Expand-Archive -LiteralPath '#{zip}' -DestinationPath #{dest} -Force") - # STDERR.puts "ERROR: Failed to unpack installation package for #{exe}" - # exit(1) - # end - # # cleanup - # rm_f(zip) - # end - # # find executable - # find_exe(dest, exe) - # end - # - # def find_exe(path, exe) - # fp = Dir.glob(File.join(path, '*')).find { |p| File.file?(p) && File.basename(p) == exe } - # unless fp - # Dir.glob(File.join(path, '*')).each do |p| - # fp = find_exe(p, exe) if File.directory?(p) - # return fp if fp - # end - # end - # fp - # end - def wx_configure bash('./configure --prefix=`pwd`/install --disable-tests --without-subdirs --without-regex --with-expat=builtin --with-zlib=builtin --disable-debug_info') end From 24d3f3f5aa550d45efa370cec1f2604e7ee97595 Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 1 Jun 2024 14:01:26 +0200 Subject: [PATCH 09/11] bumping version --- lib/wx/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wx/version.rb b/lib/wx/version.rb index 0ddad00b..93fc5da1 100644 --- a/lib/wx/version.rb +++ b/lib/wx/version.rb @@ -3,5 +3,5 @@ # This software is released under the MIT license. module Wx - WXRUBY_VERSION = '1.0.0' + WXRUBY_VERSION = '1.0.1' end From 2a0c5fa36bf8a268b690ce070640fe7afbbf37df Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 1 Jun 2024 15:20:28 +0200 Subject: [PATCH 10/11] add ubuntu:latest to merge verification builds --- .cirrus.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 7579592c..de48611a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -100,6 +100,14 @@ verify_1_task: env: osname: linux distro: opensuse + - name: Cirrus CI / Ubuntu AMD64 Release + container: + image: ubuntu:latest + cpu: 4 + memory: 8G + env: + osname: linux + distro: ubuntu before_script: | ./tools/scripts/cirrus/setup-$distro.sh From 1dece0ee168354d3ecae3ad4e2c13cde724f1c3a Mon Sep 17 00:00:00 2001 From: Martin Corino Date: Sat, 1 Jun 2024 15:35:01 +0200 Subject: [PATCH 11/11] make linux release host image versions explicit; remove obsolete macosx monterey M1 --- tools/scripts/cirrus/cirrus-release.yml | 51 +++++++++---------------- 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/tools/scripts/cirrus/cirrus-release.yml b/tools/scripts/cirrus/cirrus-release.yml index 7444133e..4bc99f38 100644 --- a/tools/scripts/cirrus/cirrus-release.yml +++ b/tools/scripts/cirrus/cirrus-release.yml @@ -10,7 +10,7 @@ release_task: matrix: - name: Cirrus CI / Fedora AMD64 Release container: - image: fedora:latest + image: fedora:40 cpu: 4 memory: 8G env: @@ -18,7 +18,7 @@ release_task: distro: fedora - name: Cirrus CI / Fedora ARM64 Release arm_container: - image: fedora:latest + image: fedora:40 cpu: 4 memory: 8G env: @@ -26,7 +26,7 @@ release_task: distro: fedora - name: Cirrus CI / OpenSuSE Leap AMD64 Release container: - image: opensuse/leap:latest + image: opensuse/leap:15.5 cpu: 4 memory: 8G env: @@ -34,7 +34,7 @@ release_task: distro: opensuse - name: Cirrus CI / OpenSuSE Leap ARM64 Release arm_container: - image: opensuse/leap:latest + image: opensuse/leap:15.5 cpu: 4 memory: 8G env: @@ -42,7 +42,7 @@ release_task: distro: opensuse - name: Cirrus CI / Ubuntu AMD64 Release container: - image: ubuntu:latest + image: ubuntu:24.04 cpu: 4 memory: 8G env: @@ -50,7 +50,7 @@ release_task: distro: ubuntu - name: Cirrus CI / Ubuntu ARM64 Release arm_container: - image: ubuntu:latest + image: ubuntu:24.04 cpu: 4 memory: 8G env: @@ -58,7 +58,7 @@ release_task: distro: ubuntu - name: Cirrus CI / Debian AMD64 Release container: - image: debian:latest + image: debian:12 cpu: 4 memory: 8G env: @@ -66,19 +66,12 @@ release_task: distro: debian - name: Cirrus CI / Debian ARM64 Release arm_container: - image: debian:latest + image: debian:12 cpu: 4 memory: 8G env: osname: linux distro: debian - - name: Cirrus CI / MacOSX Monterey M1 Release - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode:latest - env: - osname: darwin - distro: macosx - latest_only: true - name: Cirrus CI / MacOSX Ventura M1 Release macos_instance: image: ghcr.io/cirruslabs/macos-ventura-xcode:latest @@ -131,21 +124,20 @@ test_release_task: - Cirrus CI / OpenSuSE Leap ARM64 Release - Cirrus CI / Ubuntu ARM64 Release - Cirrus CI / Debian ARM64 Release - - Cirrus CI / MacOSX Monterey M1 Release - Cirrus CI / MacOSX Ventura M1 Release - Cirrus CI / MacOSX Sonoma M1 Release matrix: - - name: Cirrus CI / Fedora AMD64 Release Test + - name: Cirrus CI / Fedora Latest AMD64 Release Test container: - image: fedora:latest + image: fedora:40 cpu: 4 memory: 8G env: osname: linux distro: fedora - - name: Cirrus CI / Fedora ARM64 Release Test + - name: Cirrus CI / Fedora Latest ARM64 Release Test arm_container: - image: fedora:latest + image: fedora:40 cpu: 4 memory: 8G env: @@ -153,7 +145,7 @@ test_release_task: distro: fedora - name: Cirrus CI / OpenSuSE Leap AMD64 Release Test container: - image: opensuse/leap:latest + image: opensuse/leap:15.5 cpu: 4 memory: 8G env: @@ -161,7 +153,7 @@ test_release_task: distro: opensuse - name: Cirrus CI / OpenSuSE Leap ARM64 Release Test arm_container: - image: opensuse/leap:latest + image: opensuse/leap:15.5 cpu: 4 memory: 8G env: @@ -169,7 +161,7 @@ test_release_task: distro: opensuse - name: Cirrus CI / Ubuntu AMD64 Release Test container: - image: ubuntu:latest + image: ubuntu:24.04 cpu: 4 memory: 8G env: @@ -177,7 +169,7 @@ test_release_task: distro: ubuntu - name: Cirrus CI / Ubuntu ARM64 Release Test arm_container: - image: ubuntu:latest + image: ubuntu:24.04 cpu: 4 memory: 8G env: @@ -185,7 +177,7 @@ test_release_task: distro: ubuntu - name: Cirrus CI / Debian AMD64 Release Test container: - image: debian:latest + image: debian:12 cpu: 4 memory: 8G env: @@ -193,19 +185,12 @@ test_release_task: distro: debian - name: Cirrus CI / Debian ARM64 Release Test arm_container: - image: debian:latest + image: debian:12 cpu: 4 memory: 8G env: osname: linux distro: debian - - name: Cirrus CI / MacOSX Monterey M1 Release Test - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode:latest - env: - osname: darwin - distro: macosx - latest_only: true - name: Cirrus CI / MacOSX Ventura M1 Release Test macos_instance: image: ghcr.io/cirruslabs/macos-ventura-xcode:latest