Problem in running a classic application built using CW10.0 on mac OS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem in running a classic application built using CW10.0 on mac OS

8,596 Views
mrvk
Contributor I

Hi All,

I am facing the below problem with the CW 10.0. Any quick help in this regard would be very very helpful for us.

I have developed a classic (Power PC) application using CW 10.0 on a mac mini with 10.4 mac OS (tiger).When I run this application on OS 10.4, the classic environment (9.2.2) starts and the application runs without any problem.

But when I try to run this application on a native OS 9.2.2 system (Power PC G3), this application does not run. When I try to execute this application, an ‘Open With..’ dialog pops up.

When I take a look at the type of application, it gives the information that it is a ‘document’ and not an application.

How can I successfully build an application on OS 10.4 to target the OS 9.2.2 system using CW 10.0 ?

Are there any specific settings that I need to set while building the project using the CW IDE?

Note:

Even when I tried to run the ‘Hello World ppc’ sample application (path: MetroWerks CodeWarrior 10.0 \ (CodeWarrior Examples) \ MacOS Examples\ C C++ for Power Mac\Hello World PPC\ ‘ ) I have observed the same behaviour ie., the application runs successfully in the classic environment on the OS 10.4 mac mini system but not on the native OS 9.2.2 system.

Labels (1)
0 Kudos
12 Replies

1,337 Views
DavidBlache
Contributor I
From the info you provided, I see this not a bundled application (package), but a classic "flat" application (with resources in the resource fork). If the Mac OS 9 Finder's Info window shows the type as a "Document" on the G3, then I'm betting the app did not transfer correctly to the G3.

What method did you use to copy it over to the G3 (AppleShare, FTP, Zip disk, etc)?

Can you install ResEdit or Resourcerer on the G3 and check to see what the creator and file type are on the transferred file?

It'd be helpful to be able to look at the app file that you transferred to the G3 - can you attach it to your reply?
0 Kudos

1,337 Views
mrvk
Contributor I

Yes, I think you are right. The application has not been transferred correctly. After installing FileTyper, I have checked the file type and creater on the OS 9.2 system.

The file type has become 'Text' and the creator as 'dosa' which is incorrect.

I have transferred the files using zip. Also, I have copied the application and the data directory directly to a USB memory stick and transferred to the OS 9.2 system.

How do we need to actually transfer the files and what all files do we really need to transfer?

Thanks in advance,

 

0 Kudos

1,337 Views
DavidBlache
Contributor I
When you say "using zip" do you mean using the .zip archive format, or do you mean using a Zip removable disk?

Zip Archives

In general, the zip format does not preserve resource forks. If you used this archive format, it's likely you lost all the resources in the application on the target classic system. The zip format may not preserve Finder info (type and creator) either.

Note: The Mac OS X Finder does have a File > Create Archive of ____ feature that creates a special type of zip file, placing resource data in special files in the archive in an attempt to preserve it. But I'm not sure if classic Mac OS supports this type of resource zip archive. It's not truly portable to all classic Mac OS versions in that respect.

I suggest using Stuffit to create a .sit or .sitx archive, since Stuffit formats will preserve resource fork information in the archive. Check the creator and file type on the target system after you've expanded the archive to be sure everything got there okay.

Zip Removable Disks

If you meant that you used a Zip removable disk, then it may be that the Zip disk you used is formatted in NTFS/FAT format for Windows rather than HFS format for Mac OS. If this is the case, then you likely lost all resource information when you copied the files to the disk, since NTFS/FAT have no concept of resource forks. Here again, using Stuffit to create a .sit or .sitx archive of the application first will preserve that information until you get the files onto the target classic system and expand the archive there.
0 Kudos

1,337 Views
mrvk
Contributor I

Thanks a lot for all of you. It works fine on OS 9.2 in case I use sutffit. But do I have other options?

Should I always use StuffIt (or any other zip utility) in order to distribute my application to others?

Thanks,

Vijay

0 Kudos

1,337 Views
DavidBlache
Contributor I

mrvk wrote:

Thanks a lot for all of you. It works fine on OS 9.2 in case I use sutffit. But do I have other options?

Should I always use StuffIt (or any other zip utility) in order to distribute my application to others?

Thanks,

Vijay






These days, the recommended form of packaging and distribution, especially for applications that run in Mac OS X, is a compressed disk image. Since your application runs in both Mac OS X and classic Mac OS, it seems a perfect candidate for a disk image. The immediate advantage to your end users is that they do not need third-party software to use a disk image; though, there are other advantages.

Disk images may contain applications, documentation, and pretty much anything else you want to distribute, all in one, single, compressed file. Users can download the compressed disk image file to their computer and double-click it to have it automatically mounted as a virtual volume on their desktop (just as if they had inserted a floppy or Zip disk). They can then copy files from the mounted virtual volume to their hard drive.

Apple has a short tutorial showing developers unfamiliar with disk images how to create one. The tutorial instructions are a little outdated (for instance, in Mac OS X 10.4.x, you choose File > New > Blank Disk Image to create a new image), but give you the basic idea of how to do it.
0 Kudos

1,337 Views
J2MEJediMaster
Specialist I
Have you:

1) Made sure that the tools are generating CFM code and not Mach-O code?

2) Have you tried using ResEdit to change the application file's type to 'APPL'?

---Tom
0 Kudos

1,337 Views
mrvk
Contributor I

Hi,

I am pretty new to this environment. I am not really sure, if the CFM code is being generated. In the Target Settings, I have specified the linker name as 'Macintosh Power PC' and not as 'Mach-o'. Also the project type is specified as 'Application' with type as 'APPL'.

Can you please let me know how can I sure that the CFM code is generated and what should be the application file extension for the generated file ? I am not able to view the extension using the option, 'Get Info' for the generated file.

Thanks in advance,

Vijay

 

0 Kudos

1,337 Views
J2MEJediMaster
Specialist I
OK, exactly what CodeWarrior template did you select to build the application? It sounds like you're not generating mach-o code, but there are other settings that can trip you up. Ideally, you want to choose Carbon Application.

Also, I wouldn't worry about the file extension, just the metadata for the file's Type and Creator. Mac OS 9 is going to use that rather than a file extension to launch the app.
0 Kudos

1,337 Views
mrvk
Contributor I

In the Target settings panel, the Creator is specified as '????' and the Type is specified as 'APPL'. These were the default values. Can you please let me know whether I need to modify it to ensure that the application runs on native OS 9.2.2 ?

 

0 Kudos

1,337 Views
J2MEJediMaster
Specialist I
Those settings should work. I'm puzzled as to why it's showing up as a documentratyhwer than an application. Check these:

Under the Classic Toolbox settings panel, is the Project Type set to Application?

Under the cluster of Linker setting panels, is the Mac OS Packager turned off? That is, the checkbox for Use Mac OS Packager is unchecked. Finally, under the Linker cluster, you should see a PPC PEF panel. If that isn't there, then it's not generating PEF code.

---Tom
0 Kudos

1,337 Views
mrvk
Contributor I

Yes, the project type is set to 'Application'. I also do see a PPC PEF panel.  I am unable to find the option, 'Use Mac OS Packager'. Under the linker panel, I have an option, 'Code Folding' which is turned off.

After compiling the classic application (TestClassic), a directory with the name, 'TestClassic Data' is created with a .stg and .tdt files and object code.

I have copied this directory along with the TestClassic application to the native OS 9.2 system. Even then it does not work.

0 Kudos

1,337 Views
mrvk
Contributor I

The project type that I have used is 'Mac Os C++ Stationery' and the template is 'Mac OS Classic \ C++ Toolbox Classic'.

 

 

0 Kudos