COM/MTS Guide


Appendix C. New Windows Executables

As part of the Panther COM/MTS installation package, a set of standard Panther executables is provided for the client and the web application broker. Depending on your configuration and on the platform and database being used, you might need to create new executables. Specifically, a new executable is required if you are using a database for which DLLs are not provided or if you are adding C functions to your Panther application.

Alternatively, Panther distributes workspace and project files for use with Microsoft Developer Studio. Instructions on how to use the workspace are provided in the Release Notes.


Client and Web Application Broker Executables

To create new executables, Panther distributes a single makefile that can be invoked via the command line utility, nmake.

How to Create a New Panther Executable

Complete the installation process of Panther components.

  1. Ensure that the appropriate application variables (SMBASE, etc.) have been applied to your environment.
  2. Go to your application directory (or create one) and copy all files from the Panther link subdirectory to it.
  3. Edit the makefile in your application directory, commenting or uncommenting lines as needed to build the appropriate executables. For further information, refer to "Specifying the Executables."
  4. Uncomment the appropriate database in the makefile and edit the database-specific makevars.dbs (where dbs is the extension of the database) file to choose the correct version of your database software. For further information, refer to "Linking in the Database."
  5. Type nmake at the command line to build the executable. By default, the makefile in the current directory is used for the make (and make) command.
  6. The nmake process creates a new Panther executable, prodev32.exe. Give the executable file a unique name to distinguish it from the distributed executable or others that you have built differently.
  7. If you built a new web application broker executable (jserver), modify the SERVER variable in your application's initialization file to reference the new jserver executable in its own directory. Do not overwrite the jserver executable in the util directory.

Specifying the Executables

To indicate the executables to build, edit the makefile in your application directory:

  1. Comment or uncomment the appropriate client executables as needed (these are uncommented by default):

    PRORUN = prorun32.exe

    Runtime executable

    PRODEV = prodev32.exe

    Development executable

    RWRUN = rwrun32.exe

    Report utility

    If Web application broker software has been installed, comment or uncomment the server executable as needed:

    JSERVER = jserver.exe

    Web application broker executable (uncommented by default)

  2. To override the value of certain application variables such as SMBASE, uncomment the appropriate lines in the PARAMETERS section.
  3. If you have the Panther web application broker on the same machine as other Panther software, it is recommended that they be installed in the same directory. However, if they are not in the same directory, set WEBBASE (in WEB PARAMETERS section) to the web application broker installation directory.
  4. The Panther debugger allows you to trace JPL and Panther screen events and is installed by default for clients. If you do not wish to use the debugger, comment the lines in the DEBUGGER PARAMETERS section.
  5. You have the option of building a standalone executable. Comment or uncomment the appropriate lines in the MIDDLEWARE PARAMETERS section.
  6. If you want to add Microsoft Codeview debugging information, uncomment the corresponding block.

Linking in the Database

If you are using a database for which DLLs are not provided, you must edit the makefile in your application directory to link in the appropriate database.To include the appropriate database in your executables:

  1. Uncomment the appropriate include statement in the SELECT DATABASE SOFTWARE section of the makefile.
  2. Edit the corresponding makevars.dbs (where dbs is the extension of the database) file to choose the correct version of your database software.
  3. In the makevars.dbs file, verify or update the following:

Changing the Panther COM Template DLL

PrlServer.dll is the template for Panther COM components and can be edited to enable you to link your own C functions into your COM component. Files included in the comlink directory are:

PrlServer.c

Source code

PrlServer.rc

Resource file for copyright information

PrlServer.dsw

Microsoft Developer Studio Workspace File

PrlServer.dsp

Microsoft Developer Studio Project File

makefile

For command line makes

Edit the source code in PrlServer.c to include your C Functions, make a new DLL, and in the Panther editor, update the name and/or location of the template DLL on the COM tab of the Component Service interface. It is recommended that you give the new DLL a different name (other than PrlServer.dll).