[58174] trunk/dports/emulators/minivmac-devel

ryandesign at macports.org ryandesign at macports.org
Wed Sep 23 08:48:20 PDT 2009


Revision: 58174
          http://trac.macports.org/changeset/58174
Author:   ryandesign at macports.org
Date:     2009-09-23 08:48:16 -0700 (Wed, 23 Sep 2009)
Log Message:
-----------
minivmac-devel: allow ~/Library/Preferences/Gryphel/mnvm_rom to be an alias, which is its intended disposition according to the developer

Modified Paths:
--------------
    trunk/dports/emulators/minivmac-devel/Portfile

Added Paths:
-----------
    trunk/dports/emulators/minivmac-devel/files/readalias.applescript

Modified: trunk/dports/emulators/minivmac-devel/Portfile
===================================================================
--- trunk/dports/emulators/minivmac-devel/Portfile	2009-09-23 12:53:41 UTC (rev 58173)
+++ trunk/dports/emulators/minivmac-devel/Portfile	2009-09-23 15:48:16 UTC (rev 58174)
@@ -119,7 +119,8 @@
 }
 
 pre-fetch {
-    if {![file exists ${my_rom_dir}/${my_rom_file}] && ![file exists ${my_app_dir}/${my_rom_file}]} {
+    set my_real_rom_dir [exec osascript ${filespath}/readalias.applescript [file normalize ${my_rom_dir}]]
+    if {![file exists ${my_real_rom_dir}/${my_rom_file}] && ![file exists ${my_app_dir}/${my_rom_file}]} {
         ui_msg "****************************************************************"
         ui_msg "To build Mini vMac, you will need a ROM file from a Macintosh"
         ui_msg "Plus or 512Ke. And to run it, you need a ROM file from the type"
@@ -130,7 +131,8 @@
         ui_msg "and transfer it to a real physical early Macintosh that you own."
         ui_msg "Run the CopyRoms program there, then transfer the ROM file back"
         ui_msg "to this Mac and put it in ${my_rom_dir}"
-        ui_msg "or ${my_app_dir}."
+        ui_msg "(which can be an alias or symlink if desired) or"
+        ui_msg "${my_app_dir}."
         ui_msg "****************************************************************"
         return -code error "${my_rom_file} not found"
     }

Added: trunk/dports/emulators/minivmac-devel/files/readalias.applescript
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/readalias.applescript	                        (rev 0)
+++ trunk/dports/emulators/minivmac-devel/files/readalias.applescript	2009-09-23 15:48:16 UTC (rev 58174)
@@ -0,0 +1,14 @@
+-- $Id$
+
+on run argv
+	tell application "Finder"
+		set the_path to item 1 of argv
+		try
+			-- Will throw an error if the_path does not exist.
+			set the_item to POSIX file the_path as alias
+			-- Will throw an error if the_item is not an alias.
+			return POSIX path of (original item of the_item as text)
+		end try
+		return the_path
+	end tell
+end run


Property changes on: trunk/dports/emulators/minivmac-devel/files/readalias.applescript
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090923/f891b26e/attachment.html>


More information about the macports-changes mailing list