Adding to the default project types

When you select Create New Project, a list of project types appear, for the most part this list is fairly complete. However, you may want to modify the list to more readily reflect the types of programs you write. Each assembler has it's own file and the project types are defined in that file. A project type requires first that the name of the project is added to the list of available names and second that the creation parameters and command lines are defined.

Adding a project name

In your file the list of project types is contained in the section. The project types are comma delimited and spaces are allowed.

[Project]
Type=Win32 App,Dos App

Also of concern is file extensions you will be using. This is generally a fixed list and modifying it will affect all other projects, it is ok to add to it though. The file extensions are those that can be created by RadASM when the project is created. As we will see later there is a way to set up defaults for each project type.

Files=Asm,Inc,Rc,Def,Txt,Mak

The last piece of the [Project] section that is of general interest is the folders. This is a list of the same type as Files, and the same rules apply.

Folders=Bak,Mod,Res

Controlling the New Project Wizard

Once you have named your project type in the Type list, RadASM will look for an INI section of the name you gave it. So the first thing to do is to create a new section in your file. INI sections are always contained in square brackets, the MyProjectType is to be replaced by the exact name you used in Type= above.

[MyProjectType]

The first entry of a project definition is the Files= key. Here you can define the default check state for the File Creation page in the wizard. 1 indicates that the item will be checked and 0 unchecked. The file extensions correspond to the extensions defined in the Files key of the Project section. If there are more extensions defined than entries in this list the file extension will default to unchecked, this way when you add a new extension to the list you don't have to modify existing project types.

Files=1,1,0,0,0

The same rules apply to folders

Folders=1,0,0

The MenuMake key let's you determine which commands on the make menu will be enabled by default. These commands correspond to the commands in the MenuMake key of the [Project] section.

MenuMake=0,1,1,1,1,1,0,0

Setting the default build options

Now on to the meat of the section, the command line defaults. There are 2 sets of six command line defaults for each project type, the first set is for standard builds and the second set is for debug builds. All command lines are built using the same template of comma delimited fields:

Field 1. Enter the number of a from the RAP file. RadASM will delete this file before executing the command line and verify if it is present afterwards. For example in the RC command line it will delete the projects RES file (file #4) and make sure that a new one was created on exit.

Field 2. Enter a letter O to output to the Output Window of RadASM, C to output to a Console or the number 0 for no output. All StdOut output from the command is piped to the output you specify.

Field 3. The command you wish to execute. This file uses the variables to specify the directory or you can hard-code a directory as well. In the RC field using the .EXE extension will suppress quotes around the input file name.

Field 4+. The command switches are next, you can use a , to indicates quotes around an item and the pipe symbol | is used to replace the comma. When building the switches it is a good idea to put parameters that need quotes such as file names last, this will avoid having to quote the whole line. All switches can use the variables as well as file numbers. To distinguish between file numbers and digits RadASM assumes that only digits preceded by a comma are a file name. If you have a file name that you do not wish to encapsulate in quotes use $# instead i.e. for Project.RES use $4.

For a more detailed look at command lines see

Key number and command type

1 & 11 = Resource compiler
2 & 12 = Assembler command line
3 & 13 = Link command line (these two will usually be different as 13 will have a debug switch)
4 & 14 = Run command (almost always 0,0,,5)
5 & 15 = This is for the CVTRES command that converts Res files to object files
6 & 16 = Is used for batch assembling of ASM files for building modules