sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    RBZ and Components library

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 4 Posters 335 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Didier BurD Offline
      Didier Bur
      last edited by

      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,

      DB

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

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

        TIG

        1 Reply Last reply Reply Quote 0
        • Didier BurD Offline
          Didier Bur
          last edited by

          Thanks TIG, clever answer as usual...

          DB

          1 Reply Last reply Reply Quote 0
          • D Offline
            driven
            last edited by

            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

            learn from the mistakes of others, you may not live long enough to make them all yourself...

            1 Reply Last reply Reply Quote 0
            • danielbowringD Offline
              danielbowring
              last edited by

              @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?
              john

              For 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
              
              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement