<commit_before>[Setup]
AppName=SQFLint
AppPublisher=Kamen
AppPublisherURL=http://sqflint.zipek.cz
AppVersion=0.5
DefaultDirName={pf}\SQFLint
UninstallDisplayIcon={app}\sqflint.exe
OutputDir=dist\packages
OutputBaseFilename=sqflint-install
ChangesEnvironment=yes
SetupIconFile=dist-src\sqflint.ico

[CustomMessages]
AppAddPath=Add application directory to your environmental path

[Tasks]
Name: modifypath; Description:{cm:AppAddPath};

[Files]
Source: "dist\*"; DestDir: "{app}"; Flags: recursesubdirs

[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
    ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \
    Check: NeedsAddPath('{app}'); Tasks: modifypath

[Code]

function NeedsAddPath(Param: string): boolean;
var
  OrigPath: string;
begin
  if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
    'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
    'Path', OrigPath)
  then begin
    Result := True;
    exit;
  end;
  // look for the path with leading and trailing semicolon
  // Pos() returns 0 if not found
  Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;<commit_msg>Incerased installer version.<commit_after>[Setup]
AppName=SQFLint
AppPublisher=Kamen
AppPublisherURL=http://sqflint.zipek.cz
AppVersion=0.5.1
DefaultDirName={pf}\SQFLint
UninstallDisplayIcon={app}\sqflint.exe
OutputDir=dist\packages
OutputBaseFilename=sqflint-install
ChangesEnvironment=yes
SetupIconFile=dist-src\sqflint.ico

[CustomMessages]
AppAddPath=Add application directory to your environmental path

[Tasks]
Name: modifypath; Description:{cm:AppAddPath};

[Files]
Source: "dist\*"; DestDir: "{app}"; Flags: recursesubdirs

[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
    ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \
    Check: NeedsAddPath('{app}'); Tasks: modifypath

[Code]

function NeedsAddPath(Param: string): boolean;
var
  OrigPath: string;
begin
  if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
    'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
    'Path', OrigPath)
  then begin
    Result := True;
    exit;
  end;
  // look for the path with leading and trailing semicolon
  // Pos() returns 0 if not found
  Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;
{'fraction_non_alphanumeric': 0.13192389006342495, 'fraction_numerical': 0.0038054968287526427, 'mean_word_length': 5.7025495750708215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3581015', 'n_tokens_mistral': 820, 'n_tokens_neox': 781, 'n_words': 179}