|
|
Xbase IDE (Project Menu)
To Order On Line ( Product will be shipped Via Federal Express ) Using the Project Menu The project menu is used to control all aspects of a Xbase++ project. From here you can create a new project, or import an existing Xbase++ project. You can open projects youve worked on previously, as well compile and debug your projects. You can backup and restore your work to ZIP files, and create deployment disks when you are ready to distribute your application. Finally, for that 3:00 AM development work you wish never happened, you can cancel your editing sessions changes and restore things back to before you started. The project information is stored in a text file that can be edited from outside the IDE as well. Rather than relying on some binary storage for you to hack into, all of the project information is available in a readable (and editable) manner in the XP1 file. The manuals appendix describes the format of the XP1 text file. Creating a new project
To create a new project within the IDE, you need to select the new option from the project menu or click on the New button. Once you select new, the screen shown below will appear. This multi-tab property box allows you to customize the information for this project, including project name and description, compiler options, linker options, resources, and directories where various files can be found. At a minimum, you should enter a project name (which must be unique among all your projects) and a directory where the source code should be placed. Part of the new project is to generate source code files, so the program must know where to put the PRG files it generates. It is strongly recommended that each project have its own directory for source code files. The Xbase IDE uses this directory to generate project files and to present the project browser. It would be difficult to keep track of multiple projects in the same directory, so you should keep each project in a separate directory. You can fill in as many of the other options and settings as youd like or just take the defaults. You can access this project options screen at any time you are working with a project. You can change them later if you suddenly decide you know longer want debugging information included in your project. You know, that mythical state where the project is actually done and ready for clients. Once youve named the project, specified the source directory, and set any options, click the Save button to generate your starting source code. You could actually compile and run the results at this point, but you will probably want to do some coding in the programs before then. Importing an Xbase++ project Another way to get a project into the IDE is to import an existing Xbase++ project file into the system. If you select this option, you can navigate your computer looking for any XPJ files to import. Once you find one and open it, the IDE will read the XPJ file and extract out project name, compiler and linker options, source directories, etc. You will enter the property options dialog box (see Figure 1.1) and can make any changes youd like. Clicking on save will bring this project into the IDE environment. Opening an existing project If you already have a project in the IDE system, you can click on the Open button or menu option to start working with this project. A drop-down combo box will appear on the main program screen and you can select the project to open by double clicking on the list or by clicking the open project button found to the immediate left of the combo-box. The project will then be opened and is ready for editing.
Tech note: When a project is opened, a backup file is automatically made of the project files before you start your edit session. This backup file is PKZIP compatible and is stored in the same directory as the IDE application resides. While the IDE provides the ability to recover all of the files from this ZIP (hence canceling your session changes), you can manually extract files from the zip file as well. Running the program If you select this menu option (or press the F9 shortcut key), a DOS session will be created to run the Xbase++ compiler against any source code files that have been changed recently. Once all the programs are compiled, the linker will then be called to create the application EXE file. If the compilation and linking are successful, the project will be run as a separate task so you can see the results of your programming efforts. If any errors occur, the are reported in the .RUN file (created by output from the LINK process). If the EXE file is not created, an edit window will be open showing the current .RUN file. This will allow you to correct the compilation and/or linker errors and try to run the program again. If you open any of the source code files in the editor window, a separate window below will show any errors encountered while attempting to compile that particular source program. Debugging your program The debugging menu option (or Ctrl-F9 accelerator key) compiles all source code files (with debugging information included) and links your application, but runs it through the Xbase++ debugger instead. If the project is successfully built, the debug window is open in a separate task and you can step through your source code. If you have the source code open in an edit window, you can correct the source code as you step through the debug process. If any errors occur, the are reported in the .RUN file (created by output from the LINK process). This file will be open in an edit window, allowing you to correct the problems and rebuild the application. Creating deployment disks When you are ready to distribute your application, you can select this menu option to build a set of disks (or a directory on a network) which contain the necessary files that a user must have to run your program. The figure below shows the screen that will appear to create your deployment disks.
Specify the drive letter and check the appropriate options. When you click on the create button, the necessary files will be extracted from your Xbase++ runtime directory (if needed) and from your source code directory to allow installation of your application on another computer. Project properties This menu option allows you to change the variety of settings and options that control your Xbase++ project. The dialog box consists of general project options shown below and specific options controlling the compiler, linker, resource compiler, and directories.
In the top portion, you need to specify a project name, which must be unique among all your projects. This is the only required information. The description, author, and copyright fields are all used in the comments of code generated by the system. You can specify default values for each of these fields in the [defaults] section of the IDE.INI file (which must be located in the same directory as the EXE file). Appendix B describes the contents of IDE.INI. Compiler options The compiler options tab allows you to set the compiler flags that you want to use when you compile your application. These flags are used both during the project build phase and when you compile any program in the source code window. The compiler options screen is shown below:
If you set the debug flag on the top portion of the screen, the debugging information options will automatically be checked. However, unchecking the debugging in the top portion will NOT change the debugging options in the compiler section. Linker options The linker options tab allows you to set the linker flags that you want to use when you link your application. These flags are used both during the project build phase and control which linkers to use as well as the generation of a MAP file. The linker options screen is shown below:
The default linker is ALINK, however your can use the navigator buttons next to the linker edit boxes if you want to specify a different linker to use. Resources The resources tab allows you to set the resource compiler to use as well as different resource options. You can also create a resource file by entering the resource definitions in the grid display. The resources tab is shown below:
If you check the Xbase++ header box, then a header (CH) file will be created as well as a resource (ARC) file for the project. The generated resource file will include the header file via the #include statement, rather than duplicating the resource identification labels. Directories screen
The most important directories are the Source code and the Work directory. Since the IDE will generate the PRG files, and XPJ files automatically, it needs to know where to store them. Each project should keep its source code in a separate directory. If you specify a database tables directory, the IDE will look in that directory to determine which database engines should be included as part of the project. (The tables menu manages the DBF files that are to be accessed as part of the project). Be sure to leave this directory blank if there are no DBF files to be managed by the application. Backing up the project If you do not have any source code files open, you can backup the projects files from within the IDE. The screen below shows the backup screen.
From this screen, you can backup just the current source code, or the entire Xbase++ environment, which is handy if you want to continue working on a project on your laptop computer. Your license agreement with the IDE allows you to install a copy both on your development machine and a laptop, so you can easily backup the Xbase++ environment on one machine and install it on your laptop. Just be sure you respect the Xbase++ licensing agreement as well. Restoring from backup If you create backup disks from within the IDE, you can restore the programs into any directory including the original source code. The restore screen is shown below:
You can check any or all of the file to restore from the indicated backup file, and specify the name of the directory to restore the files to. If you restore the ALASKA environment, you can restore just a single directory or the entire development environment. Undo session changes Whenever you open a project, the IDE automatically backs up all of the program files (PRG), header files (CH), resource files (ARC), and the project file (XPJ) in the source code directory. The zip file it creates is stored in the same directory as the IDE application EXE file. If you select the Undo Session changes option, you will be given the ability to recover the previous versions of the files from this zip file. (The IDE only allows recovery of the full project, although you can access the ZIP file from outside the IDE as well). If you proceed with this option, all PRG, CH, and ARC files are removed from the source code directory. The XPJ file is also deleted, as well as the XP1 file from the IDE exe directory. Once the files are deleted, the ZIP file is extracted and your session changes are overwritten. Tech note: When the files are deleted, they are written in the Windows Recycle Bin, so you could recover if you really didnt mean to cancel the changes. |
|
|