RUL.DLL (v1.11) - Language Support for RUL files

If you don't own a copy of Codewright, download a 30-day trial version from www.premia.com

Please send any questions or feedback to jonathan.jarvis@openmarket.com

Get the latest updates from
	http://www2.folio.com/is

Description
===========	
This Zip file contains support for the InstallShield 5.x Script Language and Codewright.


Configuring
===========
a. Copy RUL.DLL to the Codewright directory.
b. Add 'LibPreload=RUL.DLL' to the LibPreLoad section of the cdwright.ini file.
c. Start Codewright.
d. Select 'Language...' from the Document menu.
e. Select .rul from the File type list.
f. On the Edit tab, check Smart Indenting, Template Expansion, Name Completion, and / or
   Language Dependent if you want these features.


Topics
======
1 - Keyword Highlighting
2 - Template Expansion
3 - Smart indenting
4 - Name Completion
5 - Using the InstallShield Help files
6 - Functions and Defines Outline
7 - Compiling
8 - Guidelines for Using Codewright with the InstallShield IDE

1 - Keyword Highlighting (Language Dependent ChromaCoding)
Keywords are highlighted in different colors.
	a)  All function names are red. 
	b)  All system variables are magenta. 
	c)  Flow control keywords are dark blue. 
	d)  Comments are green.
	e)  Operators are blue.

	To change the color for functions, system variables, flow control keywords, comments, or operators:
	Select the Color tab on the Preferences dialog on the Document menu.
	- System variables use the Alternate 9 color.
	- Functions use the Alternate 4 color.
	- Flow controls use the Keywords color.
	- Comments use the Comments color.
	- Operators use the Alternate 8 color.

	For Example, to change the color for system variables to magenta:
	a) Select the Colors tab on the Preferences dialog on the Document menu.
	b) Select Alternate 9 in the Screen Element list box.
	c) Select the foreground color of magenta.
	d) Select the All User Windows checkbox in the Scope group.
	e) Choose OK.


2 - Template Expansion
Template Expansion when enabled provides you with a "fill in the blanks" form for all of the
InstallShield functions.  Typing a function name followed by a space will cause all of the
parameters to be filled in.  For example, if you type:

AddFolderIcon

followed by a space, Codewright will complete the function by adding:

(szProgramFolder, szItemName, szCommandLine, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag);

If this feature becomes annoying, turn it off or don't type a space after a function name and
before the '('.


3 - Smart indenting
Smart indenting when enabled automatically indents when you press [Enter] after typing certain words.
If a line in a rul file begins with 'if', 'while', 'else, 'for', 'case', 'elseif', or 'switch',
when you press enter to terminate the line, the next line will automatically be indented.


4 - Name Completion
By typing part of a variable, function, or other symbol name into a document and then pressing
[Ctrl][Space], Codewright then attempts to complete the name for you from words previously typed
in the script file.


5 - Access the InstallScript Language Reference Help file from Codewright.
(This feature only works with the full trial version or the commercial version.)
	a) Choose Configure index file... from the Help menu.
	b) Add LANGREF.HLP to the Filename list found in
	   'C:\Program Files\InstallShield\InstallShield 5.5 Professional Edition\Program'.
	c) Choose Save.
	d) Open an rul file.
	e) Place you cursor on a keyword and press F1.
	f) Select the InstallScript Language Reference Help file.
	g) Select Ok.

6 - Functions and Defines Outline
Function and define names can be displayed in the Outline tab of the Project window.
	a) Select the Symbols tab on the Language dialog on the Document menu.
	b) Select the .rul extension in the File type list box.
	c) Choose Add.
	d) Type Function in the Parser name box.
	e) Choose Function from the Parser type drop down box.
	f) Choose OK.
	g) Check the check box next to Function.
	h) Paste the following into the Pattern box.
		(^[ \t]*function[ \t]*\c[A-Za-z_0-9]+[\t ]*\()|(^[ \t]*\cprogram[ \t]*\n)
	g) Choose Add.
	i) Type Define in the Parser name box.
	j) Choose Definition in the Parser type list box.
	k) Choose OK.
	l) Check the check box next to Define.
	m) Paste the following into the Pattern box.
		^[ \t]*#[ \t]*define[ \t]*\c[a-zA-Z_][a-zA-Z0-9_]*[^a-zA-Z0-9_]
	n) Choose OK.
	o) Open a rul file.
	p) Display the Project window. (On the Window menu)
	q) Select the Outline tab in the Project window to see the functions and defines.


7 - Compiling
	a) Add C:\PROGRA~1\INSTAL~1\INSTAL~1.5PR\PROGRAM to your path environment variable
	   through the AUTOEXEC.BAT on Win9X
	    i.e. SET PATH=C:\PROGRA~1\INSTAL~1\INSTAL~1.5PR\PROGRAM
	   or change the environment variable on WINNT in the Control Panel|System icon|Environment tab.
	b) Add C:\PROGRA~1\INSTAL~1\INSTAL~1.5PR\INCLUDE to your include environment variable.
	    i.e. SET INCLUDE=C:\PROGRA~1\INSTAL~1\INSTAL~1.5PR\INCLUDE
	c) Reboot your machine if needed.
	d) Open Codewright.
	e) Open a rul file.
	f) Select the Compile tab on the Language dialog on the Document menu.
	g) Select the .rul extension in the File type list box.
	h) Select Default Compiler Settings from the Compiler name drop down box.
	i) Paste the following into the Compile box
		${FTEE} compile "setup.rul" -i"" -v2
	j) Display the Output window. (On the Window menu)
	k) Choose Compile from the Project window or click on the compile button on the standard toolbar.
	l) The output from the compile should be in the Build tab of the output window.

		
8 - Guidelines for Using Codewright with the InstallShield IDE
	Be careful you don't have the same file open in Codewright and the IDE, and edit in 
	Codewright and save and then edit in the IDE and compile.

	If changes have been made in the IDE, the compile will overwrite the file saved in Codewright.
	
	!!!Always close the script files in the IDE before going back to Codewright!!!


Updates
=======

Version 1.11 - 03-30-99
=======================
Added 'program' to list of auto indents


Version 1.10 - 03-24-99
=======================
Fixed smart indenting


Version 1.09 - 03-22-99
=======================
Added 'begin' to list of smart indents


Version 1.08 - 03-09-99
=======================
Added self registration of the .rul extension


Version 1.07 - 03-04-99
=======================
Fixed memory leak


Version 1.06 - 02-25-99
=======================
Fixed bug associated with '/*   */' comments.


Version 1.05 - 01-05-98
=======================
Colored the following operators:
Address operator (&)
Arithmetic operators (+, -, *, /)
Indirection operator (*)
Logical operators (&&, ||, !)
Member operator (.)
Relational operators (<, >, =, <=, >=, !=)
String operators (^, +, %)
Structure pointer operator (->)
Bit operators (&, |, ~, ^, <<, >>)
Case Statements character(:)


Version 1.04 - 10-28-98
=======================
Added function GetDiskSpaceEx
Added more predefined constants


Version 1.03 - 09-24-98
=======================
Applied ChromaCoding to keywords beginning with '!', '|', '&', '<', and '>'.
Added more data types and other keywords
Added more predefined constants


Version 1.02 - 08-03-98
=======================
Added more Preprocessor directives


Version 1.01 - 07-14-98
=======================
Added more Predefined constants
Added more Flow control keywords
Fixed comment bug with the following type of comment
/***** Comment *****/
System Variables changed to use the Alternate 9 color



