What does a “version file” look like?

前端 未结 5 1907
别那么骄傲
别那么骄傲 2020-12-08 07:15

I\'ve been googling this for ages now without results. The PyInstaller manual says:

--version-file=FILE
    add a version resource from FILE to the exe

5条回答
  •  暖寄归人
    2020-12-08 07:27

    Create your Version file using an earlier answer save it as version.rc

    Locate the filename.spec file open it. next in that script, locate the:

    exe = EXE(pyz,...)
    

    at the end of that entire section add this piece of code to automatically embed the version information on your exe file

    version='version.rc'
    

    Save it and then launch pyinstaller again and this time run the installer using this code:

    pyinstaller filename.spec 
    

    this will not only create the exe file itself but also include all of your version information as well.

    In case you may not have thought about it, replace the filename with your program's filename

提交回复
热议问题