{"id":486,"date":"2010-04-28T10:24:54","date_gmt":"2010-04-28T14:24:54","guid":{"rendered":"http:\/\/www.caseyodonnell.org\/blog\/?p=486"},"modified":"2010-04-28T10:24:54","modified_gmt":"2010-04-28T14:24:54","slug":"complicating-things-to-simplify-them","status":"publish","type":"post","link":"https:\/\/caseyodonnell.org\/blog\/index.php\/2010\/04\/28\/complicating-things-to-simplify-them\/","title":{"rendered":"Complicating Things to Simplify Them"},"content":{"rendered":"<p>I have a problem. I complicate things in order to simplify them. <a href=\"http:\/\/caseyodonnell.org\/athens_uga\/codework\/wxblogger\/\" target=\"_blank\" rel=\"noopener\">wxBlogger<\/a> began that way, as did <a href=\"http:\/\/wxcode.sourceforge.net\/components\/wxcurl\/\" target=\"_blank\" rel=\"noopener\">wxCURL<\/a>, as did <a href=\"http:\/\/caseyodonnell.org\/athens_uga\/codework\/wxsync\/\" target=\"_blank\" rel=\"noopener\">wxSync<\/a>. Each began with the idea of simplifying some of the more mundane tasks that I do each day. Since I began working with <a href=\"http:\/\/unity3d.com\/\" target=\"_blank\" rel=\"noopener\">Unity 3D<\/a>, I&#8217;ve found on several\u00a0occasions\u00a0that using Mac OS X&#8217;s built-in right-click &#8220;Compress &#8230;&#8221; did strange things, particularly with executable files, that would only be discovered by Windows users later. Global Game Jam 2009 this bit us. It&#8217;s bitten me several other times.<\/p>\n<p>Now, theoretically, I could open the &#8220;Archive Utility&#8221; application housed in (\/System\/Library\/CoreServices\/) and change its preferences, instructing it to use the more Windows friendly &#8220;ZIP&#8221; format rather than&#8230; Well, whatever it does and calls &#8220;.zip&#8221;.\u00a0But, that would be simple, right? What would be interesting about that solution?<\/p>\n<p>Thus I taught myself a little Apple Script and whipped up what I&#8217;ve called &#8220;<a href=\"http:\/\/caseyodonnell.org\/files\/WinZip.app.zip\">WinZip<\/a>,&#8221; which is clearly not this <a href=\"http:\/\/www.winzip.com\/index.htm\" target=\"_blank\" rel=\"noopener\">WinZip<\/a>. My little deal is a Mac App \/ Apple Script that does the work of making a Windows compatible ZIP file for you without having to know the commands or do it yourself in the Terminal. The source code and application are all released under the <a href=\"http:\/\/www.wxwidgets.org\/about\/newlicen.htm\" target=\"_blank\" rel=\"noopener\">wxWidgets License<\/a>.<\/p>\n<pre lang=\"AppleScript\">-- WinZip for Mac OS X\n-- Casey O'Donnell\n-- http:\/\/www.caseyodonnell.org\/\n-- This script takes a dropped file (or several) and compresses them in a Windows\n-- compatible format using the \"ditto\" command.\n--\n-- The source and the application are released under the wxWidgets Licence, which\n-- can be found here: http:\/\/www.wxwidgets.org\/about\/newlicen.htm\non open fileList\n\tset szPathName to \"\"\n\tset szPathDest to \"\"\n\trepeat with i in fileList\n\t\tset szPathName to quoted form of POSIX path of (i as text)\n\n\t\tset iLength to length of szPathName\n\t\tset szLastChars to get characters (iLength - 1) thru (iLength - 1) of szPathName\n\n\t\tif (szLastChars contains \"\/\") then\n\t\t\tset szPathDest to get characters 1 thru (iLength - 2) of szPathName\n\t\t\tset szPathDest to szPathDest &amp; \".zip'\"\n\t\telse\n\t\t\tset szPathDest to get characters 1 thru (iLength - 1) of szPathName\n\t\t\tset szPathDest to szPathDest &amp; \".zip'\"\n\t\tend if\n\n\t\ttell application \"Terminal\"\n\t\t\tdo script \"ditto -c -k -X \" &amp; szPathName &amp; \" \" &amp; szPathDest &amp; \"; exit\"\n\t\tend tell\n\tend repeat\nend open<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have a problem. I complicate things in order to simplify them. wxBlogger began that way, as did wxCURL, as did wxSync. Each began with the idea of simplifying some of the more mundane tasks that I do each day. Since I began working with Unity 3D, I&#8217;ve found on several\u00a0occasions\u00a0that using Mac OS X&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[13,30,183,202,216],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-discontinutity","tag-archive","tag-complicate","tag-simplify","tag-unity-3d","tag-zip"],"_links":{"self":[{"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":0,"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"wp:attachment":[{"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/caseyodonnell.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}