Inno setup inno安装程序可在sepcific位置浏览和解压缩zip文件
我希望使用户能够在特定位置浏览和解压缩zip文件 要求/步骤:Inno setup inno安装程序可在sepcific位置浏览和解压缩zip文件,inno-setup,Inno Setup,我希望使用户能够在特定位置浏览和解压缩zip文件 要求/步骤: 显示欢迎页面 下一步显示浏览按钮以选择安装目录(DisableDirPage=no) 下一步显示浏览按钮以选择zip文件(JDK) 将步骤3中选择的JDKzip文件解压缩到步骤2中选择的位置,这意味着JDK应该解压缩到用户在步骤2中选择的安装目录中 我的代码有问题: 在第一步之后,我的代码直接跳到第三步,然后跳到第二步 如果我将方法名作为参数传递,则提取zip的代码不起作用。如果我传递位置的硬编码值,它就会工作。我不知道pascal
DisableDirPage=no
)JDK
)JDK
zip文件解压缩到步骤2中选择的位置,这意味着JDK
应该解压缩到用户在步骤2中选择的安装目录中[设置]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
DisableProgramGroupPage=no
DisableWelcomePage=no
DisableDirPage=no
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
[档案]
Source: "{code:GetLicensePath}"; DestDir: "{app}"; Flags: external
Source: "7za.exe"; DestDir: "D:\authorized\Builds\Solo\"; Flags: deleteafterinstall;
[图标]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
[运行]
[守则]
var
Page: TInputFileWizardPage;
DataDir:String;
procedure InitializeWizard();
begin
Page :=
CreateInputFilePage(
wpWelcome,
'Select Zip File Location',
'Where is your Zip file located?',
'Select where Zip file is located, then click Next.');
Page.Add(
'Location of Zip file:',
'*.7z|*.rar|All files|*.*',
'.zip');
// Set initial value (optional)
Page.Values[0] := ExpandConstant('{%USERPROFILE}\Downloads\setup.7z');
;
end;
function GetZipPath(Param: string): string;
begin
DataDir := Page.Values[0];
end;
你能帮帮我吗
Create*
函数的第一个参数决定。因此,将wpcomelcome
更改为wpSelectDir
{{…}}
-这可能就是问题所在。另外,code:
应为小写 Result := Page.Values[0];
Result := Page.Values[0];