mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
9f200a8930
for wsl, a manual install is required(linux install).
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
[Setup]
|
|
AppName=Oh My Posh
|
|
AppVersion=<VERSION>
|
|
DefaultDirName={autopf}\oh-my-posh
|
|
DefaultGroupName=Oh My Posh
|
|
PrivilegesRequired=lowest
|
|
AppPublisher=Jan De Dobbeleer
|
|
AppPublisherURL=https://ohmyposh.dev
|
|
AppSupportURL=https://github.com/JanDeDobbeleer/oh-my-posh/issues
|
|
LicenseFile="bin\COPYING.txt"
|
|
OutputBaseFilename=install
|
|
|
|
[Files]
|
|
Source: "bin\oh-my-posh.exe"; DestDir: "{app}\bin"
|
|
Source: "bin\themes\*"; DestDir: "{app}\themes"
|
|
|
|
[Registry]
|
|
Root: "HKCU"; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; Check: NeedsAddPathHKCU(ExpandConstant('{app}\bin'))
|
|
Root: "HKCU"; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\themes"; Check: NeedsAddPathHKCU(ExpandConstant('{app}\themes'))
|
|
|
|
[Code]
|
|
function NeedsAddPathHKCU(Param: string): boolean;
|
|
var
|
|
OrigPath: string;
|
|
begin
|
|
if not RegQueryStringValue(HKEY_CURRENT_USER,
|
|
'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;
|