Is it possible to obtain the Inno Setup version number for use in an Inno Setup installer?
I cannot find a documented switch to return its version number (eg 5.5.6) and there doesn't seem to be an exposed predefined version constant exposed to Inno Setup scripts.
On the contrary @magicnumber, there is indeed a compiler version constant available directly in your inno-script. The predefined Preprocessor variable Ver
returns the 32-bit encoded version of Inno Setup compiler. Highest byte holds the major version, lowest byte usually holds zero. Make it prettyful with the DecodeVer
function. Example:
#define MyCompilerVerStr DecodeVer(Ver)
Update:
You can also add details if the compiler is the unicode or non-unicode version:
#ifdef UNICODE
#define MyInnoVersion DecodeVer(Ver) + " (unicode)"
#else
#define MyInnoVersion DecodeVer(Ver) + " (non-unicode)"
#endif
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.