Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installer: use new InnoSetup functionality #5421

Open
dscho opened this issue Feb 12, 2025 · 1 comment
Open

installer: use new InnoSetup functionality #5421

dscho opened this issue Feb 12, 2025 · 1 comment

Comments

@dscho
Copy link
Member

dscho commented Feb 12, 2025

In InnoSetup v6.4.0:

  • Added new ExecAndCaptureOutput support function to execute a program or batch file and capture its stdout and stderr outputs separately.

This is of particular interest to me, as it will hopefully allow us to drop the finicky ExecWithCapture() function.

In InnoSetup v6.3:

Support for Arm64 systems improved, and related enhancements

  • Setup now officially supports the installation of x64 apps on Arm64 Windows 11 systems, which are able to run x64 binaries via emulation. To enable your x64 app installers to run properly on Arm64 Windows 11, some minor changes may be needed in your scripts. Most importantly:

    1. In ArchitecturesAllowed and ArchitecturesInstallIn64BitMode, change any use of x64 to x64compatible.
    2. In Check parameters and [Code], change any use of IsX64 to IsX64Compatible.
    3. In [Code], if there are any ProcessorArchitecture = paX64 comparisons, replace them with calls to IsX64Compatible.

    The key difference between x64/IsX64 and the new x64compatible/IsX64Compatible is that the latter matches both x64 Windows and Arm64 Windows 11.

    In most cases, you should make the above changes, because otherwise, users on Arm64 systems may not be able to run your installers. For example, an ArchitecturesAllowed=x64 setting will only allow the installer to run on x64 Windows --- not on Arm64 Windows 11. Or, if you ship x86 and x64 versions of your app in the same installer, the 32-bit x86 version may be chosen instead of the expected x64 version when running on Arm64 Windows 11.

  • The [Setup] section directives ArchitecturesAllowed and ArchitecturesInstallIn64BitMode have been enhanced:

    • Six new architecture identifiers have been introduced. Briefly:
      • arm32compatible matches systems capable of running 32-bit Arm binaries.
      • x64compatible matches systems capable of running x64 binaries.
      • x64os matches systems running x64 Windows only. (Equivalent to the existing x64 identifier, which is now deprecated.)
      • x86compatible matches systems capable of running 32-bit x86 binaries.
      • x86os matches systems running 32-bit x86 Windows only. (Equivalent to the existing x86 identifier.)
      • win64 matches systems running 64-bit Windows, regardless of architecture.See the new Architecture Identifiers help topic for further details on each.
    • Boolean expressions are now supported. Through use of the and operator, for example, it is possible to require two architecture identifiers to match at the same time. See the ArchitecturesAllowed help topic for usage examples.
  • The x64 architecture identifier is now deprecated. If it is used, the compiler will issue a warning and substitute x64os, which has the same effect. But as mentioned above, in most cases, scripts should be changed to use x64compatible because it matches both x64 Windows and Arm64 Windows 11.

  • The 64-bit example scripts (64Bit*.iss) have all been updated to use x64compatible as preferred.

  • Certain 64-bit functionality that previously only worked on x64 Windows now works on Arm64 Windows 11 as well. This includes:

    • The Permissions parameter of the [Dirs] section when running in 64-bit install mode.
    • The Permissions parameter of the [Files] section when running in 64-bit install mode or when the 64bit flag is used.
    • The Permissions parameter of the [Registry] section when running in 64-bit install mode or when the value of the Root parameter ends in 64.
    • The regtypelib flag of the [Files] section when running in 64-bit install mode or when the 64bit flag is used.Note that all of the above remains unsupported on Arm64 Windows 10.
  • Setup now logs the machine types supported by the system --- that is, what types of EXEs can be executed, either natively or via emulation. For example, when running on an Arm64 Windows 11 system, it logs: Machine types supported by system: x86 x64 Arm32 Arm64.

  • The OnlyOnTheseArchitectures message is not used anymore. Instead, the WindowsVersionNotSupported message is now shown when Setup is started on an architecture that is not allowed by the ArchitecturesAllowed expression. (But please do not remove the message from translation files.)

  • Pascal Scripting change: Added new IsArm32CompatibleIsX64CompatibleIsX64OSIsX86Compatible, and IsX86OS support functions. The IsX64 support function still exists but is now deprecated as explained above. Example testing all architecture identifiers:

    [Code]
    function InitializeSetup: Boolean;
    begin
    if IsArm32Compatible then Log('IsArm32Compatible');
    if IsArm64 then Log('IsArm64');
    if IsX64OS then Log('IsX64OS');
    if IsX64Compatible then Log('IsX64Compatible');
    if IsX86 then Log('IsX86');
    if IsX86OS then Log('IsX86OS');
    if IsX86Compatible then Log('IsX86Compatible');
    if IsWin64 then Log('IsWin64');
    Result := True;
    end;

Would be nice to add better Windows/ARM64 support (even though it seems that Delphi, i.e. the development environment underlying InnoSetup, does not have Windows/ARM64 target support yet).

@rimrul
Copy link
Member

rimrul commented Feb 15, 2025

I've started some work for this at git-for-windows/build-extra#593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants