Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Please support fully headless execution

187 views
Skip to first unread message

Björn Kautler

unread,
Aug 11, 2024, 12:51:53 AM8/11/24
to innosetup
Hi

To build an InnoSetup-based installer on non-Windows systems, I usually do so through wine which worked fine many years already on various *nix systems.

Now I tried to setup this on GitHub Actions.
I know that the Windows runners have InnoSetup installed, but I also want to execute the build on the *nix runners to verify the build is still working as intended also on those OS.

The problem is, that the GHA runners of course are headless and it seems IS is not fully headless compatible even if all message boxes are suppressed.

I start the IS installer with the command

wine innosetup-6.3.3.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CURRENTUSER /LOG=is-install.log

As far as I understood this should be fully unattended and when I execute the same on WIndows indeed IS is installed without any dialog popping up.

But when I do this through wine on the headless system, it does not work.

Where the logs of the wine try and the windows install differ are from her on:

2024-08-11 04:28:23.170   64-bit install mode: No

On Windows I then get:

2024-08-11 04:28:23.171   Created temporary directory: ...\AppData\Local\Temp\is-M31ES.tmp
2024-08-11 04:28:23.381   Extracting temporary file: ...\AppData\Local\Temp\is-M31ES.tmp\iscrypt.ico
2024-08-11 04:28:23.423   Found 19 files to register with RestartManager.

While on wine I get:

2024-08-11 02:33:55.261   Created protected temporary directory: C:\users\runner\Temp\is-O5O1H.tmp
2024-08-11 02:33:55.269   Exception message:
2024-08-11 02:33:55.269   Defaulting to OK for suppressed message box (OK):
                          System Error.  Code: 120.
                          Call not implemented.
2024-08-11 02:33:55.269   Deinitializing Setup.
2024-08-11 02:33:55.270   Log closed.

together with wine messages on the console like

002c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.


It would be really nice if the installer would support a true headless unattended installation.

Cheers
Björn

Eivind Bakkestuen

unread,
Aug 11, 2024, 6:58:20 AM8/11/24
to inno...@googlegroups.com
Call not implemented sounds like a Wine problem; have you checked with the Wine maintainers?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/7b1e8209-3d1f-436a-9f9e-fe26c9cced51n%40googlegroups.com.

Björn Kautler

unread,
Aug 11, 2024, 2:23:18 PM8/11/24
to innosetup
I did not.

But the points are:
- If I use Xvfb as X-Server, it works fine
- The Wine output shows that InnoSetup is trying to create a window even though all GUI was disabled and this should not be necessary

So I can work-around the problem using Xvfb of course.
But it would be nicer if this were not necessary as no GUI is needed for the call I made.
So in my opinion it is a bug of InnoSetup that it tries to create a window when it does not need to.

Cheers
Björn

Jordan Russell

unread,
Aug 21, 2024, 5:33:36 PM8/21/24
to inno...@googlegroups.com
On 8/11/24 1:23 PM, Björn Kautler wrote:
> - The Wine output shows that InnoSetup is trying to create a window even
> though all GUI was disabled and this should not be necessary

Windows aren't only used for presenting a GUI; they're also commonly
used for interprocess communication (and it was once the only way to do
IPC).

For example, when an elevated Setup process needs to start a process
without elevation, it sends a WM_COPYDATA message back to the first
(non-elevated) Setup process containing the command line, etc.

You shouldn't need to do a full installation of Inno Setup, though. Just
copy over the compiler and its dependencies (iscc.exe, is*.dll,
Default.isl).

However, running the installer or the compiler under WINE has never been
officially supported -- and especially not a WINE that has core
functionality disabled. It may quit working at any time; we have never
tested new code on WINE, and have never checked if APIs or flags are
supported under WINE before using them.

-JR

Björn Kautler

unread,
Mar 14, 2025, 10:48:58 AMMar 14
to inno...@googlegroups.com
Sorry for the late reply, somehow missed your message Jordan.

Thanks for the explanation.
I'm not a native developer, so was not aware of these intricacies.

Can you elaborate on
> You shouldn't need to do a full installation of Inno Setup, though. Just
> copy over the compiler and its dependencies (iscc.exe, is*.dll,
> Default.isl).
please?

They are not published separately, are they?
Or did you mean I should install IS on windows extract the files and commit them to the project, I'd really like to avoid that.
If there is an ISCC-only ZIP published that could be downloaded and used, I'd be more more than happy to use that instead,
but I was not able to find such a download.

> However, running the installer or the compiler under WINE has never been officially supported

I know, and yet it works fine for decades for me and I hope it will continue to work.
And if it stops working, I hope there is a chance to get it fixed.
And if not, then I will consider alternatives if I really have to. :-)

> and especially not a WINE that has core functionality disabled.

Not sure what you mean with "core functionality disabled".
If you think there is, you should probably open a bug report to wine,
I would do it myself but I don't know what you are talking about.
If you mean the Windows, I don't see where anything is disabled.
If there is a windowing system (either a real one or as I said for example Xvfb as a drop-in) Windows work.
If there is no windowing system, Windows do not work.
Sounds like proper behavior to me.
Wine can hardly by default use something like Xvfb out-of-the-box, as it probably cannot know,
whether the windows are only used work-aroundy like you described or really need to be displayed to a user.

> It may quit working at any time;

And I would be very sad and ask for a fix, probably on WINE side :-)

> we have never tested new code on WINE, and have never checked if APIs or flags are
supported under WINE before using them.

Never too late to add an axis to the test matrix :-D


Cheers
Björn

Eivind Bakkestuen

