mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-22 00:32:08 +00:00
Bump the version number since .12 was released
Add a .po extension to the filename when we ingest a shrinkit or DC42 image since we don't really do read/write operations in their native format
This commit is contained in:
parent
8276bbd8c3
commit
3a7027ce7a
@ -183,8 +183,12 @@ public class Disk {
|
||||
|
||||
if (isSDK() || isSHK()) {
|
||||
// If we have an SDK, unpack it and send along the byte array
|
||||
// If we have a SHK, build a new disk and unpack the contents on to it
|
||||
diskImage = com.webcodepro.shrinkit.Utilities.unpackSHKFile(filename);
|
||||
diskSize = diskImage.length;
|
||||
// Since we don't want to overwrite their shrinkit with a raw ProDOS image,
|
||||
// add a .po extension to it
|
||||
this.filename += ".po"; //$NON-NLS-1$
|
||||
} else {
|
||||
File file = new File(filename);
|
||||
diskSize = (int) file.length();
|
||||
@ -196,7 +200,6 @@ public class Disk {
|
||||
StreamUtil.copy(input, diskImageByteArray);
|
||||
diskImage = diskImageByteArray.toByteArray();
|
||||
}
|
||||
int offset = 0;
|
||||
boolean is2img = false;
|
||||
/* Does it have the 2IMG header? */
|
||||
if ((diskImage[0] == 0x32) && (diskImage[1] == 0x49) && (diskImage[2] == 0x4D) && (diskImage[3]) == 0x47) {
|
||||
@ -205,12 +208,14 @@ public class Disk {
|
||||
/* Does it have the DiskCopy 4.2 header? */
|
||||
else if (Disk.isDC42(diskImage)) {
|
||||
isDC42 = true;
|
||||
offset = 84;
|
||||
long end = AppleUtil.getLongValue(diskImage,0x40);
|
||||
if (end < diskImage.length - 83) {
|
||||
diskImageDC42 = new byte[(int)end];
|
||||
System.arraycopy(diskImage, 84, diskImageDC42, 0, (int)end);
|
||||
System.arraycopy(diskImage, 84, diskImageDC42, 0, (int)end); // 84 bytes into the DC42 stream is where the real data starts
|
||||
diskImageManager = new ByteArrayImageLayout(diskImageDC42);
|
||||
// Since we don't want to overwrite their dmg or dc42 with a raw ProDOS image,
|
||||
// add a .po extension to it
|
||||
this.filename += ".po"; //$NON-NLS-1$
|
||||
}
|
||||
else
|
||||
throw new IllegalArgumentException(textBundle.get("CommandLineDC42Bad")); //$NON-NLS-1$
|
||||
|
@ -40,7 +40,7 @@ import com.webcodepro.applecommander.util.TextBundle;
|
||||
* @author Rob Greene
|
||||
*/
|
||||
public class AppleCommander {
|
||||
public static final String VERSION = "1.3.5.12"; //$NON-NLS-1$
|
||||
public static final String VERSION = "1.3.5.13"; //$NON-NLS-1$
|
||||
private static TextBundle textBundle = UiBundle.getInstance();
|
||||
/**
|
||||
* Launch AppleCommander.
|
||||
|
Loading…
x
Reference in New Issue
Block a user