-
Notifications
You must be signed in to change notification settings - Fork 369
JclIDEUtils: fix AnyInstanceRunning not detecting 64-bit IDE #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -403,9 +403,9 @@ TJclBorRADToolInstallation = class(TObject) | |
| function GetMake: IJclCommandLineTool; | ||
| function GetDescription: string; | ||
| function GetEditionAsText: string; | ||
| function GetIdeExeFileName: string; | ||
| function GetIdeExeFileName(x64: Boolean): string; | ||
| function GetGlobals: TStrings; | ||
| function GetIdeExeBuildNumber: string; | ||
| function GetIdeExeBuildNumber(x64: Boolean): string; | ||
| function GetIdePackages: TJclBorRADToolIdePackages; | ||
| function GetIsTurboExplorer: Boolean; | ||
| function GetLatestUpdatePack: Integer; | ||
|
|
@@ -561,8 +561,8 @@ TJclBorRADToolInstallation = class(TObject) | |
| property EnvironmentVariables: TStrings read GetEnvironmentVariables; | ||
| property IdePackages: TJclBorRADToolIdePackages read GetIdePackages; | ||
| property IdeTools: TJclBorRADToolIdeTool read FIdeTools; | ||
| property IdeExeBuildNumber: string read GetIdeExeBuildNumber; | ||
| property IdeExeFileName: string read GetIdeExeFileName; | ||
| property IdeExeBuildNumber[x64: Boolean]: string read GetIdeExeBuildNumber; | ||
| property IdeExeFileName[x64: Boolean]: string read GetIdeExeFileName; | ||
| property InstalledUpdatePack: Integer read FInstalledUpdatePack; | ||
| property LatestUpdatePack: Integer read GetLatestUpdatePack; | ||
| property LibrarySearchPath[APlatform: TJclBDSPlatform]: TJclBorRADToolPath read GetLibrarySearchPath {$IFDEF KEEP_DEPRECATED}write SetRawLibrarySearchPath{$ENDIF}; | ||
|
|
@@ -1633,7 +1633,7 @@ procedure TJclBorRADToolIdePackages.ReadPackages; | |
| if FDisabledPackages32.IndexOfName(FKnownPackages32.Names[I]) <> -1 then | ||
| FKnownPackages32.Objects[I] := Pointer(True); | ||
|
|
||
| if Installation.IDEVersionNumber >= 23 then | ||
| if FileExists(Installation.IdeExeFileName[True]) then | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The x64 IDE could be unselected during installation but registry entries be there, so I believe this test should not be changed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 64-bit IDE was introduced in version 12.3, but the test |
||
| begin | ||
| ReadPackageList(GetKnownIDEPackagesKeyName(True), FKnownIDEPackages64); | ||
| ReadPackageList(GetKnownPackagesKeyName(True), FKnownPackages64); | ||
|
|
@@ -2139,7 +2139,7 @@ function TJclBorRADToolInstallation.AnyInstanceRunning: Boolean; | |
| if RunningProcessesList(Processes) then | ||
| begin | ||
| for I := 0 to Processes.Count - 1 do | ||
| if AnsiSameText(IdeExeFileName, Processes[I]) then | ||
| if StrIsOneOf(Processes[I], [IdeExeFileName[False], IdeExeFileName[True]]) then | ||
| begin | ||
| Result := True; | ||
| Break; | ||
|
|
@@ -2542,14 +2542,14 @@ function TJclBorRADToolInstallation.GetGlobals: TStrings; | |
| Result := FGlobals; | ||
| end; | ||
|
|
||
| function TJclBorRADToolInstallation.GetIdeExeFileName: string; | ||
| function TJclBorRADToolInstallation.GetIdeExeFileName(x64: Boolean): string; | ||
| begin | ||
| Result := Globals.Values['App']; | ||
| Result := Globals.Values[Iff(x64, 'App x64', 'App')]; | ||
| end; | ||
|
|
||
| function TJclBorRADToolInstallation.GetIdeExeBuildNumber: string; | ||
| function TJclBorRADToolInstallation.GetIdeExeBuildNumber(x64: Boolean): string; | ||
| begin | ||
| Result := VersionFixedFileInfoString(IdeExeFileName, vfFull); | ||
| Result := VersionFixedFileInfoString(IdeExeFileName[x64], vfFull); | ||
| end; | ||
|
|
||
| function TJclBorRADToolInstallation.GetIdePackages: TJclBorRADToolIdePackages; | ||
|
|
@@ -2716,7 +2716,8 @@ function TJclBorRADToolInstallation.GetUpdateNeeded: Boolean; | |
|
|
||
| function TJclBorRADToolInstallation.GetValid: Boolean; | ||
| begin | ||
| Result := (ConfigData.FileName <> '') and (RootDir <> '') and FileExists(IdeExeFileName); | ||
| Result := (ConfigData.FileName <> '') and (RootDir <> '') and | ||
| (FileExists(IdeExeFileName[False]) or FileExists(IdeExeFileName[True])); | ||
| end; | ||
|
|
||
| function TJclBorRADToolInstallation.GetVclIncludeDir(APlatform: TJclBDSPlatform): string; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that the Exe file will be different depending on the platform, but I don't expect the version info inside it to be different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A large number of properties and methods related to the 64-bit IDE in
JclIDEUtilsuse the parameter formx64: Boolean, which can maintain consistency. The getter of this property also simply retrieves the file version information ofIdeExeFileName[x64: Boolean].Additionally, some of Embarcadero's newer features now only support the 64-bit IDE, and it is entirely possible that the 32-bit IDE will be deprecated or made an optional installation in the future.