wxScintilla already comes with a SWIG friendly header file. I modified the rakewx and the Scintilla.i file to include it directly from the wxScintilla install. This means it''s an odd-ball compared to our other classes. Does anyone see a problem with this? I think it''s best to use the one supplied with the installation to avoid problems of the header file getting out of sync with the installed version. Thoughts? Roy
Roy Sutton wrote:> wxScintilla already comes with a SWIG friendly header file. I modified > the rakewx and the Scintilla.i file to include it directly from the > wxScintilla install. This means it''s an odd-ball compared to our other > classes. Does anyone see a problem with this? I think it''s best to use > the one supplied with the installation to avoid problems of the header > file getting out of sync with the installed version. Thoughts?I would definitely prefer to use their SWIG file. Kevin
Here are the patch files for Scintilla. You''ll need to download (and compile) the Scintilla from the wxCode archive on SourceForge http://sourceforge.net/projects/wxcode You''ll need to place the Scintilla.i file into swig/classes/optional scintilla.rb goes into samples/scintilla I didn''t modify any of the other platform rakefiles so you''ll need to make your own patches for those. You must set the WXSCINTILLA environment variable to point to the base Scintilla directory. If you don''t set it, you won''t get Scintilla compiled in (i.e. a build as before) Comments are welcome. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakewx.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Events.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: events.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: EvtHandler.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0003.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakemswin.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0004.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: scintilla.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0005.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Scintilla.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0006.pl
Roy Sutton wrote:> Here are the patch files for Scintilla. You''ll need to download (and > compile) the Scintilla from the wxCode archive on SourceForge > > http://sourceforge.net/projects/wxcodeScintilla doesn''t build out the box on OS X, so I haven''t yet got to make this work. By changing g++ option from -shared to -dynamiclib I could get it to compile a lib that would build and run the C++ Scintilla sample (with some tweaking of latter). Looks cool, but not working perfectly (some keybindings seem wrong, code-folding not working).> You''ll need to place the Scintilla.i file into swig/classes/optional > > scintilla.rb goes into samples/scintillaAll your patches and instructions worked well. I did a clean and reswig, and it all works, up until the last step when it tries to link everything into a .bundle. I get a load of errors like: /Users/alex/installers/wx/wxscintilla_1.68.1/lib/libwxscintilla.dylib(baselib_stream.o) definition of wxBufferedOutputStream::OnSysWrite(void const*, ... for just about every method under the sun. libwxscintilla.dylib looks big (9MB) and I wonder if it has wxwidgets statically linked into it, and if this is the problem. If so I probably need some other option when building Scintilla. Will have a search but let me know if any of this rings bells. alex
Alex Fenton wrote:> Scintilla doesn''t build out the box on OS X, so I haven''t yet got to > make this work. By changing g++ option from -shared to -dynamiclib I > could get it to compile a lib that would build and run the C++ Scintilla > sample (with some tweaking of latter). Looks cool, but not working > perfectly (some keybindings seem wrong, code-folding not working). >Try building Scintilla from the contrib folder in wxWidgets. When I was first starting I used that and it worked OK. It might compile better for you than the wxCode one. The header file is completely different though so you may have to fiddle around. I don''t recall if the headers are compatible enough that you could substitute. Maybe I need to get me one of those macs to try out. Roy
Hi Roy Sutton wrote:> Try building Scintilla from the contrib folder in wxWidgets.It compiles and installs cleanly, thanks for the suggestion.> The header file is completely different > though so you may have to fiddle around.Yep - now I can at least build wxruby with WxScintilla against the version from contrib, using the WxCode header. But I get a slew of undefined symbols, so I guess they''re not compatible enough. I think I''m a bit stuck now b/c I don''t know the OS X compiler enough to fix the standalone distrib nor how to fix the headers from the main distribution version. Your patches look sound so I will commit them (and others) later. I would like to squeeze out an alpha release candidate over the weekend; I don''t think it''s a showstopper for Scintilla only to be integrated on Windows. The pieces will all be there for someone more adept to tie up the ends on OS X and Linux in the near future. alex