*.rbz installer
-
Hi all,
Im trying out the new ruby installer in Sketchup to install plugins from a *.rbz file.
Would there be a possibility to include components and materials in this rbz-file and let Sketchup install those properly? Previously we allways had customers extract Plugins, Components and Material folders in de the Sketchup directory but the new RBZ way could be a lot easier for some people.Thanks in advance and happy modeling,
Quintus
-
There is no customization of the installer available. Everything is simply extracted into the plugins folder.
-
Because the API now supports the installation compressed archives in code it might be possible to trick these installations into the alternative folders, BUT it requires convoluted coding and a suitably structured archive...
For example your own ZIP/RBZ archive would contain a folder called say 'af8f4bfc-2604-43ec-acf1-489b153db0d6
' [a unique name GUID], your specialized installer requires that everything in a ZIP/RBZ is in one folder... it then unzips that archive's folder into Plugins. Prior to that your code would have made a list of the Plugins folder's entries [ents=Dir(pluginspath).entries] and now it makes another and finds the difference... to get the path to ../Plugins/af8f4bfc-2604-43ec-acf1-489b153db0d6.
Next you look through the contents of that folder [af8f4bfc-2604-43ec-acf1-489b153db0d6] which must have a series on subfolders called say Plugins, Materials, Components and Styles...
So for Plugins your code now moves its contents to Plugins, Materials to Materials and so on. Finally you tidy up by removing the subfolders and then ../Plugins/af8f4bfc-2604-43ec-acf1-489b153db0d6 itself...
So it would be possible to make an installer to extract files into other multiple folders using the new API coding and given a suitably structured ZIP/RBZ archive...
To make your own GUIDs use:
guid="";(0..35).to_a.map{|a|rand(16).to_s(16)}.each_with_index{|e,i|e="-"if[8,13,18,23].include?(i);guid<<e}
-
Hmm thanks TIG, i'm going to look into that.
Quintus
Advertisement