Giter Club home page Giter Club logo

Comments (7)

lee-dohm avatar lee-dohm commented on July 18, 2024

@paulcbetts since you're the one that made the assertion in Squirrel/Squirrel.Windows#545 (comment) that the version fields are 8-bit, is this a 32-bit executable versus 64-bit executable thing?

from rcedit.

anaisbetts avatar anaisbetts commented on July 18, 2024

Citation Needed? I'm not sure I believe you, but if it's true that'd be rad

from rcedit.

geary avatar geary commented on July 18, 2024

Both 32-bit and 64-bit executables use the same format for these version resources: a 64-bit value containing four 16-bit fields.

I tested this patch using the updated rcedit.exe with a Squirrel build. The Setup.exe file that Squirrel generates is a 32-bit executable, and the patch works fine with it.

from rcedit.

geary avatar geary commented on July 18, 2024

For reference, the code that actually sets these values in rcedit is in rescle.cc lines 215-216 and 241-242. Both are the same code:

root->dwProductVersionMS = v1 << 16 | v2;
root->dwProductVersionLS = v3 << 16 | v4;

The dwProductVersionMS and dwProductVersionLS fields are defined in verrsrc.h:

DWORD   dwProductVersionMS;     /* e.g. 0x00030010 = "3.10" */
DWORD   dwProductVersionLS;     /* e.g. 0x00000031 = "0.31" */

from rcedit.

geary avatar geary commented on July 18, 2024

And here's the MSDN reference while I'm at it. :-)

FILEVERSION version
Binary version number for the file. The version consists of two 32-bit integers, defined by four 16-bit integers. For example, "FILEVERSION 3,10,0,61" is translated into two doublewords: 0x0003000a and 0x0000003d, in that order. Therefore, if version is defined by the DWORD values dw1 and dw2, they need to appear in the FILEVERSION statement as follows: HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2).

PRODUCTVERSION version
Binary version number for the product with which the file is distributed. The version parameter is two 32-bit integers, defined by four 16-bit integers. For more information about version, see the FILEVERSION description.

from rcedit.

anaisbetts avatar anaisbetts commented on July 18, 2024

Nice!

from rcedit.

zcbenz avatar zcbenz commented on July 18, 2024

Fixed by #7.

from rcedit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.