Subject: [9000-Developers] Geos SDK under Win 95/98 - some assembly required... To: 9000-developers <9000-developers@geekstuff.co.uk> Hi all, the following collection of "random notes" lists the changes I had to make to get the HELLO sample application to compile on the Geos SDK when it is installed under Win 95/98. General note: the following procedures are not for the faint-hearted - they require some familiarity with batch files, patching and general command line skills. If you come from a Visual C-type background and have a distaste for command line compilers anyway, the following will probably not make you like them any more... Most of these steps could be automated and packaged a lot more nicely, but I document them here anyway since a number of people asked for the SDK under 95/98 a while ago... The following assumes that the SDK as well as Perl have already been installed as described in the documentation. Pathnames assume that all tools have been installed to drive C, and Borland C 4.5 is used. Contrary to the usual recommendation, Borland C 5.0 may do slightly better under Win 95/98 because it doesn't require longname fixing with the "dosfront" tool and therefore avoids one of the incompatibilities described below (see the SDK docs for special notes about installing/using Borland C 5.0): The first two parts deals with the compiler and build tools, while the rest may be interesting even for those who do not immediately want to start compiling away because it shows how to make the emulation targets (N9110V10.NC/EC and N9000V20.NC/EC) work under Windows 95/98 in full screen or in a window. This is already enough for testing software on a PC without endangering your actual phone... :-) ciao marcus *** Setting up compiler: - Edit AUTOEXEC.BAT: path "%path%;C:\Program Files\Perl\bin;c:\pcgeos\bin" set root_dir=c:\pcgeos set goc_compiler_dir=c:\bc45 set ccom=@dosfr95 bcc - COPY c:\windows\command.com c:\pcgeos\bin\cmd.exe - Create c:\pcgeos\bin\pmake95.bat: pmake -u %1 %2 %3 %4 %5 %6 %7 %8 %9 >_run.bat call _run.bat - COPY c:\pcgeos\bin\dosfront.exe c:\pcgeos\bin\dosfr95.exe and patch DOSFR95: Comparing DOSFRONT.EXE and DOSFR95.EXE. 00000AD7: 2D FF 0000A60C: 64 25 0000A60D: 73 78 0000A60E: 66 2E 0000A60F: 25 74 0000A610: 78 6D 0000A611: 2E 70 0000A612: 74 00 0000A613: 6D 00 0000A614: 70 00 0000A619: 64 25 0000A61A: 73 78 0000A61B: 66 2E 0000A61C: 25 74 0000A61D: 78 6D 0000A61E: 2E 70 0000A61F: 74 00 0000A620: 6D 00 0000A621: 70 00 *** Compiling/building restricitons: - MKMF doesn't fully work. As a result, running MKMF only creates the makefile, but not the dependencies file. This means that any changes in include files do not automatically cause the affected object modules o be recompiled. In addition, after running MKMKF, I have experienced an error message "Invalid option", after which you are caught in a DOS command line with no prompt. To leave, enter EXIT. - "PMAKE95 depend" fails because MAKEDPND gets an enormously long commandline that causes problems in the Win 95/98 batch file generated by PMAKE95. If you want to run MAKEDPND to get the dependencies file (see above), you'll have to manually edit the generated _run.bat file to first copy all the parameters of makedpnd into a single-line text file (e.g. "args") and then call makedpnd with an argument file instead, using a command line like "makedpnd @args". Then, start _run.bat again. - Instead of PMAKE, PMAKE95 must be used to build an application. - Because of the patch to DOSFR95 (which effectively disables a longname kludge), only the NC version of an application can be built without tricks because it generates object files with valid 8+3 names. In other words, "PMAKE95 -n" works, while "PMAKE95" only will fail in the GLUE stage because of missing object files. If you still want to build an EC version, you'll have to rename "*.EOB" to "*.EOBJ" and link again. When using BCC 5.0, DOSFRONT is not required, and this restriction does not apply. *** Setting up emulation targets: - Add to GEOS(EC).INI in target: [system] primaryFSD = ms4.geo [screen 0] driver = vga[ec].geo device = VGA: 640x480 8-level grayscale [keyboard] driver = kbd.geo - Copy from \pcgeos\target\geos2xnc to target: system\fs\ms4.geo system\kbd\kbd.geo *** Restrictions to the emulation targets: - Only the "EC/NC without Swat" versions work for single machine debugging. You can still use the emulations in a window without a debugger attached (using Alt-Enter to switch from full screen to DOS window). In addition, you can perform debugging using an actual phone over a serial line. - The only thing missing for performing full serial debugging on a second machine running the emulation (or possibly on the same machine with a looped-back serial line) is a serial SWAT stub to replace \pcgeos\target\n9110v10.*c\swat.exe (this version was part of previous Geos SDKs, and it is most likely identical with the SWAT.EXE found on an actual phone). - Targets cannot be exited except by forcefully closing their DOS windows. - The GEOS Setup application to change the registry entries of the SDK doesn't work. If one is serious about using Swat over a serial line, it is probably necessary to copy the registry entries for the SDK from an NT machine over in a .REG file.