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
10 changes: 8 additions & 2 deletions client/source/DelphiLint.IDEContext.pas
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ function BuildDelphiLintFileLogger: ILogger;
LogDir: string;
LogPath: string;
StartDate: string;
ProductVersion: string;
begin
LogDir := TPath.Combine(TPath.GetHomePath, 'DelphiLint\logs');
ProductVersion := (BorlandIDEServices as IOTAServices).ExpandRootMacro('$(ProductVersion)');
LogDir := TPath.Combine(TPath.GetHomePath, 'DelphiLint\' + ProductVersion + '\logs');
TDirectory.CreateDirectory(LogDir);
DateTimeToString(StartDate, 'yyyy-mm-dd-hh-mm-ss', Now);
LogPath := TPath.Combine(LogDir, Format('delphilint-client-%s.log', [StartDate]));
Expand All @@ -265,11 +267,15 @@ function BuildDelphiLintFileLogger: ILogger;
//______________________________________________________________________________________________________________________

constructor TIDELintContext.Create;
var
ProductVersion: string;
begin
inherited;
FPlugin := TIDEPlugin.Create(GetIDEServices);

FSettingsDir := TPath.Combine(TPath.GetHomePath, 'DelphiLint');
ProductVersion := FIDEServices.ExpandRootMacro('$(ProductVersion)');

FSettingsDir := TPath.Combine(TPath.GetHomePath, 'DelphiLint\' + ProductVersion);
FSettings := TLintSettings.Create(TPath.Combine(FSettingsDir, 'delphilint.ini'));

Log.Info('DelphiLint started at %s', [DateToISO8601(Now)]);
Expand Down
2 changes: 1 addition & 1 deletion scripts/TEMPLATE_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ProgressPreference = "SilentlyContinue"
Write-Host -ForegroundColor Red "This script is a template. Do not run it directly."
Exit 1
##{ENDREPLACE}##
$DelphiLintFolder = Join-Path $env:APPDATA "DelphiLint"
$DelphiLintFolder = Join-Path $env:APPDATA "DelphiLint\$RegistryVersion\"
$BinFolder = (Join-Path $DelphiLintFolder "bin")

function New-AppDataPath {
Expand Down