VCVRack / library

Database for the VCV Library
https://library.vcvrack.com/
385 stars 82 forks source link

compressing ZIP file on OSX system: removing unneeded, unwanted folders #114

Closed antoniotuzzi closed 6 years ago

antoniotuzzi commented 6 years ago

this is not an ISSUE but more an ADVICE:

if you do development on OSX and at the end you compress the package for your plugin using the right mouse button :

compress yourpluginpackage

you can remove the unneeded items doing 2 commands on the the terminal:

1) TO REMOVE the __MACOSX dir do:

**zip -d yourpluginpackage.zip __MACOSX/\***

2) TO DELETE ALL the .DS_Store files do:

**zip -d yourpluginpackage.zip \*/.DS_Store**

@jeremywen, is not so important but, maybe you want to add to you FAQ

jeremywen commented 6 years ago

Done. https://github.com/jeremywen/JW-Modules/wiki/Dev-FAQ-for-VCV-Rack

jeremywen commented 6 years ago

I added this to my .profile

function cleanmaczip(){
    zip -d "$1" '*/.DS_Store' && zip -d "$1" '__MAC*'
}
AndrewBelt commented 6 years ago

Why are you using the ZIP compressor in MacOS? Why not just run make dist, assuming your Makefile is similar to https://github.com/VCVRack/Tutorial/blob/master/Makefile?

jeremywen commented 6 years ago

I have to go to each OS and make builds copy them to dropbox and then copy them into the right folder then make the zip

AndrewBelt commented 6 years ago

With separated ZIPs for each arch being supported, why not just collect the three ZIPs from each machine's make dist step?

jeremywen commented 6 years ago

And with all this manual moving of files and switching computers right clicking to compress is easy

AndrewBelt commented 6 years ago

Maybe I don't understand what your workflow is. You have to use all three computers anyway to make the build, so why is your method easier than producing three ZIPs on each computer, collecting them on one computer, and then uploading them to GitHub?

jeremywen commented 6 years ago

well then there is only one nice zip url in the manifest and only one zip uploaded to github - less chance for error and one sha256 and one check to virus total

AndrewBelt commented 6 years ago

Okay, I see, you're using the old combined ZIP method. Using that is still fine if you wish, since I don't plan to remove support for it.

In that case, I propose someone writes a generic zipmerge.sh script to take the first N-1 arguments, unzip them, and then recombine them into a ZIP with last argument as the filename. Example:

./zipmerge.sh MyModule-0.5.0-*.zip MyModule-0.5.0.zip

I'm aware of the zipmerge utility which does this same thing, but my testing of it seemed to give incorrect permissions of the output files, requiring sudo rm to remove them, despite unzipping them without root.

jeremywen commented 6 years ago

ok i will make that script

AndrewBelt commented 6 years ago

Ah, wait, I realized how I could make it easily. I can do it if you want.

jeremywen commented 6 years ago

do it 👍

AndrewBelt commented 6 years ago

zipmerge.sh script

./zipmerge.sh MyPlugin-0.5.0.zip MyPlugin-0.5.0-*.zip

https://gist.github.com/AndrewBelt/2c8fbe4ca24231a147e348391fa747d6

jeremywen commented 6 years ago

ooh adding this to the dev faq - thanks!

https://github.com/jeremywen/JW-Modules/wiki/Dev-FAQ-for-VCV-Rack#how-can-i-merge-the-zip-files-from-each-os

AndrewBelt commented 6 years ago

Closing since everything here is obsolete. It is no longer recommended to merge ZIP packages, and you shouldn't be running your own ZIP commands, just use make dist and remove the .DS_Store files prior to running if they're present.