[67388] trunk/dports/emulators
ryandesign at macports.org
ryandesign at macports.org
Thu May 6 23:34:11 PDT 2010
Revision: 67388
http://trac.macports.org/changeset/67388
Author: ryandesign at macports.org
Date: 2010-05-06 23:34:07 -0700 (Thu, 06 May 2010)
Log Message:
-----------
minivmac, minivmac-devel: work properly when the ROM file is in the preferences folder instead of in the applications folder
Modified Paths:
--------------
trunk/dports/emulators/minivmac/Portfile
trunk/dports/emulators/minivmac-devel/Portfile
Modified: trunk/dports/emulators/minivmac/Portfile
===================================================================
--- trunk/dports/emulators/minivmac/Portfile 2010-05-07 04:17:33 UTC (rev 67387)
+++ trunk/dports/emulators/minivmac/Portfile 2010-05-07 06:34:07 UTC (rev 67388)
@@ -146,8 +146,7 @@
}
pre-fetch {
- 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}]} {
+ if {"" == [my_real_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"
@@ -186,7 +185,7 @@
file mkdir ${my_mnvm_dat}
# Symlink the ROM file into the data directory.
- ln -s ${my_app_dir}/${my_rom_file} ${my_mnvm_dat}
+ ln -s [my_real_rom_file] ${my_mnvm_dat}
# Symlink the disk images into the data directory with sequentially-numbered
# names so Mini vMac will find them and automatically mount them.
@@ -336,6 +335,20 @@
}
}
+# Returns the full path to the ROM file, wherever the user has it,
+# or the empty string if the user doesn't have it.
+proc my_real_rom_file {} {
+ global filespath my_app_dir my_rom_dir my_rom_file
+ if {[file exists ${my_app_dir}/${my_rom_file}]} {
+ return ${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}]} {
+ return ${my_real_rom_dir}/${my_rom_file}
+ }
+ return ""
+}
+
# Converts normal arch names into Mini vMac target names.
proc my_arch_to_target {arch} {
switch ${arch} {
Modified: trunk/dports/emulators/minivmac-devel/Portfile
===================================================================
--- trunk/dports/emulators/minivmac-devel/Portfile 2010-05-07 04:17:33 UTC (rev 67387)
+++ trunk/dports/emulators/minivmac-devel/Portfile 2010-05-07 06:34:07 UTC (rev 67388)
@@ -154,8 +154,7 @@
}
pre-fetch {
- 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}]} {
+ if {"" == [my_real_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"
@@ -194,7 +193,7 @@
file mkdir ${my_mnvm_dat}
# Symlink the ROM file into the data directory.
- ln -s ${my_app_dir}/${my_rom_file} ${my_mnvm_dat}
+ ln -s [my_real_rom_file] ${my_mnvm_dat}
# Symlink the disk images into the data directory with sequentially-numbered
# names so Mini vMac will find them and automatically mount them.
@@ -344,6 +343,20 @@
}
}
+# Returns the full path to the ROM file, wherever the user has it,
+# or the empty string if the user doesn't have it.
+proc my_real_rom_file {} {
+ global filespath my_app_dir my_rom_dir my_rom_file
+ if {[file exists ${my_app_dir}/${my_rom_file}]} {
+ return ${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}]} {
+ return ${my_real_rom_dir}/${my_rom_file}
+ }
+ return ""
+}
+
# Converts normal arch names into Mini vMac target names.
proc my_arch_to_target {arch} {
switch ${arch} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100506/04ea895e/attachment.html>
More information about the macports-changes
mailing list