[106314] trunk/dports/emulators
ryandesign at macports.org
ryandesign at macports.org
Wed May 22 03:32:45 PDT 2013
Revision: 106314
https://trac.macports.org/changeset/106314
Author: ryandesign at macports.org
Date: 2013-05-22 03:32:45 -0700 (Wed, 22 May 2013)
Log Message:
-----------
minivmac, minivmac-devel: Speed up configure: Put the configure.args file directly on the Tidbits disk image, removing the need for a separate blank disk image; put an alias of the configure.args file in the Startup Items folder. Add documentation on re-creating the binary patchfiles.
Modified Paths:
--------------
trunk/dports/emulators/minivmac/Portfile
trunk/dports/emulators/minivmac/files/configure.applescript.in
trunk/dports/emulators/minivmac-devel/Portfile
trunk/dports/emulators/minivmac-devel/files/configure.applescript.in
Added Paths:
-----------
trunk/dports/emulators/minivmac/files/README-binary-patchfiles.md
trunk/dports/emulators/minivmac/files/patch-Disk Tools.image.bsdiff
trunk/dports/emulators/minivmac/files/patch-Tidbits.image.bsdiff
trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md
trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff
trunk/dports/emulators/minivmac-devel/files/patch-Tidbits.image.bsdiff
Removed Paths:
-------------
trunk/dports/emulators/minivmac/files/patch-hfs24M.DSK.bsdiff
trunk/dports/emulators/minivmac-devel/files/patch-hfs24M.DSK.bsdiff
Modified: trunk/dports/emulators/minivmac/Portfile
===================================================================
--- trunk/dports/emulators/minivmac/Portfile 2013-05-22 06:07:22 UTC (rev 106313)
+++ trunk/dports/emulators/minivmac/Portfile 2013-05-22 10:32:45 UTC (rev 106314)
@@ -30,15 +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 \
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.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
set my_icons_distfile ${my_icons}.zip
set my_system_disk_container System_7.0.1.smi
@@ -47,7 +44,6 @@
distfiles ${my_src_distfile}:minivmacsource \
${my_bootstrap_distfile}:bootstrap \
${my_icons_distfile}:minivmacextras6 \
- ${my_blanks_distfile}:minivmacblanks \
${my_system_disk_container_distfile}:apple
extract.only ${my_src_distfile} \
@@ -64,10 +60,6 @@
md5 2af006506de7549be14f94317918d59a \
sha1 4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7 \
- ${my_blanks_distfile} \
- md5 b16321d0d78048d5ec9b635f4f86b19c \
- sha1 9b8d7e77bd05633709907f8806d976279d7a20b7 \
- rmd160 a0784c17c5a5ca2e159762fb836c1c800762b213 \
${my_system_disk_container_distfile} \
md5 8a4776350b15b5a516cdf7dd18e27290 \
sha1 d4c8b8653de9c7a9b2594dd6126ec7120e3e2e9e \
@@ -178,9 +170,6 @@
}
}
- # Get an empty disk image to store the configure args.
- system -W ${worksrcpath} "unzip -p ${distpath}/${my_blanks_distfile} blanks/hfs24M.zip | funzip > hfs24M.DSK"
-
# Delete temporary files we no longer need.
delete ${worksrcpath}/${my_system_disk_container} ${worksrcpath}/${my_system_disk_container_decompressed}
@@ -196,7 +185,6 @@
ln -s "${worksrcpath}/Disk Tools.image" "${my_mnvm_dat}/disk1.dsk"
ln -s ${worksrcpath}/Tidbits.image "${my_mnvm_dat}/disk2.dsk"
ln -s ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
- ln -s ${worksrcpath}/output.img "${my_mnvm_dat}/disk4.dsk"
# Use the prettier icon on the bootstrap app.
copy -force ${worksrcpath}/${my_icons}/icons//AppIcon.icns ${worksrcpath}/${my_bootstrap_app}/Contents/Resources/
@@ -204,10 +192,12 @@
post-patch {
# 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.
- system -W ${worksrcpath} "${prefix}/bin/bspatch hfs24M.DSK hfs24M.DSK.tmp '${filespath}/patch-hfs24M.DSK.bsdiff'"
- move -force ${worksrcpath}/hfs24M.DSK.tmp ${worksrcpath}/hfs24M.DSK
+ # 8180 spaces, and "@END@") onto the Tidbits disk.
+ system -W ${worksrcpath} "${prefix}/bin/bspatch Tidbits.image Tidbits.image.in '${filespath}/patch-Tidbits.image.bsdiff'"
+
+ # Place an alias of the configure.args file in the Startup Items folder on the Disk Tools disk.
+ 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"
}
pre-configure {
@@ -215,8 +205,8 @@
xinstall -m 755 ${filespath}/configure.applescript.in ${worksrcpath}/configure.applescript
reinplace "s|@BOOTSTRAP_APP@|${my_bootstrap_app}|g" ${worksrcpath}/configure.applescript
- # Copy a blank disk image to store the configure args.
- copy -force ${worksrcpath}/hfs24M.DSK ${worksrcpath}/output.img
+ # Copy the template Tidbits disk image.
+ copy -force ${worksrcpath}/Tidbits.image.in ${worksrcpath}/Tidbits.image
# Build up the combined configure args for all variations.
set i 0
@@ -235,13 +225,13 @@
}
}
- # Write the configure args into the configure.args file on the output disk image.
+ # Write the configure args into the configure.args file on the Tidbits disk image.
set max_configure_args_length 8192
set padded_args [format "%-${max_configure_args_length}s" [join ${configure_args}]]
if {[string length ${padded_args}] > ${max_configure_args_length}} {
return -code error "configure args too long"
}
- reinplace -locale C "s|@START@ *@END@|${padded_args}|" ${worksrcpath}/output.img
+ reinplace -locale C "s|@START@ *@END@|${padded_args}|" ${worksrcpath}/Tidbits.image
# Set the real configure.args that get passed to the AppleScript to the number
# of variations being assembled, so that it knows how long to wait.
Added: trunk/dports/emulators/minivmac/files/README-binary-patchfiles.md
===================================================================
--- trunk/dports/emulators/minivmac/files/README-binary-patchfiles.md (rev 0)
+++ trunk/dports/emulators/minivmac/files/README-binary-patchfiles.md 2013-05-22 10:32:45 UTC (rev 106314)
@@ -0,0 +1,30 @@
+# Creating binary patches
+
+## 1. Create patch-Tidbits.image.bsdiff
+
+* Get a fresh copy of Tidbits.image
+* Make a copy called Tidbits.image.orig
+* Boot Mini vMac with Disk Tools.image
+* Mount Tidbits.image
+* Open TeachText on the Tidbits volume
+* Type "@START@", 8180 spaces, "@END@"
+* Save as "configure.args" on the Desktop of the Tidbits volume
+* Use "Get Info" in the Finder to verify the file is exactly 8192 bytes long
+* Close all windows
+* Shut down the emulator
+* Run `bsdiff Tidbits.image.orig Tidbits.image patch-Tidbits.image.bsdiff`
+
+## 2. Create patch-Disk Tools.image.bsdiff
+
+* Get a fresh copy of Disk Tools.image
+* Make a copy called Disk Tools.image.orig
+* Boot Mini vMac with Disk Tools.image
+* Get a Tidbits.image patched to contain the configure.args file
+* Mount Tidbits.image
+* Open the System Folder on the Disk Tools volume
+* Select the configure.args file on the Desktop
+* Choose Make Alias from the File menu
+* Copy or move the alias into the Startup Items folder
+* Close all windows
+* Shut down the emulator
+* Run `bsdiff 'Disk Tools.image.orig' 'Disk Tools.image' 'patch-Disk Tools.image.bsdiff'`
Property changes on: trunk/dports/emulators/minivmac/files/README-binary-patchfiles.md
___________________________________________________________________
Added: svn:mime-type
+ text/markdown
Added: svn:eol-style
+ native
Modified: trunk/dports/emulators/minivmac/files/configure.applescript.in
===================================================================
--- trunk/dports/emulators/minivmac/files/configure.applescript.in 2013-05-22 06:07:22 UTC (rev 106313)
+++ trunk/dports/emulators/minivmac/files/configure.applescript.in 2013-05-22 10:32:45 UTC (rev 106314)
@@ -13,14 +13,11 @@
set cpu_mhz to (system attribute "pclk") / 1000000
set configuration_delay to 1400 * number_of_variations / cpu_mhz
- delay 4 -- wait 1 second for each disk image Mini vMac needs to mount
+ delay 3 -- wait 1 second for each disk image Mini vMac needs to mount
- my key_code(8) -- "C" -- select the configure.args file
- my menu_file_open() -- open it
- my menu_edit_select_all() -- select its contents
+ my menu_edit_select_all() -- select the contents of the configure.args file which has been automatically opened
my menu_edit_copy() -- copy it
my menu_file_quit() -- quit
- my menu_file_close() -- close Finder window
my key_code(46) -- "M" -- select the MnvM_bld program
my menu_file_open() -- open it
@@ -53,11 +50,6 @@
delay 0.5 -- wait for zoomrects to draw
end menu_file_open
-on menu_file_close()
- my key_code_with_modifiers(13, {command down}) -- "Command-W"
- delay 0.5 -- wait for zoomrects to draw
-end menu_file_close
-
on menu_file_go()
my key_code_with_modifiers(5, {command down}) -- "Command-G"
delay configuration_delay -- wait for configuration to run
Added: trunk/dports/emulators/minivmac/files/patch-Disk Tools.image.bsdiff
===================================================================
(Binary files differ)
Property changes on: trunk/dports/emulators/minivmac/files/patch-Disk Tools.image.bsdiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/dports/emulators/minivmac/files/patch-Tidbits.image.bsdiff
===================================================================
(Binary files differ)
Property changes on: trunk/dports/emulators/minivmac/files/patch-Tidbits.image.bsdiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/dports/emulators/minivmac/files/patch-hfs24M.DSK.bsdiff
===================================================================
(Binary files differ)
Modified: trunk/dports/emulators/minivmac-devel/Portfile
===================================================================
--- trunk/dports/emulators/minivmac-devel/Portfile 2013-05-22 06:07:22 UTC (rev 106313)
+++ trunk/dports/emulators/minivmac-devel/Portfile 2013-05-22 10:32:45 UTC (rev 106314)
@@ -39,15 +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 \
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.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
set my_icons_distfile ${my_icons}.zip
set my_system_disk_container System_7.0.1.smi
@@ -56,7 +53,6 @@
distfiles ${my_src_distfile}:minivmacsource \
${my_bootstrap_distfile}:bootstrap \
${my_icons_distfile}:minivmacextras6 \
- ${my_blanks_distfile}:minivmacblanks \
${my_system_disk_container_distfile}:apple
extract.only ${my_src_distfile} \
@@ -73,10 +69,6 @@
md5 2af006506de7549be14f94317918d59a \
sha1 4ef79bb56b988fedfeb82a8b6cafd8066f5bbab2 \
rmd160 cef6d7d7578464538d0042b0d98379ae7f18fab7 \
- ${my_blanks_distfile} \
- md5 b16321d0d78048d5ec9b635f4f86b19c \
- sha1 9b8d7e77bd05633709907f8806d976279d7a20b7 \
- rmd160 a0784c17c5a5ca2e159762fb836c1c800762b213 \
${my_system_disk_container_distfile} \
md5 8a4776350b15b5a516cdf7dd18e27290 \
sha1 d4c8b8653de9c7a9b2594dd6126ec7120e3e2e9e \
@@ -187,9 +179,6 @@
}
}
- # Get an empty disk image to store the configure args.
- system -W ${worksrcpath} "unzip -p ${distpath}/${my_blanks_distfile} blanks/hfs24M.zip | funzip > hfs24M.DSK"
-
# Delete temporary files we no longer need.
delete ${worksrcpath}/${my_system_disk_container} ${worksrcpath}/${my_system_disk_container_decompressed}
@@ -205,7 +194,6 @@
ln -s "${worksrcpath}/Disk Tools.image" "${my_mnvm_dat}/disk1.dsk"
ln -s ${worksrcpath}/Tidbits.image "${my_mnvm_dat}/disk2.dsk"
ln -s ${worksrcpath}/${my_src}/${my_src}.dsk "${my_mnvm_dat}/disk3.dsk"
- ln -s ${worksrcpath}/output.img "${my_mnvm_dat}/disk4.dsk"
# Use the prettier icon on the bootstrap app.
copy -force ${worksrcpath}/${my_icons}/icons//AppIcon.icns ${worksrcpath}/${my_bootstrap_app}/Contents/Resources/
@@ -213,10 +201,12 @@
post-patch {
# 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.
- system -W ${worksrcpath} "${prefix}/bin/bspatch hfs24M.DSK hfs24M.DSK.tmp '${filespath}/patch-hfs24M.DSK.bsdiff'"
- move -force ${worksrcpath}/hfs24M.DSK.tmp ${worksrcpath}/hfs24M.DSK
+ # 8180 spaces, and "@END@") onto the Tidbits disk.
+ system -W ${worksrcpath} "${prefix}/bin/bspatch Tidbits.image Tidbits.image.in '${filespath}/patch-Tidbits.image.bsdiff'"
+
+ # Place an alias of the configure.args file in the Startup Items folder on the Disk Tools disk.
+ 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"
}
pre-configure {
@@ -224,8 +214,8 @@
xinstall -m 755 ${filespath}/configure.applescript.in ${worksrcpath}/configure.applescript
reinplace "s|@BOOTSTRAP_APP@|${my_bootstrap_app}|g" ${worksrcpath}/configure.applescript
- # Copy a blank disk image to store the configure args.
- copy -force ${worksrcpath}/hfs24M.DSK ${worksrcpath}/output.img
+ # Copy the template Tidbits disk image.
+ copy -force ${worksrcpath}/Tidbits.image.in ${worksrcpath}/Tidbits.image
# Build up the combined configure args for all variations.
set i 0
@@ -244,13 +234,13 @@
}
}
- # Write the configure args into the configure.args file on the output disk image.
+ # Write the configure args into the configure.args file on the Tidbits disk image.
set max_configure_args_length 8192
set padded_args [format "%-${max_configure_args_length}s" [join ${configure_args}]]
if {[string length ${padded_args}] > ${max_configure_args_length}} {
return -code error "configure args too long"
}
- reinplace -locale C "s|@START@ *@END@|${padded_args}|" ${worksrcpath}/output.img
+ reinplace -locale C "s|@START@ *@END@|${padded_args}|" ${worksrcpath}/Tidbits.image
# Set the real configure.args that get passed to the AppleScript to the number
# of variations being assembled, so that it knows how long to wait.
Added: trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md (rev 0)
+++ trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md 2013-05-22 10:32:45 UTC (rev 106314)
@@ -0,0 +1,30 @@
+# Creating binary patches
+
+## 1. Create patch-Tidbits.image.bsdiff
+
+* Get a fresh copy of Tidbits.image
+* Make a copy called Tidbits.image.orig
+* Boot Mini vMac with Disk Tools.image
+* Mount Tidbits.image
+* Open TeachText on the Tidbits volume
+* Type "@START@", 8180 spaces, "@END@"
+* Save as "configure.args" on the Desktop of the Tidbits volume
+* Use "Get Info" in the Finder to verify the file is exactly 8192 bytes long
+* Close all windows
+* Shut down the emulator
+* Run `bsdiff Tidbits.image.orig Tidbits.image patch-Tidbits.image.bsdiff`
+
+## 2. Create patch-Disk Tools.image.bsdiff
+
+* Get a fresh copy of Disk Tools.image
+* Make a copy called Disk Tools.image.orig
+* Boot Mini vMac with Disk Tools.image
+* Get a Tidbits.image patched to contain the configure.args file
+* Mount Tidbits.image
+* Open the System Folder on the Disk Tools volume
+* Select the configure.args file on the Desktop
+* Choose Make Alias from the File menu
+* Copy or move the alias into the Startup Items folder
+* Close all windows
+* Shut down the emulator
+* Run `bsdiff 'Disk Tools.image.orig' 'Disk Tools.image' 'patch-Disk Tools.image.bsdiff'`
Property changes on: trunk/dports/emulators/minivmac-devel/files/README-binary-patchfiles.md
___________________________________________________________________
Added: svn:mime-type
+ text/markdown
Added: svn:eol-style
+ native
Modified: trunk/dports/emulators/minivmac-devel/files/configure.applescript.in
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/configure.applescript.in 2013-05-22 06:07:22 UTC (rev 106313)
+++ trunk/dports/emulators/minivmac-devel/files/configure.applescript.in 2013-05-22 10:32:45 UTC (rev 106314)
@@ -13,14 +13,11 @@
set cpu_mhz to (system attribute "pclk") / 1000000
set configuration_delay to 1400 * number_of_variations / cpu_mhz
- delay 4 -- wait 1 second for each disk image Mini vMac needs to mount
+ delay 3 -- wait 1 second for each disk image Mini vMac needs to mount
- my key_code(8) -- "C" -- select the configure.args file
- my menu_file_open() -- open it
- my menu_edit_select_all() -- select its contents
+ my menu_edit_select_all() -- select the contents of the configure.args file which has been automatically opened
my menu_edit_copy() -- copy it
my menu_file_quit() -- quit
- my menu_file_close() -- close Finder window
my key_code(46) -- "M" -- select the MnvM_bld program
my menu_file_open() -- open it
@@ -53,11 +50,6 @@
delay 0.5 -- wait for zoomrects to draw
end menu_file_open
-on menu_file_close()
- my key_code_with_modifiers(13, {command down}) -- "Command-W"
- delay 0.5 -- wait for zoomrects to draw
-end menu_file_close
-
on menu_file_go()
my key_code_with_modifiers(5, {command down}) -- "Command-G"
delay configuration_delay -- wait for configuration to run
Added: trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff
===================================================================
(Binary files differ)
Property changes on: trunk/dports/emulators/minivmac-devel/files/patch-Disk Tools.image.bsdiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/dports/emulators/minivmac-devel/files/patch-Tidbits.image.bsdiff
===================================================================
(Binary files differ)
Property changes on: trunk/dports/emulators/minivmac-devel/files/patch-Tidbits.image.bsdiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/dports/emulators/minivmac-devel/files/patch-hfs24M.DSK.bsdiff
===================================================================
(Binary files differ)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130522/f16524ed/attachment-0001.html>
More information about the macports-changes
mailing list