!DrWimpC Application Actions Menu
This menu appears for each application loaded into !DrwimpC.
Caveat 2012: Since this manual was written the menus and dialogues of !DrWimpC have changed alot. Menu items have moved between existing or placed in new menus and the main DrWimpC App Builder Projects window has been introduced as the main way of wrking with applications. So the information provided here is out of date but is still of interest. Just don't rely on it reflecting the current design of !DrWimpC menus and dialogues. For example, The 'Build' and 'Make' menu itams have moved toi the new 'Compile' menu but the information for include and library lists is still relevant. It will take some time to progressively update this manual. The Getting started pages of the DrWimpC web site are up to date so check anything here with those pages.
New File
Clicking on this item leads to the New File dialogue.
Open ...
This option opens the filer window for the application directory to let you
manage the application and its resoources directly.
Touch
If you want to force the compilation of all source files in the main c source file directory then click this item to time stamp all the C source files in the directory so that the object files for them appear out of date when the make process is next invoked by either clicking on the Build, or make item of this
menu, or running the appropriate !MakeApp obey file that !DrWimpC generates and
stores in the main application directory. There is a similar option in the template files sub menu to time stamp just the template library source files.
Touch All
This is similar to The Touch item above but also time stamps the C source files
for any template libraries in the application's FormSrce directory.
Build and Make
These items invoke the make process running one of the !MakeApp obey files according to settings of the debug item in this menu and the Dev choices Dialogue. The two files drwUli
and drwUTregfn that are generated for an application by !DrwimpC are regenerated
before the make process is started. In the case of build a check is made that all application files that should be present for it to run successfully after the make process has finished are indeed in the application. Defaults are created if they are not found.
Note that since this manual was first writtten GCC has progressed bringing shared library support to RISC OS. DrWimpC App Builder can make use of shared libraries and utilises the debug flags to specify the building of an application's Template functions into shared libraries. The debug flag is reused because its meaning 'add debug information' when set is not relevant to GCC.
!DrWimpC provides a method of keeping object files compiled with the ROOL C/C++ tools (and a debug version), and those compiled with the free GCC compiler
separate, so they can exist concurrently and be used to produce a !RunImage file
by placing the object files in separate object directories, and using separate make files to build a !RunImage files depending ion the Dev choices dialogue. and for a debug version the debug item in this menu, or if you wish to only compile debug information on individual files, this can be specified using the debug item for a file by setting the debug flag on the File Action submenu for the file.
Corresponding make files and obey files to run the makefiles are also produced.
The generated files and associated object directories are
Directories
- o
- for ROOL C/C++ compiler compiling without debug information.
- od
- for the ROOL C/C++ compiling with debug information.
- og
- for the GCC compiler (compiling and static linking).
- ogd
- for the GCC compiler compiling and linking with shared libraries.
Generated Files
- !MakeApp (type obey), MakeFilRI and MakeFile (type &fe1)
- for ROOL C/C++ compiler compiling and linking without debug information.
- !MakeAppD (type obey), MakeFilRD and MakeFileD (type &fe1)
- for the ROOL C/C++ compiling with debug information.
- !MakeAppG (type obey), MakeFilRG and MakeFileG (type &401)
- for the GCC compiler (compiling and linking using static libraries).
- !MakeAppGD (type obey), MakeFilRGD and MakeFileGD (type &401)
- for the GCC compiler compiling and linking with shared libraries.
You can compile and link the application directly instead of using the !DrWimpC menu items by clicking on the appropriate obey file but note that you may have to manually delete the !RunImage file to relink it if only tmeplate livraries are recompiled. This is due to an incompatibily in the make file rules (mixed targets) leading to a mkae file error when dependencies on template libraries are included in the make file final target rule.
If there are any Template source in the FormSrce sub directories then obey and
make files are also generated to build these into libraries grouping the functions together based on the template file they are associated with.
Generated Files for compiling and linking Template Sources
- !Make (type obey) and MakeFile (type &fe1)
- for ROOL C/C++ compiler compiling and linking without debug information.
- !MakeD (type obey) and MakeFileD (type &fe1)
- for the ROOL C/C++ compiling with debug information.
- !MakeG (type obey) and MakeFileG (type &401)
- for the GCC compiler (compiling and static linking).
- !MakeGD (type obey) and MakeFileGD (type &401)
- for the GCC compiler compiling and linking with shared libraries.
The template sources are compiled and made into object code libraries, one for
each template file. They are rebuilt when the main application code is rebuilt
by clicking on the Build or Make menu items, or the !MakeApp files.
For GCC 4 the libraries are copy/moved into either the (FormSrce or FormReg) directories for static libraries and into an (FromSrce or FormReg) sub directory - shlibs.V>Version Number< where >Version Number< is based on the shared libary version nnumber in the form of >major</>minor</>release increment<.
For shared libraries, the symlink file facility supported by GCC 4 and the ELF loader is used to provide the GCC 4 compiler and ELF loader with the location of the shared libraries.
The makefiles are (re)generated by selecting the Makefiles menu item. Note that the make files that are generated are basic in form in that they have an explicit rule for each source file, for various reasons, for instance, it allows each individual file to be compiled with or without debug information, by specifying the -g flag (or not) in the rule. It is simpler to code for both ROOL's AMU and GNU make, and avoids possible make errors where shorthand rules such as the %. rule in GNU make. If you write your own make files, then in practice it is usually better, neater and more concise if you can specify a default rule for all the C sources, rather than have an explicit rule for each file. Then use an explicit rule when required, such as including the debug flag for an individual file.
MakeFiles
This causes the make files for a project to be regenerated depending on the settings of the debug item in this menu and the Dev choices Dialogue. The two files drwUli
and drwUTregfn that are generated for an application by !DrwimpC are regenerated
if necessary.
Debug
Set this flag so that all C sources that are compiled during the make process have debug information included (ROOL compiler) or the -fPIC flag for position independent code to be generated for use in a shared library (GCC 4 compiler) in the resulting object file.
Include and Library Lists
The next three items in the menu allow you to manage the header file include paths (Includes ...), the list of object libraries to be linked with the application (Libraries ...), and template code libraries (Tlibs ...) that are
used when constructing the command line for the Link and LibFile commands in the generated make files. The lists are handled in similar ways by means of a list window dialogue. (In fact, this is a good example of what the long list redraw, a Drwimp Elixir, can be used for. (Using the well known chicken and egg method !DrWimpC was written using !DrwimpC). There are four possible includes/library lists, one for each type of development tools and shared/debug option. I.e. ROOL C/C++ or GNU GCC, with or without any shared/debug option being set. The two option buttons Shared/Debug and GCC can be used to control which list you want to Load, Edit and Save. They are stored in the main application directory in text format named, IncList and LibList with suffix of G for a list applying to the GCC tools and D for a list for use with a shared/debug project build. Items can be placed in the list by 1. Dragging from a filer window to the list window or 2. By manually entering it in the Selected Item line when no items are selected, and clicking SELECT on the Apply button.
The include entries are paths or pathname variables to header file directories,
or the full path name of the header file directory that will be appended to the
compiler's command line for the compiler to search for header files.
The library entries are object code library names, either the full path name, or
of the form <path variable name>.o.<Library name> for example,
OSLib:o.OSLib for the ROOL tools, or -lOSLib: -LOSLib: for GCC 4.
You can edit an item by <SELECT>ing it so that its current value is placed in
the selected item line to be edited, then click <SELECT> oin the Apply button to
place ithe edited item back into the list. To delete an item <SELECT> it and
click <SELECT> on the Remove button.
The position of an item in the list can be changed by keeping <ADJUST> pressed
for an item and dragging it through the list.
Click <SELECT> on the Save button to save the list back to the application.
Default lists are placed in an application when it is created for both the ROOL C/C++ and GCC 4 tools. It is easy to generate another list from them by loading the default list and setting the GCC or Debug options and saving the list either
straight away, or after making any necessary changes.
The Tlibs list operates slightly differently in that it is a list of any reusable
templates used in your application. So, their code libraries are external to the
application. You can place items in the list as for Include and Library lists,
this time by dragging the template files to the list window. The object code library for the template is identified as <path variable name>.o.<Library name> where the path variable name is the template file leaf name.
DrWimpC App Builder automatically adds to this list if it finds icon names with template functions from external applications templates and libraries while it is rebuilding the application as directed by the user <SELECT>ing the 'Build' option form the 'Compile' menu.
The items in the list can be edited, removed or repositioned as for Include and Library lists and the list loaded or save by &<SELECT>ing the Load or Save button.
The list is held in the main application directory in text format file named TlibList.
Save, Discard and Run
These straightforwardly let you save or discard any changes you have made to the application source files, or run the application after a make action. If
you have selected the debug option, then !DrWimpC
runs the file !RunD in the main application directory, which is an obey file
to run the !RunImage file with a larger wimpslot value. When initially created
!RunD has a wimpslot four times larger than the one used in the !Runfile.
Clean and Clean All
These options let you clean the object directories use by the various make files
according to your Dev choices. The clean all option clEans both the main application's object directories (o,og, od, ogd) and
the object directories for any Template libraries the application has in its FormSrce directory (o, od, og, ogd, obj, objd, objg, objgd). The Clean option only cleans the main application's object directories. There is a similar Clean
option in the Template Files submenu to clean just the template object libraries. The clean Target option deletes the !RunImage files, and, or the
Template object libraries. You can clean the various object directories by selecting the gcc and debug options then deleting the target and objects.
Options ...
This leads to the application details dialogue so that you can edit the various options, or change the developmnent tool flag strings, or add further files, etc to the application.
Distribution
At some point you may wish to distribute your application to other users. DrWimpC App Builder will export a standard set of files and directories such as !Boot, !Run, !Sprites, the Resoources directory as well as some internally used files.
The Distribution menu option leads to a list window to which you add a lost of items to be included in the distribution by either draggin items, or selection of items, from the application directory, or manually add items using
the selected item field. (If you select an item from the list, its value is placed in the selected item field for you to edit and save back to the list). The Load, Save, Remove and Apply buttons operate in the same way as for the
Include and Library lists described above.
All files and directories in the Distribution list are relative to the application directory. When you have saved the list, you can export the application containing the files and directories in the list by <SELECT>ing the Export buttom. The List's header pane window is then changed to the export
dialogue, which requests the location to store the exported appplication. You can either drag a directory to the dialogue window, or drag the Export To icon from the dialogue window to the location. Then <SELECT> Accept and !DrWimpC will create the application in the specified location, and copy across all the files and directories in the Distribution List. The option flags control whether you want to include application and FormSrce source files and/or any template function libraries. You may only require the template function libraries in which case tick the no RunImage and no Run file flags to exclude those two files from the distribution.
[Top]