Tighten up the ant task a bit

This commit is contained in:
2012-08-15 04:02:58 +00:00
parent 0935e13c51
commit 821e7c7977
3 changed files with 12 additions and 5 deletions

View File

@ -82,7 +82,7 @@
<appleCommander command="x" imagename="${pro140image}" outputpath="${projdir}/work/dist" /> <appleCommander command="x" imagename="${pro140image}" outputpath="${projdir}/work/dist" />
<echo message="Files should be exported to the current working directory now." /> <echo message="Files should be exported to the current working directory now." />
<!-- Now, try out converting --> <!-- Now, try out converting -->
<appleCommander command="convert" filename="C:\David\Asimov\images\gs\utils\DiskCommander.GS.sdk" imagename="${projdir}/work/dist/test.po" /> <appleCommander command="convert" filename="images\gs\utils\DISK.WITCH3.1.0.SHK" imagename="${projdir}/work/dist/test.po" sizeblocks="2000"/>
</target> </target>
<target name="clean" description="Get rid of testing artifacts."> <target name="clean" description="Get rid of testing artifacts.">

View File

@ -45,7 +45,7 @@ public class AntTask extends Task
* dos140: <imagename> <volname> * dos140: <imagename> <volname>
* pro140/pro800: <imagename> <volname> * pro140/pro800: <imagename> <volname>
* pas140/pas800: <imagename> <volname> * pas140/pas800: <imagename> <volname>
* convert: <filename> <imagename> * convert: <filename> <imagename> [<sizeblocks>]
*/ */
if (_command.equals("i")) if (_command.equals("i"))
{ {
@ -226,7 +226,7 @@ public class AntTask extends Task
{ {
try try
{ {
com.webcodepro.applecommander.ui.ac.convert(_fileName, _imageName); com.webcodepro.applecommander.ui.ac.convert(_fileName, _imageName, Integer.parseInt(_sizeBlocks));
} }
catch (IOException io) catch (IOException io)
{ {
@ -282,6 +282,11 @@ public class AntTask extends Task
_address = address; _address = address;
} }
public void setSizeBlocks(String sizeBlocks)
{
_sizeBlocks = sizeBlocks;
}
public void setFailOnError(String failonerror) public void setFailOnError(String failonerror)
{ {
if (failonerror.equalsIgnoreCase("true")) if (failonerror.equalsIgnoreCase("true"))
@ -307,4 +312,6 @@ public class AntTask extends Task
String _type = null; String _type = null;
String _address = "0x2000"; String _address = "0x2000";
String _sizeBlocks = "0";
} }

View File

@ -534,7 +534,7 @@ public class ac {
* *
* DiskCopy 4.2 image - convert it to a ProDOS image * DiskCopy 4.2 image - convert it to a ProDOS image
* SDK disk image - unpack it to a disk image * SDK disk image - unpack it to a disk image
* ShrinkIt file bundle [future] - unpack files onto a disk image sized to fit * ShrinkIt file bundle - unpack files onto a disk image sized to fit
*/ */
static void convert(String shrinkName, String imageName) static void convert(String shrinkName, String imageName)
throws IOException { throws IOException {
@ -546,7 +546,7 @@ public class ac {
* *
* DiskCopy 4.2 image - convert it to a ProDOS image * DiskCopy 4.2 image - convert it to a ProDOS image
* SDK disk image - unpack it to a disk image * SDK disk image - unpack it to a disk image
* ShrinkIt file bundle - unpack files onto a disk image sized to fit * ShrinkIt file bundle - unpack files onto a disk image sized to fit, or as specified in numbers of blocks
*/ */
static void convert(String shrinkName, String imageName, int imageSize) static void convert(String shrinkName, String imageName, int imageSize)
throws IOException { throws IOException {