4) Camlprog.

6.1) Introduction

Camlprog is a complete camlwin development tool. It includes Camlicon and Camldsgn, a project manager, and text editor. A project is the specification of the files that composed it, the way to compile them (this is alredy done for caml, html, c files, but can be changed and increased), the aim (library or binary) and the option for the linker, the automatic tasks to accomplish on the help.

6.2) The text editor

The text editor is a classic one. At the top of the window there is the menu bar. The File menu is: You can do a find and replace or find in the edited text with the search menu: You can edit the text with the associated key or with the Edit menu: When a project is opened, in order to swap to another file, select the new file in the project. The current file is saved if needed, then new selected is loaded.

6.3) Create a project

You can load, save, or create a new project with the menu Project. Once a project is opened, the window shown in figure bellow is added.


Figure 6.1

This is the project window. It lists all the files of your project. You can add a new file with the button Add and delete a file with the button Del. The order is important, because Camlprog compiles the file in the order of the project. The selected file is the one displayed in the text editor.

A compiler and some options are associated with each file extension. You can configure or add file type by pressing the Config Compilers button.

Figure 6.2

The window that allow to configure all the compilers is shown in figure 6.2. There is a list of all the file extensions currently supported by Camlprog, and the configuration of the selected one.

A configuration is the specification of a source file extension, target file extention and a compiler and some flags. For example, if you want to compile a caml file with the debug flag, add -g flag to .ml file extension. The changes made in a configuration are effective only if you pressed Change button.

You can add or remove a configuration with the buttons Add and Del.

The aim of the project and the option of the linker can be configured with the Config Linker button.

Figure 6.3

You can choose between a binary and a library project. A binary project use camlc. A library project use camllibr. In order to make a library, you can specify a temporary file name, which is used to move the last file of the project once it's compiled. With this method, you can make one mli file for your library (see camllibr in caml reference manual).

If you have help files ("html" or "htm" under PC), Camlprog can make an HTML file which is the index of all the anchors of all the help files. It can also renumber all the titles, using title levels (H1,...,H6) or make an other HTML file which stores the "Table of content". The names of these files are to be specified when you select these options.

6.4) Compile and link.

The menu Run allows to compile a file, make a project, clean a project, run a program. This menu is:

6.5) Call Camldsgn and camlicon.

The menu Exec is useful to open the Camldsgn or the Camlicon window. The 3 items of this menu are :

4.6) Project file and config file formats.

The project are saved in two files. The first (project file: .prj) is the list of all the files included in the project, the other (config file: .cfg) is the configuration of the project. The format of these files is describe bellow.
Project file: ".prj"
Configuration file: ".cfg"