Its time to discuss an important subject: Plugins/Extensions

Its time to discuss an important subject: Plugins/Extensions

Postby tomot » Thu Mar 02, 2017 11:13 pm

I have not been able to figure out why my scripts, are no longer able to be read by SketchUp 2016? My scripts don't follow the .RBZ format which is simply a rename of a .ZIP or .RAR file extension

previously a simple How to Text file, was all that was needed to install a plugin.

C:/Users/USERNAME/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins
Works!

C:/Users/USERNAME/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins
Does not Work!

Some Background:
AutoCad 2.5 came on 6 x 3.5" 2.44 diskettes. Something most users here will have to Google first to see what a 2.44 diskette looked like. The reason I mention this, AutoDesk never cut off any of its users from any version they provided year after year. The main reason any program or OS becomes voluminous after a while is because software programmers in general do not wish to alienate their existing user base.

1. NO user likes to lose his or hers way of working..
2. NO user wants to waste his or her time, learning a new way.
In the real world many users don't have time to learn something unfamiliar it reduces their productivity on the job.

Hence I find it a bit heavy handed that a small group here, without the benefit of such history, keep making trivial changes that in reality don't benefit all past and present SketchUp users.
0

tomot 
PluginStore Author
PluginStore Author
 

Re: Its time to discuss an important subject: Plugins/Extens

Postby Dan Rathbun » Sun Mar 05, 2017 1:06 am

tomot wrote:I have not been able to figure out why my scripts, are no longer able to be read by SketchUp 2016?

What is your extension loading policy (in SU2016) set to ?
Window > Preferences > Extensions Policy

It may be set to "Identified Extensions Only". If so, you'll need to set it to "Unrestricted" if you do intend to run scripts that have not been processed through the Trimble Developer portal for a security certificate.

tomot wrote:My scripts don't follow the .RBZ format which is simply a rename of a .ZIP file extension ... previously a simple How to Text file, was all that was needed to install a plugin.

Previously ... was 6 years ago! SketchUp 8M1 and earlier.

tomot wrote:Some Background: AutoCad 2.5 came on 6 x 3.5" 2.44 diskettes. ...

Irrelevant. SketchUp is not going to be distro'd on diskettes, no matter how much you like your old floppy drive. :wink:

tomot wrote:2. NO user wants to waste his or her time, learning a new way.
In the real world many users don't have time to learn something unfamiliar it reduces their productivity on the job.

Sorry. The "real world" and life in general is full of challenges. That is just the way things are. There is always something new to learn around the corner.

You will just have to "man up" and "bite the bullet" learn the new way (which is 5 years old by now,) ... or risk being "left in the dust" of everyone else

tomot wrote:Hence I find it a bit heavy handed that a small group here, without the benefit of such history, keep making trivial changes that in reality don't benefit all past and present SketchUp users.

WHO is "a small group here" ? These security changes in SketchUp 2016 (and higher) were made by Trimble, not us! (And the Trimble team members do not spend much time here, now that the official Discourse forums are up and running. They actually would often say that they did not "officially monitor" the SCF forums.)

