inno setup.exe fails with Floating point division by zero on Windows XP

后端 未结 3 1482
难免孤独
难免孤独 2021-02-20 02:37

I have setup an inno setup script that installs my application. The resulting setup.exe will install properly on windows vista/7 but fails with the division by zero error on wi

3条回答
  •  爱一瞬间的悲伤
    2021-02-20 03:04

    Supplement to Dan's answer that wouldn't fit in a comment...

    For the wizard image files, I tried pretty much every possible permutation of color depth and operating system (Windows 7 and Windows XP) using GIMP 2.8 as the image editor. I came up with the following results:

    It doesn't matter what color depth you use; 8-bit, 16-bit, 24-bit or 32-bit. Which makes sense when you think about it, because Windows XP does have support for 32-bit icons on the desktop. see edit below

    Dan nailed it on the head when he talked about the 'corrupt' header in the bitmap. It turns out that it is not corrupt. By default, GIMP 2.8 saves 'color space information' in the header of the bitmap file. Innosetup or Windows XP (I'm not sure which) doesn't know how to properly interpret this information.

    The key is to make sure that this color space information is not saved in the bitmap file. When exporting a bitmap from GIMP 2.8, you have the option to check the 'Do not write color space information' option as shown in the image below.

    enter image description here

    EDIT 2014-Mar-20

    Some updated information: In InnoSetup version 5.5.4 (running and installing on Windows 7 64-bit OS), using the above method with 32-bit images gives a bitmap image is not valid error when the compiled install file is run.

    Changing to a 24-bit image, still without the color space information, resolved the issue.

提交回复
热议问题