Registering a Scrambled Extension
-
Hello,
I was just wondering if anyone could tell me if its possible to register a scrambled extension (where the ruby files are in .rbs format) using the SketchUp extension registering api.
e.g. from the docs, the following line registers an extension:
# Create an entry in the Extension list that loads a script called # stairTools.rb. require 'sketchup.rb' require 'extensions.rb' stair_extension = SketchupExtension.new "Stair Tools", "utils/stairTools.rb" stair_extension.version = '1.0' stair_extension.description = "Tools to draw stairs automatically." Sketchup.register_extension stair_extension, true
but what if the ruby file was stairTools.rbs? I've tried just substitiuting the file extension for the .rbs one in my plugin but I just get an error message about the file not being found.
Does anyone have any ideas as to why this would be?
Thanks,
Malcolm Murray -
Just wondering if anyone has any solutions for this? I've tried everything I can think of to get the scrambled extension to load up. When I try it with the non scrambled version everything works fine, but when I link SketchupExtension.new to an rbs file it comes back with a message that the file cannot be found even when I know for certain it is there. I've even used Sketchup.find_support_file to get the path to the rbs file I need to load the plugin with but I still get the same error message.
Has anyone else had any problems with this kind of thing?
Any help would be most appreciated.
Thanks,
Malcolm Murray -
OK, I've kind of sorted this out by not encrypting the file being referenced by SketchupExtension and encrypting the rest. This seems to work for now, but it would be quite nice if you could register encrypted ruby files as extensions.
-
I have the same experience. Extensions can't register an encrypted ruby file, so the extensions needs to register a plain-text file, which in turn loads the encrypted file.
-
In my case it appeared to load the .rbs file, but it wrapped everything into the
SketchupExtension
namespace.
Advertisement