forked from jrsoftware/issrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isportable.iss
37 lines (33 loc) · 876 Bytes
/
isportable.iss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// -- IsPortable.iss --
// Include file with support functions for portable mode
//
[Code]
function PortableCheck: Boolean;
begin
Result := ExpandConstant('{param:portable|0}') = '1';
end;
function GetAppId(Param: String): String;
begin
Result := Param;
if PortableCheck then
Result := Result + ' Portable';
end;
function GetDefaultDirName(Param: String): String;
begin
if PortableCheck then
Result := '{autodesktop}'
else
Result := '{autopf}';
Result := ExpandConstant(AddBackslash(Result) + Param);
end;
<event('InitializeWizard')>
procedure IsPortableInitializeWizard;
begin
if PortableCheck then
WizardForm.NoIconsCheck.Checked := True;
end;
<event('ShouldSkipPage')>
function IsPortableShouldSkipPage(PageID: Integer): Boolean;
begin
Result := (PageID = wpSelectProgramGroup) and PortableCheck;
end;