Difference between revisions of "LMD VCL - General FAQ"

From LMD
Jump to: navigation, search
(Uninstallation)
(Uninstallation)
 
(3 intermediate revisions by the same user not shown)
Line 105: Line 105:
 
Issue is caused by SHA-1 signature of the uninstaller exe (UNWISE.EXE).<br>
 
Issue is caused by SHA-1 signature of the uninstaller exe (UNWISE.EXE).<br>
 
This issue is fixed in new LMD installers: Since LMD 2020.2 release a new SHA-2 signature was added to the installer which prevents this problem.<br><br>
 
This issue is fixed in new LMD installers: Since LMD 2020.2 release a new SHA-2 signature was added to the installer which prevents this problem.<br><br>
To workaround this problem with installers till '''2020.1''':
+
To workaround this problem with installers till '''2020.1''' (including LMD/NG 2019, 2018 etc. installer):
* Download updated uninstaller from here: [[http://files.lmd.de/downloads/utils/uninstall.zip|uninstall.zip]]
+
* Download updated uninstaller from here: '''https://files.lmd.de/downloads/utils/uninstall.zip'''
 
* Copy UNWISE.EXE from the zip into your installation folder and replace the existing UNWISE.EXE file.
 
* Copy UNWISE.EXE from the zip into your installation folder and replace the existing UNWISE.EXE file.
 
* After that Uninstaller works as expected.
 
* After that Uninstaller works as expected.
{TOP}
 
  
 
== IDE ==
 
== IDE ==

Latest revision as of 17:51, 23 January 2023

[edit]

<< Back to Overview page 

General

CBuilder SpeedUp

#include <oleidl.h> 
#define NO_WIN32_LEAN_AND_MEAN
NO_WIN32_LEAN_AND_MEAN
When this macro is defined, VCL.H does not define WIN32_LEAN_AND_MEAN. Default: OFF

VCL_FULL
Same as NO_WIN32_LEAN_AND_MEAN (NOTE: This macro is for BCB v1.0 backward compatibility) Default: OFF

INC_VCLDB_HEADERS
When this macro is defined, VCL.H includes the core Database headers of VCL. (Defining this macro is functionally equivalent to including VCLDB.H) Default: OFF

INC_ALLVCL_HEADERS
When this macro is defined, VCL.H includes all VCL headers. (Defining this macro is functionally equivalent to including VCLMAX.H) Default: OFF

CHM Helpfiles - content not visible

If you see no content in CHM files, you need to unblock the file in the file properties dialog. For more information read e.g. this Stackoverflow topic.


Installation

"Entry Point not found"/"Could not find [..]" during startup of IDE

Version Mix Up

If "Entry Point not found" or "Could not find [..]" errors occur during startup of IDE, problem is most likely caused by a version mix up.
Reason: Delphi/C++ Builder still has access to older or different runtime packages (--> multiple variants of same runtime package reside on your system. Especially when older versions reside in \system32 folder, they are preferred against those which reside in \projects\bpl directory).
If you encounter this problem, check your harddisk whether several versions of same runtime package are installed on your system. All LMD-Tools runtime packages start with lmd[..], so using the filter lmd*.bpl for harddisk search should work.
Usually this problem occurs when a previous version was not removed completely. E.g. if you compiled sourcecode, Delphi places created runtime BPL's automatically into the default BPL output path (can be specified in Environment Options dialog). Older version may have installed them in System directory - so there is the possible version conflict.
To completely remove an old LMD-Tools version (the hard way):

  • Close Delphi / C++ IDE (Note: Be sure that you did not include any LMD VCL units in own packages, otherwise open these packages, remove LMD-Tools units and recompile them).
    • Use all uninstallers for previous packages
    • Delete all LMD-Tools directoies
    • Delete all LMD-Tools path settings from Extras|Environment Options|Tab Library
    • Now most important point: Search your harddisk (at least in your system directory

and the Delphi Projects\BPL path) for LMD BPLs. Use as search string lmd*.bpl for runtime packages.

  • Use as search string dcllmd*.bpl for designtime packages.
  • Remove them all

After that try to reinstall original package or use sourcecode installer. To install LMD VCL sourcecode:

  • Use the source installer of your product
  • After installation check whether paths to LMD VCL source files are correctly set. If for any reason not, add them yourself
  • We have extremly simplified source compilation. Load the correct project group and compile one package after another. Install only designtime packages (dcllmd*.bpk). All compiled packages can be found after compilation in the Projects\BPL path of your IDE version.
Packages not installed in a system path

The second common reason is caused by the fact, that packages were installed into a non-system path. E.g. when you have specified a custom output folder for BPLs in your IDE settings, you must assure, that especially runtime packages are installed into a system path. Otherwise you will see packages when you install them, but with next start of BDS/IDE you get error that a specific package can not be found. In BDS or Codegear RAD Studio IDEs (Delphi 2005 and better) you can easily extend your PATH settings in Environment Settings|Environment Variables in Options dialog. Otherwise you need to modify PATH variable in system settings, if you don't want to use default BPL folder.

[Fatal Error]: Unit XXXX was compiled with a different version of XXXXX

Example
[Fatal Error] UMain.pas(8): Unit lmdsysin was compiled with a different version of lmdconst.IDS_CPUSPEED

Reason
A previous installation (trial, previous release) was not removed completely. This error message might also occur, when you try to use precompiled LMD VCL packages with Delphi/C++ Builder trials. 

Solution
Make sure that no path reference to an older LMD-Tools exist (check Environment Options|Library Path). The most secure way would be to uninstall any files of any previous version from your harddisk. Please rebuild your project completely to reflect new units. For detailed instructions read Uninstall section in installation guide.

LMD[..].pas not found error / Version Mix Up

If IDE claims that it can't find a file (though DCUs are available and Library Path is set correctly - see Environment Options), there are only a few possible causes for this problem:

  • Your IDE version is not compatible with precompiled LMD VCL package. Make sure that you do not use a Delphi / C++ Builder trial and that you have installed all required service packs of your IDE.
  • Most probably this is a version mix up. For the offending files please check whether a previous version was completely uninstalled, that no parts are compiled into existing packages (e.g. your personal packages, you might have to rebuild the package) and that your project was REBUILD (to force the compilation of latest PAS/DCU files). Furthermore the project files may have references to older package files (especially if you use runtime packages, simply check Package settings in Project Options.

LMD VCL Trials or SE releases do NOT work with Delphi / C++ Builder Trials!

To make it short:  You need a full version of C++ Builder/Delphi to run any precompiled version (Trial or SE). The VCL files in Borland Trials use a different DCU signature than full versions.
So many or almost all precompiled packages will fail to work on a C++ Builder/Delphi Trialversion. If you own a sourcecode version, then you can compile code as usual even in CodeGear trials.

After installation (without errors) components do not appear on component palette

Please check first in Install Components... dialog whether Package entries were created at all. If items are not available, packages have to be installed manually (check installation guide in \info folder). If items are available, but not checked: Check them to enable packages. If you receive error messages, IDE has no (or wrong) access to the runtime packages. Please check then whether installer has installed runtime packages correctly into your default output BPL folder. If runtime/designtime packages are missing, locate the files on your harddisk and copy them to the default folder and add them manually.

BDS (Delphi 2005 and higher) specific problems

Disabled Packages

If components do not appear on component palette, though installation worked without problems: Please check wether IDE did not disable corresponding package entries (this may e.g. happen when during previous start of IDE runtime packages were not found). Alternatively you may check following registry key:

_CURRENT_USER\Software\Borland\BDS\X.0\Disabled Packages

X.0 specifies the BDS version, e.g. 3.0 for Delphi 2005, 4.0 for BDS 2006 and so on.

Wrong Default Project Options

Another possible cause of problems are wrong Default Project Options (custom default project options were set). Check Default Project Options in BDS in Project Menu (at the very end when no project is loaded) and especially review path and package settings. Especially remove packages from previous versions from the "Use runtime Packages" section.

Localized BDS Versions

For localized (german, japanes, french) Delphi/C++ Builder IDEs (from Delphi 2005 and higher) the identification of the default BPL output path may fail. If problem occurs, please copy files manually to the correct folder.

Important Registry keys explained

This section lists Delphi personality relevant registry keys:

  • HKEY_CURRENT_USER\Software\Borland\BDS\X.0\Known Packages

Lists all packages which should be loaded during

  • HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Disabled Packages

This key includes all packages which should be NOT loaded, even if they are included in "Known Packages" key-

  • HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Library all search paths:
    • Search Path: *.dcu, *.dcp, *.dfm etc. files
    • Package DPL Search Path: *.bpl files
    • Package DCP Search Path: *.dcp files
    • Browsing Path: Source files
    • Debug DCU Path (optional): Path to DCU files with debug information. Not used with LMD VCL products.

Uninstallation

After most recent operating system updates you might see following UAC dialog box:
UAC dialog box
Issue is caused by SHA-1 signature of the uninstaller exe (UNWISE.EXE).
This issue is fixed in new LMD installers: Since LMD 2020.2 release a new SHA-2 signature was added to the installer which prevents this problem.

To workaround this problem with installers till 2020.1 (including LMD/NG 2019, 2018 etc. installer):

IDE

Disappearing Components in VCL.NET packages

Note: Problem seems to be limited to BDS 2006 / CRS 2007 or better
A few customers reported about a problem with disappearing components (reproducible in Installed .NET components... dialog) in VCL.NET personalitites. This problem is limited to a few assemblies only (RTLX, RichPack and LMD-Tools components). This problem had been investigated, we found problem is related to LMD Design Time assemblies which make use of CodeGear design time packages(located in the \Bin folder of your BDS/CRS installation folder).
Since LMD-Tools 8.10 installers and package project files were changed (for LMD ElPack and LMD IDE-Tools as well). Changes are:

  • By default LMD DesignTime assemblies are now installed into the \Bin folder below BDS/CRS installation folder. This work around solve the problem.
  • The designtime projects files also locate design time  assemblies into \bin folder (see project options)
  • If you don't want this behaviour (or if it is technically not possible, e.g. caused by security settings in Vista):
    • For compiled packages: Choose in installer option to install designtime packages into library folder.
    • For source packages: Change project options in designtime projects.
    • In both cases: Add the \bin folder of your IDE installation to the Assembly search folder.

Corrupted/screwed Component Palette

Note: Problem seems to be solved in Delphi / CBuilder 6 and higher

Answer 1:
This problem is not a LMD-Tools issue but a Delphi problem in connection with a a very few number of certain graphic cards and drivers (caused by Delphi from a very large numbers of installed components on).
There are several ways to workaround:

  1. Try to update your graphic driver. In a few cases problem dissappeared by using latest driver versions.
  2. If latest driver does not help: Advanced graphic drivers provide options to switch off certain optimization techniques. In this case Bitmap Caching options must be turned off. If option is not available, try to turn off hardware acceleration. If using device driver does not help the only way is to reduce number of installed components at the same time. If you own sourcecode you might use many options described in the installation HTML files of LMD-Tools to drastically reduce the number of installed components. Deinstall all other standard component packages which are not required as well (System must be rebooted each time to reflect changes to reinitialize bitmap cache).


Answer 2:
There is a bug in some video card drivers in the way they handle the ImageList API. When an ImageList is being built in memory that cards will freeze the computer or corrupt the images when they have to swap the ImageList back out to main memory to complete the building on large imagelist's like the 180+ image component pallete list. The S3 chipset has been particularly problematic (Win98 is even worse).
Try these:

  1. Get the latest driver (www.s3.com or your vendor if your vendors doesn't work, try the S3 as they tend to be more compliant)
  2. Start Delphi with the -ns switch
  3. Under the [display] section of the SYSTEM.INI file add the following line: BusThrottle=1 (reboot afterwards)
  4. Reboot in safe mode and start Delphi. Goto the properties of the component pallet and hide all the controls that you rarely use. This will reduce the imagelist that is getting built and might get you under the threshold.
  5. reduce the hardware acceleration for the card. (display->properties->settings->advances->performance) 6) play with color depth/resolution 1024x768 in 16 bit color seems the worse (particularly with Delphi 3).
  6. Get the latest DirectX drivers.
  7. After Delphi is started, change the color depth (you can change it right back) of your video card.

Also Delphi 5 can not run in Win98 under 16 color mode. You must be at least at 256 colors.
If the BusThrottle works for you this is by far the best solution. All it does is instruct the driver that it must give a little time slice to the OS so affects on performance are not noticable (so far no one has reported back to me that they can even tell a difference between using and not using the BusThrottle setting except that Delphi runs). Unfortunately not all drivers respect this setting.

Help Index files disappear / AV's in CBuilder when starting help

You are running a Win9X/ME machine (on Windows NT/2K/XP this problem mostly happens in CBuilder only). The capability of index items in Windows Help system is limited on these operating systems (and LMD-Tools Index files are very large). There are two possible workarounds:

  • To reset the original help index use the OpenHelp tool from the Help menu and remove LMD-Tools index files
  • Use the Open Help tool from the Help menu to remove other unnecessary help index files (until Delphi/CBuilder helpfiles including LMD-Tools helpfile work again).

Debugger problem

Problem: I want to run my application in IDE, but debugger window appears (breakpoint just before ntdll.DbgUserBreakPoint) and I have to hit F9 several times to start project.

  1. The problem happens only within (older) IDEs (does not affect the executable).
  2. Get the projects #15804 and #16098 from CodeGear Codecentral and install in the IDE. Follow information in text files and problem will go away.

Programming Techniques

Unknown identifier during compilation

You receive during compilation an "Unknown identifier..." for a procedure/function or type and you are certain that type name is correctly spelled. In almost all cases the required unit - where the corresponding type is defined - is not included in the uses clause. To solve this problem:

  1. Mark the affected identifier in the code editor
  2. Press F1 to let Delphi automatically search for correct help entry. If correct help entry is not found immediately, mark the property or component name which you tried to change or use.
  3. Read helptext and find out, in which unit the type or method is defined. Add this unit to the uses clause of the unit, where the compilation error occured.
  4. If helpfile does not deliver you unit name, search the interface files (or source files) for the typename and find out where the type name is declared. Add this unit to the uses clause of the unit, where the compilation error occured.
  5. Recompile your project again.

Accessing enumerated values at runtime

You want to access enumerated properties like Options property of TLMDForm (wich display their value in object inspector like <source>[foAutoShow, foAutoCenter])</source>, but you don't know how to achieve this at runtime.
The Options property of TLMDForm is used as example.

To check for a flag, use code as follows:

if (foAutoCenter in MyLMDForm.Options) then DoWhatEver;

This line of code tests whether foAutoCenter flag is currently set.

To enable or disable a specific flag, use following code:

MyLMDForm.Options:=MyLMDForm.Options+[foAutoCenter];
or
MyLMDForm.Options:=MyLMDForm.Options-[foAutoCenter];

Duplicate identifier during compilation

Situation
You want to specify a new value to property at runtime. During compilation you receive an error for incompatible (duplicate) types. You think that you used correct value and find out, that same name is used in different type definitions.
Example
You want to change TLMDDBNImage Style property (also TLMDNImage, TLMDLImage etc.) at runtime, e.g. <delphi>LMDDBNImage1.Style:=sbKeepAspRatio;</delphi> You receive "Incompatible Types error ->TLMDBitmapStyle and TLMDOldBitmapStyle.

Solution
Make sure that Compiler uses correct type defintion. To solve problem demonstrated in example:
You probably included both the lmdobj (supports old controls and units) and the lmdgraph unit in the uses clause of your unit.
There are two ways to workaround this problem:

  1. Correct the order of the referenced units in the uses clause (place lmdgraph before lmdobj)
  2. Add lmdgraph before the type name of the corresponding type to ensure that correct type is used, e.g.
LMDDBNImage1.Style := lmdgraph.sbNone;

E2134 Type 'TRect' has no type info

It is caused by turning on the 'Emit runtime type information' flag in the compiler options. Apparently, using this flag will generate this error if the dcs's are compiled with different versions of the base units where these types are declared

If you upgrade from LMD-Tools 7 or earlier:

Unit changes several units were reorganized and removed from the packages. So you might encounter following problems when trying to compile an existing project:

File not found errors for certain units

Following units are no longer required in LMD-Tools:
lmdbredt.pas, lmdbtn.pas, lmdcctrl.pas, lmdcombo.pas, lmdcompo.pas, LMDComponent.pas, LMDCtrl.pas, lmdctrlA.pas, lmddbctA.pas, lmddbctr.pas, lmddlgS.pas, lmdeditb.pas, lmdeditc.pas, LMDEditM.pas, lmdextcA.pas, lmdextcS.pas, LMDGrapA.pas, lmdgroup.pas, LMDMemoC.pas, lmdmmS.pas, lmdnonvA.pas, lmdnonvS.pas, lmdnwgui.pas, lmdrctrl.pas, lmdrectutils.pas, lmdshapA.pas, LMDStdCA.pas, lmdstdcS.pas (for CBuilder user: .hpp/.cpp extension). If compiler complains about these files simply remove the unit from the uses clause. This is the recommended way.
Alternatively install the units from the source\deprecated (Delphi only, CBuilder user must always remove references). These units are actually empty but make compiler happy.


Other changes

The style for TLMDCustomButton and TLMDCustomSpeedButton (and controls using internal SpeedButtons) is now specified by the ButtonStyle property.
In addition the ubsWinXP, ubsWinXPCombo, ubsWinXPTool and ubsAutoDetect styles were removed, because CtlXP property (which is activated by default) is now supported by buttons. In most cases you need not to take care of this change, because we handle conversion automatically.