Setting up RBZ package lost its symbolic links on MacOS

Hello there,

The following problem occurs with Sketchup 2017 & 2019 (don’t try on 2018 version)

I am creating a rbz package that contains a MacOS framework.

When the package is setup using the extension manager, it is uncompressed in the /Users/Mootools/Library/Application Support/SketchUp 20XX/SketchUp/Plugins/ folders
During that process the unzip procedure does not keep the symbolic links at extraction and the framework get broken as shown on the image below :


As a result the framework fails to load and the extension fails to install.

If I install manually the rbz package, there is no problem.
The symbolic links are kept (as shown below) and everything went fine.


I believe the rbz uncompress procedure should be improved to support framework package on a next release.


Symlinks seems to be very rarely used in zip files, as well as in a Windows environment. Would this be functionality for mac only?

did you preserve symlinks using the flag when zipping the folder?

zip -x "*.DS_Store" --symlinks


I’m with John on this. Sounds like a problem with whatever you used to zip the archive.

I compress with the following flags:
zip -y -r …/myplugin.rbz *

Please note that when I unzip the above produced archive in the /Users/USERNAME/Library/Application Support/SketchUp 20XX/SketchUp/Plugins/ folders everything work fine and the symbolic links are kept.

–symlinks and -y are equivalent.

–symlinks is the linux flag.
if you type zip -help on MacOS only the -y flag is available.

So my archive is correct and the problem occurs during sketchup rbz installation. :wink:

I did a quick test and it seems SU uses ruby to unzip the rbz which resolves any symlinks [which breaks them]…

however, it doesn’t ‘unzip’ any contained zip’s inside the .rbz…

for a test I zipped a .framework and included it in a .rbz >> installed that using Extension Manager…

in the extension I added a short script to unzip and purge the folder on first load…

`unzip "#{dir}"/*.zip -d "#{dir}"`
`rm  "#{dir}"/*.zip`
`rm  "#{dir}"/purge.rb`

the symlinks survived and the framework is intact…

not sure if MacOS ships with ‘unzip’ but it could be included [and purged] if not…

btw: both -y and the long form --symlink work on my mac [El Capitan]…


The following rbz allows to reproduce the problem:
Test.rbz (57.9 KB)

This rbz does nothing. You can use extension manager to make sketchup install it.

Once setup, under Sketchup 2019, on setup you can open:

  • /Users/Mootools/Library/Application Support/SketchUp 2019/SketchUp/Plugins/test/ folder
  • Click on test.framework
  • you’ll see that the symbolic links are removed as shown the capture below (no more link arrow on the files)


If you open the original rbz you’ll see the arrow, meaning that we have a link, on Modules, Resources and SkpDialogs as shown below:


this should work after a SU restart…

test_zipped.rbz (62.5 KB)

if it was part of a registered extension, it may not need the restart [untested]…


Thanks you John!

The trick you give works perfectly! I would not have find this workaround on my side!
Symbolic links are kept if the framework is embed in a zip then unzip using ruby script.

Wow ! :slight_smile: