diff --git a/developer/src/tike/actions/dmActionsMain.pas b/developer/src/tike/actions/dmActionsMain.pas
index 163e9ce7a08..79dd2ea0394 100644
--- a/developer/src/tike/actions/dmActionsMain.pas
+++ b/developer/src/tike/actions/dmActionsMain.pas
@@ -269,6 +269,9 @@ implementation
Keyman.Developer.UI.Project.ProjectFileUI,
Keyman.Developer.UI.Project.ProjectUI,
Keyman.Developer.UI.Project.UfrmNewProject,
+ Keyman.Developer.UI.Project.UfrmProject,
+ Keyman.Developer.UI.Project.UfrmProjectSettings,
+ Keyman.Developer.UI.Project.UfrmProjectSettings20,
GlobalProxySettings,
RegistryKeys,
TextFileFormat,
@@ -291,8 +294,6 @@ implementation
UfrmOSKEditor,
UfrmPackageEditor,
UmodWebHttpServer,
- Keyman.Developer.UI.Project.UfrmProject,
- Keyman.Developer.UI.Project.UfrmProjectSettings,
Upload_Settings,
utilexecute,
UfrmMDIChild;
@@ -630,12 +631,16 @@ procedure TmodActionsMain.CloseProject;
end;
procedure TmodActionsMain.actProjectSettingsExecute(Sender: TObject);
+var
+ frm: TForm;
begin
- with TfrmProjectSettings.Create(Screen.ActiveForm) do // I4688
+ if FGlobalProject.Options.Version = pv10
+ then frm := TfrmProjectSettings.Create(Screen.ActiveForm) // I4688
+ else frm := TfrmProjectSettings20.Create(Screen.ActiveForm);
try
- ShowModal;
+ frm.ShowModal;
finally
- Free;
+ frm.Free;
end;
end;
diff --git a/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.dfm b/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.dfm
new file mode 100644
index 00000000000..d36183334d3
--- /dev/null
+++ b/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.dfm
@@ -0,0 +1,122 @@
+object frmProjectSettings20: TfrmProjectSettings20
+ Left = 0
+ Top = 0
+ BorderStyle = bsDialog
+ Caption = 'Project Settings'
+ ClientHeight = 219
+ ClientWidth = 418
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lblOutputPath: TLabel
+ Left = 16
+ Top = 19
+ Width = 59
+ Height = 13
+ Caption = '&Output path'
+ FocusControl = editOutputPath
+ end
+ object Label2: TLabel
+ Left = 81
+ Top = 73
+ Width = 64
+ Height = 13
+ Caption = 'Placeholders:'
+ end
+ object Label3: TLabel
+ Left = 151
+ Top = 73
+ Width = 77
+ Height = 13
+ Caption = '$PROJECTPATH'
+ end
+ object Label6: TLabel
+ Left = 248
+ Top = 73
+ Width = 122
+ Height = 13
+ Caption = 'Path that the project is in'
+ end
+ object lblSourcePath: TLabel
+ Left = 16
+ Top = 46
+ Width = 58
+ Height = 13
+ Caption = '&Source path'
+ FocusControl = editSourcePath
+ end
+ object editOutputPath: TEdit
+ Left = 81
+ Top = 16
+ Width = 320
+ Height = 21
+ TabOrder = 0
+ end
+ object cmdOK: TButton
+ Left = 131
+ Top = 186
+ Width = 75
+ Height = 25
+ Caption = 'OK'
+ Default = True
+ TabOrder = 6
+ OnClick = cmdOKClick
+ end
+ object cmdCancel: TButton
+ Left = 212
+ Top = 186
+ Width = 75
+ Height = 25
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 7
+ end
+ object chkCompilerWarningsAsErrors: TCheckBox
+ Left = 81
+ Top = 114
+ Width = 232
+ Height = 17
+ Caption = 'Treat compiler &hints and warnings as errors'
+ TabOrder = 3
+ end
+ object chkWarnDeprecatedCode: TCheckBox
+ Left = 81
+ Top = 137
+ Width = 160
+ Height = 17
+ Caption = 'Warn on &deprecated code'
+ TabOrder = 4
+ end
+ object chkCheckFilenameConventions: TCheckBox
+ Left = 81
+ Top = 160
+ Width = 160
+ Height = 17
+ Caption = '&Check filename conventions'
+ TabOrder = 5
+ end
+ object editSourcePath: TEdit
+ Left = 81
+ Top = 43
+ Width = 320
+ Height = 21
+ TabOrder = 1
+ end
+ object chkBuildMetadataFiles: TCheckBox
+ Left = 81
+ Top = 92
+ Width = 232
+ Height = 17
+ Caption = 'Build &metadata files for Keyman Cloud'
+ TabOrder = 2
+ end
+end
diff --git a/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.pas b/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.pas
new file mode 100644
index 00000000000..2bda4a3bb66
--- /dev/null
+++ b/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.pas
@@ -0,0 +1,82 @@
+(*
+ Name: Keyman.Developer.UI.Project.UfrmProjectSettings
+ Copyright: Copyright (C) SIL International.
+ Documentation:
+ Description:
+ Create Date: 4 May 2015
+
+ Modified Date: 24 Aug 2015
+ Authors: mcdurdin
+ Related Files:
+ Dependencies:
+
+ Bugs:
+ Todo:
+ Notes:
+ History: 04 May 2015 - mcdurdin - I4688 - V9.0 - Add build path to project settings
+ 24 Aug 2015 - mcdurdin - I4865 - Add treat hints and warnings as errors into project
+ 24 Aug 2015 - mcdurdin - I4866 - Add warn on deprecated features to project and compile
+
+*)
+unit Keyman.Developer.UI.Project.UfrmProjectSettings20; // I4688
+
+interface
+
+uses
+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
+ Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
+
+type
+ TfrmProjectSettings20 = class(TForm)
+ lblOutputPath: TLabel;
+ editOutputPath: TEdit;
+ Label2: TLabel;
+ cmdOK: TButton;
+ cmdCancel: TButton;
+ Label3: TLabel;
+ Label6: TLabel;
+ chkCompilerWarningsAsErrors: TCheckBox;
+ chkWarnDeprecatedCode: TCheckBox;
+ chkCheckFilenameConventions: TCheckBox;
+ lblSourcePath: TLabel;
+ editSourcePath: TEdit;
+ chkBuildMetadataFiles: TCheckBox;
+ procedure FormCreate(Sender: TObject);
+ procedure cmdOKClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+implementation
+
+{$R *.dfm}
+
+uses
+ Keyman.Developer.System.Project.Project;
+
+procedure TfrmProjectSettings20.cmdOKClick(Sender: TObject);
+begin
+ FGlobalProject.Options.BuildPath := Trim(editOutputPath.Text);
+ FGlobalProject.Options.SourcePath := Trim(editSourcePath.Text);
+ FGlobalProject.Options.SkipMetadataFiles := not chkBuildMetadataFiles.Checked;
+ FGlobalProject.Options.CompilerWarningsAsErrors := chkCompilerWarningsAsErrors.Checked; // I4865
+ FGlobalProject.Options.WarnDeprecatedCode := chkWarnDeprecatedCode.Checked; // I4866
+ FGlobalProject.Options.CheckFilenameConventions := chkCheckFilenameConventions.Checked;
+ FGlobalProject.Save;
+ ModalResult := mrOk;
+end;
+
+procedure TfrmProjectSettings20.FormCreate(Sender: TObject);
+begin
+ editOutputPath.Text := FGlobalProject.Options.BuildPath;
+ editSourcePath.Text := FGlobalProject.Options.SourcePath;
+ chkBuildMetadataFiles.Checked := not FGlobalProject.Options.SkipMetadataFiles;
+ chkCompilerWarningsAsErrors.Checked := FGlobalProject.Options.CompilerWarningsAsErrors; // I4865
+ chkWarnDeprecatedCode.Checked := FGlobalProject.Options.WarnDeprecatedCode; // I4866
+ chkCheckFilenameConventions.Checked := FGlobalProject.Options.CheckFilenameConventions;
+ if editOutputPath.Text = '' then editOutputPath.Text := '$PROJECTPATH';
+end;
+
+end.
diff --git a/developer/src/tike/tike.dpr b/developer/src/tike/tike.dpr
index 34cfd924169..b7e702f09d7 100644
--- a/developer/src/tike/tike.dpr
+++ b/developer/src/tike/tike.dpr
@@ -31,7 +31,7 @@ uses
Keyman.Developer.System.Project.kpsProjectFile in 'project\Keyman.Developer.System.Project.kpsProjectFile.pas',
Keyman.Developer.System.Project.kmxProjectFile in 'project\Keyman.Developer.System.Project.kmxProjectFile.pas',
Keyman.Developer.System.Project.modelTsProjectFile in 'project\Keyman.Developer.System.Project.modelTsProjectFile.pas',
- Keyman.Developer.UI.Project.UfrmProjectSettings in 'project\Keyman.Developer.UI.Project.UfrmProjectSettings.pas' {frmProjectSettings},
+ Keyman.Developer.UI.Project.UfrmProjectSettings20 in 'project\Keyman.Developer.UI.Project.UfrmProjectSettings20.pas' {frmProjectSettings20},
Keyman.Developer.UI.Project.ProjectFileUI in 'project\Keyman.Developer.UI.Project.ProjectFileUI.pas',
Keyman.Developer.UI.Project.ProjectUI in 'project\Keyman.Developer.UI.Project.ProjectUI.pas',
Keyman.Developer.UI.Project.ProjectUIFileType in 'project\Keyman.Developer.UI.Project.ProjectUIFileType.pas',
@@ -287,7 +287,8 @@ uses
Keyman.Developer.System.Project.xmlLdmlProjectFileAction in 'project\Keyman.Developer.System.Project.xmlLdmlProjectFileAction.pas',
Keyman.Developer.UI.Project.xmlLdmlProjectFileUI in 'project\Keyman.Developer.UI.Project.xmlLdmlProjectFileUI.pas',
Keyman.Developer.UI.UfrmLdmlKeyboardEditor in 'child\Keyman.Developer.UI.UfrmLdmlKeyboardEditor.pas' {frmLdmlKeyboardEditor},
- dmActionsKeyboardEditor in 'actions\dmActionsKeyboardEditor.pas' {modActionsKeyboardEditor: TDataModule};
+ dmActionsKeyboardEditor in 'actions\dmActionsKeyboardEditor.pas' {modActionsKeyboardEditor: TDataModule},
+ Keyman.Developer.UI.Project.UfrmProjectSettings in 'project\Keyman.Developer.UI.Project.UfrmProjectSettings.pas' {frmProjectSettings};
{$R *.RES}
{$R ICONS.RES}
@@ -317,8 +318,7 @@ begin
Application.Title := 'Keyman Developer';
if TikeActive then Exit;
Application.CreateForm(TmodWebHttpServer, modWebHttpServer);
- Application.CreateForm(TmodActionsKeyboardEditor, modActionsKeyboardEditor);
- try
+ try
Application.CreateForm(TfrmKeymanDeveloper, frmKeymanDeveloper);
Application.Run;
finally
diff --git a/developer/src/tike/tike.dproj b/developer/src/tike/tike.dproj
index 397140f1652..cb9b54134cd 100644
--- a/developer/src/tike/tike.dproj
+++ b/developer/src/tike/tike.dproj
@@ -162,8 +162,8 @@
-
-
+
+
@@ -572,6 +572,10 @@
dfm
TDataModule
+
+
+ dfm
+
Cfg_2