mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:36:09 +02:00
Converter: Fix replacements of unit names when target is Windows-only.
git-svn-id: trunk@39697 -
This commit is contained in:
parent
782074c449
commit
f1d5a6a06f
@ -247,7 +247,7 @@ begin
|
||||
if OmitUnit then // but they can have replacements.
|
||||
fMissingUnits.Add(NewUnitName)
|
||||
// Report Windows specific units as missing if target is CrossPlatform.
|
||||
// Needed if work-platform is Windows (kind of a hack).
|
||||
// Needed if work-platform is Windows.
|
||||
else if Settings.CrossPlatform and IsWinSpecificUnit(LowNU) then
|
||||
fMissingUnits.Add(s);
|
||||
// Check if the unit is not part of project and needs conversion, too.
|
||||
@ -257,7 +257,7 @@ begin
|
||||
else begin
|
||||
// If the unit is not found, add it to fMissingUnits, but don't add
|
||||
// Windows specific units if target is "Windows only".
|
||||
// Needed if work-platform is different from Windows (kind of a hack).
|
||||
// Needed if work-platform is different from Windows.
|
||||
if Settings.CrossPlatform or not IsWinSpecificUnit(LowNU) then
|
||||
fMissingUnits.Add(s);
|
||||
end;
|
||||
@ -618,7 +618,7 @@ begin
|
||||
if not CodeTool.AddUnitToSpecificUsesSection(
|
||||
fUsesSection, fUnitsToAdd[i], '', SrcCache) then exit;
|
||||
end;
|
||||
if fIsMainFile or (Settings.CrossPlatform and not Settings.SupportDelphi) then begin
|
||||
if fIsMainFile or not Settings.SupportDelphi then begin
|
||||
// One way conversion (or main file) -> remove and rename units.
|
||||
if not fMainUsedUnits.RemoveUnits then exit; // Remove
|
||||
if not fImplUsedUnits.RemoveUnits then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user