Chapter 19

Customizing PowerBASIC

The PowerBASIC program PBINST.EXE will help you to personalize PowerBASIC, making it just the way you like it, to make your work easier. It makes semi-permanent changes to working copies of the PB.EXE and PBD.EXE files themselves.

Some things that you can change

* Default compiler options

* Directory paths used when PowerBASIC starts up

* Colors used to display menus and information in windows

* Type of video monitor

* Editor keystrokes and command options

* Limit EMS/XMS use by PB.EXE and PBD.EXE

* Maximum sizes of the watch and edit windows

After you run PBINST, the IDE environment will always come up preset to your own favorite pathnames and options. This will save you valuable time, and minimize stressful frustration, allowing you to devote more of your precious energies to creating good software.

After you run PBINST, you don't have to type in all these choices again every time. It will install your personal preferences as the new default values.

Running PBINST takes your temporary preferences, and makes them semi-permanent, by "installing" them into part of the PB.EXE and PBD.EXE files. You can always re-install them, by running PBINST again, but for all practical purposes, they are permanent alterations that you make to the compiler. Your habits become dominant over the compiler's assumptions.

This is another "set and forget" feature of PowerBASIC, helping you to do it your way, faster and easier, helping you to get more work done in less time.

PATH NAME ASSUMPTIONS

Especially on the default pathname selections, setting these correctly can prevent time-wasting errors when PB.EXE cannot find the source files that you meant.

In the IDE, PowerBASIC first tries to find your source files in this order: full path names, pathnames in the Options menu, and current directory.

If you are using the command-line version, PBC.EXE, it looks first to see if it is a full pathname, then at the command line, and then in PBC.CFG, for a /DS option, and lastly, in the current directory.

You can always overrule current default settings in the Options menu path names, by using full pathnames in your source code.

Some choices duplicate the pulldown menu choices in the IDE, including the complete AltO Options menu. PBINST will also let you change some things that you cannot change from within the IDE itself.

******************use same list on page 411, if you like it

One of the extra things you can do with PBINST is reassign quick keys for the built-in editor to the same keys that you already know. This can make it easier for you to use PB.EXE, especially if you first learned a word processor or other text editor with different style commands.

You can personalize monitor colors, sizes of windows, and display mode to match your video monitor.

Remarks

You can always make new selections in the IDE, and save those choices to the PBCONFIG.PB file. If you deleted the PBCONFIG.PB file, then these PB.EXE installed choices will reappear as your default selections. You can change these in PB.EXE at any time, by running PBINST again.

To put these same choices into your PBCONFIG.PB file, at the DOS level, delete PBCONFIG.PB, and then enter the IDE, and Save a new PBCONFIG.PB file. Until you do this also, the values in PBCONFIG.PB will overrule the new defaults in PB.EXE and PBD.EXE.

Running PBINST

PBINST modifies your copy of PB.EXE, the IDE compiler version, and of PBD.EXE, the DDE free-standing debugger version.

First, be sure to have PB.EXE and PBD.EXE in the current directory.

When you are asked to choose PB.EXE, or PBD.EXE, or press ENTER for both, if you choose both, it lets you make choices for PB.EXE, and then attaches those same choices to PBD.EXE also. This saves time. If you really want to have different choices for each environment, you can run PBINST twice, once for each.

Follow the menus.

Part of the choices are duplicates of the pulldown menu choices in the IDE. See Chapter 3, on the integrated development environment, for help on these menus that look the same.

Go thru these, and set everything the way you want it.

Save these choices.

The File choice

The File choice lets you define the name for the pick file. The pick file remembers the file names of the most recent files you worked on. You can have a different pick file for each project you are working on, even when the files are in the same subdirectory.

The Run choice

The Run choice lets you define default startup contents for command$. This might help if you are testing some instructions concerned with passing parameters on the command line.

The Compile choice

The compile choice lets you install default Compile-To settings: Memory, EXE file, Chain file, or Unit file. This might save time if you are steadily doing one of these types of compile. Compile also lets you define a default value for the MainFile, the one you are usually working on as the mainline. This is useful when you are working on one main program, all the time.

The Options choice

The Options choice duplicates all the many screens of selections from the IDE Options menu, subtitled Compiler, Linker, Environment, and Directories, which holds the pathnames.

See Chapter 3, on the integrated development environment, for help on these menus that look the same.

The Debug choice

The Debug choice lets you set default Watch CPU status, either on or off, and Display Swapping, either none, smart, or always.

This is more applicable in the PBD.EXE DDE environment.

Setting other values

Other optional services provided by PB.EXE's IDE, or its runtime libraries, that are user-selectible thru the Options menu, can be permanently chosen by using PBINST.

