Win32 Utils
-
Ok as some of us know Ruby Win32API doesn't support callbacks and it was writen a long time ago. Read http://forums.sketchucation.com/viewtopic.php?f=180&t=33756&p=296865#p296865 to get familiar with the problem. But Its not the end of the world - My idea was to get the callback function by using win32 Utilities: http://rubyforge.org/frs/?group_id=85&release_id=37782 Actually it wasn't my idea, but I love it. My problem: I donwloaded win32-api-1.4.5.zip and don't know which file to use to interact with new module win32 + ::API in this case. Or is there a different way I should do that?
-
I would recommend using TT_Lib2, but I don't see what software license it uses. Thomas?
-
FYI, Dan Berger no longer updates thru that RubyForge project page.
He has moved his projects to Github... and releases his packages as gems/gemsets thru RubyGems.org
http://rubygems.org/gems/win32-api/versions/Latest ver is 1.4.8, but you have to compile the mswin32 edition. (He does supply a pre-compiled api.so binary for the mingw edition.)
ADD: win32-api is released under Artistic License 2.0, which ThomThom must abide by for that portion of his library.
-
@jim said:
I would recommend using TT_Lib2, but I don't see what software license it uses. Thomas?
Thanks, I downloaded it and look forward to use it.
@dan rathbun said:
Latest ver is 1.4.8, but you have to compile the mswin32 edition. (He does supply a pre-compiled api.so binary for the mingw edition.)
ADD: win32-api is released under Artistic License 2.0, which ThomThom must abide by for that portion of his library.
Okay thanks!!! The latest gem is with me now, but how do I compileit? - I have 3 ruby versions: 1.8.6, 1.8.7, and1.9.2
-
-
Mind you, I'd rather not that the version os Win32 Utils I bundle with TT_Lib2 is redistrobuted with any other packages. I made that bundle so it was wrapped in my namespace and I could control the version. If it is distributed through other packages it could cause problems if there was an update.
-
@anton_s said:
Okay thanks!!! The latest gem is with me now, but how do I compileit? - I have 3 ruby versions: 1.8.6, 1.8.7, and1.9.2
1.9.x is out of the question... Sketchup cannot load the interpreter DLL in the 1.9 branch.
I would recommend using the version SU v8 is distro'd with: Ruby v1.8.6-p287
The topic of compiling Ruby extensions has been visited, in other threads. You will need MS Visual Studio, or nmake at least. Or some other compatible compiler. I think TBD uses a free ANSI compiler.
See: this [ Info ] topic, it should lead you to more information, other topic posts, etc. Be prepared to waste a bunch of time learning...
[Info] C/C++ Ruby extensions & SketchUp plugins -
@dan rathbun said:
See: this [ Info ] topic, it should lead you to more information, other topic posts, etc. Be prepared to waste a bunch of time learning...
[Info] C/C++ Ruby extensions & SketchUp pluginsThanks for that info I'll take the time it needs to learn all that ...
About win32-api: It is good that they release the source code, but why wouldn't they release the source + the compiled api?
About Ruby: My Operating System is Windowns XP and it uses .dll file libraries, but why all ruby libraries are writen in .so files(Linux Library)?
-
@anton_s said:
About win32-api: It is good that they release the source code, but why wouldn't they release the source + the compiled api?
He does.. it's just that he has switched to use the minGW compiler, because it's easier (much more so than MS Visual Studio, for Ruby work.)
But.. Sketchup and it's API are compiled with MSVS. So it may be safer to use the mswin32 compiled Ruby DLL.
Although some people have loaded the mingw32 compiled Ruby DLL under Sketchup, time will tell if there's a bad side-effect, or not.@anton_s said:
About Ruby: My Operating System is Windowns XP and it uses .dll file libraries, but why all ruby libraries are writen in .so files(Linux Library)?
Well.. they don't respect Windows. Ruby can load DLL files with
require()
in the 1.8.x branch, but I am told that they are dropping this support. Not sure if it's 1.9.x, 2.0 ?That will suck, because you can't right click an .SO file, and get version info like you can with a DLL file. (Or use Win32 normal command line tools to check that kind of info.)
Unless.. we in the MS world can find a way to add that feature back in, via a Ruby extension. -
@thomthom said:
Mind you, I'd rather not that the version os Win32 Utils I bundle with TT_Lib2 is redistrobuted with any other packages. I made that bundle so it was wrapped in my namespace and I could control the version. If it is distributed through other packages it could cause problems if there was an update.
Right, distributing someone else's software causes confusion at best and can cause compatibility problems at worst; not to mention it's just bad form.
I meant that since many (most?) SketchUp users that also use plugins are likely to already have TT_Lib2 installed, it wouldn't be much of a problem to use the lib; if that's an acceptable use.
-
Sure, anyone can use the lib if they want. I've tried to document as much as possible.
Advertisement