2021-01-28 12:53:45 -08:00
|
|
|
[Setup]
|
2021-06-05 10:27:33 -07:00
|
|
|
AppName=Oh My Posh
|
2021-01-28 12:53:45 -08:00
|
|
|
AppVersion=<VERSION>
|
|
|
|
DefaultDirName={autopf}\oh-my-posh
|
2021-06-05 10:27:33 -07:00
|
|
|
DefaultGroupName=Oh My Posh
|
2021-01-28 12:53:45 -08:00
|
|
|
AppPublisher=Jan De Dobbeleer
|
|
|
|
AppPublisherURL=https://ohmyposh.dev
|
2021-02-15 23:36:37 -08:00
|
|
|
AppSupportURL=https://github.com/JanDeDobbeleer/oh-my-posh/issues
|
2021-01-28 12:53:45 -08:00
|
|
|
LicenseFile="bin\COPYING.txt"
|
|
|
|
OutputBaseFilename=install
|
2021-12-30 06:40:55 -08:00
|
|
|
PrivilegesRequired=lowest
|
2021-12-30 10:02:55 -08:00
|
|
|
PrivilegesRequiredOverridesAllowed=dialog
|
2022-02-21 03:32:54 -08:00
|
|
|
ChangesEnvironment=yes
|
2021-01-28 12:53:45 -08:00
|
|
|
|
|
|
|
[Files]
|
2021-09-14 09:13:33 -07:00
|
|
|
Source: "bin\oh-my-posh.exe"; DestDir: "{app}\bin"
|
2021-01-28 12:53:45 -08:00
|
|
|
Source: "bin\themes\*"; DestDir: "{app}\themes"
|
|
|
|
|
|
|
|
[Registry]
|
|
|
|
Root: "HKCU"; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; Check: NeedsAddPathHKCU(ExpandConstant('{app}\bin'))
|
2022-02-21 03:32:54 -08:00
|
|
|
Root: "HKCU"; Subkey: "Environment"; ValueType: string; ValueName: "POSH_THEMES_PATH"; ValueData: {app}\themes; Flags: preservestringtype
|
2021-01-28 12:53:45 -08:00
|
|
|
|
|
|
|
[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;
|