[58175] trunk/dports/emulators/minivmac

ryandesign at macports.org ryandesign at macports.org
Wed Sep 23 08:52:31 PDT 2009


Revision: 58175
          http://trac.macports.org/changeset/58175
Author:   ryandesign at macports.org
Date:     2009-09-23 08:52:31 -0700 (Wed, 23 Sep 2009)
Log Message:
-----------
minivmac: merge r58118 and r58174 from minivmac-devel: allow the ROM files to be in ~/Library/Preferences/Gryphel/mnvm_rom (which can be an alias)

Revision Links:
--------------
    http://trac.macports.org/changeset/58118
    http://trac.macports.org/changeset/58174

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

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

Property Changed:
----------------
    trunk/dports/emulators/minivmac/


Property changes on: trunk/dports/emulators/minivmac
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk/dports/emulators/minivmac-devel:58118-58174

Modified: trunk/dports/emulators/minivmac/Portfile
===================================================================
--- trunk/dports/emulators/minivmac/Portfile	2009-09-23 15:48:16 UTC (rev 58174)
+++ trunk/dports/emulators/minivmac/Portfile	2009-09-23 15:52:31 UTC (rev 58175)
@@ -80,6 +80,7 @@
     bin:expect:expect
 
 set my_app_dir          "${applications_dir}/Mini vMac"
+set my_rom_dir          "~/Library/Preferences/Gryphel/mnvm_rom"
 set my_bootstrap_app    "Mini vMac.app"
 set my_rom_file         vMac.ROM
 set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex -im 1"
@@ -97,7 +98,8 @@
 }
 
 pre-fetch {
-    if { ! [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"
@@ -107,7 +109,9 @@
         ui_msg "${homepage}extras/copyroms.html"
         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_app_dir}."
+        ui_msg "to this Mac and put it in ${my_rom_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"
     }

Copied: trunk/dports/emulators/minivmac/files/readalias.applescript (from rev 58174, trunk/dports/emulators/minivmac-devel/files/readalias.applescript)
===================================================================
--- trunk/dports/emulators/minivmac/files/readalias.applescript	                        (rev 0)
+++ trunk/dports/emulators/minivmac/files/readalias.applescript	2009-09-23 15:52:31 UTC (rev 58175)
@@ -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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090923/7821b0ca/attachment.html>


More information about the macports-changes mailing list