Ignore:
Timestamp:
May 7, 2010, 6:34:07 AM (10 years ago)
Author:
ryandesign@…
Message:

minivmac, minivmac-devel: work properly when the ROM file is in the preferences folder instead of in the applications folder

Location:
trunk/dports/emulators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/emulators/minivmac-devel/Portfile

    r67387 r67388  
    155155
    156156pre-fetch {
    157     set my_real_rom_dir [exec osascript ${filespath}/readalias.applescript [file normalize ${my_rom_dir}]]
    158     if {![file exists ${my_real_rom_dir}/${my_rom_file}] && ![file exists ${my_app_dir}/${my_rom_file}]} {
     157    if {"" == [my_real_rom_file]} {
    159158        ui_msg "****************************************************************"
    160159        ui_msg "To build Mini vMac, you will need a ROM file from a Macintosh"
     
    195194   
    196195    # Symlink the ROM file into the data directory.
    197     ln -s ${my_app_dir}/${my_rom_file} ${my_mnvm_dat}
     196    ln -s [my_real_rom_file] ${my_mnvm_dat}
    198197   
    199198    # Symlink the disk images into the data directory with sequentially-numbered
     
    345344}
    346345
     346# Returns the full path to the ROM file, wherever the user has it,
     347# or the empty string if the user doesn't have it.
     348proc my_real_rom_file {} {
     349    global filespath my_app_dir my_rom_dir my_rom_file
     350    if {[file exists ${my_app_dir}/${my_rom_file}]} {
     351        return ${my_app_dir}/${my_rom_file}
     352    }
     353    set my_real_rom_dir [exec osascript ${filespath}/readalias.applescript [file normalize ${my_rom_dir}]]
     354    if {[file exists ${my_real_rom_dir}/${my_rom_file}]} {
     355        return ${my_real_rom_dir}/${my_rom_file}
     356    }
     357    return ""
     358}
     359
    347360# Converts normal arch names into Mini vMac target names.
    348361proc my_arch_to_target {arch} {
  • trunk/dports/emulators/minivmac/Portfile

    r67387 r67388  
    147147
    148148pre-fetch {
    149     set my_real_rom_dir [exec osascript ${filespath}/readalias.applescript [file normalize ${my_rom_dir}]]
    150     if {![file exists ${my_real_rom_dir}/${my_rom_file}] && ![file exists ${my_app_dir}/${my_rom_file}]} {
     149    if {"" == [my_real_rom_file]} {
    151150        ui_msg "****************************************************************"
    152151        ui_msg "To build Mini vMac, you will need a ROM file from a Macintosh"
     
    187186   
    188187    # Symlink the ROM file into the data directory.
    189     ln -s ${my_app_dir}/${my_rom_file} ${my_mnvm_dat}
     188    ln -s [my_real_rom_file] ${my_mnvm_dat}
    190189   
    191190    # Symlink the disk images into the data directory with sequentially-numbered
     
    337336}
    338337
     338# Returns the full path to the ROM file, wherever the user has it,
     339# or the empty string if the user doesn't have it.
     340proc my_real_rom_file {} {
     341    global filespath my_app_dir my_rom_dir my_rom_file
     342    if {[file exists ${my_app_dir}/${my_rom_file}]} {
     343        return ${my_app_dir}/${my_rom_file}
     344    }
     345    set my_real_rom_dir [exec osascript ${filespath}/readalias.applescript [file normalize ${my_rom_dir}]]
     346    if {[file exists ${my_real_rom_dir}/${my_rom_file}]} {
     347        return ${my_real_rom_dir}/${my_rom_file}
     348    }
     349    return ""
     350}
     351
    339352# Converts normal arch names into Mini vMac target names.
    340353proc my_arch_to_target {arch} {
Note: See TracChangeset for help on using the changeset viewer.