[fxruby-users] Support for Ruby 1.9?

Kevin Burge kevin.burge at systemware.com
Tue Apr 17 18:47:08 EDT 2007


I'm trying to compile FXRuby under Ruby 1.9.0.  After applying the below 
patch, I get the error:

FXRbApp.cpp: In member function 'long int 
FXRbApp::onChoreThreads(FX::FXObject*, FX::FXSelector, void*)':
FXRbApp.cpp:98: error: 'CHECK_INTS' was not declared in this scope

I would fix this, but I'm not familiar with what this code is doing.

Any estimate on support for 1.9 in FXRuby?  I only ask because I'm 
trying to add support for 1.9 to my extensions, and I end up building 
FXRuby in the process.

Thanks,

Kevin

Index: pre-config.rb
===================================================================
--- pre-config.rb    (revision 921)
+++ pre-config.rb    (working copy)
@@ -20,7 +20,7 @@
 def fox_include_files_found?
   search_directories.each do |path|
     filename = File.join(path, "fxver.h")
-    return true if FileTest.exists?(filename)
+    return true if FileTest.exist?(filename)
   end
   false
 end
@@ -44,7 +44,7 @@
 def installed_fox_version
   search_directories.each do |path|
     filename = File.join(path, "fxver.h")
-    if FileTest.exists?(filename)
+    if FileTest.exist?(filename)
       foxMajor, foxMinor, foxLevel = read_fox_version(filename)
       return [foxMajor, foxMinor, foxLevel].join('.')
     end
Index: ext/fox16/extconf.rb
===================================================================
--- ext/fox16/extconf.rb    (revision 921)
+++ ext/fox16/extconf.rb    (working copy)
@@ -20,7 +20,7 @@
  
   incdirs.each do |incdir|
     filename = File.join(incdir, "fxver.h")
-    if FileTest.exists?(filename)
+    if FileTest.exist?(filename)
       idircflag = "-I" + incdir
       $CPPFLAGS += " " + idircflag unless 
$CPPFLAGS.split.include?(idircflag)
       return
@@ -50,7 +50,7 @@
  
   incdirs.each do |incdir|
     filename = File.join(incdir, "FXScintilla.h")
-    if FileTest.exists?(filename)
+    if FileTest.exist?(filename)
       $autodetected_fxscintilla = true
       idircflag = "-I" + incdir
       $CPPFLAGS += " " + idircflag unless 
$CPPFLAGS.split.include?(idircflag)
@@ -87,11 +87,11 @@
   $libs = append_library($libs, "FOX-1.6")
   $CFLAGS = $CFLAGS + " -fpermissive -DWIN32 -Iinclude"
   if is_fxscintilla_build?
-    File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if 
FileTest.exists?('scintilla_wrap.cpp.bak')
+    File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if 
FileTest.exist?('scintilla_wrap.cpp.bak')
     $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
     $libs = append_library($libs, "fxscintilla")
   else
-    File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if 
FileTest.exists?('scintilla_wrap.cpp')
+    File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if 
FileTest.exist?('scintilla_wrap.cpp')
   end
 end
 
@@ -113,11 +113,11 @@
   $CFLAGS = $CFLAGS + " /DWIN32 /DUNICODE /GR /GX /Iinclude"
   $LOCAL_LIBS = $LOCAL_LIBS + "FOX-1.6.lib"
   if is_fxscintilla_build?
-    File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if 
FileTest.exists?('scintilla_wrap.cpp.bak')
+    File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if 
FileTest.exist?('scintilla_wrap.cpp.bak')
     $CFLAGS = $CFLAGS + " /DWITH_FXSCINTILLA /DHAVE_FOX_1_6"
     $libs = append_library($libs, "fxscintilla")
   else
-    File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if 
FileTest.exists?('scintilla_wrap.cpp')
+    File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if 
FileTest.exist?('scintilla_wrap.cpp')
   end
 end
 
@@ -139,11 +139,11 @@
   $libs = append_library($libs, "FOX-1.6")
   $CFLAGS = $CFLAGS + " -O0 -Iinclude"
   if is_fxscintilla_build?
-    File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if 
FileTest.exists?('scintilla_wrap.cpp.bak')
+    File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if 
FileTest.exist?('scintilla_wrap.cpp.bak')
     $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
     $libs = append_library($libs, "fxscintilla")
   else
-    File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if 
FileTest.exists?('scintilla_wrap.cpp')
+    File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if 
FileTest.exist?('scintilla_wrap.cpp')
   end
 end
 
Index: install.rb
===================================================================
--- install.rb    (revision 921)
+++ install.rb    (working copy)
@@ -237,7 +237,6 @@
       @table[k] = default
     end
   end
-  private :init
 
   def save
     File.open(SAVE_FILE, 'w') {|f|




http://www.systemware.com/



More information about the fxruby-users mailing list