WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Compiler
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Remembering Compiler Settings

Keywords: 	  saved compiler settings

Question:

It used to be that compiler settings were saved on a filename only basis. For Example, If I compiled x:\test\19990331\test.wbt and then compiled x:\test\19990401\test.wbt, the second compile would maintain the settings of the first file. When compiling files of the same name, more often than not in my opinion you'd want the same compiler settings (size, EXE location, Icon, etc...).

These days compiler settings are saved on a filepath\filename. This isn't appealing when you have to retype the location every time you compile the file if it has a different path\name.

We use directory names for version control. A sample structure is similar to what I wrote above:

x:\test\19990331\test.wbt
x:\test\19990401\test.wbt
I would obviously want the second file to have the same compiler settings as the first.

Can you put it back to the way it used to be? Please...

Answer:

Actually, the compiler settings are stored in a .CMP file with the same name as the source code (.WBT) file. The internal format of the .CMP file is the same as .INI files; you can use all of the WinBatch IniXXXPvt() functions to manage these files.

With judicious use of the file searcher extender and the IniXXXPvt() functions it should be possible to perform automated configuration of the .CMP files to make sure that they all have the same settings regarding extenders, etc... Also, you could take the path information from where the .CMP file is actually located and then process that "version" information and stuff it into the appropriate "version" keywords in the .CMP file.

Just remember that when you copy your files to a new subdirectory to start a new version that you can take the existing .CMP file along and just make some quick mods to it to update the output target path.

Format of CMP files:

[Main]
Type=2 {*REQUIRED*} 2=small 1=large
Src=source_file_name.wbt {*REQUIRED*}
Targ=[path to target directory]\source_file_name.exe {*REQUIRED*}
Icon=[path to icon filename]
CmpVersion=2 [Version of CMP file]

[Options]
TechWebPage=[URL]
RunHidden=1

[Version Info]
Comments=
CompanyName=
FileDescription=source_file_name
FileVersion=1.0
InternalName=source_file_name.exe
LegalCopyright=
LegalTrademarks=
OriginalFilename=source_file_name.exe
ProductName=source_file_name
ProductVersion=1.0

[Other Files]
Count=0

[Extenders]
Count=0

Article ID:   W12798
Filename:   Saved Compiler Settings.txt
File Created: 1999:11:30:10:54:52
Last Updated: 1999:11:30:10:54:52