Travis, Wine, Innosetup: Error creating window.

Given:

  1. You’re using Travis.
  2. You using Linux runners.
  3. You want to generate and publish a Windows installer for your app.

Seems straightforward enough. Just

  • install Wine
    addons:
      apt:
        packages:
          - wine32
          - wine-stable
    
  • install Innosetup
    wget -q https://jrsoftware.org/download.php/is.exe
    wine is.exe /VERYSILENT /NORESTART
    
  • then run it normally
    wine "$inno_bin" my_install_script.iss
    

However, the catch is that Innosetup really want a display for itself, even when installing silently. So, add

services:
  - xvfb

to .travis.yml.

According to all docs, that should be about enough. Still, it didn’t work for me:

2020-03-03 22:12:41.068   Successfully imported the DLL function. Delay loaded? No
2020-03-03 22:12:41.069   Exception message:
2020-03-03 22:12:41.069   Message box (OK):
                          Error creating window.
2020-03-03 22:12:41.070   User chose -1.
2020-03-03 22:12:41.070   Deinitializing Setup.
2020-03-03 22:12:41.071   Log closed.

After much trial and error, I discovered that Innosetup just would not install on a language: minimal Bionic runner. Apparently it was still missing some libraries. Setting language: java in .travis.yml, however, allowed the build to pass.

Most important are the things they don’t tell you…

Comments