-
-
Notifications
You must be signed in to change notification settings - Fork 146
add chmodzip utility #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if (de.name == member && ((de.externalAttributes >> 16) & 07777) != newattr) | ||
{ changes = true; | ||
de.madeVersion = 0x317; // necessary or linux unzip will ignore attributes | ||
de.externalAttributes = (de.externalAttributes & ~(07777 << 16)) | (newattr << 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use octal!7777.
Are there alternatives to using Info-Zip that would fix the problem? I hope that we still manage to put all necessary files into the installers |
if (args.length == 1) | ||
{ | ||
writeln("Usage: zip zipfile attr members..."); | ||
exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just return 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or rather return 1
, as this is an error condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also please write to stderr
@WalterBright ping on that, several review points should be addressed |
@WalterBright ping |
We now support to set attributes use |
Since this program in its current form already exists and has been in use for years as part of the release process, I believe it best to be incorporated in its existing form as the initial revision. After that, I'll issue a PR to address the comments above. |
OK please follow up |
Ok, I started on the PR to address the above issues. But I can't compile it because "madeVersion" is now read-only. |
|
I've been using this to set execute attribute bits when zipping release packages on windows, because the windows zip32 utility doesn't. Usage is like:
dmd2.zip:
del dmd2.zip
zip32 -r dmd2 \dmd2*
chmodzip dmd2.zip 0755
dmd2/freebsd/bin32/rdmd
dmd2/freebsd/bin32/dmd
dmd2/freebsd/bin32/obj2asm
dmd2/freebsd/bin32/dumpobj
dmd2/freebsd/bin32/dman
dmd2/freebsd/bin32/shell
dmd2/freebsd/bin32/ddemangle
dmd2/linux/bin32/rdmd
dmd2/linux/bin32/dmd
dmd2/linux/bin32/obj2asm
dmd2/linux/bin32/dumpobj
dmd2/linux/bin32/dman
dmd2/linux/bin32/ddemangle
dmd2/linux/bin64/rdmd
dmd2/linux/bin64/dmd
dmd2/linux/bin64/obj2asm
dmd2/linux/bin64/dumpobj
dmd2/linux/bin64/dman
dmd2/linux/bin64/ddemangle
dmd2/osx/bin/dumpobj
dmd2/osx/bin/obj2asm
dmd2/osx/bin/shell
dmd2/osx/bin/dmd
dmd2/osx/bin/rdmd
dmd2/osx/bin/dman
dmd2/osx/bin/ddemangle