Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Version of Compile Exe's
#1
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
Code:
Copy      Help
;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
#2
Download file Archive.qml: Collected QM apps, functions, samples
Import folder FileVersionInfo from it. It is in folder Functions, classes...
Example:
Macro exe_version
Code:
Copy      Help
;/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


Forum Jump:


Users browsing this thread: 1 Guest(s)