On the recommendation of several posts here on SO, I've been working with the InnoTools Downloader to try to install a 3rd party dependency for our app during the Install script in Inno setup.
Unfortunately the InnoTools Downloader hasn't been updated in a few years, and is starting to look like it's incompatible with the current Inno Tools setup (5.5.2 (u) on my machine at present). The PChar parameters in ITD have been replaced by PAnsiChar parameters, and when I try to run the various ITD_xxx procedures it gives me varying degrees of fail:
ITD_DownloadFiles
gives a type mismatch error and won't compile in Inno SetupITD_DownloadFile
compiles, but the file that shows up is 6KB in length and not runnable.
Has anyone gotten ITP to run with newer Inno (post-5.3.0) unicode versions? Or should I look around for another solution?
EDIT Just to clarify things a bit, I have tried going into the it_download.iss file and replacing all instances of PChar with PAnsiChar. This got me past the compile errors when I first tried to integrate ITD with my setup script.
Here is a sample section of the Inno script:
[Code]
procedure InitializeWizard();
begin
ITD_Init; // initialize the InnoTools Downloader
// install 3rd party tool (ex. Git) from the internet.
if ITD_DownloadFile('http://git-scm.com/download/win',expandconstant('{tmp}\GitInstaller.exe'))=ITDERR_SUCCESS then begin
MsgBox(expandconstant('{tmp}\GitInstaller.exe'), mbInformation, MB_OK);
Exec(ExpandConstant('{tmp}\GitInstaller.exe'), '', '', SW_SHOW, ewWaitUntilTerminated, tmpResult);
end
end;
When this is run, it will bring up a dialog stating where it "downloaded" and stored the file -- on my machine it's in a subdirectory of c:\Users\\AppData\Local\Temp. This file is 6KB, as opposed to the file downloaded from http://git-scm.com/download/win, which is currently 15,221KB.
The ITP_DownloadAfter
method gives a similar result.
PChar
is the equivalent of D2009 and laterPAnsiChar
, but without specifics of the problem you're having it's hard to recommend a solution. – Ken WhitePChar
toPAnsiChar
you must replacestring
withAnsiString
. – TLamaPChar
withPAnsiChar
andstring
withAnsiString
and tried the code you posted. The problem is now that you're downloading a web site instead of a GIT installer binary. Check the content of the downloaded file. It's a HTML document. – TLama