1

I have only just realised that the latest version of Inno Setup supports signonce for the[Files] section. This means I no longer need to use my batch file to do it!

As a result, it is possible to take this batch content:

echo Building Help file
CALL "C:\Program Files (x86)\HTML Help Workshop\HHC.EXE" ..\Help\MeetSchedAssist.HHP
echo Copying help file to the release folder
copy ..\Help\MeetSchedAssist.CHM "..\Meeting Schedule Assistant\Release\MeetSchedAssist.CHM"

And perform this action in the Pre Compilation Step? Then I won't need to use my batch file.

I tried this:

[PreCompile]
Name: "C:\Program Files (x86)\HTML Help Workshop\hhc.exe"; Parameters: "..\Help\MeetSchedAssist.HHP"

I realise it does not do the copying. Not worked that out. But when I compile I only see this in the output window:

Compiler Output

It is not clear to me if it has performed the help compilation as I expected to see output. I am running this in Inno Script Studio.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • If you see it process the section, what's the issue? Surely you can see whether the command is actually executed simply by checking if it produced any output? – Nyerguds Feb 23 '18 at 06:56
  • I have decided to continue to use a batch file. All I did was remove the signing lines as they are now handled by the compilation. So the batch compiles the CHM file and then executes Inno Setup compliation. – Andrew Truckle Feb 23 '18 at 08:46
  • Seems sensible, yea. Inno Setup is just an installer builder, not a project build-process manager. – Nyerguds Feb 23 '18 at 09:15

1 Answers1

1

[PreCompile] is special section in Inno Script Studio, such code will not work in standard Inno Setup (any version)!

You have to contact authors of this tool to update/fix this feature, but it looks it was abandoned (the newest version is more than 3 years old).

Consider switching to Visual Studio and compiling scripts using Visual & Installer extension (3rd party: https://marketplace.visualstudio.com/items?itemName=unSignedsro.VisualInstaller).

In Visual Studio you can set Post-Build event(s) and Pre-Build event(s) where you can define any task (like signing, generating docs, copying, or any batch file, ...) to perform before/after the script is compiled.

(credits: I am developer of Visual & Installer, sorry for little promo)

Slappy
  • 5,250
  • 1
  • 23
  • 29
  • Thanks for your answer and info. I am aware of your product and tried it in the past. The issues I have had are that I have to pay as opposed to shareware. And, it lacks any GUI windows as we have with **Inno Script Studio**. Also, I find that AVG constantly flags security issues when Visual Studio signed executables via pre/post build steps of external files. So I no do the signing external to Visual Studio via a batch file. Have you improved your GUI element in your plugin? – Andrew Truckle Feb 23 '18 at 08:49
  • *Visual & Installer* is different than standard Inno Setup editors. There is no GUI, everything is script based so we focus on writing scripts. And it is much simpler because of IntelliSense, code completion, code navigation , Go To features and this is why V&I is more powerful. I know many users expect GUI but it is impossible to cover all features in GUI so the only option is to make great scripting and that is what V&I does. – Slappy Feb 27 '18 at 06:23