3
votes

I started to use Inno Setup as I thought the Pascal Scripting would make it a lot easier for me to do custom stuff, compared to NSIS. However, it seems that there is no documentation anywhere on the Web? The official Wiki has been deleted and I can't find any API documentation. There was an earlier question (3 years-old, an eternity!) which ended in the sad statement that nothing existed.

So far I was able to get help (mostly on Stackoverflow ;-)) each time I wanted to do something specific but I don't want to go accross forums each time I want to do something. My problem right now is to create a directory if it doesn't exist, and I haven't find anyone asking this question yet. So I'm asking. If you know how to do it, can you please tell me (how to do it ;-)) and where you learnt it?

Thanks!

1
In fact, you have two questions here! - jachguate
Yes I know. Though the main question was about locating the documentation, you can consider the second one as the "application exercise" ;-) ¡Muchas gracias para tu respuestas! :) - Matthieu
@Mattieu no hay de qué, hombre, es un gusto, me alegra ser de alguna ayuda ;) - jachguate

1 Answers

3
votes

Pascal script syntax is very close to the Pascal/Delphi syntax, so you have a lot of documentation in the Delphi DocWiki and Free pascal documentation about it.

The best place I know about inno-setup specific pascal script function support is the PascalScript section in the Inno Setup Help File, the most relevant sections are:

As for your last question, take a look at this:

var
  DocPath: string;
  DirPath: string;
begin
  DocPath := ExpandConstant('{userdocs}');
  DirPath := DocPath + '\ISTest';
  if not DirExists(DirPath) then
  begin
    if not CreateDir(DirPath) then
       MsgBox(SysErrorMessage(DLLGetLastError), mbError, mb_Ok);
  end;
end;

Where I learned it? I'm a Delphi developer, and the aim of pascal script is to be close to Delphi, so I think I really learned it by learning Delphi. Nowadays, before to take a look at the documentation, I try to do what I want to do a la Delphi, and if I fail doing so, I resort to documentation as a last resource.