sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    RBZ installation on MAC OS

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 492 Views 2 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.
    • S Offline
      sonjachr
      last edited by

      I am generating my RBZ file using a Powershell script on my Windows PC, by collecting all plugin files, doing scrambling and then zip the files and rename to RBZ

      [pre:14foiw11][Reflection.Assembly]::LoadWithPartialName( "System.IO.Compression.FileSystem" )
      $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
      [System.IO.Compression.ZipFile]::CreateFromDirectory( $srcdir, $zipfilename, $compressionLevel, $True)
      Copy-ToZip $srcdir -ZipFile $zipFilename[/pre:14foiw11]
      Installation of the RBZ file works fine on my Windows PC, but on the MAC it fails.
      When I unzip the file and zip it using Winzip, the Installation on the MAC is working.

      So, I guess, some of my parameters in the Powershell zip routine may be wrong.

      Anybody having an idea what is wrong?

      Help is very much appreciated!

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

        it may be backslashes in your paths...

        @unknownuser said:

        ZipFile.CreateFromDirectory adds archive entries (ZipArchiveEntry) with back-slash "" in FullName which is not a path separator on Mac. Writing a custom packaging routine with a slash "/" as path separator in FullName fixes the issues: public static void ZipDirectory(string archiveFileName, string directoryPath) { using (var archive = ZipFile.Open(archiveFileName, ZipArchiveMode.Create)) { var rootDirectory = directoryPath.TrimEnd('\'); var files = Directory.GetFiles(rootDirectory, ".", SearchOption.AllDirectories); foreach (var fileName in files) { string relativePath = fileName.Substring(rootDirectory.Length + 1).Replace("\", "/"); ZipArchiveEntry entry = archive.CreateEntry(relativePath); using (var destination = entry.Open()) { using (var source = File.OpenRead(fileName)) { source.CopyTo(destination); } } } } }

        WinZip commandline tools should work for both [web 100%,100:35sef4yi]http://www.winzip.com/downcl.html[/web:35sef4yi] as they even have a mac edition...

        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
        • S Offline
          sonjachr
          last edited by

          Hi John,
          many thanks for your quick reply.

          It was really helpful. I am now using the command line of winzip in my Powershell script, as you have proposed. The generated RBZ file is now working on my MAC also.

          Thanks a lot for your help.

          Sonja

          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