For every CalcIt Application or code at Scratchpad, a standalone Windows executable file (.exe) can be generated. This executable can be a normal GUI executable or a console executable which runs at command line.
These generated executables need a DLL file to run (calcitlib.dll). This file has to be found in the current directory or in the normal search path. Also, for convenience, when the main CalcIt application runs updates an entry in the registry which points to the the dll in its execution directory. CalcIt generated executables check first this entry to locate and load the needed dll file.
Many CalcIt executables can run at the same time when in the CalcIt environment only one code can run at a time.
Any code in a Scratchpad window or Application item can be used to create CalcIt executables. We press the in the Scratchpad toolbar and we get a form to accomplish easily this task.
Under "File Name" we enter the path and the name of the file. If we omit the path the file will be created in CalcIt directory.
Under "Title" we enter a Title for the executable. This title appears in the caption of the default output window. See below.
Under "Icon" a path is entered pointing to an icon (.ico) resource file. With this icon the executable will appear in the desktop. If this entry is empty then a default icon is used.
Under Font Charset you select the character set for use in this executable. If selection is DEFAULT then the current Windows character set will be used.
When the checkbox "Console Application" is checked then a console executable is generated to run at the command line. The output of the program is printed in command line window.
Under "Include" we choose the code inclusion in the generated file. We can choose to include the full contents of Functions, Classes and Constants lists or not. If we choose not to include everything then only what is really needed for the execution of Application/Scratchpad code is included automatically. This creates smaller and faster executables. Normally we will select to include "everything" only for applications that make use of the ExecCode command which permits the end user to enter and execute CalcIt code (like the provided calculator).
Under "Default Output Window" group box we can decide if we want to display the default output window. This window accepts by default the output of commands PRINT and PRINTARR. If our Forms handle this task and we don't need it then we can uncheck the "Display on execution" check box. The rest of edit controls in this group affect the position and size of the default output window.
When the code terminates and the default output window is visible, then the program is not terminated by default. The user has to close the window for the application to terminate. If the check box "Terminate when operation is finished" is checked then the application terminates even the output window is visible.
NOTE: The options about "Default Output Window" do not apply for console executables and in this case they are ignored.