Skip to content

Commit

Permalink
Fix drive installer path
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindaugas Veblauskas committed Jan 30, 2024
1 parent 6d12891 commit 2e4e250
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Setup/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define Hash ""
#define VersionFolder "v" + MyAppVersion
#define AppFolder "Proton\VPN"
#define SourcePath GetEnv("BUILD_PATH")
#define SourcePath GetEnv("BUILD_PATH")
#define IsBTISource SourcePath == "src/bin/win-x64/BTI/publish"
#if IsBTISource
#define OutputBaseSuffix "_BTI"
Expand Down Expand Up @@ -140,7 +140,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}";
Name: "installProtonDrive"; Description: "{cm:InstallProtonDriveTitle}"; Check: ShouldDisplayProtonDriveCheckbox;

[Run]
Filename: "{app}\{#VersionFolder}\{#ProtonDriveDownloaderName}"; Parameters: "{autopf}\Proton\Drive"; Tasks: installProtonDrive; Flags: postinstall nowait runascurrentuser skipifsilent;
Filename: "{app}\{#VersionFolder}\{#ProtonDriveDownloaderName}"; Parameters: "{code:GetDriveInstallPath}"; Tasks: installProtonDrive; Flags: postinstall nowait runascurrentuser skipifsilent;

[Languages]
Name: "en_US"; MessagesFile: "compiler:Default.isl,Strings\Default.isl"
Expand Down Expand Up @@ -479,6 +479,11 @@ begin
end;
end;
function GetDriveInstallPath(value: String): String;
begin
Result := '"' + ExpandConstant('{autopf}\Proton\Drive') + '"';
end;
function ShouldDisplayProtonDriveCheckbox: Boolean;
begin
Result := IsProductInstalled('{F3B95BD2-1311-4B82-8B4A-B9EB7C0500ED}') = 0;
Expand Down

0 comments on commit 2e4e250

Please sign in to comment.