In either case, if you have made changes to the project that have not been saved, a message dialog box will be displayed, telling you that you have unsaved edits and giving you the choice of cancelling the generate code process or saving the project. If you choose to save the project, you will have to specify where to save the project if it has not been saved before.
The Code Generator is displayed.
If you have saved the project and all goes well, a number of messages will be displayed in the output pane at the top of the Code Generator. The final message will be "Running: ./[projectname]" and the application will run.
At the least, the application primary window will be displayed. Any windows whose visibility is not set to yes at application startup will be hidden. Depending on what functionality you included that does not require user code, the application might do a variety of things. Menus can be displayed, some connections can be tested, On Item help can be displayed, and so on.
As the code generator runs, messages are displayed in the output pane at the top of the Code Generator window. The final message should be "Completed successfully." A number of files will be created, including Makefiles, project files, module files, and two dtb_utils files. You can look at the files in the term pane at the bottom of the Code Generator window.
More messages will be displayed in the Output Pane as the application is compiled. The final message again should be "Completed successfully." A few more files will be created, including object files and the executable application file, which has the name you gave the project.
The application will be started--as if you had typed the name of the executable at the command line.
This will terminate the application, closing all windows. You can also click Abort to terminate code generation or make operations started in the Code Generator window.
If you select Specific Modules or Specific Modules and Main, the list of modules is active. Select the names of the modules you want to generate code for in the list.
Choices are Report Normal Messages, Be Silent, and Be Verbose.
These arguments will be included when you click Make or Make & Run.
These arguments will be included when you click Run or Make & Run.
Default values are Generate Code For Entire Project, Merge user code with generated code, and Report Normal Messages.
The Options dialog box will be dismissed if you click OK.
You might want to change PATH, for instance.
The value of the variable will be displayed in the Value pane.
This change is made for this App Builder session only.
Usage: dtcodegen [options] [project-file] [module-file [module-file] ...]
Code is generated for each module specified on the command line, or for all modules in the project, if no modules are specified. If no project file is specified, a project file containing the specified module(s) is searched for in the current directory.
Files with extension .bip are assumend to be BIL project files, files with .bix extension are assumed to be encapsulated BIL files, and files with a .bil extension are assumed to be BIL module files.
The area between the START and END comments are considered a "user segment." Any text (even non-C code) may be added within a user segment, and the code generator will preserve this code in all future versions of the code. Each user segment begins with a comment that suggests what type of code should be added in that segment, or what state the application is in when that segment is executed. These suggestions are purely informational, and may be ignored./* DTB_USER_CODE START */
/* DTB_USER_CODE_END */
Neither App Builder nor the code generator verify that the code added by you is legal C code. It is your responsibility to ensure that any file you modify can be processed satisfactorily by your compiler.
If you wish to destroy all of the hand-edited code, you must either explicitly select Don't Merge from the Options dialog of the Code Generator Window, or run dtcodegen with the -nomerge option. This should be done only with great caution, as large amounts of work may be lost.
Under no circumstances should the generated comments be modified. If they are modified, code generation will fail, and the resulting file will very likely be uncompilable. A backup file, with the extension .BAK, is preserved in the current directory to help recover from such mistakes.
The user code segments appear in strategic places in the code, to allow you a great deal of freedom in customizing the generated application. All code related to main() and application-wide data and structures are defined in <projectname>.h and <projectname>.c. In these files, fields may be added to the Xt resource data structure for the application, new developer-defined data types and variables may be added, and the application's startup procedures may be amended.
Each <modulename>_stubs.c file contains user segments for modifying the effects of generated connections. Your code may be added both before and after the automatically-generated code is executed.
In addition, each file contains a user segment at the top of each file that can be used to add a custom header or copyright notice.