There are a number of Metrowerks projects associated with this project. (This document does not cover the Eudora Installer Assistant.)
ftp code resources
ftp applications
other code resources
KClientRuning.µ
BackupK5Files.µ
SetHome.µ
SetHome21.µ
SqlNetEncryption.µ
FTP client as a 68k code resource. This is the one that we use in the installer.
This project has code to use Open Transport, but it is compiled out. For some reason it crashes on InitOpenTransport(). There is no problem in using the MacTCP calls with a system that has OpenTransport installed. Please refer to the sample program OTGetDefaultEthernetAddress on the MacOS SDK 2 cd rom. That program builds a code resource using OT as an XCMD for Hypercard, which also requires an A4 world. In trying to get OT to work, I tried setting the project as follows, but that didn't help.
*
changed code model from large to small
*
set 4 byte integers
*
turned on link single segments
*
changed from 2 byte integer ANSI and Math libraries to 4 byte libraries
This code is based on the source from Newswatcher, which is important for two reasons. First, there are licensing issues. Second, and of importance to the project, is that to produce this code resource I took a huge application, reduced it to a tiny core, pasted on the decoders for BinHex and MacBinary, had it decode and write to disk on-the-fly rather than caching in ram, and finally conform to the APIs for VISE and InstallerMaker. This has resulting in stable yet complex source code. From reading the files, its lineage is evident.
The PPC code resource and the standalone applications have much the same project structure and the same source files, so most everything will be explained in this section, while project specific items are discussed in their respective project sections.
Project Files
C & Libraries Headers IMid.c
HighLevel.c
main.c
ftp.c
net.c
log.c
MyStrNEqual.c
binHexToMac.c
MacBinary.c
dnr.cBinHex.h
BinHexToMac.h
def.h
ftp.h
FTPStrings.h
HighLevel.h
log.h
LogDebugging.h
MacBinary.h
main.h
MyMacTCP.h
MyStrNEqual.h
net.h
OpenTransport.hA4Globals.h
IMid.h
SetupA4FromMain.h
CodeRsrcPrefixFile.h
MacOS.lib
ANSI (2i) C.A4.68K.Lib
MathLib68K (2i).A4.Lib
ICGlue.o
OpenTptInet.n.o
OpenTransport.n.o
OpenTransportExtn.n.oProject Preferences
C Language
Target - Macintosh 68k
68k Project
68k Linker
68k Processor
FTP client as PPC, to be used in a Safe Fat Resource. This was never fully tested. In the tests, I didn't see performance any better than with the 68k resource, and that was on BinHex files which are more processor intensive than MacBinary, which is what most installers should be using.
Project Files
IMid.c
HighLevel.c
main.c
ftp.c
net.c
log.c
MyStrNEqual.c
binHexToMac.c
MacBinary.c
dnr.c
ANSI C.PPC.Lib
OpenTptInetPPC.o
OpenTptInternetLib
OpenTransportAppPPC.o
OpenTransportLib
InterfaceLib
ICGlue.o
MathLib
MWCRuntime.LibProject Preferences
C Language
Target - Macintosh PowerPC
PPC Project (same as IMid68k.µ)
PPC Linker
PPC Processor
FTP client as a PPC application. Very useful for debugging, since it has a user interface and the source level debugger can be used.
Project Files
front end
main.c
HighLevel.c
ftp.c
MyStrNEqual.c
net.c
MacBinary.c
binHexToMac.c
log.c
resource files
FrontEnd.rsrc
vers.rsrc
ftp
Mac Libraries
InterfaceLib
MathLib
MWCRuntime.Lib
ANSI Libraries
ANSI C.PPC.Lib
Libs & Misc
dnr.c
ICGluePPC.lib
OpenTransportLib
OpenTransportAppPPC.o
OpenTptInternetLib
OpenTptInetPPC.oProject Preferences
C Language
Target - Macintosh PowerPC
PPC Project
PPC Linker
PPC Processor
FTP client as a 68k app. Only really useful to check library use, etc. Generally, the PPC app would be used for debugging.
Code resource used in the Kerberos 4 installer that detects if the driver is running. If it is, it moves the extension (or control panel) and prefs file to a folder at root (e.g. KClient Sep 20, 96), puts an alias to the installer in the startup folder, and then restarts the system.
If not running, it backs up the files anyway.
Assumes you are removing *and* installing an extension (as KClient was in version 1.5). Does not work properly with version 1.62 (a control panel), even if you are replacing 1.5 with 1.62, so do not use if that is the version you are installing.
Project Files
KClientRunning.c
MacOS.lib
ANSI (2i) C.A4.68K.Lib
MathLib68K (2i).A4.LibProject Preferences
Same as other 68k code resource projects.
Code resource used in the Kerberos 5 installer that copies existing files to a folder at root (e.g. Kerberos Sep 20, 96).
Project Files
BacupK5Files.c
MacOS.lib
ANSI (2i) C.A4.68K.Lib
MathLib68K (2i).A4.LibProject Preferences
Same as other 68k code resource projects.
(Formerly "HackAlias")
Application to build the alias files that get added to the VISE project window. There is no 68k version. There could be, but I just didn't implement it.
Project Files
Sources
MakeAliasMain.c
alias.rsrc
Mac Libraries
InterfaceLib
MathLib
MWCRuntime.Lib
ANSI Libraries
SIOUX.PPC.Lib
ANSI C++.PPC.Lib
ANSI C.PPC.LibProject Preferences
C Language
Target - Macintosh PowerPC
PPC Project
PPC Linker
PPC Processor
This code resource is used in the SQL Net 1.5 installer and does the same work as the SetHome application. The code resource is run after the file "config.ora" is installed. It modifies the "Oracle Settings" file which is installed in the entensions folder. (That's right, extensions.) The SetHome application, which the user used to run after completing the installation, would create this file.
This code resource assumes that "Oracle Settings" has been already installed, figures out the path to "config.ora", which is at the root of the install folder, and stores it in the resource 'ODAT' id=19. The structure of the resource seems to be the pathname as a C string offset from the start of the resource by 12 bytes. It is assumed that the total size of the resource is 258 bytes, leaving only 246 for the string. The first 12 bytes are zero.
This code resource does not work properly with SQL Net 2.1, use the SetHome21 code resource instead.
Project Files
SetHome.c
MacOS.lib
ANSI (2i) C.A4.68K.Lib
MathLib68K (2i).A4.LibProject Preferences
This project file was created by copying BackupK5Files.µ, and no preferences have been changed, except "68k Project", to set the resource name to "SetHome" and the ResID to 6004.
This code resource is used in the SQL Net 2.1 installer and does the same work as the SetHome application. The code resource is run after the file "config.ora" is installed. It modifies the "Oracle Preferences" file which is installed in the "Oracle Folder", inside the Preferences folder. The SetHome application, which the user used to run after completing the installation, would create this file.
This code resource assumes that "Oracle Preferences" has been already installed, figures out the path to "config.ora", which is at the root of the install folder, and makes an alias the install folder (the parent folder of "config.ora"), and then stores it as an 'alis' resource in the "Oracle Preferences" file. (The 'alis' resource is a standard Mac system resource.)
This project also uses some routines from the Apple Dev MoreFiles library, so the source to them is included as well.
Project Files
SetHome21.c
(These are from MoreFiles.)
DirectoryCopy.c
FileCopy.c
FSpCompat.c
FullPath.c
IterateDirectory.c
MoreDesktopMgr.c
MoreFiles.c
MoreFilesExtras.c
Search.c
MacOS.lib
ANSI (2i) C.A4.68K.Lib
MathLib68K (2i).A4.LibProject Preferences
This project file was created by copying SetHome.µ, and no preferences have been changed, except "68k Project", to set the resource name to "SetHome21" and the ResID to 6006.
This code resource is not currently used by any installer. It will eventually be used by the SQLNet 2.x installer, and should not be used with the 1.5 installer. It should be called after the file "sqlnet.ora" is installed, and modifies the encryption seed with random characters.
The "sqlnet.ora" file is read entirely into ram, and is assumed to be less than 16k. This is probably a fair assumption, since the largest example file is about 2k.
The label for the encryption seed (SQLNET.CRYPTO_SEED) is searched for. The encryption seed is assumed to start following the first double quote, and ending before the next double quote. There are no assumptions made about the length, except for the assumption about the total length of the file.
Every character in the seed is changed to be a random letter between 'a' and 'z'. The code could easily be changed to include all printable characters, or all upper and lower case, or letters and numbers, etc.
The latest version of this code resource uses the MacOS toolbox function Random() after seeding the Mac's random number generator. (The original version had difficulties accessing these routines and used the TickCount to get a random offset.)
Project Files
SetHome.c
MacOS.lib
ANSI (2i) C.A4.68K.Lib
MathLib68K (2i).A4.Lib
Project Preferences
This project file was created by copying BackupK5Files.µ, and no preferences have been changed, except "68k Project", to set the resource name to "SQLNetEncryption" and the ResID to 6005.
The resource file "ftp" is very important to the project. The code resources are saved into this file. The "prefs" resource and its template also live in this file. This file is included in the application project files since the error alerts are there, as well as the prefs resource. The VISE installer project also includes the "ftp" file, since the code and prefs resources need to be copied to the installer.
The ftp code resources are conditionally compiled so that they can be built for either VISE or InstallerMaker. The code is also conditionally compiled for the application projects.