0

我正在寻找适用于 Ruby 2.0 的 Win32 wxRuby gem,有人知道在哪里可以找到它吗?我没有成功尝试构建它,似乎该项目已经死了。

4

2 回答 2

2

我仍在战斗中,我在 linux Ubuntu (Xenial 16.04) 和 Mint (17 和 18) 上成功地为 i386 和 amd64 使用 Ruby 2.3 构建了 wxRuby,测试和使用来自这里这里的说明:

# temporary add this source for a complete libwxgtk2.8
echo "deb http://archive.ubuntu.com/ubuntu precise main universe" | tee /etc/apt/sources.list.d/precise-copies.list
apt update

# install required packages
apt-get install libwxgtk2.8-dev libglib2.0-dev libpango1.0-dev libgtk2.0-dev libgtk-3-dev pangox-1.0-dev build-essential curl git

# install recommended swig version
wget "http://downloads.sourceforge.net/project/swig/swig/swig-1.3.38/swig-1.3.38.tar.gz?r=&ts=1471028964&use_mirror=ufpr" -O swig-1.3.38.tar.gz
tar zxvf swig-1.3.38.tar.gz
cd swig-1.3.38
./configure
make -j8
make install

# install ruby, using RVM
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm install 2.3.0

# wxRuby
git clone https://github.com/cinnammon/wxRuby-ng
cd ~/wxRuby-ng
export WXRUBY_EXCLUDED=GLCanvas
export WXRUBY_VERSION=2.0.1
# add "Config = RbConfig unless defined?(Config)" to the top of ./rakefile
# and change 'raise "This version of Ruby (#{RUBY_VERSION}) is not supported"'
# on line 38 for "SWIG_MINIMUM_VERSION = '1.3.37'"
rake
# I got some "extern" "static" declaration errors on some files,
# just changed "static" to "extern" and all went well
rake install

# remove source
rm /etc/apt/sources.list.d/precise-copies.list
apt update

我将继续尝试将其移植到 Windows 或者可能坚持使用 Linux,但会更新这篇文章 :)

于 2016-08-16T12:51:11.140 回答
1

支持 wxruby gem 的最新 ruby​​ 版本是 1.9.1(gem 名为 wxruby-ruby19,名为 wxruby 的 gem 专用于 ruby​​ 1.8)并且 wxruby 项目不再开发。因此,如果您需要使用 ruby​​ 2.0,您现在只能靠自己了。但是请尝试在http://www.ruby-forum.com/forum/wxruby询问一些以前的 wxruby 开发人员仍然活跃并渴望提供帮助。

于 2013-05-20T07:25:11.790 回答