Skip to content

Instantly share code, notes, and snippets.

@ben-hearn-sb
Created January 11, 2021 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ben-hearn-sb/62763a3eac6cccd2c03478d913afd43c to your computer and use it in GitHub Desktop.
Save ben-hearn-sb/62763a3eac6cccd2c03478d913afd43c to your computer and use it in GitHub Desktop.
Windows pyinstaller setup
import PyInstaller.__main__
import os
root_dir = os.path.dirname(os.path.dirname(__file__))
PyInstaller.__main__.run([
'--name=%s' % '__eTrax_windows',
'--distpath=%s' % r'C:\Users\Ben\Documents\etrax_build\dist',
'--workpath=%s' % r'C:\Users\Ben\Documents\etrax_build\build',
'--paths=%s' % r'C:\Users\Ben\Documents\collection_cleanup',
'--add-data=%s' % r'C:\Users\Ben\Documents\collection_cleanup\venv\Lib\site-packages\ftfy\char_classes.dat;ftfy',
'--add-data=%s' % r'C:\Program Files\VideoLAN\VLC\plugins;plugins',
'--add-binary=%s' % r'C:\\Program Files\\VideoLAN\\VLC\\libvlc.dll;.',
'--add-binary=%s' % r'C:\\Program Files\\VideoLAN\\VLC\\libvlccore.dll;.',
'--add-binary=%s' % r'C:\\Program Files\\VideoLAN\\VLC\\axvlc.dll;.',
'--add-binary=%s' % r'C:\\Program Files\\VideoLAN\\VLC\\npvlc.dll;.',
'--add-binary=%s' % r'C:\Users\Ben\Documents\collection_cleanup\venv\Lib\site-packages\sklearn\.libs\vcomp140.dll;sklearn\.libs',
'--noconfirm',
'--onefile',
#'--noconsole',
os.path.join(root_dir + '/etrax/', 'main.py')
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment