sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Ruby FFI, Need Suggestions!

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 531 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      Anton_S
      last edited by

      Hello everyone,

      I came across the Ruby FFI and am amazed by its features and advantages over the DL, Win32API, or Win32::API. I love its implementations and want to use it for my future library. I did a few adjustments, changed Config to ENV data, and got it working, though not sure how to implement it:

      1. Should I place the FII library into my library's folder, or have it in the separate, in the plugins folder?
      2. Should I recompile it under my own namespace? The library can have an unlimited amount of callbacks, so recompiling it isn't required; however, what if someone else uses a different version of FFI - might results in overwriting, and incompatibilities... Including, recompiling FFI to own namespace is a long pain - the library is huge!
      3. I think we need to have agreements here, like posting the FFI library as a separate, shared plugin, and have the user require it for his/her own plugin/library.
      4. And what if we want to use other gems, should each person recompile it to his/her own version? I don't think so, I think we should have a Topic with a list of gems (adjusted and set compatible for SU) so the user can go there, download, and use it for his/her library. The only thing the user will have to check is whether the required library is there, and display a message if it isn't: Like "The AMS library requires Ruby-FII, please go here to download it; otherwise, the library will not load!"

      What you think ❓

      • Anton
      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        @anton_s said:

        Should I place the FII library into my library's folder, or have it in the separate, in the plugins folder?
        Should I recompile it under my own namespace? The library can have an unlimited amount of callbacks, so recompiling it isn't required; however, what if someone else uses a different version of FFI - might results in overwriting, and incompatibilities... Including, recompiling FFI to own namespace is a long pain - the library is huge!

        I would recommend compiling it under your own namespace - to avoid version conflict if anyone else should try to load a different version. That what I did with TT_Lib2 when I needed Win32::API.

        @anton_s said:

        I think we need to have agreements here, like posting the FFI library as a separate, shared plugin, and have the user require it for his/her own plugin/library.

        The problem is that every SketchUp extension developer isn't on this forum to check this list.

        @anton_s said:

        The only thing the user will have to check is whether the required library is there, and display a message if it isn't: Like "The AMS library requires Ruby-FII, please go here to download it; otherwise, the library will not load!"
        That somewhat that path I took with TT_Lib, but trust me - it will generate a lot of "This plugins doesn't work!!!111!!1" - because people never read the instructions. I've started expanding the library check with my plugins so the users will get a webdialog that describes why the plugin didn't load and direct link to the require libraries. That takes cares of most of the people who tries to install it.

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by

          @tt_su said:

          I would recommend compiling it under your own namespace - to avoid version conflict if anyone else should try to load a different version.

          Ok, I guess that's the way I should go πŸ˜’

          @tt_su said:

          The problem is that every SketchUp extension developer isn't on this forum to check this list.

          Lazy people πŸ˜†

          @tt_su said:

          That somewhat that path I took with TT_Lib, but trust me - it will generate a lot of "This plugins doesn't work!!!111!!1" - because people never read the instructions. I've started expanding the library check with my plugins so the users will get a webdialog that describes why the plugin didn't load and direct link to the require libraries. That takes cares of most of the people who tries to install it.

          Even I my self got one of these messages before πŸ˜’ Good results require some work πŸ˜† πŸ‘

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement