Komodo and the Perl Dev Kit

Komodo provides support for ActiveState's Perl Dev Kit, so that you can build executable programs, ActiveX controls and Windows services in Perl.

After creating the desired Perl script in Komodo, select Tools|Build Standalone Perl Application to configure the Perl application. The Build Standalone Perl Application dialog box will open, giving you access to key Perl Dev Kit tools from within Komodo.

  • PerlApp - Build an executable file from Perl scripts.
  • PerlCtrl - Build Active X controls from Perl scripts.
  • PerlNET - Create Perl components and applications that are compliant with Microsoft's .NET Framework.
  • PerlSvc - Convert Perl programs to Windows services.
  • PerlTray - Write system tray applications in Perl.

Note: On Linux, only the PerlApp tool is supported.

For complete instructions on building executables, controls and services in Perl, see the User Guide that accompanies the Perl Dev Kit.

As you configure options on the tabs described in the sections below, the corresponding command line string is displayed at the bottom of the Build Standalone Perl Application dialog box. Command line options for PerlApp, PerlCtrl, PerlSvc, PerlNET and PerlTray can be found in the User Guide that accompanies the Perl Dev Kit. Alternatively, view the Perl Dev Kit User Guide on ASPN, the ActiveState Programmer Network.

When using the PDK 'Build standalone application' feature in Komodo with Perl 5.8.0 on a Linux installation where the environment is set to use UTF-8, you must add a module 'utf8' on the modules tab. This is the equivalent of 'perlapp --add utf8'. This does not affect Perl 5.6.x or future versions of Perl 5.8.1 or higher.

Once you have configured options using the tabs in the Build Standalone Perl Application dialog box, use the buttons at the bottom of the dialog box to create a build, add a script to the Toolbox, or debug a script in Komodo.

  • Add to Toolbox - Once you have created a new script, you can click this button to add it to the Toolbox as a run command.
  • Build - Click this button to create a new build or overwrite an existing build.
  • Debug - If the Komodo debugging option is selected on the General tab, you can start the debugger by clicking this button.

Feature Showcase

Configuring the General Tab

The build options for the Perl Dev Kit correspond with the tools described in the Perl Dev Kit documentation, which contains detailed instructions on configuring Perl executables, services and controls.

  • Enter the name of the script to build using the PDK - Use this field to enter the path and file name of the source Perl script. This option is equivalent to the -script command line argument.
  • Build the script using - Select the type of output you wish to generate.
  • Enter the name of the target executable or control - Use this field to specify the path and name of the output file. This option is equivalent to the -exe command line argument.
  • Dependencies
    • None - Select this option to include all necessary files in the output file, so that it can be run on systems that do not have Perl56.dll or ActivePerl. This option is equivalent to the -freestanding command line argument.
    • Perl Dll required on target - Select this option to reduce the size of the generated executable by excluding Perl56.dll from the output file. Target systems must have the Perl56.dll installed. This setting corresponds with the -xclude command line argument.
    • ActivePerl required on target - Select this option to create an output file that will be run on systems where ActivePerl and any modules included via use and require statements are installed. This option is equivalent to the -dependent command line argument.
  • Verbose build information - This option will generate detailed output messages while the output file is being built. This option corresponds to the -verbose command line argument.
  • Hide console (for GUI applications) - Similar to running wperl.exe, this option is useful for building applications that run in the background. This setting corresponds with the PerlApp -gui command line argument, and is only available when you select the PerlApp tool.
  • Overwrite existing build - Select this check box if you want the new build to replace the existing build. If you attempt to overwrite a build without selecting this option, a pop-up dialog box will warn that the .exe file already exists. You can then choose to overwrite the file, overwrite the file and enable the check box, or cancel the command. This option is equivalent to the -force command line argument.
  • Delete temp files after each run - Freestanding Perl applications, services and controls sometimes contain embedded DLLs that are extracted and cached in the host system's temporary directory. Check this box to delete these files after each run. This setting corresponds with the -clean command line argument.
  • Debugging - To debug the Perl executable, control or service as it is being built, select the desired debugger from the drop-down list. If you are not using either the Komodo or the PDK debugger, you can specify a Hostname and Port for another debugger in the fields provided.

 

Configuring the Modules Tab

The Modules tab is used for adding external modules to the build, as well as trimming unwanted modules.

Specifying Extra Modules For Your Script

To add a module to the output program, enter the name of the module in the Module name field and click Add. The new module to be added will be displayed in the list box above. Remove modules from the list box using the Delete and Delete All buttons.

This option corresponds with the -add command line argument.

Specifying Modules to Trim from the Package

To remove an unwanted module from the build, enter the name of the module in the Modules field and click Add. The new module to be trimmed will be displayed in the list box above. Remove modules from the list box using the Delete and Delete All buttons.

This option corresponds with the -trim command line argument.

 

Configuring the Files Tab

The Files tab is used to add additional files (typically data files used by the embedded program) to the output file that will be extracted when the program is run.

This option corresponds with the -bind command line argument.

Adding Files

To add a file to the output program, click Add. In the pop-up dialog box, enter the source location of the file on your system, and the location where the file should be extracted when the output file is run.

Editing Files

To edit a file that has been added to the output program, click Edit. In the dialog box, as required, alter the source location of the file on your system, and the location where the file should be extracted when the output file is run.

Deleting Files

To remove a file that was to be added to the output program, click the file, then click Delete.

 

Configuring the Version Tab

The Version tab is used to embed version information in the output program. It corresponds to the -info command line argument.

To alter any of the version options, select the desired option in the Version field column and enter the desired value in the field below. This information will be assembled as a version information (VERINFO) resource, and will be displayed to users when they view the properties for your script in Windows Explorer.

Configuring the Library Paths Tab

You can use the Library Paths tab to add directories to your build. The options on the Library Path tab correspond with the command line arguments -lib and -blib.

Specifying "lib" and "blib" Directories to Include

To add a lib or blib directory to include in your output file, Click Add. From the Browse for Folder dialog box, select the directory path to include and click OK. The path can contain multiple directories that are separated in the same way as in the PATH environment variable.

Use the Delete and Delete All to remove directories that you do not want to add from the "lib" and "blib" list boxes.

 

Configuring the Extra Tab

The Extra tab is for adding icon files, as well as manually specifying any additional command line arguments.

Specifying Icon files

To include .ico files in a build, Click Add. From the Add Icon dialog box, select the icon(s) you want to add and click Open. The complete path for the icon file will be displayed in the Icon File list box.

This option is equivalent to the -icon command line argument.

Specifying Additional Command Line Parameters

If you want to specify any command line parameters in addition to those selected using the options in the Build Standalone Perl Application dialog box, you can type them in the field provided.