Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Please Vote! Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

# Mac Installation and Configuration Notes

## Platforms

> This version has been tested on a PowerMac 7100/80 with the following VMs:

>       MRJ 1.0.2, 1.5, 2.0d2, and 2.2
>       CodeWarrior Pro2, Standard and JIT

## Installation

> Unzipping the archive containing this file will produce a folder named 'samizdat'. You can put this folder anywhere you wish.

> In the 'samizdat' folder, there are five Stuffit archives which contain the Mac-specific files. Installing JConfig on the Mac consists of unstuffing these files, and moving one of the resulting folders into your Extensions folder.

> The Mac-specific files are stored in the locations shown below. The Mac-specific files are shown in bold. A description of the contents of each file is given in the 'Mac Manifest' section below.

>     samizdat
>         SamizdatClasses.sit        a folder containing the Mac shared library
>         macdebug.sit               a folder containing the DebugWindow application
>         macrescp.sit               a folder containing the IC Res Copy application
>         imeister
>             IMapp.sit              the ImageMeister application
>             SDK
>                 example
>                     macproj.sit    a CodeWarrior project and its support files

> Please follow the instructions below exactly, in order to avoid problems.

> Step 1. Unstuff each of these files in place: i.e., unstuff them into the locations where they're currently stored: 'macdebug.sit' into the 'samizdat' folder, 'IMapp.sit' into the 'imeister' folder, etc.

> NOTE: If Stuffit does not recognize the .sit files as Stuffit archives, you'll need to change the creator of each of these files to 'SIT!', and the type of each of these files to 'SITD'.

> Step 2. Copy the files 'JConfig.zip' and 'imeister.zip' from the 'common' folder into the 'SamizdatClasses' folder. The 'SamizdatClasses' folder was created when you unstuffed 'SamizdatClasses.sit'. The 'SamizdatClasses' folder should now contain three items: 'JConfig.shlb', 'JConfig.zip', and 'imeister.zip'.

> Step 3. In order for JBindery and other Mac applications to be able to work with 'JConfig.zip' and 'imeister.zip', you may need to change the creator of these two files to 'JAVA', and the type of these two files to 'ZIP '.

> Step 4. Move the 'SamizdatClasses' folder into your 'Extensions' folder. The 'Extensions' folder is inside your System Folder.

> NOTE: When you redistribute the JConfig binaries, you do not need to store 'JConfig.zip' or 'JConfig.shlb' in this same location. This is only done because the ImageMeister application looks for its Java classes, which are stored in the 'imeister.zip' file, in a folder named 'SamizdatClasses' inside the Extensions folder.

## Running ImageMeister

> The ImageMeister application is now ready to run, just double-click its icon in the 'imeister' folder.

> For more information on ImageMeister, see imagemeister.html.

## Running The Sample Applications

> This distribution contains two sample applications which illustrate various features of JConfig:

> - The first application is a sample disk browser, the source code for which is the DiskBrowser.java and BrowserPanel.java files in the `source/com/tolstoy/testjc` folder.
> - The other application brings up a console window, finds and opens the SimpleText application, displays the application icon for SimpleText, and launches your Web browser. The source code for this sample application is Tester.java, in the `source/com/tolstoy/testjc` folder.

> In addition to Tester and DiskBrowser, three other samples are provided.

> Run these in a similar fashion to running Tester. See the comments in these files for more information.

> - `com.tolstoy.testjc.FileAttributesTest`: Lets you view and set the attributes for files and folders.
> - `com.tolstoy.testjc.TestResFork`: shows how to copy a Mac file's data and resource forks to a new file. Copying the file's attributes is left as an exercise.
> - `com.tolstoy.testjc.MakeLink`: shows how to create a Windows shortcut, but could be adapted for the Mac.

> To run these applications, follow the instructions appropriate for either MRJ or CW.

> MRJ Instructions

> 1) Open the 'SamizdatClasses' folder which was installed in your 'Extensions' folder, inside your System Folder.

> 2) Put a copy of the JBindery application in the 'jconfig' folder, which is inside the 'samizdat' folder. JBindery comes with the MRJ SDK.

> 3) Drag 'JConfig.zip' from the 'SamizdatClasses' folder onto the JBindery application. JBindery will open, and in the 'Command' section ( the first section ), enter the following in the 'Class Name' text box:

>     	com.tolstoy.testjc.DiskBrowser