unread,
Mar 14, 2025, 5:52:32 PMMar 14
to inno...@googlegroups.com
The WINE report from the console, along with the above explanations should be enough for WINE devs to consider your request. Log it with WINE and see what they say.

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.

Björn Kautler

unread,
Mar 14, 2025, 10:19:47 PMMar 14
to inno...@googlegroups.com
Again, I'm not sure what you or Jordan think should be reported.
*I* don't see a wrong behavior of wine.
It finds no windowing system, so no Windows can be opened.
If there is a windowing system, it works.


You received this message because you are subscribed to a topic in the Google Groups "innosetup" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/innosetup/7GVs3eO5DHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/CAH4EOO4jxRBjYG%3D%2BP-ACt9j1s0-2YsAO1zXuM2kw%2BVEL6YjWmg%40mail.gmail.com.

Eivind Bakkestuen

unread,
Mar 15, 2025, 4:54:22 AMMar 15
to inno...@googlegroups.com
Something to test, as I don't know the answer:

Is it possible to run a "very silent" Inno Setup on a Windows Server Core (no GUI) installation?

If yes, then WINE should be able to implement support as well. If no, I'd say you're out of luck.



Jernej Simončič

unread,
Mar 15, 2025, 5:45:51 AMMar 15
to Eivind Bakkestuen on [innosetup]

On Saturday, March 15, 2025, 09:54:04, Eivind Bakkestuen wrote:


Is it possible to run a "very silent" Inno Setup on a Windows Server Core (no GUI) installation?

Server Core still has GUI, just Explorer shell isn't present. Normal windows are still opened fine (including non-silent Inno Setup installs).

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


You can't fall off the floor.
       -- Paul's Law (of Drinking)

Jordan Russell

unread,
Mar 15, 2025, 5:09:36 PMMar 15
to inno...@googlegroups.com
On 3/14/25 9:48 AM, Björn Kautler wrote:
> If there is an ISCC-only ZIP published that could be downloaded and used,
> I'd be more more than happy to use that instead,
> but I was not able to find such a download.

I'm afraid there isn't one, mainly for security reasons: ZIP files can't
be Authenticode-signed, which makes it difficult for a user to tell
whether the file they downloaded has been tampered with. (GPG signatures
*could* be provided, but realistically very few users would take
advantage of that.)

> Not sure what you mean with "core functionality disabled".
> If you think there is, you should probably open a bug report to wine,
> I would do it myself but I don't know what you are talking about.

From the log output you posted, it looks like WINE's CreateWindow API
fails completely when an X server isn't available. While an X server
would be needed to see and interact with a window, requiring an X server
simply to create a window handle doesn't make sense to me. Like I said,
(hidden) windows can be used for IPC.

AFAIK, on a real Windows system, CreateWindow is always available for
use, even in non-interactive services.

-JR

Bill Stewart

unread,
Mar 18, 2025, 11:20:52 AMMar 18
to innosetup
On Friday, March 14, 2025 at 8:48:58 AM UTC-6 Björn Kautler wrote:

Sorry for the late reply, somehow missed your message Jordan.If there is an ISCC-only ZIP published that could be downloaded and used, I'd be more more than happy to use that instead, but I was not able to find such a download.

As stated, there's not one. But you can "extract" the Inno Setup installer using these parameters:

/CURRENTUSER /LANG=English /PORTABLE=1 /NOICONS /TASKS="" /DIR="<directory>" /SILENT

Of course, replace <directory> with the name of the directory you want to extract to.

Below is a sample Windows PowerShell script that creates a .zip file from an Inno Setup installer executable:

----------

#requires -version 5

[CmdletBinding(SupportsShouldProcess,ConfirmImpact = "High")]
param(
  [Parameter(Position = 0,Mandatory)]
  [ValidateNotNullOrEmpty()]
  [String]
  $Path,

  [Parameter(Position = 1)]
  [ValidateNotNullOrEmpty()]
  $Language = "English"
)

function New-TemporaryDirectory {
  do {
    $tempDirName = Join-Path ([IO.Path]::GetTempPath()) `
      ([IO.Path]::GetRandomFileName())
  }
  while ( Test-Path $tempDirName )
  New-Item $tempDirName -ItemType Directory |
    Select-Object -ExpandProperty FullName
}

$InputPath = Resolve-Path $Path -ErrorAction Stop |
  Select-Object -ExpandProperty ProviderPath

$OutputPath = Join-Path (Split-Path $InputPath -Parent) `
  ("{0}.zip" -f [IO.Path]::GetFileNameWithoutExtension($InputPath))

if ( Test-Path $OutputPath ) {
  if ( -not $PSCmdlet.ShouldProcess($OutputPath,"Overwrite file") ) {
    exit
  }
}

$TempDirName = New-TemporaryDirectory

Write-Host "Extracting '$InputPath' to '$TempDirName'"
$StartArgs = @{
  FilePath = $InputPath
  ArgumentList = @(
    ('/CURRENTUSER')
    ('/LANG="{0}"' -f $Language)
    ('/PORTABLE=1')
    ('/NOICONS')
    ('/TASKS=""')
    ('/DIR="{0}"' -f $TempDirName)
    ('/SILENT')
  )
  Wait = $true
  PassThru = $true
}
$Process = Start-Process @StartArgs
if ( $Process.ExitCode ) {
  throw "Error extracting '$InputPath' to '$TempDirName'."
}

if ( Test-Path $OutputPath ) {
  Remove-Item $OutputPath
}

Write-Host "Creating '$OutputPath'"
Compress-Archive (Join-Path $TempDirName "*") $OutputPath

Write-Host "Removing temporary directory '$TempDirName'"
Remove-Item $TempDirName -Recurse

Reply all
Reply to author
Forward
0 new messages