简体   繁体   English

如何在同一个安装程序中包含 2 个 exe 文件(在 INNO 安装程序中)

[英]How to include 2 exe files in the same installer(in INNO setup)

So I made a program in JavaFX and I want to create an installer for it.所以我在 JavaFX 中制作了一个程序,我想为它创建一个安装程序。 But in order to run it I need JRE.但是为了运行它,我需要 JRE。

What can I do (in INNO SETUP) in order to have an installer that contains both applications:我可以做什么(在 INNO SETUP 中)以获得包含两个应用程序的安装程序:

  • JRE JRE
  • My application我的应用程序

I want to install JRE automatically before or after installing my program.我想在安装我的程序之前或之后自动安装 JRE。

I know that is something about BeforeInstall or AfterInstall .我知道这是关于BeforeInstallAfterInstall

This is the part of the code that I think that can help:这是我认为可以提供帮助的代码部分:

[Files]
Source: "C:\Users\Alex\Desktop\cacaca.exe"; DestDir: "{app}"; BeforeInstall: java ('{app}')

[Code]
procedure java();
begin
MsgBox('About to install MyProg.exe as ' + CurrentFileName + '.', mbInformation, MB_OK);
end;

If you want more files installed, then include more [Files] (as needed).如果您想要安装更多文件,请包含更多 [Files](根据需要)。 The Inno Setup Script Wizard (under the "file" menu as "new") should allow you to pick out as many files as you want, if you'd rather click through that than hand-write an installer. Inno 安装脚本向导(在“文件”菜单下为“新建”)应该允许您选择任意数量的文件,如果您宁愿点击它而不是手写安装程序。

[Files]
Source: "C:\Users\Alex\Desktop\java.exe"; DestDir: "{app}/PrivateJava";
Source: "C:\Users\Alex\Desktop\cacaca.exe"; DestDir: "{app}"; BeforeInstall: java('{app}')
Source: "C:\Users\Alex\Desktop\license.docx"; DestDir: "{app}";
Source: "C:\Users\Alex\Desktop\*.dll"; DestDir: "{app}";

[Code]
procedure java();
begin
MsgBox('About to install MyProg.exe as ' + CurrentFileName + '.', mbInformation, MB_OK);
end;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM