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...