<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>~~LIFE!<br></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, 8 Jul 2015 at 10:06, James Paige <<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>The copy of zip.exe that the OHRRPGCE fetches from <a href="http://HamsterRepublic.com/ohrrpgce/support/zip.zip" target="_blank">http://HamsterRepublic.com/ohrrpgce/support/zip.zip</a> is Info-Zip version 2.3<br><br></div>The newest version I was able to find for Windows was Info-Zip version 3.0 from 2008<br><br></div>I tested it, and it does appear to turn on the executable bit for all files, so it would be safe to use.<br></div></div></div></blockquote><div><br></div><div>You're mistaken about this. zip files can store extra OS-specific "external attributes" for each file, but the meaning of those attributes is OS specific - on Windows/DOS, the Windows/DOS file attributes are stored (eg 'hidden', 'archive', 'readonly'...), while on unix, unix file permissions are stored. So if a zip is created on Windows, there are no executable bits at all. What you're seeing is a quirk of the way that the OSX Finder unzips .zips created on DOS/Windows.<br><br>I can't find an ideal tool for actually viewing the external file attributes, but infozip's zipinfo tool (which can also be called as "unzip -Z <zipfile>") shows eg:<br></div><div><span style="font-family:monospace,monospace"><br>-rw-r--r--  3.0 unx      330 tx defN  1-Sep-18 00:26 OHRRPGCE-Game.app/Contents/Resources/ohrhelp/sliceedit_xy.txt<br>drwx---     3.0 fat        0 bx stor  1-Oct-18 23:24 OHRRPGCE-Game.app/Resources/<br>-rw----     3.0 fat       11 tx stor  1-Oct-18 23:15 OHRRPGCE-Game.app/Resources/bundledgame<br></span><br></div><div>This is from a zip file I created on linux (with infozip 3.0, which is probably the default in most distros) and updated on windows (with support/zip.exe, also infozip 3.0). Notice that the number of permission dashes is different.<br></div><div>I had a look at the source code and discovered that for 'fat' (aka DOS) attributes, zipinfo actually displays an 'x' bit (which of course doesn't exist) if either the file is a directory, or has an extension like exe, bat, etc. Uselessly misleading!<br><br></div><div>Incidentally, file entries created by Win XP's builtin zip creator look like:<br><span style="font-family:monospace,monospace"><br>-rw----     2.0 ntf     1128 t- defN 07-Jun-15 13:04 readme.txt<br></span><br></div><div>In addition to the external attributes, there's also an alternative way to store unix file permissions, using "extra fields". But info-zip doesn't do this. (You can use ziptool to read/write these as completely opaque data. ziptool is completely seperate, not part of info-zip. ziptool can't read/write external attributes...)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>There seems to be a ton of misinformation about the zip format out there. Most people seem to believe (as I did this morning) that zip has zero support for file unix file permission attributes. The format supports them, but the zip.exe tool has has no support for controlling them.<br><br></div><div>Anyway, looks like this solves the problem.<br></div></div></blockquote><div><br></div><div>I have a concern that third party Mac archive tools like keka, which some people use, may not set the x bits in the same way as Finder. I figured out a possible solution, if it's required, and it's only a little more complex:<br></div><div>-package ohrrpgce-mac-minimal as a .zip instead of .tar.gz<br></div><div>-on Windows, use ziptool to rename OHRRPGCE-Game.app/* to gamename.app/* inside the archive without extracting it<br></div><div>-use regular zip to add the .rpg and other files and delete README-mac-minimal.txt<br></div><br><div>I started looking into this because Marionline uploaded (quite a while ago) a mac version of her "Space (demo)" game which doesn't work. After a lot of time wasted I finally realised that she had unzipped the .zip the engine created then rezipped it, and in the process the +x flag was lost, even though she did everything on linux. I wonder what weird deficient zip tool she used for that, probably one built into some file manager...</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div><br>---<br></div>James<br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 7, 2015 at 12:19 PM, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>So apparently I was wrong. Mac does *not* automatically set the executable bit on files extracted from zip files.<br><br></div>.zip format actually does support storage of file attributes. The zip/unzip tools on Linux support it, the zip/unzip tools on Mac support it, and the built-in zip support on Windows 7 uses it to turn on the executable bit for all files added to a zip archive.<br><br></div>What does NOT support it is the build of zip.exe that we are actually using in the ohrrpgce on Windows.<br><br></div>So until I have resolved that issue, we can't switch to .zip yet.<br><div><br><br></div></div><div><div class="m_-2408069758578547079gmail-m_-7008280069556225914h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 7, 2015 at 12:02 PM,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">james<br>
2015-07-07 12:02:52 -0700 (Tue, 07 Jul 2015)<br>
123<br>
Distribute Game: export Mac App still needs to use the tar and gzip tools to extract the base app from the minimal tarball<br>
---<br>
U   wip/distribmenu.bas<br>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div></div></div></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div></div></div></div></div>