[106300] trunk/dports/emulators

ryandesign at macports.org ryandesign at macports.org
Tue May 21 19:05:14 PDT 2013


Revision: 106300
          https://trac.macports.org/changeset/106300
Author:   ryandesign at macports.org
Date:     2013-05-21 19:05:14 -0700 (Tue, 21 May 2013)
Log Message:
-----------
minivmac: update to 3.2.3
minivmac-devel: update to 3.3.2
both ports: Remove all code dealing with mounting disk images, which was problematic. Instead have the MnvM_bld program export the configured source as tarballs to the host machine. Update the bootstrap to 3.2.3, with the new auto-slow feature disabled, and patched to export files to the same directory as the bootstrap app, instead of prompting for a location.

Modified Paths:
--------------
    trunk/dports/emulators/minivmac/Portfile
    trunk/dports/emulators/minivmac/files/configure.applescript.in
    trunk/dports/emulators/minivmac-devel/Portfile

Added Paths:
-----------
    trunk/dports/emulators/minivmac/files/patch-src-MYOSGLUE.c.diff
    trunk/dports/emulators/minivmac-devel/files/patch-src-MYOSGLUE.c.diff

Removed Paths:
-------------
    trunk/dports/emulators/minivmac/files/patch-Disk Tools.image.bsdiff
    trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff

Modified: trunk/dports/emulators/minivmac/Portfile
===================================================================
--- trunk/dports/emulators/minivmac/Portfile	2013-05-21 22:57:04 UTC (rev 106299)
+++ trunk/dports/emulators/minivmac/Portfile	2013-05-22 02:05:14 UTC (rev 106300)
@@ -6,7 +6,7 @@
 name                    minivmac
 conflicts               minivmac-devel
 set my_name             minivmac
-version                 3.1.3
+version                 3.2.3
 categories              emulators aqua
 maintainers             ryandesign
 license                 GPL-2
@@ -30,12 +30,12 @@
 master_sites            sourceforge:project/minivmac/minivmac/${version}:minivmacsource \
                         sourceforge:project/minivmac/minivmac-extras/extras6:minivmacextras6 \
                         sourceforge:project/minivmac/minivmac-extras/2004.01.24:minivmacblanks \
-                        macports:${my_name}:macports \
+                        http://www.ryandesign.com/macports/distfiles/minivmac:bootstrap \
                         http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/:apple
 
 set my_src                                  ${distname}.src
 set my_src_distfile                         ${my_src}.zip
-set my_bootstrap_distfile                   ${my_name}-bootstrap-3.1.2_1.zip
+set my_bootstrap_distfile                   ${my_name}-bootstrap-3.2.3_0.zip
 set my_blanks                               blanks
 set my_blanks_distfile                      ${my_blanks}-0.2.0.zip
 set my_icons                                icnsosx-1.0.0
@@ -44,7 +44,7 @@
 set my_system_disk_container_distfile       ${my_system_disk_container}.bin
 
 distfiles               ${my_src_distfile}:minivmacsource \
-                        ${my_bootstrap_distfile}:macports \
+                        ${my_bootstrap_distfile}:bootstrap \
                         ${my_icons_distfile}:minivmacextras6 \
                         ${my_blanks_distfile}:minivmacblanks \
                         ${my_system_disk_container_distfile}:apple
@@ -55,13 +55,11 @@
                         ${my_blanks_distfile}
 
 checksums               ${my_src_distfile} \
-                        md5     5243ae167cc00920e03b4abca2b40af5 \
-                        sha1    b9967ac258baf1a15785e884c306bf0d42097d45 \
-                        rmd160  2af69ebf5420f8f8d0baece03664dc7326e13e38 \
+                        rmd160  24e2a29db9ea54dfc41889ef16184daa3f054ef5 \
+                        sha256  f3b8c5dc3f4a48267d0a2666b9c71109a59fd5edf96a6d0ed12158df303c878f \
                         ${my_bootstrap_distfile} \
-                        md5     65fa9b7fb19a24dc6c9e711387c1bc30 \
-                        sha1    4ad44559e75894d45e91ae62cc7ddb420062f968 \
-                        rmd160  58884cac487a537b5d00fc6093fdfecb6ccc5a2f \
+                        rmd160  32e803a75d4f9ab6b7dfa5a7b1ec2ef9d3a057c2 \
+                        sha256  e6fe692683ab54e08b0350fe9901e872f7bf3c3a62f69b45773254fce45a4fae \
                         ${my_icons_distfile} \
                         md5     2af006506de7549be14f94317918d59a \
                         sha1    4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
