I'm preparing a window installer for my nodewebkit application. It's an app that use Three.js, so DirectX is required.
How can I modify my installer.iss to install DirectX before (or after, isn't important) my app?
I have:
[Code]
function installDirectX() : Boolean;
begin
....
end;
[Run]
Filename "{app}\{#MyAppName}"; Description: "...."; Flags: nowait postinstall skipfsilent
more specifications
basically I want to include directx.exe in installer but I want also to launch directx.exe (only if NOT already installed -but this is a plus-)
update
As RobeN suggests I try:
[Files]
Source: "path\dxsetup.exe"; DestDir: "{app}"
[Run]
Filename: "dxsetup.exe"; WorkingDir: "{app}"; Parameters: "/silent"; Flags: waitilterminated skipifdoesntexist; StatusMsg: "Installing Microsoft DirectX..."
But still doesn't work..
Solution 1:
This launch (always) DirectX installer after App installation.
[Files]
Source: "dxsetup.exe"; DestDir: "{app}"; AfterInstall: DirecXinstaller
[Code]
procedure DirecXinstaller;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{app}\dxsetup.exe'), '', '', SW_SHOWNORMAL,
ewWaitUntilTerminated, ResultCode)
then
MsgBox('Other installer failed to run!' + #13#10 +
SysErrorMessage(ResultCode), mbError, MB_OK);
end;