> 4) Click the 'Save Settings...' button. In the file dialog that opens, click the 'Save as application' check box, and then save the file. This will create a double-clickable application.

> 5) Open the information box on the resulting application, and increase its memory partitions to around 1 Meg. Otherwise, the console window will stop displaying output at some point.

> 6) Create another double-clickable application by repeating steps 3-5, except this time enter the following in the 'Class Name' text box:

>     	com.tolstoy.testjc.Tester

> CodeWarrior Instructions

> 1) Copy the following files into the same folder as the 'Metrowerks Java' application:

>     	JConfig.zip
>     	JConfig.shlb
>     	jconfig.cfg
>     	jcfactrz.txt

> The first two files are in your 'SamizdatClasses' folder, which was installed in your 'Extensions' folder. The last two files are in the 'samizdat:jconfig' folder.

> For instance, your folder hierarchy might look like:

>     Macintosh HD:
>         Metrowerks:
>             Metrowerks Java:
>                 Metrowerks VM:
>                     Metrowerks Java ( the application )
>                     JConfig.zip
>                     JConfig.shlb
>                     jconfig.cfg
>                     jcfactrz.txt

> 2) Drag JConfig.zip onto the 'Metrowerks Java' application, and open the 'Application' window. The command for this is on the 'Windows' menu.

> 3) In the 'Class Name' text box, enter the following:

>     	com.tolstoy.testjc.DiskBrowser

> Then, press the 'Run' button. This will run the Disk Browser sample application.

> 4) To run the other sample application, quit 'Metrowerks Java', and then repeat steps 2-3, except enter the following in the 'Class Name' text box:

>     	com.tolstoy.testjc.Tester

## Paths and Classpaths

> First, you have to make sure that JConfig.zip is in the classpath. Since the Mac doesn't have a command line, this is generally handled by dragging and dropping .zip files onto an application runner of some kind.

> One such application runner is JBindery, the use of which was described in the MRJ section above. When you drag a .zip file onto the JBindery icon, JBindery add that .zip file to its classpath. JBindery also has a dialog box which allows you to add something to the classpath via a file selection dialog box.

> For more information on JBindery, read the documentation which comes with the MRJ SDK, or ask a question on Apple's MRJ-Dev mailing list. Both of these are available at Apple's Web site.

> Also, you need to make sure that JConfig.shlb is in the "shared library search path". Basically, this means that JConfig.shlb should be either in the same folder as your application, or somewhere in the Extensions folder. The Extensions folder is in your System Folder, and is where items such as MRJ are stored. JConfig.shlb does not have to be in the root level of the Extensions folder; it can be inside another folder, which is how we do it: we store JConfig.shlb in the 'SamizdatClasses' folder.

> NOTE: If you want to put JConfig.shlb next to your app, you have to be running your app standalone: not directly from the JBindery setup program. After setting up your app with JBindery, make sure that the 'Save As Application' checkbox is selected on the JBindery 'Save' dialog.

## Debugging

> Although JConfig.shlb does not call DebugStr, it is highly recommended that you have MacsBug installed.

> The folder 'DebugWindow 1.4 Ä' contains the application DebugWindow. DebugWindow displays a window on your screen, similar to the console window opened by JBindery.

> JConfig writes debugging information to this window. It is highly recommended that you have DebugWindow open when working with JConfig. If there are any problems, please copy the information from DebugWindow, and send it to us with your bug report.

## Mac Manifest

> The Mac-related files contain the following items:

>     macdebug.sit
>         Contains the 'DebugWindow' application, which is described in the
>         'Debugging' section above.

>     macrescp.sit
>         Contains the 'IC Res Copy' application. The use of this application
>         is described in the file 'macrescp.txt' inside this archive.

>     IMapp.sit
>         Contains the Mac shell application for the ImageMeister application.
>         This application was created by modifying the 'ApplicationSample'
>         included with the MRJ SDK.

>     macproj.sit
>         Contains a CodeWarrior project and its support files. This is used
>         to build the sample ImageMeister plugin described in the file
>         'tutorial.html' inside the 'imeister/SDK' folder.

Main Page · JConfig · ImageMeister · System Properties Repository · Native Macros · Free Samples · WordMeister · Java Freeware · Links · Contact Us

Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.
JConfig and ImageMeister are trademarks of Samizdat Productions. Other trademarks are the property of their respective owners.
samizdat@tolstoy.com