I'd like to be able to use Cucumber to drive the development of Windows applications so I went looking for something like Webrat for desktop GUI's. I found Win32::GuiTest. There is a project of the same name on RubyForge that contains the same source but that's as far as that went.
Win32::GuiTest is a C extension that was compiled with Cygwin, so I wanted to rebuild a native version. I found some instructions on Kevin Kleinfelter's blog that look much like below, but using VC++ 2008 I got to skip a couple of steps:
- Download and install Visual C++ Express Edition (this is free, I got the 2008 version)
- Edit $RUBY_HOME/lib/ruby/1.8/i386-mswin32/config.h and delete the “#error MSC version unmatch” line
- Open a Visual Studio 2008 Command Prompt
- Start
- All Programs
- Microsoft Visual C++ 2008 Express Edition
- Visual Studio Tools
- cd C:\temp\guitest020218\ext\cguitest
- I'm building the guitest extension
- ruby extconf.rb
- nmake
- mt.exe -manifest cguitest.so.manifest -outputresource:cguitest.so;2
- Copy and paste the command above. You need it all from the 'mt' to the ';2'
- nmake install
- cd \temp\guitest020218
- ruby install.rb config
- ruby install.rb install
- To test:
- irb
- require 'win32/guitest'
- check response is '=> true'
No comments :
Post a Comment