Sha256: bb567df1fb13ec7fe1abf86c5aa12ee65855ff8a44bc9a15320176067da238d0

Contents?: true

Size: 1.4 KB

Versions: 36

Compression:

Stored size: 1.4 KB

Contents

# To test out the pure Java main program on .NET, execute:
#
#   rake ikvm
#
# Just print dots:
#
#   [mono] pkg/gherkin.exe features
#
# Pretty print all to STDOUT:
#
#   [mono] pkg/gherkin.exe features pretty
#
# To test out the pure C# main program on .NET, execute:
#
#   rake ikvm (you need this to generate all the .dll files needed for the next step)
#
# Then build ikvm/Gherkin.sln. Then:
#
#   [mono] mono ikvm/Gherkin/bin/Debug/Gherkin.exe features/steps_parser.feature
#
namespace :ikvm do
  desc 'Make a .NET .exe'
  task :exe => 'pkg/gherkin.exe'

  desc 'Make a .NET .dll'
  task :dll => 'pkg/gherkin.dll'

  file 'pkg/gherkin.exe' => 'lib/gherkin.jar' do
    mkdir_p 'release' unless File.directory?('release')
    sh("mono /usr/local/ikvm/bin/ikvmc.exe -target:exe lib/gherkin.jar -out:release/gherkin-#{GHERKIN_VERSION}.exe")
  end

  file 'pkg/gherkin.dll' => 'lib/gherkin.jar' do
    mkdir_p 'release' unless File.directory?('release')
    sh("mono /usr/local/ikvm/bin/ikvmc.exe -target:library lib/gherkin.jar -out:release/gherkin-#{GHERKIN_VERSION}.dll")
  end

  desc 'Copy the IKVM .dll files over to the pkg dir'
  task :copy_ikvm_dlls do
    Dir['/usr/local/ikvm/bin/{IKVM.OpenJDK.Core,IKVM.OpenJDK.Text,IKVM.Runtime}.dll'].each do |dll|
      cp dll, 'release'
    end
  end
end

task :ikvm => ['ikvm:exe', 'ikvm:dll', 'ikvm:copy_ikvm_dlls'] do
  sh "mono release/gherkin-#{GHERKIN_VERSION}.exe features"
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
gherkin-1.0.15 tasks/ikvm.rake
gherkin-1.0.15-i386-mswin32 tasks/ikvm.rake
gherkin-1.0.15-i386-mingw32 tasks/ikvm.rake
gherkin-1.0.15-java tasks/ikvm.rake
gherkin-1.0.14 tasks/ikvm.rake
gherkin-1.0.14-i386-mswin32 tasks/ikvm.rake
gherkin-1.0.14-i386-mingw32 tasks/ikvm.rake
gherkin-1.0.14-java tasks/ikvm.rake
gherkin-1.0.13 tasks/ikvm.rake
gherkin-1.0.13-i386-mswin32 tasks/ikvm.rake
gherkin-1.0.13-i386-mingw32 tasks/ikvm.rake
gherkin-1.0.13-java tasks/ikvm.rake
gherkin-1.0.12 tasks/ikvm.rake
gherkin-1.0.12-i386-mswin32 tasks/ikvm.rake
gherkin-1.0.12-i386-mingw32 tasks/ikvm.rake
gherkin-1.0.12-java tasks/ikvm.rake
gherkin-1.0.11 tasks/ikvm.rake
gherkin-1.0.11-i386-mswin32 tasks/ikvm.rake
gherkin-1.0.11-i386-mingw32 tasks/ikvm.rake
gherkin-1.0.11-java tasks/ikvm.rake