Converter: rename Multi-platform to Cross-platform

git-svn-id: trunk@39696 -
This commit is contained in:
juha 2012-12-30 19:38:30 +00:00
parent 1f2700f715
commit 782074c449
5 changed files with 62 additions and 62 deletions

View File

@ -619,7 +619,7 @@ var
// UTF8 funcs are in LCL which console apps don't have -> don't change.
and not (aIsConsoleApp and (FuncDefInfo.Category='UTF8Names'))
// Keep Windows funcs in a Windows application.
and (fCTLink.Settings.MultiPlatform or (FuncDefInfo.Category<>'WindowsAPI'))
and (fCTLink.Settings.CrossPlatform or (FuncDefInfo.Category<>'WindowsAPI'))
then begin
// Create a new replacement object for params, position and other info.
FuncCallInfo:=TFuncReplacement.Create(FuncDefInfo);

View File

@ -17,7 +17,7 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = UnitReplaceDivider
Left = 9
Height = 21
Height = 19
Hint = 'Directory where project''s main file must be'
Top = 32
Width = 330
@ -32,8 +32,8 @@ object ConvertSettingsForm: TConvertSettingsForm
EditLabel.AnchorSideRight.Side = asrBottom
EditLabel.AnchorSideBottom.Control = ProjectPathEdit
EditLabel.Left = 9
EditLabel.Height = 13
EditLabel.Top = 12
EditLabel.Height = 15
EditLabel.Top = 10
EditLabel.Width = 330
EditLabel.Caption = 'Project Path:'
EditLabel.ParentColor = False
@ -48,10 +48,10 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = TargetGroupBox
AnchorSideTop.Side = asrBottom
Left = 12
Height = 17
Height = 21
Hint = 'Creates a Backup directory under project directory'
Top = 181
Width = 159
Top = 179
Width = 210
BorderSpacing.Left = 3
BorderSpacing.Top = 9
Caption = 'Make backup of changed files'
@ -63,8 +63,8 @@ object ConvertSettingsForm: TConvertSettingsForm
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 34
Top = 315
Height = 38
Top = 311
Width = 587
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
@ -84,10 +84,10 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = BackupCheckBox
AnchorSideTop.Side = asrBottom
Left = 12
Height = 17
Height = 21
Hint = 'Separate form files allow different properties'
Top = 203
Width = 185
Top = 205
Width = 241
BorderSpacing.Top = 5
Caption = 'Keep converted files open in editor'
ParentShowHint = False
@ -259,23 +259,23 @@ object ConvertSettingsForm: TConvertSettingsForm
Left = 9
Height = 108
Hint = 'xxx'
Top = 64
Top = 62
Width = 255
BorderSpacing.Top = 11
Caption = 'Target'
ClientHeight = 90
ClientHeight = 91
ClientWidth = 251
ParentShowHint = False
ShowHint = True
TabOrder = 8
object SupportDelphiCheckBox: TCheckBox
AnchorSideLeft.Control = MultiPlatformCheckBox
AnchorSideTop.Control = MultiPlatformCheckBox
AnchorSideLeft.Control = CrossPlatformCheckBox
AnchorSideTop.Control = CrossPlatformCheckBox
AnchorSideTop.Side = asrBottom
Left = 10
Height = 17
Top = 26
Width = 88
Height = 21
Top = 30
Width = 116
BorderSpacing.Top = 5
Caption = 'Support Delphi'
OnChange = SupportDelphiCheckBoxChange
@ -288,9 +288,9 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = SupportDelphiCheckBox
AnchorSideTop.Side = asrBottom
Left = 10
Height = 17
Top = 48
Width = 149
Height = 21
Top = 56
Width = 194
BorderSpacing.Top = 5
Caption = 'Use the same DFM form file'
OnChange = SameDfmCheckBoxChange
@ -298,14 +298,14 @@ object ConvertSettingsForm: TConvertSettingsForm
ShowHint = True
TabOrder = 1
end
object MultiPlatformCheckBox: TCheckBox
object CrossPlatformCheckBox: TCheckBox
AnchorSideTop.Control = TargetGroupBox
Left = 10
Height = 17
Height = 21
Top = 4
Width = 84
Width = 114
BorderSpacing.Top = 4
Caption = 'Multi-Platform'
Caption = 'Cross-platform'
ParentShowHint = False
ShowHint = True
TabOrder = 2
@ -317,11 +317,11 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = UnitReplaceButton
AnchorSideTop.Side = asrCenter
Left = 447
Height = 21
Top = 29
Height = 27
Top = 26
Width = 136
BorderSpacing.Left = 23
ItemHeight = 13
ItemHeight = 0
Style = csDropDownList
TabOrder = 9
end
@ -330,11 +330,11 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = UnknownPropsDivider
AnchorSideTop.Side = asrBottom
Left = 447
Height = 21
Height = 27
Top = 84
Width = 136
BorderSpacing.Top = 2
ItemHeight = 13
ItemHeight = 0
Style = csDropDownList
TabOrder = 10
end
@ -344,11 +344,11 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = FuncReplaceButton
AnchorSideTop.Side = asrCenter
Left = 447
Height = 21
Top = 197
Height = 27
Top = 194
Width = 136
BorderSpacing.Left = 23
ItemHeight = 13
ItemHeight = 0
Style = csDropDownList
TabOrder = 11
end
@ -358,11 +358,11 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = CoordOffsButton
AnchorSideTop.Side = asrCenter
Left = 447
Height = 21
Top = 253
Height = 27
Top = 250
Width = 136
BorderSpacing.Left = 23
ItemHeight = 13
ItemHeight = 0
Style = csDropDownList
TabOrder = 12
end
@ -372,11 +372,11 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = TypeReplaceButton
AnchorSideTop.Side = asrCenter
Left = 447
Height = 21
Top = 141
Height = 27
Top = 138
Width = 136
BorderSpacing.Left = 23
ItemHeight = 13
ItemHeight = 0
Style = csDropDownList
TabOrder = 13
end
@ -385,9 +385,9 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = KeepFileOpenCheckBox
AnchorSideTop.Side = asrBottom
Left = 142
Left = 181
Height = 20
Top = 244
Top = 250
Width = 102
BorderSpacing.Left = 6
BorderSpacing.Top = 24
@ -399,9 +399,9 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Control = ScanProgressBar
AnchorSideTop.Side = asrCenter
Left = 12
Height = 13
Top = 248
Width = 124
Height = 15
Top = 253
Width = 163
Caption = 'Scanning parent directory'
ParentColor = False
end
@ -411,9 +411,9 @@ object ConvertSettingsForm: TConvertSettingsForm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScanProgressBar
AnchorSideRight.Side = asrBottom
Left = 142
Left = 181
Height = 25
Top = 265
Top = 271
Width = 102
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 1

