home » help » editor integration
Follow on Twitter
Follow Kix2Exe on Twitter
New Version Notifier

You'll get notified as soon as new releases are out.

Note: Your e-mail address is only used to keep you informed about new releases.

Editor Integration

Kix2Exe facilitates the packaging process by integrating the "XML-type code block" (packaging settings) from within a KiXtart script.

This new feature will save you from re-typing the whole Kix2Exe syntax everytime you need to package your Kixtart script. In addition, with this functionality you will be able to call Kix2Exe from a script editor that supports calling an external software. See below for information how to integrate Kix2Exe in your script editor.

The packaging settings comment block

Below you'll find an example of a Kix2Exe packaging settings comment block.

The packaging settings comment block begins with <kix2exe> and ends with the </kix2exe> tag. All user configurable settings must be put between the <settings> and </settings> tags.

;<kix2exe>
;<version>1.2.0.0</version>
;<settings>
;  <package></package>
;  <icon></icon>
;  <kix></kix>
;  <consolehide></consolehide>
;  <consolesize></consolesize>
;  <consoletitle></consoletitle>
;  <keepconsoleopen></keepconsoleopen>
;  <include></include>
;  <runasuser></runasuser>
;  <runaspassword></runaspassword>
;  <runasinteractive></runasinteractive>
;  <runasnoprofile></runasnoprofile>
;  <branding-name></branding-name>
;  <branding-desc></branding-desc>
;  <branding-version></branding-version>
;  <branding-copyright></branding-copyright>
;  <balloontips></balloontips>
;  <kixforms></kixforms>
;</settings>
;</kix2exe>

The names of the tags correspond to their equally named command line parameters. The values that are allowed in the packaging settings comment block are mostly the same as for the command line. For example, the /kix command line parameter only accepts the values kix32 and wkix32 as valid arguments. So the same goes for values between the <kix> and </kix> tags.

An exception to this rule are the following tags:

The command line parameters corresponding to these tags don't have any arguments, so there wouldn't be a way of configuring them in the packaging settings. To solve this you can specify a boolean value of 1 or true (both mean the same) to activate them or 0, false (or leave them empty) to deactivate the option.

sample script

Here is an example of a configured packaging settings comment block:

;<kix2exe>
;<version>1.2.0.0</version>
;<settings>
;  <package>c:\myscripts\mypackage.exe</package>
;  <icon>myicon.ico</icon>
;  <kix>kix32</kix>
;  <consolehide></consolehide>
;  <consolesize>200,300</consolesize>
;  <consoletitle>My Packaged Script</consoletitle>
;  <keepconsoleopen></keepconsoleopen>
;  <include>@c:\myscripts\includelist.txt</include>
;  <runasuser></runasuser>
;  <runaspassword></runaspassword>
;  <runasinteractive></runasinteractive>
;  <runasnoprofile></runasnoprofile>
;  <branding-name>My Packaged Script</branding-name>
;  <branding-desc>This is a packaged script</branding-desc>
;  <branding-version>1.00</branding-version>
;  <branding-copyright>(c) by me</branding-copyright>
;  <balloontips>1</balloontips>
;  <kixforms></kixforms>
;</settings>
;</kix2exe>


If $K2E_BalloonTipsEnabled = True
  $rc = K2E_SetBalloonTip("Installation Progress","Creating shortcuts","i")
EndIf

Note: You can override packaging settings by specifing the corresponding parameters directly to Kix2Exe. Example: specifying /kix wkix32 in combination with the packaging settings example from above will result in a package using the wkix32.exe executable.

Note: it's strongly adviced to not change the version string found between the <version> and </version> tag (1.2.0 in the example above). This is a internal checkup value used by Kix2Exe to verify that it can expect a compatible set of packaging options.

Steps to integrate Kix2Exe inside your script editor

If your editor supports calling external software (like PSPad, UltraEdit, or PrimalScript do), KiXtart scripts can be packaged directly from your editor. This can be accomplished by following the steps below.

Integrating Kix2Exe into your script editor can be accomplished by following these steps:

  1. Add Kix2exe and ScriptCfg as external tools to your editor
  2. Add the packaging settings comment block to your script
  3. Configure the packaging settings according to your requirements
  4. Call Kix2Exe from the script editor with the at least the /script and /usescriptsettings parameters

How to actually integrate Kix2Exe into your editor, depends on the editor you are using. Check the manual of your script editor. I've created an example how to integrate Kix2Exe into PSPad.

How to add the packaging settings comment block

Adding the packaging settings to your script can be done manually (just copy & paste the lines above into your script) or by use ScriptCfg (a small command line utility provided with Kix2Exe v1.2.0).

This is an example how to run ScriptCfg from the command line:

c:\temp>scriptcfg /script script.kix

The packaging settings comment block will be added to the script.kix script.

By integrating ScriptCfg into your editor, you can easily add the packaging settings to your script with just a click of the mouse (or maybe two clicks..). To integrate ScriptCfg into your editor, call ScriptCfg with the /script parameter and the full path and filename of your script.

Note: Use ScriptCfg at your own risk. I'm not responsible for any damage to or loss of your scripts! Save your script first before calling ScriptCfg, else changes to your script might be lost. Also test ScriptCfg with a dummy script first.