Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LazarusSource/CLICommands.pas
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ TCLICommandProcessor = class
function GetDriveSize(const GivenSize: String): Cardinal;
procedure ShowHelp;
procedure ListCatalogueEx(const Mode: String);
procedure LoadContextSettings;
// Command handlers
procedure CmdAccess(const Params: TStringArray);
procedure CmdAdd(const Params: TStringArray);
Expand Down Expand Up @@ -174,6 +175,21 @@ implementation

{ TCLICommandProcessor }

procedure TCLICommandProcessor.LoadContextSettings;
begin
FContext.CreateINF := FSettings.GetBool('CreateINF', True);
FContext.AddImpliedAttributes := FSettings.GetBool('AddImpliedAttributes', True);
FContext.HideDEL := FSettings.GetBool('Hide_CDR_DEL', True);
FContext.ScanSubDirs := FSettings.GetBool('Scan_SubDirs', True);
FContext.OpenDOS := FSettings.GetBool('Open_DOS', True);
FContext.CreateDSC := FSettings.GetBool('Create_DSC', False);
FContext.DFSZeroSecs := FSettings.GetBool('DFS_Zero_Sectors', False);
FContext.DFSBeyondEdge := FSettings.GetBool('DFS_Beyond_Edge', True);
FContext.DFSAllowBlank := FSettings.GetBool('DFS_Allow_Blanks', False);
FContext.SparkIsFS := FSettings.GetBool('Spark_Is_FS', True);
FContext.ADFSInterleave := FSettings.GetInt ('ADFS_L_Interleave', 0);
end;

constructor TCLICommandProcessor.Create;
begin
inherited Create;
Expand All @@ -183,6 +199,7 @@ constructor TCLICommandProcessor.Create;
FOwnsSettings := True;
FConsoleWidth := 80;
FUseColors := True;
LoadContextSettings;
end;

constructor TCLICommandProcessor.Create(AContext: TDiscImageContext;
Expand All @@ -195,6 +212,7 @@ constructor TCLICommandProcessor.Create(AContext: TDiscImageContext;
FOwnsSettings := False;
FConsoleWidth := 80;
FUseColors := True;
LoadContextSettings;
end;

destructor TCLICommandProcessor.Destroy;
Expand Down Expand Up @@ -1561,7 +1579,10 @@ procedure TCLICommandProcessor.CmdConfig(const Params: TStringArray);
end;
end;
if Ok then
begin
LoadContextSettings;
WriteLn('Configuration option set.')
end
else
WriteLnColored('Invalid configuration option.', clRed);
end
Expand Down
318 changes: 0 additions & 318 deletions LazarusSource/ConsoleAppUnit.pas

This file was deleted.

Loading