View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005513 | JEDI Code Library | JclIDEUtils | public | 2011-03-14 00:27 | 2012-02-25 21:14 |
Reporter | debose | Assigned To | outchy | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Version 2.3 | ||||
Target Version | Fixed in Version | Version 2.3 | |||
Summary | 0005513: GetEnvironmentVariables (in TJclBDSInstallation) does not have values for some variables of Delphi XE: $(BDSLIB), $(Platform) | ||||
Description | Just found, that method GetEnvironmentVariables of TJclBDSInstallation does not return values for some Enviroinment variables that appeared in DelphiXE. These are: $(BDSLIB), $(Platform) These variables are used in default configuration of Delphi XE to specify search path for default Library. 1) $(BDSLIB)\$(Platform)\release 2) $(BDSLIB)\$(Platform)\debug which are equal to 1) C:\Program Files\Embarcadero\RAD Studio\8.0\lib\win32\release 2) C:\Program Files\Embarcadero\RAD Studio\8.0\lib\win32\debug Tested with rev 3402. | ||||
Additional Information | I investigated this problem a little. These variables can't be retrieved from registry. Also they are not specified in RAD Studio Command Prompt of Delphi XE. | ||||
Tags | Jcl, XE | ||||
Fixed in GIT commit | |||||
Fixed in SVN revision | 3573 | ||||
IDE version | Delphi/C++Builder 2010 | ||||
2011-03-18 09:18
|
JclIDEUtils_GetEnvVar_BdsLib.patch (1,093 bytes)
Index: JclIDEUtils.pas =================================================================== --- JclIDEUtils.pas (revision 3506) +++ JclIDEUtils.pas (working copy) @@ -812,6 +812,8 @@ EnvVariableBDSValueName = 'BDS'; EnvVariableBDSPROJDIRValueName = 'BDSPROJECTSDIR'; EnvVariableBDSCOMDIRValueName = 'BDSCOMMONDIR'; + EnvVariableBDSLIBValueName = 'BDSLIB'; + EnvVariablePLatformValueName = 'Platform'; KnownPackagesKeyName = 'Known Packages'; KnownIDEPackagesKeyName = 'Known IDE Packages'; ExpertsKeyName = 'Experts'; @@ -3458,6 +3460,11 @@ Result.Values[EnvVariableBDSPROJDIRValueName] := DefaultProjectsDir; if Result.Values[EnvVariableBDSCOMDIRValueName] = '' then Result.Values[EnvVariableBDSCOMDIRValueName] := CommonProjectsDir; + + if Result.Values[EnvVariableBDSLIBValueName] = '' then + Result.Values[EnvVariableBDSLIBValueName] := PathAddSeparator(RootDir) + 'lib'; + if Result.Values[EnvVariablePLatformValueName] = '' then + Result.Values[EnvVariablePLatformValueName] := 'win32'; end; end; |
|
Added patch to fix that. Note: no checks on Delphi version are performed. Hope this won't cause any troubles. |
2011-03-19 14:46
|
JclIDEUtils_GetEnvVar_BdsLib2.patch (1,252 bytes)
Index: JclIDEUtils.pas =================================================================== --- JclIDEUtils.pas (revision 3506) +++ JclIDEUtils.pas (working copy) @@ -812,6 +812,8 @@ EnvVariableBDSValueName = 'BDS'; EnvVariableBDSPROJDIRValueName = 'BDSPROJECTSDIR'; EnvVariableBDSCOMDIRValueName = 'BDSCOMMONDIR'; + EnvVariableBDSLIBValueName = 'BDSLIB'; + EnvVariablePLatformValueName = 'Platform'; KnownPackagesKeyName = 'Known Packages'; KnownIDEPackagesKeyName = 'Known IDE Packages'; ExpertsKeyName = 'Experts'; @@ -3458,6 +3460,15 @@ Result.Values[EnvVariableBDSPROJDIRValueName] := DefaultProjectsDir; if Result.Values[EnvVariableBDSCOMDIRValueName] = '' then Result.Values[EnvVariableBDSCOMDIRValueName] := CommonProjectsDir; + + if VersionNumber >= 8 then + begin + { TODO : For crossplatform Delphi version check/change $(BDSLIB) and $(platform) values. } + if Result.Values[EnvVariableBDSLIBValueName] = '' then + Result.Values[EnvVariableBDSLIBValueName] := PathAddSeparator(RootDir) + 'lib'; + if Result.Values[EnvVariablePLatformValueName] = '' then + Result.Values[EnvVariablePLatformValueName] := 'win32'; + end; end; end; |
|
Added 2nd version of the patch with BDS version check. JclIDEUtils_GetEnvVar_BdsLib2.patch |
|
ok for $(BDSLIB), but $(Platform) depends on the target OS. It is project specific. |
|
> but $(Platform) depends on the target OS. It is project specific. Is it actually? I suppose Delphi XE has libraries only for win32 platform. Anyway I asked friend to check his installation of Delphi XE on 64bit windows, and he approved that there is also "win32" folder. |
|
but i believe, that in Delphi XE 2, $(platform) can take other values. F.e. "win64" and "macos". |
|
Note: I suppose, you can't reproduce this bug, running code in Delphi XE, cause Delphi XE adds these enviroinment variables. So, code should be run either from outside of Delphi XE, or from older version of Delphi. |
|
Actually you can switch the active platform/configuration by settings properties in MsBuild command line. These settings are not strongly set by the project file, the project file contains configuration for all possible platform/configuration pairs. I've just committed a parser for MsBuild files in revision 3573, it should be able to give more accurate results about the default platform/configuration for each project. |
|
This new MsBuild project can be used to parse EnvOptions.proj or CodeGear.Delphi.Targets that will return the right values for these environment variables. Note that they are now automatically expanded when encountered in an MsBuild project file. |
|
Some variables may still be undefined (see: http://issuetracker.delphi-jedi.org/view.php?id=5809) Is it possible to get Env. variables from "srsvars.bat" for each installation, to avoid cases when some variables may still be empty? These values can also be passed to MsBuild parser, but MsBuild parser can try to overwrite them. p.s. srsvars.bat is used in TJclBDSInstallation.GetCommonProjectsDirectory |
|
Please follow-up in http://issuetracker.delphi-jedi.org/view.php?id=5809 The original issue is definitively fixed. Revision 3749 introduces TJclBDSInstallation.GetRsVars to return environment variables as after RsVars.bat is executed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-14 00:27 | debose | New Issue | |
2011-03-14 00:27 | debose | IDE version | => Delphi/C++Builder XE |
2011-03-14 00:28 | debose | Tag Attached: Jcl | |
2011-03-14 00:28 | debose | Tag Attached: XE | |
2011-03-18 09:18 | debose | File Added: JclIDEUtils_GetEnvVar_BdsLib.patch | |
2011-03-18 09:19 | debose | Note Added: 0018458 | |
2011-03-19 14:46 | debose | File Added: JclIDEUtils_GetEnvVar_BdsLib2.patch | |
2011-03-19 14:46 | debose | Note Added: 0018459 | |
2011-03-23 22:46 | outchy | Category | JclBorlandTools => JclIDEUtils |
2011-03-24 10:31 | outchy | Note Added: 0018469 | |
2011-03-24 10:43 | debose | Note Added: 0018470 | |
2011-03-24 10:44 | debose | Note Added: 0018471 | |
2011-03-30 10:11 | debose | Note Added: 0018476 | |
2011-08-13 00:47 | outchy | Note Added: 0018869 | |
2011-08-17 09:03 | outchy | Note Added: 0018875 | |
2011-08-17 09:03 | outchy | Assigned To | => outchy |
2011-08-17 09:03 | outchy | Status | new => feedback |
2011-09-29 21:55 | outchy | Fixed in revision | => 3573 |
2011-09-29 21:55 | outchy | Status | feedback => resolved |
2011-09-29 21:55 | outchy | Fixed in Version | => Version 2.3 |
2011-09-29 21:55 | outchy | Resolution | open => fixed |
2012-02-25 06:48 | debose | IDE version | Delphi/C++Builder XE => Delphi/C++Builder 2010 |
2012-02-25 06:49 | debose | Note Added: 0019550 | |
2012-02-25 06:49 | debose | Status | resolved => feedback |
2012-02-25 06:49 | debose | Resolution | fixed => reopened |
2012-02-25 21:14 | outchy | Note Added: 0019554 | |
2012-02-25 21:14 | outchy | Status | feedback => resolved |
2012-02-25 21:14 | outchy | Resolution | reopened => fixed |