How to update exe details generated by PyInstaller?

Naveen Kumar

I've used PyInstaller to create executable and wants to update the exe details like File description, File version.

Below is the command I've used

PyInstaller --onefile --icon=favicon.ico main.spec

I'm referring to the properties as shown in the details tab below:

enter image description here

Naveen Kumar
I have solved this by myself with the help of python documentation

1. Create version.rc file

    VSVersionInfo(
        ffi=FixedFileInfo(
        filevers=(ProductVersions),
        prodvers=(ProductVersions),
        mask=0x3f,
        flags=0x0,
        OS=0x40004,
        fileType=0x1,
        subtype=0x0,
        date=(0, 0)),
        kids=[StringFileInfo([StringTable(
        u'040904B0',
        [StringStruct(u'FileDescription', u'xyz'),
        StringStruct(u'FileVersion', u'1.0.0.0'),
        StringStruct(u'InternalName', u'xyz'),
        StringStruct(u'LegalCopyright', u'Copyright'),
        StringStruct(u'OriginalFilename', u'xyz'),
        StringStruct(u'ProductName', u'xyz'),
        StringStruct(u'ProductVersion', u'1.0.0.0'),
        StringStruct(u'Language', u'Language Neutral'),
        StringStruct(u'LegalTrademarks', u'xyz')])]), 
        VarFileInfo([VarStruct(u'Translation', [1033, 1200])])]
    )

2. Create main.spec file and call version.rc file in that

  a = Analysis(['main.py'],
             pathex=['.'],
             binaries=[],
             datas=[('data\\*.tsv', 'data')],
             hiddenimports=['sklearn.neighbors.typedefs','sklearn.neighbors.quad_tree','sklearn.tree._utils','boto', 'smart_open'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          name='xyz',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          runtime_tmpdir=None,
          console=True , icon='favicon.ico', version='version.rc')

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Python Pyinstaller no exe file generated

Pyinstaller generated EXE file does not work

Determining application path in a Python EXE generated by pyInstaller

EXE file generated with pyinstaller crashes on start

Why does my .exe generated by PyInstaller not start?

How do I include poppler to pyinstaller generated exe when using pdf2image?

How do I re-write this python code to work within a pyinstaller generated exe?

Exe with tkinter GUI generated by Pyinstaller exe does not work

Python to EXE generated through Pyinstaller not running for kivy based python

Black screen for kivy based windows exe generated using pyinstaller

Pyinstaller and --onefile: How to include an image in the exe file

How to make a .exe from python script with pyinstaller?

How to fix error with pyinstaller after compilation in exe

How to create .exe using py2exe(or pyinstaller) on Ubuntu

after generated .exe using pyinstaller it give me error (no module named exchangelib)

How to suppress all warnings in window of executable file generated by pyinstaller

How to get PyInstaller to embed SVN Working Copy properties in the generated executable?

No hook files generated by PyInstaller

How to make my PyInstaller exe program open on the default browser

How to provide relative path of icon in PyInstaller while creating an exe

How to include timzonefinder module while creating an exe file via pyinstaller

How to add a binary data file in the same directory as of exe using pyinstaller?

How to compile .exe with Pyinstaller using --onefile and --add-data options

How do I tell Pyinstaller to use an .EXE thats in the Scripts folder?

How to get a working EXE file using pyinstaller with the sounddevice module in Python

Reducing size of pyinstaller exe

PyInstaller .exe file not working

Pyinstaller compile to exe

Exe to python with pyinstaller?

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    pump.io port in URL

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  14. 14

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  15. 15

    How to use merge windows unallocated space into Ubuntu using GParted?

  16. 16

    flutter: dropdown item programmatically unselect problem

  17. 17

    Pandas - check if dataframe has negative value in any column

  18. 18

    Nuget add packages gives access denied errors

  19. 19

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  20. 20

    Generate random UUIDv4 with Elm

  21. 21

    Client secret not provided in request error with Keycloak

HotTag

Archive