View File

@ -58,7 +58,7 @@ type
// Actual user settings.
fBackupFiles: boolean;
fKeepFileOpen: boolean;
fMultiPlatform: boolean;
fCrossPlatform: boolean;
fSupportDelphi: boolean;
fSameDfmFile: boolean;
// Modes for replacements:
@ -108,7 +108,7 @@ type
property Enabled: Boolean read fEnabled write SetEnabled;
property BackupFiles: boolean read fBackupFiles;
property KeepFileOpen: boolean read fKeepFileOpen;
property MultiPlatform: boolean read fMultiPlatform;
property CrossPlatform: boolean read fCrossPlatform;
property SupportDelphi: boolean read fSupportDelphi;
property SameDfmFile: boolean read fSameDfmFile;
property UnitsReplaceMode: TReplaceModeLong read fUnitsReplaceMode;
@ -132,7 +132,7 @@ type
ScanLabel: TLabel;
ScanProgressBar: TProgressBar;
UnitReplaceComboBox: TComboBox;
MultiPlatformCheckBox: TCheckBox;
CrossPlatformCheckBox: TCheckBox;
SameDfmCheckBox: TCheckBox;
SupportDelphiCheckBox: TCheckBox;
TargetGroupBox: TGroupBox;
@ -391,7 +391,7 @@ begin
fConfigStorage:=GetIDEConfigStorage('delphiconverter.xml', true);
fBackupFiles :=fConfigStorage.GetValue('BackupFiles', true);
fKeepFileOpen :=fConfigStorage.GetValue('KeepFileOpen', false);
fMultiPlatform :=fConfigStorage.GetValue('MultiPlatform', true);
fCrossPlatform :=fConfigStorage.GetValue('CrossPlatform', true);
fSupportDelphi :=fConfigStorage.GetValue('SupportDelphi', false);
fSameDfmFile :=fConfigStorage.GetValue('SameDfmFile', false);
fUnitsReplaceMode:=TReplaceModeLong(fConfigStorage.GetValue('UnitsReplaceMode', 2));
@ -612,7 +612,7 @@ begin
// Save possibly modified settings to ConfigStorage.
fConfigStorage.SetDeleteValue('BackupFiles', fBackupFiles, true);
fConfigStorage.SetDeleteValue('KeepFileOpen', fKeepFileOpen, false);
fConfigStorage.SetDeleteValue('MultiPlatform', fMultiPlatform, true);
fConfigStorage.SetDeleteValue('CrossPlatform', fCrossPlatform, true);
fConfigStorage.SetDeleteValue('SupportDelphi', fSupportDelphi, false);
fConfigStorage.SetDeleteValue('SameDfmFile', fSameDfmFile, false);
fConfigStorage.SetDeleteValue('UnitsReplaceMode', integer(fUnitsReplaceMode), 2);
@ -653,7 +653,7 @@ begin
// Settings --> UI. Loaded from ConfigSettings earlier.
BackupCheckBox.Checked :=fBackupFiles;
KeepFileOpenCheckBox.Checked :=fKeepFileOpen;
MultiPlatformCheckBox.Checked :=fMultiPlatform;
CrossPlatformCheckBox.Checked :=fCrossPlatform;
SupportDelphiCheckBox.Checked :=fSupportDelphi;
SameDfmCheckBox.Checked :=fSameDfmFile;
UnitReplaceComboBox.ItemIndex :=integer(fUnitsReplaceMode);
@ -668,7 +668,7 @@ begin
// UI --> Settings. Will be saved to ConfigSettings later.
fBackupFiles :=BackupCheckBox.Checked;
fKeepFileOpen :=KeepFileOpenCheckBox.Checked;
fMultiPlatform :=MultiPlatformCheckBox.Checked;
fCrossPlatform :=CrossPlatformCheckBox.Checked;
fSupportDelphi :=SupportDelphiCheckBox.Checked;
fSameDfmFile :=SameDfmCheckBox.Checked;
fUnitsReplaceMode:=TReplaceModeLong(UnitReplaceComboBox.ItemIndex);
@ -801,8 +801,8 @@ begin
KeepFileOpenCheckBox.Caption:=lisKeepFileOpen;
KeepFileOpenCheckBox.Hint:=lisKeepFileOpenHint;
// Target
MultiPlatformCheckBox.Caption:=lisConvertTargetMultiPlatform;
MultiPlatformCheckBox.Hint:=lisConvertTargetMultiPlatformHint;
CrossPlatformCheckBox.Caption:=lisConvertTargetCrossPlatform;
CrossPlatformCheckBox.Hint:=lisConvertTargetCrossPlatformHint;
SupportDelphiCheckBox.Caption:=lisConvertTargetSupportDelphi;
SupportDelphiCheckBox.Hint:=lisConvertTargetSupportDelphiHint;
SameDfmCheckBox.Caption:=lisConvertTargetSameDfmFile;