And yes the new security certificates put a cramp in the "quick and dirty" script workflow.
0
    I'm not here much anymore. But a PM will fire email notifications.
    User avatar
    Dan Rathbun 
    PluginStore Author
    PluginStore Author
     

    Re: Its time to discuss an important subject: Plugins/Extens

    Postby tomot » Sun Mar 05, 2017 7:40 pm

    @Dan If you have ever written a script, which used to work prior to 2016 you will find that the extension policy set to Unrestricted does nothing to help with the installation process.
    You wasted far to much time nit picking my words hence taking them out of the overall context.
    Highly condensed, your last sentence was all that was needed,....maybe!

    Additionally, I never signed up for the sketchUcation PluginStore
    My name only appears on the list of Authors because I provided some scripts to the sketchUcation forum.
    My scripts were also changed by others to make them conform to .rbz installation. I had nothing to do with that.
    0

    tomot 
    PluginStore Author
    PluginStore Author
     

    Re: Its time to discuss an important subject: Plugins/Extens

    Postby TIG » Sun Mar 05, 2017 8:50 pm

    When SketchUp instigated the RBZ installation format many versions ago [to sidestep the agonies of trying to install into the Plugins folder which might have limited permissions etc], then as a convenience to all of those authors on the SketchUcation forums who had submitted a valued "raw" RB or ZIP format plugin, those offerings were "auto-converted" [at not an inconsiderable "manual" effort] into the superior RBZ format.
    The PluginStore predated the EWH - which incidentally still does not offer many of the better extensions/plugins available at SCF...
    These RBZ versions were then added to the PluginStore, with appropriate recognition etc.
    So the authors could change them in due course, should they desire...
    If you need any help with this contact someone at SCF, who will then give you guidance...

    The days of being able to publish a "raw" RB file and getting it easily installed, have long gone.

    With more recent versions of SketchUp [>v2016] these RBZ files must also be appropriately constructed [file.RB + matching subfolder with the same name], and then 'signed' by Trimble as an approved developer - if it is to be successfully installed and loaded by users in any Extension-Loading-Policy harsher than 'Unrestricted'...

    Times have moved on...
    Making plugins is now more complicated. :shock:
    1
    TIG
    User avatar
    TIG 
    Global Moderator
     

    Re: Its time to discuss an important subject: Plugins/Extens

    Postby Dan Rathbun » Mon Mar 06, 2017 8:06 pm

    tomot wrote:@Dan If you have ever written a script, which used to work prior to 2016 you will find that the extension policy set to Unrestricted does nothing to help with the installation process.

    What is so difficult about right-clicking the RB file, choosing "Send to Zip folder", and then renaming the zip archive to ".rbz" ???

    What is so difficult about using the internal SketchUp Preferences > "Install Extension..." browser panel, to select a RBZ archive to install ???
    0
      I'm not here much anymore. But a PM will fire email notifications.
      User avatar
      Dan Rathbun 
      PluginStore Author
      PluginStore Author
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby tomot » Mon Mar 06, 2017 10:02 pm

      @Dan please look at the attached pic, do you see the end result?
      0

      tomot 
      PluginStore Author
      PluginStore Author
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby TIG » Mon Mar 06, 2017 11:06 pm

      What exactly is your "Concrete_Frame_Tool.rbz" ?
      Without more knowledge of that how can we help ?
      Please attach it to a post or PM it...

      It might be that it was not made correctly...

      Did you take your RB file [and perhaps any supporting files within a related folder] and then ZIP it into an archive, then rename that as an RBZ file ?

      How did you make the ZIP ?
      You cannot simply rename an RB as an RBZ, if must be a ZIPped format, then renamed...

      Please help us help you...
      0
      TIG
      User avatar
      TIG 
      Global Moderator
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby tomot » Tue Mar 07, 2017 1:06 am

      @TIG: you said something to the effect that a main.rb, can now only communicate with any additional files (such as Icons) if found in a same named folder. If my above interpretation is correct, is that why the next 5 steps work, using the SketchUp Extension Manager in SU 2016?

      Hence:
      1. click on my plugins above my name.
      2. goto: SketchUp - Free Ruby Plugins
      3. download: free plugin: doortools
      4. rename doortools.zip to doortools.rbz
      5. voila! doortools.rbz will install via the SketchUp Extension Manager

      Is this the only rabbit hole I should be avoiding?
      0

      tomot 
      PluginStore Author
      PluginStore Author
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby TIG » Tue Mar 07, 2017 1:18 pm

      Here's an overview of writing and installing plugins/extensions.

      The simplest plugin possible is one RB file.
      This needs to be in the user's Plugins folder, so that it auto-loads as SketchUp starts.
      It is possible to load an RB file manually using the Ruby Console and load "full_path_to_RB"

      This 'home-made' RB plugin will only load in >=v2016 if the loading-policy is set to 'unrestricted', because it's not 'signed'.

      A simple RB plugin is not an Extension - more about those later...

      Let's assume you want to give this lone RB to others but in an easily installed RBZ format.
      You must put it in a ZIP file and rename the ZIP with the .RBZ suffix.
      It can then be installed using the Load Extension... tool... the user does not now need to access their Plugins folder.
      However, as the RBZ is unsigned there will be potential loading-policy issues.

      Let's assume you want to avoid any loading-policy issues...
      Make the RBZ as above, but also include in the ZIP an empty subfolder with the very same name as the RB.
      You then need to be a registered developer at Trimble, and submit it for signing here:
      https://extensions.sketchup.com/en/deve ... _signature
      The signing process will fail unless the RBZ contains just the RB and a matching named subfolder.
      The RBZ is quickly processed and a modified RBZ is then available for download.
      This now has two additional files in the subfolder .hash and .susig - these confirm the signing and compatibility with all loading-polices.
      If you modify the RB in any way the hash/signing is broken and it will be limited in loading under stricter policies.
      You can distribute the RBZ to others who can easily install it using the native [or SCF] tools.

      Back to "Extensions"...

      An Extension is just a plugin written in a special way, which lets you enable/disable it in the Extensions manager, so it does not fully load as SketchUp starts unless it is enabled...

      A typical Extension comes in an RBZ and as above it also has a loader RB and subfolder of the same name, the RB contains code to set up the Extension and loads another Ruby file within the subfolder.
      This could then load other Ruby files within that subfolder, or even subfolders with that.
      It can also use HTML/JS/CSS files in this subfolder etc to make dialogs etc.
      The signing process hashes all of these files, so changing any negates the hash.
      The subfolder can of course contain other files like images used in dialogs and toolbars...

      When you submit an RBZ for signing there are options to encrypt your RB files...
      The 'loader' RB is never encrypted, but any within the subfolder can be made into RBS or RBE files.
      RBE only load in >=v2016; they are a securely encrypted format, the old RBS is known to have been cracked and is therefore only suitable for low-grade obfuscation, however it has the advantage of being compatible with all SketchUp versions...
      Unless you have some wondrous intellectual property in your code which you wish to protect, then encryption is not a likely option ?

      If you are to have your Extension hosted at the PluginStore there are few further restrictions. However, if you wish to submit it to the Extension-Warehouse then it is far more onerous.
      I suggest that you read their detailed guidance directly before proceeding.
      You would need to be a registered developer, and write your code in a particular way, otherwise your submission will be rejected for EWH processing and hosting [the signing process is less proscriptive], assuming your RBZ is not found wanting, then they will encrypt the RBZ's RB files as you instruct and sign it for you etc...
      0
      TIG
      User avatar
      TIG 
      Global Moderator
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby tomot » Wed Mar 08, 2017 6:49 pm

      For the benefit to other members reading this thread.

      1. I emailed TIG one of my for purchase ruby scripts in .zip format
      2. We both agreed that indeed when renamed to .rbz the SU 2016 Extension Manager failed to install the script.

      to quote TIG: "As to why there are some issues with some of your ZIP/RBZ files is a mystery..."

      Coincidentally SU 2016 Extension Manager also fails to install all of the other for purchase ruby scripts. This situation came to light when one of my Clients informed me that my scripts do not work in SU 2016. That's the reason I started this thread.
      I also warned clients not to use my scripts for SU 2016 on my blog.


      Manual installation, without the use of Extension Manager in SU 2015 ....works!
      Hence loading the file in the Ruby Console also ....works!

      Manual installation, without the use of Extension Manager in SU 2016 .....fails!
      Hence loading the file in the Ruby Console also ....fails!

      So now you have the problem you can no longer write or edit an .rb files the way you did with past version of SU 2015 and earlier.

      1. If you have to convert the .rb to .rbz first, then try to install in into SU 2016
      and if that install fails, You wont be able to read any Ruby script errors in the Ruby Console.....So now what!

      If you still have SU 2015 installed, stay with that version, and you wont have any install problems.
      0

      tomot 
      PluginStore Author
      PluginStore Author
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby TIG » Wed Mar 08, 2017 7:19 pm

      For my part...

      Your item 2. is not entirely correct.
      I siad to you that I can take your supplied ZIP file and rename it as a RBZ...
      and it will install and load OK in v2016/v2017

      Whereas you cannot get yours to install.
      Which is the quoted 'mystery'...
      You did not supply your RBZ - perhaps that's the missing lonk ??

      There is clearly some issue...

      I suggest you try remaking your ZIP using another [known to be compatible] exe - like 7-Zip or Windows's own 'Send to > ZIP' context-menu.
      Then rename that .ZIP file as .RBZ [ensuring that the folder-options are set to display all file-types, so that you do really rename the file-extension - e.g. "xxx.zip" needs to become "xxx.rbz" not "xxx.rbz.zip", which can happen if folder-options are set to hide known file-types] - this is yet another idea, which I've had since our last exchanges...

      I always use a very similar method to the one you have described, when I make all of my RBZ files [in Win 10] - so it is clearly quite possible to make usable RBZ archives from ZIP files, which will then install and load OK in ALL current versions of SketchUp...
      0
      TIG
      User avatar
      TIG 
      Global Moderator
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby tomot » Wed Mar 08, 2017 7:55 pm

      thanks for the clarification!
      I sent the same file yesterday to my Client who purchased this particular plugin
      and who also informed me about the SU 2016 issue. I just got his response
      0
      Last edited by tomot on Wed Mar 08, 2017 7:58 pm, edited 1 time in total.

      tomot 
      PluginStore Author
      PluginStore Author
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby TIG » Wed Mar 08, 2017 7:57 pm

      Rather than send me the ZIP can you send me the equivalent RBZ so that I can test it too...
      Obviously use PM, to avoid publishing it unduly...
      0
      TIG
      User avatar
      TIG 
      Global Moderator
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby tomot » Wed Mar 08, 2017 8:04 pm

      TIG wrote:Rather than send me the ZIP can you send me the equivalent RBZ so that I can test it too...
      Obviously use PM, to avoid publishing it unduly...


      I will do that, and then in return you can send me a new .rbz file you made for me to try.
      (urgent issue to attend to... I will do this next hr.)
      0

      tomot 
      PluginStore Author
      PluginStore Author
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby TIG » Wed Mar 08, 2017 8:11 pm

      I've sent you my RBZ by PM, I await yours... ;)
      0
      TIG
      User avatar
      TIG 
      Global Moderator
       

      Re: Its time to discuss an important subject: Plugins/Extens

      Postby Dan Rathbun » Wed Mar 08, 2017 8:59 pm

      TIG wrote:I suggest you try remaking your ZIP using another [known to be compatible] exe - like 7-Zip or Windows's own 'Send to > ZIP' context-menu.

      This is the second time you've told him that some zip makers do not work well with SketchUp.

      What was he using to make his Zip files ?

      And are his rb files properly UTF-8 (without BOM) encoded ?
      0
        I'm not here much anymore. But a PM will fire email notifications.
        User avatar
        Dan Rathbun 
        PluginStore Author
        PluginStore Author
         

        Re: Its time to discuss an important subject: Plugins/Extens

        Postby TIG » Wed Mar 08, 2017 9:17 pm

        I think we probably have reached a solution.
        :?
        Tomot gave me a ZIP - which was a true ZIP [code starting "PK"] - when renamed as RBZ it installed fine.
        He then gave me his failing RBZ - its code started "Rar" - showing it to be a WinRAR files NOT a ZIP file.

        So we are now resolving by PM how this happened, and can be avoided in the future.
        I have also suggested he tries making his ZIP files in alternative ways [like 7-Zip or the Win > Send to>Zip...], thereby avoiding issues with RAR files that masquerade as ZIP files !
        0
        TIG
        User avatar
        TIG 
        Global Moderator
         

        Re: Its time to discuss an important subject: Plugins/Extens

        Postby tomot » Thu Mar 09, 2017 4:41 pm

        Here is the bottom line in the .ZIP to .RBZ saga

        My current version of Winrar 5.31 (64-bit) ....failed to faithfully do a proper .zip conversion.

        TIG informed me how one script I sent him was able to be installed while the other was not.
        How is this possible?
        That lead me to investigate what had happens to WinRar, which I have used for .rar .zip and password protect files since the early 2000's

        I attached one of my very old XP HDD's via a none sata to usb connection to my PC. And there it was, an old copy of Winrar 3.71

        1. I used the old Winrar 3.71 to make a new zip file
        2. renamed .zip to .rbz
        3. installed the .rbz
        3. voila! ... it installs via the dreaded Installation Manager!

        I admit I'm a so learner, this is not the first time I have regretted getting on that bloody upgrade treadmill. I can hardly wait for SU 2018 :(
        0

        tomot 
        PluginStore Author
        PluginStore Author
         

        SketchUcation One-Liner Adverts

        by Ad Machine » 5 minutes ago



        Ad Machine 
        Robot
         



         

        Return to Developers' Forum

        Who is online

        Users browsing this forum: Google Bot and 3 guests

        Visit our sponsors: