Login  •  Register


The time is now: Mon Nov 18, 2019 7:01 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 11 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Sat Aug 06, 2016 11:07 am 
Offline
Space Cadet

Joined: Sat Aug 06, 2016 10:59 am
Posts: 3
Hello,

I am trying to import a Mac OS file (a HyperCard stack) from my computer into SheepShaver. A few years ago, the stack was in a Sit file, but I extracted it with the Unarchiver through the unar command in Debian. This produced two files, the stack and the .rsrc resource fork. I kept those files and discarded the sit.

I am now trying to get this HyperCard stack to open in SheepShaver. I have installed Mac OS 9 and HyperCard 2.4, and put both the stack and the resource fork file in the Unix share. However, HyperCard cannot open the stack (does not appear in the list of files in the "Open stack..." dialog.

Is there a way I can open this stack? Do I need to recombine the resource fork back into the file, and if so is there a way to do this, preferably on a Linux machine before the resulting file is loaded into SheepShaver.

Andrew


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 06, 2016 1:18 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
A pity that you discarded the sit file. That was the only way to keep the archived file intact on a non-Mac file system. You could have imported the sit file into SheepShaver and extracted it there. On any other than HFS or HFS+ file system, the file will be split in two, the data fork "filename" and the resource fork, usually named ".filename". In this form the file is unusable.

If recombination is possible, it can only be done if the combined file is saved to a HFS or HFS+ file system. OSX has (I think since MacOSX 10.3) a utility "FixupResourceForks" that could do the job. Maybe someone with a Mac running OSX can try to recombine the files for you and add again the type and creator metadata that were also lost when you extracted the file in Debian.

http://www.unix.com/man-page/osx/1/FixupResourceForks/


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 07, 2016 2:19 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2719
Location: Emaculation.com
It seems to me that if he renamed .Resource as .<filename> and stuck it them on a removable FAT drive, something might be recoverable. I can't remember exactly how the layout works, but it should be possible to lay things out like Apple does on non-HFS volumes and get the OS to re-combine them.

Anyone have more details on this format to give him?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 07, 2016 3:37 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5617
Location: Amsterdam, Netherlands
Here is some basic information about AppleSingle and AppleDouble formats:
http://www.macdisk.com/asaden.php


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 07, 2016 10:26 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2719
Location: Emaculation.com
Here's some basic info on how named forks are stored on flat file systems:
https://discussions.apple.com/docs/DOC-1876


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Aug 09, 2016 6:18 pm 
Offline
Master Emulator

Joined: Fri Sep 17, 2004 4:22 am
Posts: 353
andrewferguson wrote:
Do I need to recombine the resource fork back into the file
Yes.

Quote:
and if so is there a way to do this, preferably on a Linux machine before the resulting file is loaded into SheepShaver.
EDIT: All you need is a program to convert AppleDouble into MacBinary, copy the result to your HFV volume, and then decode it again with Stuffit Expander (or any other such utility) within Sheepshaver. And such a utility is readily available in Linux.
http://linuxcommand.org/man_pages/unbin1.html

Unfortunately, the syntax is ambiguous. Try "macbinary whatever whatever.rsrc". If that doesn't work, try renaming "whatever.rsrc" to "._whatever" and then "macbinary whatever".

[Needlessly complex rambling follows.]

This is discussed at http://emaculation.com/doku.php/extract ... in_windows . If you were running in Windows, the procedure would be to rename "whatever.rsrc" to "%whatever", browse to the folder with HFV Explorer, and copy the file to your HFV volume. Since you're running Linux, you could always try an ancient version of Executor instead – though I would doubt the binary is at all easy to get running anymore. Or maybe HFV Explorer runs in Wine.

Another idea that comes to mind is to use the Apple .zip format:
  • Create a folder named __MACOSX in the folder containing "whatever".
  • Move "whatever.rsrc" into __MACOSX and rename it to "._whatever".
  • Create a standard .zip archive that includes both "whatever" and the __MACOSX subfolder.
  • Copy the .zip file to your HFV volume and decompress it inside Sheepshaver using the utility from this thread.

In theory, you might be able to re-arrange the resource fork data on your Unix drive so that it's stored in the way Sheepshaver expects to find resource fork data on a non-HFS drive, i.e. by sticking it in a folder named ".finf". But I never worked out the particulars of that arrangement and I'm not sure it's the standard AppleDouble format.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Aug 15, 2016 8:33 pm 
Offline
Space Cadet

Joined: Sat Aug 06, 2016 10:59 am
Posts: 3
Jorpho,

Wow! What you describe sound exactly like what I am looking for. However, I can't find a way to get the macbinary program. It is not in the package repositories for debian, nor can I find a website. Is it this GitHub repository https://github.com/johnnywalker/netatalk ? Or can I find a precompiled version elsewhere?

Andrew


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Aug 15, 2016 10:17 pm 
Offline
Master Emulator

Joined: Fri Sep 17, 2004 4:22 am
Posts: 353
Ah, fiddlesticks, of course it wouldn't be that easy, would it?

It does appear to be part of the netatalk package, but indeed, https://packages.debian.org/jessie/netatalk turns up nothing. Searching for "macbinary" at http://rpm.pbone.net/ turns up a lot of results for netatalk, including packages for CentOS 6. Maybe one of those will work – apparently you need to use "alien", or if all else fails you can just fire up a live CD in VMware or VirtualBox.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Aug 15, 2016 11:06 pm 
Offline
Space Cadet

Joined: Sat Aug 06, 2016 10:59 am
Posts: 3
I don't suppose that macstream (http://linuxcommand.org/man_pages/macstream1.html) would do the same thing? (It comes with the macutil package in debian). I am not really sure how to use it if it can.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Aug 16, 2016 12:01 am 
Offline
Tinkerer

Joined: Thu Aug 14, 2008 9:05 am
Posts: 97
First thing to do is to determine what format the dotfile is in. It's most likely AppleDouble, but if it's something else (like a straight copy of the resource fork), it's good to know that before wasting time on an AppleDouble copy.

What happens if you run the 'file' command on the dotfile?

Alternatively, you could e-mail the two files to me (support, then the thing that looks like an "a" with a circle around it, then charlessoft, then a period, then com) and I could send them back to you in the form of a disk image that SheepShaver could open, if you like. I'm the author of a popular decompression tool for the Mac, so I've got a lot of experience dealing with these files.

_________________
There's no earthly way of knowing, which direction we are going, for the rowers keep on rowing, and they're certainly not showing any signs that they are slowing.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Aug 16, 2016 2:25 am 
Offline
Master Emulator

Joined: Fri Sep 17, 2004 4:22 am
Posts: 353
Unar only supports AppleDouble and cannot create straight copies of the resource fork, so no question there.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 11 posts ]


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group