[Ironruby-core] Detecting Mono path

Sanghyeon Seo sanxiyn at gmail.com
Sun Oct 28 22:30:02 EDT 2007


The official way to detect path to Mono runtime is to run pkg-config.
The following patch should resolve TODO.

Index: Rakefile
===================================================================
--- Rakefile    (revision 53)
+++ Rakefile    (working copy)
@@ -32,7 +32,8 @@
 if ENV['mono'].nil?
   FRAMEWORK_DIR = Pathname.new(ENV['windir'].dup) + 'Microsoft.NET' +
'Framework' + 'v2.0.50727'
 else
-  FRAMEWORK_DIR = Pathname.new('/usr/local/lib/mono/2.0')  # TODO:
get mono path from ENV
+  libdir = IO.popen('pkg-config --variable=libdir mono').read.strip
+  FRAMEWORK_DIR = Pathname.new(libdir) + 'mono' + '2.0'
 end

 CS_COMPILER             = ENV['mono'].nil? ? 'csc' : 'gmcs'

-- 
Seo Sanghyeon


More information about the Ironruby-core mailing list