简体   繁体   中英

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. But in order to run it I need JRE.

What can I do (in INNO SETUP) in order to have an installer that contains both applications:

  • JRE
  • My application

I want to install JRE automatically before or after installing my program.

I know that is something about BeforeInstall or AfterInstall .

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). 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.

[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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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