@@ -85,7 +83,7 @@
 set my_rom_dir          "~/Library/Preferences/Gryphel/mnvm_rom"
 set my_bootstrap_app    "Mini vMac Bootstrap.app"
 set my_rom_file         vMac.ROM
-set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
+set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx"
 set my_archs            {}
 
 options my_variations
@@ -103,11 +101,11 @@
                         {IIx}       {-m IIx -mem 8M -hres 800 -vres 600 -depth 3}
 }
 
-# To build the bootstrap, use "sudo port install bootstrap=yes".
+# To build the bootstrap, use "sudo port install bootstrap=yes +bootstrap".
 # The variant is hidden because it is useful only to the port maintainer.
 if {[tbool bootstrap]} {
     variant bootstrap conflicts unsupported requires universal description {Build the bootstrap version of Mini vMac} {
-        my_variations   {Bootstrap} {-m Plus -sound 0 -bg 1 -speed a}
+        my_variations   {Bootstrap} {-m Plus -sound 0 -bg 1 -speed a -as 0}
         depends_build-append port:p7zip
         depends_skip_archcheck p7zip
         post-destroot {
@@ -202,10 +200,6 @@
 }
 
 post-patch {
-    # Place an alias of the output disk at System Folder:Preferences:Gryphel:Build:output.
-    system -W ${worksrcpath} "${prefix}/bin/bspatch 'Disk Tools.image' 'Disk Tools.image.tmp' '${filespath}/patch-Disk Tools.image.bsdiff'"
-    move -force "${worksrcpath}/Disk Tools.image.tmp" "${worksrcpath}/Disk Tools.image"
-    
     # Place an 8192-byte TeachText file called "configure.args" (containing "@START@",
     # 8180 spaces, and "@END@") onto the root of the output disk and set the disk's
     # window to open when the disk is mounted.
@@ -218,14 +212,9 @@
     xinstall -m 755 ${filespath}/configure.applescript.in ${worksrcpath}/configure.applescript
     reinplace "s|@BOOTSTRAP_APP@|${my_bootstrap_app}|g" ${worksrcpath}/configure.applescript
     
-    # Copy the large blank disk image to store the output.
-    # Use the .img extension so that we can mount it on Mac OS X later.
+    # Copy a blank disk image to store the configure args.
     copy -force ${worksrcpath}/hfs24M.DSK ${worksrcpath}/output.img
     
-    # Unrestrict the permissions on the output disk image so the Build program
-    # can write its output to it.
-    file attributes ${worksrcpath}/output.img -permissions 0777
-    
     # Build up the combined configure args for all variations.
     set i 0
     foreach my_arch ${my_archs} {
@@ -274,19 +263,26 @@
     
     file mkdir ${build.dir}
     set my_variation_dirs {}
-    set my_output_disk_mount [my_attach_disk_image ${worksrcpath}/output.img]
     foreach my_arch ${my_archs} {
         file mkdir ${build.dir}/${my_arch}
         set my_target [my_arch_to_target ${my_arch}]
         foreach {my_machine unused} ${my_variations} {
-            set my_src_dir ${my_output_disk_mount}/${version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
-            if {[file isdirectory ${my_src_dir}]} {
+            set my_variation ${version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
+            set my_src_tarball ${worksrcpath}/${my_variation}.tar
+            if {[file isfile ${my_src_tarball}]} {
                 set my_variation_dir ${my_arch}/${my_machine}
                 lappend my_variation_dirs [strsed ${my_variation_dir} {g/ /\\\\ /}]
                 
-                # Get the configured source code.
-                file copy ${my_src_dir} ${build.dir}/${my_variation_dir}
+                # Untar the configured source code.
+                system -W ${build.dir}/${my_arch} "tar xf '${my_src_tarball}'"
+                move ${build.dir}/${my_arch}/${my_variation} ${build.dir}/${my_variation_dir}
                 
+                if {[variant_exists bootstrap] && [variant_isset bootstrap]} {
+                    # Change the "export" function so that exported files are written to the same
+                    # directory as Mini vMac, instead of prompting for a location.
+                    system -W ${build.dir}/${my_variation_dir} "patch -p0 < ${filespath}/patch-src-MYOSGLUE.c.diff"
+                }
+                
                 # Use the right compiler.
                 reinplace "s|gcc|${configure.cc}|g" ${build.dir}/${my_variation_dir}/Makefile
                 
@@ -296,7 +292,6 @@
             }
         }
     }
-    my_detach_disk_image ${my_output_disk_mount}
     
     # Set up the global Makefile.
     xinstall ${filespath}/Makefile.in ${build.dir}/Makefile
@@ -400,20 +395,6 @@
     }
 }
 
-# Mounts a disk image.
-proc my_attach_disk_image {disk_image} {
-    global my_name
-    set mountpoint [mkdtemp "/tmp/${my_name}.XXXXXXXX"]
-    system "hdiutil attach '${disk_image}' -mountpoint '${mountpoint}' -private -nobrowse -noautoopen -noautofsck -noverify -readonly"
-    return ${mountpoint}
-}
-
-# Unmounts a disk image.
-proc my_detach_disk_image {mountpoint} {
-    my_system "hdiutil detach ${mountpoint} -force"
-    file delete -force ${mountpoint}
-}
-
 proc my_system {cmd} {
      ui_debug ${cmd}
      system ${cmd}

Modified: trunk/dports/emulators/minivmac/files/configure.applescript.in
===================================================================
--- trunk/dports/emulators/minivmac/files/configure.applescript.in	2013-05-21 22:57:04 UTC (rev 106299)
+++ trunk/dports/emulators/minivmac/files/configure.applescript.in	2013-05-22 02:05:14 UTC (rev 106300)
@@ -22,7 +22,7 @@
 	my menu_file_quit() -- quit
 	my menu_file_close() -- close Finder window
 	
-	my key_code(11) -- "B" -- select the Build program
+	my key_code(46) -- "M" -- select the MnvM_bld program
 	my menu_file_open() -- open it
 	my menu_edit_paste() -- paste the configure args into the window
 	my menu_file_go() -- do the build

Deleted: trunk/dports/emulators/minivmac/files/patch-Disk Tools.image.bsdiff
===================================================================
(Binary files differ)

Added: trunk/dports/emulators/minivmac/files/patch-src-MYOSGLUE.c.diff
===================================================================
--- trunk/dports/emulators/minivmac/files/patch-src-MYOSGLUE.c.diff	                        (rev 0)
+++ trunk/dports/emulators/minivmac/files/patch-src-MYOSGLUE.c.diff	2013-05-22 02:05:14 UTC (rev 106300)
@@ -0,0 +1,67 @@
+--- src/MYOSGLUE.c.orig	2011-09-18 23:59:33.000000000 -0500
++++ src/MYOSGLUE.c	2013-05-21 01:53:34.000000000 -0500
+@@ -3410,55 +3410,19 @@
+ #if IncludeSonyNew
+ LOCALPROC MakeNewDisk(ui5b L, CFStringRef NewDiskName)
+ {
+-	NavDialogRef theSaveDialog;
+-	NavDialogCreationOptions dialogOptions;
+-	NavReplyRecord theReply;
+-	NavEventUPP gEventProc = NewNavEventUPP(NavigationEventProc);
+-
+-	if (noErr == NavGetDefaultDialogCreationOptions(&dialogOptions)) {
+-		dialogOptions.modality = kWindowModalityAppModal;
+-		dialogOptions.saveFileName = NewDiskName;
+-		if (noErr == NavCreatePutFileDialog(&dialogOptions,
+-			'TEXT', 'MPS ',
+-			gEventProc, NULL,
+-			&theSaveDialog))
+-		{
+-			MyBeginDialog();
+-			(void) NavDialogRun(theSaveDialog);
+-			MyEndDialog();
+-			if (noErr == NavDialogGetReply(theSaveDialog,
+-				&theReply))
+-			{
+-				if (theReply.validRecord) {
+-					long itemsInList;
+-					AEKeyword keyword;
+-					DescType typeCode;
+-					FSRef theRef;
+-					Size actualSize;
+-
+-					if (noErr == AECountItems(
+-						&theReply.selection, &itemsInList))
+-					{
+-						if (itemsInList == 1) {
+-							if (noErr == AEGetNthPtr(
+-								&theReply.selection, 1, typeFSRef,
+-								&keyword, &typeCode, (Ptr)&theRef,
+-								sizeof(FSRef), &actualSize))
++	ProcessSerialNumber currentProcess = {0, kCurrentProcess};
++	FSRef fsRef;
++	FSRef theRef;
++
++	if (noErr == GetProcessBundleLocation(&currentProcess,
++		&fsRef))
++	if (noErr == FSGetCatalogInfo(&fsRef, kFSCatInfoNone,
++		NULL, NULL, NULL, &theRef))
+ 							{
+ 								ReportStandardOpenDiskError(
+ 									MakeNewDisk0(&theRef,
+-										theReply.saveFileName, L));
++										NewDiskName, L));
+ 							}
+-						}
+-					}
+-				}
+-				(void) NavDisposeReply(&theReply);
+-			}
+-			NavDialogDispose(theSaveDialog);
+-		}
+-	}
+-
+-	DisposeNavEventUPP(gEventProc);
+ 
+ 	if (NewDiskName != NULL) {
+ 		CFRelease(NewDiskName);

Modified: trunk/dports/emulators/minivmac-devel/Portfile
===================================================================
--- trunk/dports/emulators/minivmac-devel/Portfile	2013-05-21 22:57:04 UTC (rev 106299)
+++ trunk/dports/emulators/minivmac-devel/Portfile	2013-05-22 02:05:14 UTC (rev 106300)
@@ -7,7 +7,8 @@
 conflicts               minivmac
 set my_name             minivmac
 epoch                   3
-version                 3.2.2
+version                 3.3.2
+set branch              [join [lrange [split ${version} .] 0 1] .]
 set my_version          [strsed ${version} {g/^20//}]
 categories              emulators aqua
 maintainers             ryandesign
@@ -38,12 +39,12 @@
 master_sites            sourceforge:project/minivmac/minivmac/${version}:minivmacsource \
                         sourceforge:project/minivmac/minivmac-extras/extras6:minivmacextras6 \
                         sourceforge:project/minivmac/minivmac-extras/2004.01.24:minivmacblanks \
-                        macports:${my_name}:macports \
+                        http://www.ryandesign.com/macports/distfiles/minivmac:bootstrap \
                         http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Older_System/System_7.0.x/:apple
 
 set my_src                                  ${distname}.src
 set my_src_distfile                         ${my_src}.zip
-set my_bootstrap_distfile                   ${my_name}-bootstrap-3.1.2_1.zip
+set my_bootstrap_distfile                   ${my_name}-bootstrap-3.2.3_0.zip
 set my_blanks                               blanks
 set my_blanks_distfile                      ${my_blanks}-0.2.0.zip
 set my_icons                                icnsosx-1.0.0
@@ -52,7 +53,7 @@
 set my_system_disk_container_distfile       ${my_system_disk_container}.bin
 
 distfiles               ${my_src_distfile}:minivmacsource \
-                        ${my_bootstrap_distfile}:macports \
+                        ${my_bootstrap_distfile}:bootstrap \
                         ${my_icons_distfile}:minivmacextras6 \
                         ${my_blanks_distfile}:minivmacblanks \
                         ${my_system_disk_container_distfile}:apple
@@ -63,13 +64,11 @@
                         ${my_blanks_distfile}
 
 checksums               ${my_src_distfile} \
-                        md5     0a6a38ca6bcd42fdfa100a7c0fe276b7 \
-                        sha1    e60977c9d9a65a51af62b5f7e87b16e708f735f1 \
-                        rmd160  ab86256d2f3346c4b3fe28f40e174357e6801a0d \
+                        rmd160  a8a75847ed43a4d830930a98e3a20a2451144350 \
+                        sha256  b5a02693a6106585622f2f928371f160c9b79656b834e7e25519de2d645eb1be \
                         ${my_bootstrap_distfile} \
-                        md5     65fa9b7fb19a24dc6c9e711387c1bc30 \
-                        sha1    4ad44559e75894d45e91ae62cc7ddb420062f968 \
-                        rmd160  58884cac487a537b5d00fc6093fdfecb6ccc5a2f \
+                        rmd160  32e803a75d4f9ab6b7dfa5a7b1ec2ef9d3a057c2 \
+                        sha256  e6fe692683ab54e08b0350fe9901e872f7bf3c3a62f69b45773254fce45a4fae \
                         ${my_icons_distfile} \
                         md5     2af006506de7549be14f94317918d59a \
                         sha1    4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
@@ -93,7 +92,7 @@
 set my_rom_dir          "~/Library/Preferences/Gryphel/mnvm_rom"
 set my_bootstrap_app    "Mini vMac Bootstrap.app"
 set my_rom_file         vMac.ROM
-set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx -nex"
+set my_base_options     "-maintainer MacPorts -homepage http://www.macports.org/ -cl -eol unx"
 set my_archs            {}
 
 options my_variations
@@ -111,11 +110,11 @@
                         {IIx}       {-m IIx -mem 8M -hres 800 -vres 600 -depth 3}
 }
 
-# To build the bootstrap, use "sudo port install bootstrap=yes".
+# To build the bootstrap, use "sudo port install bootstrap=yes +bootstrap".
 # The variant is hidden because it is useful only to the port maintainer.
 if {[tbool bootstrap]} {
     variant bootstrap conflicts unsupported requires universal description {Build the bootstrap version of Mini vMac} {
-        my_variations   {Bootstrap} {-m Plus -sound 0 -bg 1 -speed a}
+        my_variations   {Bootstrap} {-m Plus -sound 0 -bg 1 -speed a -as 0}
         depends_build-append port:p7zip
         depends_skip_archcheck p7zip
         post-destroot {
@@ -210,10 +209,6 @@
 }
 
 post-patch {
-    # Place an alias of the output disk at System Folder:Preferences:Gryphel:Build:output.
-    system -W ${worksrcpath} "${prefix}/bin/bspatch 'Disk Tools.image' 'Disk Tools.image.tmp' '${filespath}/patch-Disk Tools.image.bsdiff'"
-    move -force "${worksrcpath}/Disk Tools.image.tmp" "${worksrcpath}/Disk Tools.image"
-    
     # Place an 8192-byte TeachText file called "configure.args" (containing "@START@",
     # 8180 spaces, and "@END@") onto the root of the output disk and set the disk's
     # window to open when the disk is mounted.
@@ -226,14 +221,9 @@
     xinstall -m 755 ${filespath}/configure.applescript.in ${worksrcpath}/configure.applescript
     reinplace "s|@BOOTSTRAP_APP@|${my_bootstrap_app}|g" ${worksrcpath}/configure.applescript
     
-    # Copy the large blank disk image to store the output.
-    # Use the .img extension so that we can mount it on Mac OS X later.
+    # Copy a blank disk image to store the configure args.
     copy -force ${worksrcpath}/hfs24M.DSK ${worksrcpath}/output.img
     
-    # Unrestrict the permissions on the output disk image so the MnvM_bld program
-    # can write its output to it.
-    file attributes ${worksrcpath}/output.img -permissions 0777
-    
     # Build up the combined configure args for all variations.
     set i 0
     foreach my_arch ${my_archs} {
@@ -282,19 +272,26 @@
     
     file mkdir ${build.dir}
     set my_variation_dirs {}
-    set my_output_disk_mount [my_attach_disk_image ${worksrcpath}/output.img]
     foreach my_arch ${my_archs} {
         file mkdir ${build.dir}/${my_arch}
         set my_target [my_arch_to_target ${my_arch}]
         foreach {my_machine unused} ${my_variations} {
-            set my_src_dir ${my_output_disk_mount}/${version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
-            if {[file isdirectory ${my_src_dir}]} {
+            set my_variation ${version}_${revision}-[strsed [string tolower ${my_machine}] {g/[^a-z0-9_-]//}]-${my_target}
+            set my_src_tarball ${worksrcpath}/${my_variation}.tar
+            if {[file isfile ${my_src_tarball}]} {
                 set my_variation_dir ${my_arch}/${my_machine}
                 lappend my_variation_dirs [strsed ${my_variation_dir} {g/ /\\\\ /}]
                 
-                # Get the configured source code.
-                file copy ${my_src_dir} ${build.dir}/${my_variation_dir}
+                # Untar the configured source code.
+                system -W ${build.dir}/${my_arch} "tar xf '${my_src_tarball}'"
+                move ${build.dir}/${my_arch}/${my_variation} ${build.dir}/${my_variation_dir}
                 
+                if {[variant_exists bootstrap] && [variant_isset bootstrap]} {
+                    # Change the "export" function so that exported files are written to the same
+                    # directory as Mini vMac, instead of prompting for a location.
+                    system -W ${build.dir}/${my_variation_dir} "patch -p0 < ${filespath}/patch-src-MYOSGLUE.c.diff"
+                }
+                
                 # Use the right compiler.
                 reinplace "s|gcc|${configure.cc}|g" ${build.dir}/${my_variation_dir}/Makefile
                 
@@ -304,7 +301,6 @@
             }
         }
     }
-    my_detach_disk_image ${my_output_disk_mount}
     
     # Set up the global Makefile.
     xinstall ${filespath}/Makefile.in ${build.dir}/Makefile
@@ -408,20 +404,6 @@
     }
 }
 
-# Mounts a disk image.
-proc my_attach_disk_image {disk_image} {
-    global my_name
-    set mountpoint [mkdtemp "/tmp/${my_name}.XXXXXXXX"]
-    system "hdiutil attach '${disk_image}' -mountpoint '${mountpoint}' -private -nobrowse -noautoopen -noautofsck -noverify -readonly"
-    return ${mountpoint}
-}
-
-# Unmounts a disk image.
-proc my_detach_disk_image {mountpoint} {
-    my_system "hdiutil detach ${mountpoint} -force"
-    file delete -force ${mountpoint}
-}
-
 proc my_system {cmd} {
      ui_debug ${cmd}
      system ${cmd}
@@ -436,7 +418,7 @@
     livecheck.url       ${homepage}develop/index.html
 } else {
     # Alpha versions:
-    livecheck.url       ${homepage}alpha/index.html
+    livecheck.url       ${homepage}doc-${branch}/download.html
     
     # Beta versions:
     #livecheck.url       ${homepage}beta/index.html

Deleted: trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff
===================================================================
(Binary files differ)

Added: trunk/dports/emulators/minivmac-devel/files/patch-src-MYOSGLUE.c.diff
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/patch-src-MYOSGLUE.c.diff	                        (rev 0)
+++ trunk/dports/emulators/minivmac-devel/files/patch-src-MYOSGLUE.c.diff	2013-05-22 02:05:14 UTC (rev 106300)
@@ -0,0 +1,67 @@
+--- src/MYOSGLUE.c.orig	2012-05-27 04:47:25.000000000 -0500
++++ src/MYOSGLUE.c	2013-05-21 06:49:37.000000000 -0500
+@@ -3436,55 +3436,19 @@
+ #if IncludeSonyNew
+ LOCALPROC MakeNewDisk(ui5b L, CFStringRef NewDiskName)
+ {
+-	NavDialogRef theSaveDialog;
+-	NavDialogCreationOptions dialogOptions;
+-	NavReplyRecord theReply;
+-	NavEventUPP gEventProc = NewNavEventUPP(NavigationEventProc);
+-
+-	if (noErr == NavGetDefaultDialogCreationOptions(&dialogOptions)) {
+-		dialogOptions.modality = kWindowModalityAppModal;
+-		dialogOptions.saveFileName = NewDiskName;
+-		if (noErr == NavCreatePutFileDialog(&dialogOptions,
+-			'TEXT', 'MPS ',
+-			gEventProc, NULL,
+-			&theSaveDialog))
+-		{
+-			MyBeginDialog();
+-			(void) NavDialogRun(theSaveDialog);
+-			MyEndDialog();
+-			if (noErr == NavDialogGetReply(theSaveDialog,
+-				&theReply))
+-			{
+-				if (theReply.validRecord) {
+-					long itemsInList;
+-					AEKeyword keyword;
+-					DescType typeCode;
+-					FSRef theRef;
+-					Size actualSize;
+-
+-					if (noErr == AECountItems(
+-						&theReply.selection, &itemsInList))
+-					{
+-						if (itemsInList == 1) {
+-							if (noErr == AEGetNthPtr(
+-								&theReply.selection, 1, typeFSRef,
+-								&keyword, &typeCode, (Ptr)&theRef,
+-								sizeof(FSRef), &actualSize))
++	ProcessSerialNumber currentProcess = {0, kCurrentProcess};
++	FSRef fsRef;
++	FSRef theRef;
++
++	if (noErr == GetProcessBundleLocation(&currentProcess,
++		&fsRef))
++	if (noErr == FSGetCatalogInfo(&fsRef, kFSCatInfoNone,
++		NULL, NULL, NULL, &theRef))
+ 							{
+ 								ReportStandardOpenDiskError(
+ 									MakeNewDisk0(&theRef,
+-										theReply.saveFileName, L));
++										NewDiskName, L));
+ 							}
+-						}
+-					}
+-				}
+-				(void) NavDisposeReply(&theReply);
+-			}
+-			NavDialogDispose(theSaveDialog);
+-		}
+-	}
+-
+-	DisposeNavEventUPP(gEventProc);
+ }
+ #endif
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130521/5b9b9b23/attachment-0001.html>


More information about the macports-changes mailing list