{"id":14,"date":"2010-03-30T13:57:18","date_gmt":"2010-03-30T13:57:18","guid":{"rendered":"https:\/\/pim.famnit.upr.si\/wp\/?p=14"},"modified":"2021-11-17T11:29:48","modified_gmt":"2021-11-17T11:29:48","slug":"executable-script-in-os-x-for-standalone-windows-software","status":"publish","type":"post","link":"https:\/\/pim.famnit.upr.si\/wp\/?p=14","title":{"rendered":"Executable script in OS X for standalone windows based software"},"content":{"rendered":"<p>I often use Windows software on OS X and I do like <a href=\"http:\/\/portableapps.com\/\">PortableApps<\/a> as they do not need installation. For running Windows software I use <a href=\"http:\/\/www.winehq.org\/\">Wine<\/a> (the open source version of <a href=\"http:\/\/www.codeweavers.com\/\">Crossover<\/a>) and I always create an icon to click on to open Windows software. This icons can be placed in the Dock or in any other folder (Applications for example). This is a simple guide on how to do it.<\/p>\n<p><!--more--><\/p>\n<p>I used to compile Wine trough MacPorts, but that is to much of a hassle.<br \/>\nThe simple way to do it is to download <a href=\"http:\/\/winebottler.kronenberg.org\/\">WineBottler<\/a> and drag both <strong>Wine<\/strong><br \/>\nand <strong>WineBottler<\/strong> to the <strong>Applications<\/strong> folder (or even just<br \/>\nWine).<\/p>\n<p>Now we can try to run our windows software from the command line like<br \/>\nthis (in one line):<\/p>\n<pre> \/Applications\/Wine.app\/Contents\/MacOS\/startwine \n                \/Users\/mkljun\/Programs\/ASP32\/Asp32.exe\n<\/pre>\n<p>Note that I have all my Windows software in a folder named <strong>Programs<\/strong><br \/>\nand that <strong>Asp32.exe<\/strong> is the Windows executable file.<\/p>\n<p>Now we need to create an <strong>AppleScript<\/strong> for our Windows<br \/>\nstandalone software. First open <strong>AppleScript Editor<\/strong>. In a new<br \/>\nwindow write your command in quotes with <strong>&#8220;do shell script&#8221;<\/strong> in<br \/>\nfront of it (in one line):<\/p>\n<pre>do shell script \"\/Applications\/Wine.app\/Contents\/MacOS\/startwine \n                \/Users\/mkljun\/Programs\/ASP32\/Asp32.exe\"<\/pre>\n<p>Now save the script as an <strong>Application<\/strong>. And that&#8217;s it. Double<br \/>\nclicking on a new &#8220;application&#8221; should open our Windows software.<\/p>\n<p align=\"center\"><img decoding=\"async\" class=\"no_float\" src=\"https:\/\/pim.famnit.upr.si\/wp\/wp-content\/uploads\/2021\/11\/wine2.png\" \/><\/p>\n<p>We can even change the icon of the new file by selecting it and<br \/>\nclicking <strong>CMD+i <\/strong>(or right clicking and selecting <strong>&#8220;Get info&#8221;<\/strong>).<br \/>\nDragging the (png) image from the <strong>Finder<\/strong> window to the left<br \/>\nupper corner where the AppleScript icon residues, will change it.<\/p>\n<p align=\"center\"><img decoding=\"async\" class=\"no_float\" src=\"https:\/\/pim.famnit.upr.si\/wp\/wp-content\/uploads\/2021\/11\/wine1.png\" \/><\/p>\n<p>Note:<\/p>\n<ul>\n<li>Windows software should not be moved as this would affect your newly<br \/>\ncreated script that expects is in the selected folder.<\/li>\n<li><a href=\"http:\/\/www.winehq.org\/\">Wine<\/a> is and opensource software<br \/>\nand is supported by donations. <a href=\"http:\/\/winebottler.kronenberg.org\/\">WineBottler<\/a> is a one-man<br \/>\nproject and he likes to read (<a href=\"http:\/\/www.amazon.de\/wishlist\/1BW11BBX8R4B0\">his reading wishlist<\/a>).<br \/>\n<a href=\"http:\/\/portableapps.com\/\">PortableApps<\/a> is an open source<br \/>\nproject ass well.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I often use Windows software on OS X and I do like PortableApps as they do not need installation. For running Windows software I use Wine (the open source version of Crossover) and I always create an icon to click on to open Windows software. This icons can be placed in the Dock or in&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1794,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[15,35],"class_list":["post-14","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-4-software-hints","tag-meeting","tag-scitech"],"_links":{"self":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":3,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":1796,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/1796"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/media\/1794"}],"wp:attachment":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}