Posts: 25
Threads: 12
Joined: Aug 2012
Gintaras
Is there a way to get the version that I assign when I compile the exe so I can use it in a varaible. I want to use it in a dialog in an about box. For exmplae in the code below the version is 0.0.0.2.
Function
BatchFromExcel
;BEGIN PROJECT
;main_function BatchFromExcel
;exe_file $my qm$\BatchFromExcel.exe
;icon <default>
;manifest $qm$\default.exe.manifest
;version 0.0.0.2
;flags 6
;guid {9E36B773-5A87-45B0-AC31-0CCEAE0B3875}
;END PROJECT
Posts: 12,055
Threads: 140
Joined: Dec 2002
Download file Archive.qml:
Collected QM apps, functions, samples
Import folder FileVersionInfo from it. It is in folder Functions, classes...
Example:
Macro
exe_version
;/exe
#compile "__FileVersionInfo"
FileVersionInfo x
;load file
if(!x.Init(ExeFullPath)) end "no version info"
;get fixed part
VS_FIXEDFILEINFO ffi
if(x.GetFixed(ffi)) out F"File version: {ffi.dwFileVersionMS>>16}.{ffi.dwFileVersionMS&0xffff}.{ffi.dwFileVersionLS>>16}.{ffi.dwFileVersionLS&0xffff}"
;BEGIN PROJECT
;exe_file $my qm$\exe_version.exe
;version 0.0.0.2
;flags 6
;END PROJECT