RBZ and Components library
-
Hi all,
Here is my problem: I have a plugin that is an extension, and it must be installed along with a components set. I want this components library to be installed in the Components folder of SU (same level as Plugins). Is it possible to create a RBZ that will correctly install these components ?
Regards, -
Not easily.
Why can't the folder reside inside the tool's subfolder within plugins?
That way you keep control of its path, what if a user does not have permission to write to the main Components folder ?The installer puts the RBZ's files/subfolders into the default Plugins folder [or with SCF v1.3.0 now in beta, perhaps into an alternative Custom-Plugins folder]...
However, some ideas...
You install your Components folder inside your main tool's subfolder.
Then when the 'loader' .rb runs and loads the extension's files etc within the subfolder, it runs a special .rb[s] that sorts out this Components folder 'behind the scenes'...
It runs, and looks to see if there is your Xcomponents folder in the tools subfolder AND that it contains some SKPs.
If not it does no more... BUT if so, AND if the main Components folder is writable, it makes a folder within that named Xcomponents, and then copies all of the SKP files across from your tool's subfolder/Xcomponents folder [using File.read/write with rb/wb etc].
It then deletes all of the SKP files in the subfolder/Xcomponents folder...
When it next runs it stops because the folder is empty... -
Thanks TIG, clever answer as usual...
-
for a mac you can create a symbolic link the will show the skps in the 'Components Browser'
lnk_skps = %x(ln -s "#{Sketchup.find_support_file("Plugins") << "/your_folder/your_skps"}" "#{Sketchup.find_support_file('Components')}" 2>&1)
is there not a windows equivalent?
john -
@driven said:
for a mac you can create a symbolic link the will show the skps in the 'Components Browser'
lnk_skps = %x(ln -s "#{Sketchup.find_support_file("Plugins") << "/your_folder/your_skps"}" "#{Sketchup.find_support_file('Components')}" 2>&1)
is there not a windows equivalent?
johnFor Vista and higher:
mklink /D LinkName TargetPath
XP "supports" a similar feature called junction points, but I don't think it's available by default.
For XP:
links LinkName TargetPath
For Vista and higher:
mklink \J LinkName TargetPath
Advertisement