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>
|
2023-11-23 23:23:57 -08:00
|
|
|
VersionInfoVersion=<VERSION>
|
2021-01-28 12:53:45 -08:00
|
|
|
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
|
2022-09-17 14:04:59 -07:00
|
|
|
SignTool=signtool
|
|
|
|
SignedUninstaller=yes
|
2022-10-26 04:31:03 -07:00
|
|
|
CloseApplications=no
|
2021-01-28 12:53:45 -08:00
|
|
|
|
|
|
|
[Files]
|
2022-09-17 14:04:59 -07:00
|
|
|
Source: "bin\oh-my-posh.exe"; DestDir: "{app}\bin"; Flags: sign
|
2021-01-28 12:53:45 -08:00
|
|
|
Source: "bin\themes\*"; DestDir: "{app}\themes"
|
|
|
|
|
|
|
|
[Registry]
|
2022-04-28 14:30:52 -07:00
|
|
|
Root: "HKA"; Subkey: "{code:GetEnvironmentKey}"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; Check: NeedsAddPathHKA(ExpandConstant('{app}\bin'))
|
|
|
|
Root: "HKA"; Subkey: "{code:GetEnvironmentKey}"; ValueType: string; ValueName: "POSH_THEMES_PATH"; ValueData: {app}\themes; Flags: preservestringtype
|
2023-05-06 11:23:32 -07:00
|
|
|
Root: "HKA"; Subkey: "{code:GetEnvironmentKey}"; ValueType: string; ValueName: "POSH_INSTALLER"; ValueData: {param:installer|manual}; Flags: preservestringtype
|
2021-01-28 12:53:45 -08:00
|
|
|
|
|
|
|
[Code]
|
2022-04-28 14:30:52 -07:00
|
|
|
function GetEnvironmentKey(Param: string): string;
|
2021-01-28 12:53:45 -08:00
|
|
|
begin
|
2022-04-28 14:30:52 -07:00
|
|
|
if IsAdminInstallMode then
|
|
|
|
Result := 'System\CurrentControlSet\Control\Session Manager\Environment'
|
|
|
|
else
|
|
|
|
Result := 'Environment';
|
2021-01-28 12:53:45 -08:00
|
|
|
end;
|
2022-04-28 14:30:52 -07:00
|
|
|
|
|
|
|
function NeedsAddPathHKA(Param: string): boolean;
|
|
|
|
var
|
|
|
|
OrigPath: string;
|
|
|
|
begin
|
|
|
|
if not RegQueryStringValue(HKA, GetEnvironmentKey(''), '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;
|
2021-01-28 12:53:45 -08:00
|
|
|
end;
|