- INSTRUCTIONS FOR BUILDING MACINTOSH C-KERMIT FROM SOURCE - F. da Cruz, Columbia University Center for Computing Activities, March 1986 This blurb explains how to get from the C source files to the final .hqx file. The files ckc*.[ch] come directly from the most current C-Kermit source. The remaining source files all have names starting with ckm... Mac Kermit can be built on a Unix system under the Stanford University Medical Center SUMACC Cross-Development System. At Columbia, this is done on a 4.2bsd VAX-11/750; it is not known if the same results will be achieved with SUMACC on other systems. Here's how to build Mac Kermit from the source: 1. Make a directory for Macintosh Kermit and cd to it. 2. Collect all the ckc*.[ch] and ckm* files together into the directory. 3. Make any desired edits to the ckm*.[ch] source files. 4. The procedure for changing resources (dialog boxes, etc) is too complicated to explain; it involves using the resource editor on the Mac to get things looking right, decompiling the result on the Mac, and editing the changes back into the master copy on the VAX. 5. If you are producing a new version of Mac Kermit, either because you've edited the Macintosh-specific portions (ckm*), or because changes were made to the system-independent portions (ckc*), you should edit ckmker.rc to change the version number. (Note, don't change the 0.8 part, only the edit number in parens; if you change the 0.8 part, the settings files will no longer work because of version skew.) 6. Rename ckmker.mak to makefile if necessary, and then "make". 7. Use Kermit to send the resulting .rsrc file to the Mac. If you put the following commands into a file called k, then "kermit < k" will do the trick: set file type binary send ckmker.rsrc ckmker.rsrc exit Click "Receive" on Mac Kermit's File menu; Mac Kermit will receive the file into the resource fork, in binary mode, by default because of the .rsrc filetype. 8. On the Mac, run SetFile, open "CKMKER", set the creator to KERM, turn on the bundle bit and push the "set it" button. The Mac Kermit icon should appear when you exit from SetFile. 9. Edit 34 requires that a special VT100 font be pasted in, along with a cursor resource. Procedure: 1) Move the CKMFNT.HQX file to the Mac, and use BINHEX to de-hex it. You will get a file called CKMFNT.RSRC. 2) Open the Resource Editor application so that it is showing the disk that contains the CKMFNT.RSRC and CKMKER files. You need a recent version of the resource editor. 3) Open the CKMFNT.RSRC file (double click it). You should see two resource types listed: CURS and FONT. 4) Hold down the command key and drag accross both resources. Both should be selected. 5) Choose COPY from the EDIT menu. 6) Close the CKMFNT.RSRC file. 7) Open the CKMKER file. 8) Choose PASTE from the EDIT menu. 9) Close the CKMKER file. You will be asked whether you want to save the changes to the file. Click YES. 10) QUIT from the Resource Editor. 10. Test CKMKER thoroughly, both on normal systems (DEC-20's, VAXes, etc), and on IBM's, both through the 3705 (line mode) and the Series/1 (full screen). Transfer both text and binary files with each system. Once you've deterimined that the new version works, change its name to "CKMKER 0.8(33)" (but use the new version number from step 5). 11. Run BinHex Version 4 on the new Kermit. Call the resulting file CKMKER.HQX. 12. Use the new Kermit to send CKMKER.HQX to another system, and then bring it back under another name, run BinHex on it to convert it back to an application and make sure it still works. For good measure, try this in binary mode on the resource file too. 13. When the program has been built successfully, record your changes in ckmker.upd and ckmker.bwr. 14. Put the new ckm*.{upd,bwr,hqx} files, plus any modified ckm*.[ch] source files, into the Kermit distribution area(s). Put the resource file in the Kermit-Binaries area. All of the above applies also to the ckmkey program, with the appropriate names changed in the expected way. HINT (may not still be current -- this problem was reported to the SUMACC people some time ago and could be fixed in the current SUMACC release): SUMACC rmaker only allows 50 resources types per compile, our ckmker.rc file has passed that limit so if you need to run rmaker, recompile with NRESCOMP = 100 or so. Also, as of edit 34, the ckmcon.c file makes standard SUMACC cc68 and ccom68 blow up for lack of sufficient symbol table space. There are expanded versions floating around. When building Mac Kermit distribution disks, they should contain executable (and compatible) CKMKER and CKMKEY programs, sample settings files for normal and IBM mainframe operation, documentation -- CKMKER.{DOC,BWR,UPD}, and the utilities SetFile, BinHex V4, and perhaps Disk Utility, and the Desk Accessory Mockwrite (for reading the documentation). Instructions For Building MacKermit From Source Using the Megamax Compiler -------------------------------------------------------------------------- - Jim Noble, Planning Research Corporation, June 1987 This explains the steps specific to rebuilding MacKermit with the Megamax native Macintosh C compiler. The general guidlines for testing and updating files presented above should be followed for Megamax C also. 1. The following additions, deletions and modifications need to be made to the Megamax 'toolnames' capitalization file to correspond to the definitions in Inside Macintosh. The header files, syslib and profile.o must be processed by convert after these changes are made. o The following names need to be added: AppFile evenParity nsvErr SerStaRec appOpen fBsyErr oddParity sPortA appPrint fLckdErr opWrErr sPortB breakEvent fnfErr ParamBlkPtr sysPatListID charCodeMask fontAscent rdPend VCB CountAppFiles fType SerClrBrk versNum ctnIcon GetDrvQHdr SerErrFlag vLckdErr ctsEvent GetVCBQHdr SerGetBuf wPrErr cumErrs keyCodeMask SerHShake wrPend dirFulErr LaunchRec SerReset xOff dskFulErr MemError SerSetBrk xOffSent dupFNErr Move SerSetBuf xOffWasSent eofErr noErr SerShk xOn o The following names need to be deleted: Alarm QHead QType QFlags QLink StatText o The following names need to be modified: Toolnames file Inside Macintosh BtnCtrl btnCtrl ChkCtrl chkCtrl CtrlItem ctrlItem CTSHold ctsHold drvQEl DrvQEl EditText editText HUnLock HUnlock IconItem iconItem KbdPrint kbdPrint OffSetRect OffsetRect PicItem picItem PortA portA PortB portB RadCtrl radCtrl teHandle TEHandle VolClik volClik XOffHold xOffHold 2. Transfer the following files to your Macintosh: o CKM*.C, CKM*.H o CKCFN2.C, CKCFNS.C, CKCMAI.C, CKCPRO.C o CKCDEB.H, CKCKER.H, CKCSYM.H o CKCPRO.W, CKMKER.BAT, CKMKER.HQX, CKMKEY.BAT, CKMKEY.HQX, CKWART.BAT, CKWART.C 3. Run Binhex to process CKMKER.HQX and CKMKEY.HQX. The ouput files should be CKMKER x.y(e) and CKMKEY x.y(e), respectively. 4. The version of Rmaker supplied with Megamax C does not handle all the resource definitions in CKMKER.RC and CKMKEY.RC so it is necessary to start off with latest version of the programs to obtain the resource definitions. Rename CKMKER x.y(e) to CKMKER and rename CKMKEY x.y(e) to CKMKEY. 5. Rename the CK*.BAT files so that the .BAT portion of the filename is in lowercase. The Megamax BatchX utility only recognizes files with the .bat portion in lowercase. Then, edit the .bat files to locate the correct device/folder for the Megamax utilities (currently Megamax_C: in the .bat files) and the MacKermit source (currently CKM: in the .bat files). 6. If CKMPRO.C does not need to be updated from CKCPRO.W skip to step 9. 7. Use the BatchX utility to process the CKWART.bat file. This will produce a new CKCPRO.C file. 8. Edit CKCPRO.C as follows (see the Unix SED editor script in CKMPRO.SED for guidance here): o Change the type of arrary tbl[] from int to unsigned char. Be sure to change all occurences. o Cast all references to tbl[...] to type int. Be sure to change all occurences. For example, change i = tbl[j]; to i = (int) tbl[j]; o Save file as CKMPRO.C. 9. Edit CKCSYM.H and change the #define definition of the symbol MEGAMAX to 1. The Megamax compiler does not support command line definition of symbols. 10. Use the BatchX utility to process the CKMKER.bat and CKMKEY.bat files. This will update the code in CKMKER and CKMKEY.