• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Fooling the EW?

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 5 Posters 327 Views 5 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.
  • D Offline
    Dan Rathbun
    last edited by 14 Mar 2014, 04:49

    @Fredo6:

    How does:

    
        # Statement for EWH compatibility
        begin ; SketchupExtension.new "toto", "toto.rb" ; rescue ; end
    
    

    .. fool the EW ?

    The extension object is never registered, so never gets a registry entry, and never gets loaded.

    It is unreferenced so gets cleaned up by GC.

    And what does "toto" mean ?

    I'm not here much anymore.

    1 Reply Last reply Reply Quote 0
    • J Offline
      jiminy-billy-bob
      last edited by 14 Mar 2014, 07:27

      @dan rathbun said:

      And what does "toto" mean ?

      It's a french placeholder, like "foobar" or so.

      25% off Skatter for SketchUcation Premium Members

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chris Fullmer
        last edited by 17 Mar 2014, 19:24

        I think this just fools the EW server script checker. It rummages through a script looking to make sure the script calls SketchupExtension.new or something like that.

        Its not ideal to fool it like this, as the checking mechanism might change in the future and it might search for something more advanced. BUT, the EW doesn't really handle plugin bundles that should not be extensions, like libraries. So that is why we are seeing a few of the libraries trying to fool the EW server script checker like this.

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • F Offline
          fredo6
          last edited by 17 Mar 2014, 20:10

          My plugins do register as SU Extension, but these détails are all handled centrally by LibFredo6, based on the information provided in the .plugin file of each script.

          I discovered that the EWH compliance was actually that the top .rb file contains such registration statement, but did not care about what was loaded (so 'toto' was perfect for that).

          Fredo

          1 Reply Last reply Reply Quote 0
          • T Online
            TIG Moderator
            last edited by 17 Mar 2014, 22:40

            Then on the other hand... thomthom does some slightly different workarounds
            His loader RB registers an Extension for TT Lib based on one of his helpers ['core.rb'].
            BUT this is never 'used' - so it's actually pointless.
            Any of his tools requiring the contents of his TT Lib folder will load them as needed anyway.
            So it his TT Lib extension is disabled by the user it makes no difference, because the contents of the TT Lib get found/loaded anyway.
            It does cause some confusion with a few users, because whether or not the TT Lib Extension is enabled has no affect on its efficacy...
            Disabling [or removing] the RB that makes the TT Lib Extension WILL stop that Extension getting made, but the TT Lib is always still available, provided the TT Lib folder is left intact !

            One cleaner workaround would be for the first run of the installed RB extension-maker to delete itself!... so in future it does not load at all, and so there is no spurious sham TT Lib extension to confuse users...

            If a newer version is installed then the self-deleting loader would not survive past its first run... 😮

            TIG

            1 Reply Last reply Reply Quote 0
            • F Offline
              fredo6
              last edited by 17 Mar 2014, 22:54

              In my case, LibFredo6 is registered as a true extension. If you disable it from the Extension Dialog box, then all my scripts relying on LibFredo6 will be disabled.

              I do agree that SU should provide some built-in support for scripts relying on a common library as this becomes more frequent:

              • managed the requirement of the Lib
              • possibly check its version for compatibility

              Fredo

              PS: I wonder why there is a field requirement when you upload a plugin, but it is not displayed in the PS tool browser window.

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

              Advertisement