Editor quick keys and monitor video display mode and colors can be user modified only thru PBINST.

The Editor commands choice

One of the extra things you can do with PBINST is reassign quick keys for the built-in editor to the same keys that you already know, especially if you first learned a word processor or other text editor with different style commands. This can make it a lot easier for you to get started using PowerBASIC, in the beginning.

*********************use same screen dump of editor commands

The Editor commands choice lets you reassign quick key definitions, so that you can adapt the table to your already-learned habits.

PBINST lets you change the Main key assignments, which are like WordStar, and also the alternate keys, which will also be recognized by the compiler editor. You probably will just alter the alternate keys, and leave the main keys alone, if you intend to really learn standard PowerBASIC.

When you start to change the key assignments, built-in macros help you do it. When you press any allowed key, to link with Ctrl or Alt, the macros will type most of the definition for you.

In Like WordStar mode, If you press "{", the macro will show {Ctrl{}.

If you press Alt, "{", the macro will show {Alt{}.

If you press "[", the macro will show {Ctrl[}.

If you press Alt, "[", the macro will show {Alt[}.

This also works with {Del}, {Home}, {End}, {Ins}, {Right}, {Left}, {PgUp}, and {PgDn}. Tab will copy the last values, like F1 at the DOS level. Backspace will delete a whole group of onscreen characters representing one special key, put there by the builtin macro.

What PBINST does is keep you from making a mistake, on this, by reaching out thru the keyboard, and typing most of it for you. This is super "user-friendly".

If you try to make two functions obey the same keys, PBINST will notice, and show the conflicting lines to you, in red highlighting, and won't let you exit the program without correcting the conflict.

*************Bob, is it always red?

An extra feature lets you choose from three general styles of quick keys: Like WordStar, Ignore case, or Verbatim. When you use Like WordStar, if you touch an allowed alphanumeric character, PBINST will add the Ctrl character automatically. In the other two modes, you must press the Ctrl character and the alphanumeric character.

Ignore case makes all characters upper case, and Verbatim allows you to use lower and upper case characters separately, which gives you more choices.

The Mode for display choice

PBINST gives you four choices of display mode. Default means to leave display mode the way it already was. Color, Monochrome, and LCD/B&W/Composite tell PowerBASIC to use a specific display mode, for those kinds of displays.

If you choose a specific display mode, other than default, then PBINST will run a video test, and ask you to tell it whether there is any "snow" on the screen. If there is no snow, then PowerBASIC will always output video information at the fastest speed. If you do see snow, PowerBASIC will send it at a slower speed. If you answer Maybe, then PowerBASIC will check your video hardware to find out for itself.

Remark

You can also use command-line options, when you start PB.EXE or PBD.EXE, to have it use black and white mode ( /B ), or color mode ( /C ). Command-line display mode options overrule the current defaults.

The Set colors choice

The colors may not matter to you too much if you have a monochrome screen, but for people that have a color screen, PBINST gives them the option to choose a favorite set of colors for the IDE, from a list, or to choose custom colors, and save them to a file that will be looked at by PB.EXE.

PBINST lets you choose from custom, default, PowerBASIC 2.x, TurboBASIC 1.x, or Aqua colors.

If you choose custom colors, PBINST displays a special multi-color screen which helps you choose colors that will work together to be visible to the human eye.

****************************you need a new picture of the menu w/changes

The Window sizes choice

PBINST lets you modify the sizes of the Edit, Watch, and Output windows in the IDE. It displays the IDE screen and lets you use the UpArrow and DownArrow keys to change the size of these windows.

The Limit EMS/XMS usage choice

To give you control over how much of the RAM memory PowerBASIC tries to use, you are asked how much EMS and also XMS memory to protect for other uses.

********************needs an example here

Saving your preferences

When you are thru making all your selections, and feel satisfied with your choices, choose Quit/Save. PBINST will ask you again, to confirm: "Save changes to PB.EXE? (Y/N)". Press Y to save the changes.

Remarks

The choices that are the same as menus in the IDE, that are saved to PB.EXE, by PBINST, are also in PBCONFIG.PB. You also need to delete the PBCONFIG.PB, after you leave PBINST, then do a Save PBCONFIG.PB, when in the IDE again, with the new defaults.

Be sure not to use any file compression programs on PB.EXE, to save space. PBINST can only make changes to the real file PB.EXE.

************** use same menu pictures except where there are changes

This file has been created with the evaluation or unregistered copy of
EasyHelp from Eon Solutions
(Tel: UK 0973 209667, Email: eon@cix.compulink.co.uk)