View File

@ -246,9 +246,9 @@ begin
// Report omitted units as missing, pretend they don't exist here,
if OmitUnit then // but they can have replacements.
fMissingUnits.Add(NewUnitName)
// Report Windows specific units as missing if target is MultiPlatform.
// Report Windows specific units as missing if target is CrossPlatform.
// Needed if work-platform is Windows (kind of a hack).
else if Settings.MultiPlatform and IsWinSpecificUnit(LowNU) then
else if Settings.CrossPlatform and IsWinSpecificUnit(LowNU) then
fMissingUnits.Add(s);
// Check if the unit is not part of project and needs conversion, too.
if Assigned(fOwnerTool.OnCheckUnitForConversion) then
@ -258,7 +258,7 @@ 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).
if Settings.MultiPlatform or not IsWinSpecificUnit(LowNU) then
if Settings.CrossPlatform or not IsWinSpecificUnit(LowNU) then
fMissingUnits.Add(s);
end;
if CodeTool.CurPos.Flag=cafComma then begin
@ -618,7 +618,7 @@ begin
if not CodeTool.AddUnitToSpecificUsesSection(
fUsesSection, fUnitsToAdd[i], '', SrcCache) then exit;
end;
if fIsMainFile or (Settings.MultiPlatform and not Settings.SupportDelphi) then begin
if fIsMainFile or (Settings.CrossPlatform and 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;

View File

@ -547,8 +547,8 @@ resourcestring
lisStartConversion = 'Start Conversion';
lisConvertTarget = 'Target';
lisConvertTargetHint = 'Converter adds conditional compilation to support different targets';
lisConvertTargetMultiPlatform = 'Multi-Platform';
lisConvertTargetMultiPlatformHint = 'Multi-Platform versus Windows-only';
lisConvertTargetCrossPlatform = 'Cross-platform';
lisConvertTargetCrossPlatformHint = 'Cross-platform versus Windows-only';
lisConvertTargetSupportDelphi = 'Support Delphi';
lisConvertTargetSupportDelphiHint = 'Use conditional compilation to support Delphi';
lisConvertTargetSameDfmFile = 'Use the same DFM form file';