我正在寻找Ruby 2.0的Win32 wxRuby gem,有人知道在哪里找到它吗?我没有成功地建立它,看起来这个项目已经死了。
我仍然在战斗中,我成功地在linux Ubuntu (Xenial 16.04)和Mint(17和18)上使用Ruby 2.3构建了wxRuby,用于i386和amd64,测试和使用这里和这里的指令:
# 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,但会更新这篇文章:)
支持wxruby gem的最新版本是1.9.1 (gem被命名为wxruby-ruby19,名为wxruby的gem专用于ruby 1.8), wxruby项目不再开发。因此,如果您需要使用ruby 2.0,您现在就得自己动手了。但是可以试着在http://www.ruby-forum.com/forum/wxruby上询问,那里有一些以前的wxruby开发人员仍然很活跃,并且渴望提供帮助。