Comments for Xbase++ 1.9 users
1. Support for projects with targets in multiple directories
Beginning with Xbase++ version 2.0, complex project scenarios involving targets located in different directories are fully supported. This required changes in the way the targets and the source files included in a project are handled by the project builder pbuild. Consequently, you should verify your .xpj files for semantical correctness if your projects are laid out in the manner described.Performing the following steps is not required for projects whose targets reside in the same folder as the project file (xpj)!
In previous versions, the location of the targets and the source files was specified relative to the folder which contained the project file. This approach had serious side-effects which basically made managing multi-target/multi-directory projects impossible. Beginning with this version, the location of the source files is specified relative to the corresponding target in the project file. This means that your existing projects may have to be modified before they can be used with this version.
This section explains the steps required to adapt your projects so that they can be used with the new Xbase++ version.
- If you plan to use your project concurrently with an older Xbase++ version, create a copy of the file for usage with the older version.
- Adapt the path of the source files in the project file
The following example shows an old-style project file with two targets, an executable (app.exe) and a DLL (helper.dll) which is located in a sub-folder:
Xbase++:[PROJECT] Project.xpj [Project.xpj] app.exe sub\helper.dll [app.exe] main.prg common.prg usual.ch [sub\helper.dll] sub\dllmain.prg sub\resources.arc sub\special.ch common.prg
Xbase++:[PROJECT] Project.xpj [Project.xpj] app.exe sub\helper.dll [app.exe] main.prg common.prg usual.ch [sub\helper.dll] dllmain.prg resources.arc special.ch ..\common.prg
- Use the new TARGET_DIR define to specify where a target shall be placed.
In previous versions, the project target location was used as some kind of deployment location to have all EXEs and DLLs of an Xbase++ project deployed at a single location which holds data files and other auxiliary files. With Xbase++ 2.0 the project target and the project binaries target location can be different. The benefit of this approach is that no intermediate files are created at the binary target location. Furthermore different targets can have source files with the same name without conflict. With previous versions, having different targets with identical prg/ch/arc filenames broke the dependency management of the Xbase++ Project builder. As a workaround “pbuild –a” was used, leading to unnecessary large build cycles.
The following example shows an old-style project file with the target app.exe that shall be created in the folder ..\bin:
Xbase++:[PROJECT] Project.xpj [Project.xpj] ..\bin\app.exe [..\bin\app.exe] app.prg src\util.prg
To migrate an old-style Xbase++ project to a 2.0 project file simple remove the folder ..\bin from your project as well as project target node. Then add a TARGET_DIR definition to each of your project targets and specify the project target binary location using TARGET_DIR=..\bin
Code:[PROJECT] Project.xpj [Project.xpj] app.exe [app.exe] TARGET_DIR = ..\bin app.prg src\util.prg
2. Changes in Layout Manager defines
The define constants supported by the Layout Manager class have been renamed for consistency. If you have already used any of the define constants with one of the preview builds, these defines must be renamed in your code. Otherwise, compile or runtime errors will result. The following table lists the changes made:Old constant: | New constant: | ||
XBP_NOEDGE | => | XBPLAYOUT_NONE | |
XBP_LEFTEDGE | => | XBPLAYOUT_LEFT | |
XBP_TOPEDGE | => | XBPLAYOUT_TOP | |
XBP_RIGHTEDGE | => | XBPLAYOUT_RIGHT | |
XBP_BOTTOMEDGE | => | XBPLAYOUT_BOTTOM | |
XBP_RELXPOS | => | XBPLAYOUT_RELLEFT | |
XBP_RELYPOS | => | XBPLAYOUT_RELBOTTOM | |
XBP_RELWIDTH | => | XBPLAYOUT_RELWIDTH | |
XBP_RELHEIGHT | => | XBPLAYOUT_RELHEIGHT | |
XBP_XCENTER | => | XBPLAYOUT_CENTERX | |
XBP_YCENTER | => | XBPLAYOUT_CENTERY |
#ifndef XBP_LEFTEDGE | |||
#define XBP_NOEDGE | XBPLAYOUT_NONE | ||
#define XBP_LEFTEDGE | XBPLAYOUT_LEFT | ||
#define XBP_TOPEDGE | XBPLAYOUT_TOP | ||
#define XBP_RIGHTEDGE | XBPLAYOUT_RIGHT | ||
#define XBP_BOTTOMEDGE | XBPLAYOUT_BOTTOM | ||
#define XBP_RELXPOS | XBPLAYOUT_RELLEFT | ||
#define XBP_RELYPOS | XBPLAYOUT_RELBOTTOM | ||
#define XBP_RELWIDTH | XBPLAYOUT_RELWIDTH | ||
#define XBP_RELHEIGHT | XBPLAYOUT_RELHEIGHT | ||
#define XBP_XCENTER | (XBPLAYOUT_CENTERX-XBPLAYOUT_RELLEFT) | ||
#define XBP_YCENTER | (XBPLAYOUT_CENTERY-XBPLAYOUT_RELBOTTOM | ||
#endif |
3. Socket Layer of ASINET Library
With Xbase++ 2.0 the socket layer is a part of the Xbase++ base product. Previously, the socket layer had been contained in the ASInet add-on library, and had to be included into the project via the asinet1c.lib link library. This file is now obsolete and is no longer installed with ASInet. Consequently, the following error will now be raised by the linker if the asinet1c.lib is requested in a project:ALINK: fatal error ALK4001: cannot open file "asinet1c.lib"
In order to overcome this problem, all references to asinet1c.lib need to be removed from both the source file and from the project file (xpj).
4. XbpBrowse() navigation mode
A new navigation mode (XBPBRW_NAVIGATION_SYSTEM) was added to the XbpBrowse class. In this mode, the position of the browse cursor does not change when operating the vertical scroll bar of the browse. Instead, the browse cursor retains its current position in the data source and hence may be scrolled off-screen. The new mode implements platform-compatible behavior and is the default navigation mode used by XbpBrowse objects. See the :navigationMode instance variable for further information.The default value of the :softTrack instance variable of the XbpBrowse class has been changed to .F.. This causes XbpBrowse objects to continuously update their display when the data area is scrolled using the horizontal or vertical scroll bars. In previous Xbase++ versions, the browser display was only stabilized at the end of a scroll operation, i.e. when the scroll bar's thumb was released. The new default value implements platform-compatible behavior and also is consistent with the behavior of the XbpQuickBrowse class.
The default value of the XbpBrowse:cursorMode member variable was changed to XBPBRW_CURSOR_ROW. The new default value better reflects the requirements in most use-cases, and also is consistent with the XbpQuickBrowse class.
5. XbpSlider, XbpProgressBar, XbpSortedQuickBrowse deprecated
The following Xbase Part classes have been deprecated and are no longer shipped with the product:- XbpSlider (XBPSLID.ZIP, Professional Subscription only)
- XbpSortedQuickBrowse (SQBROWSE.ZIP, Professional Subscription only)
- XbpProgressBar (XBPPROGR.ZIP)