aboutsummaryrefslogtreecommitdiffstats
path: root/pyinst.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyinst.py')
-rw-r--r--pyinst.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pyinst.py b/pyinst.py
index fb8eca3e5..d65243f88 100644
--- a/pyinst.py
+++ b/pyinst.py
@@ -15,9 +15,11 @@ import PyInstaller.__main__
arch = sys.argv[1] if len(sys.argv) > 1 else platform.architecture()[0][:2]
assert arch in ('32', '64')
-print('Building %sbit version' % arch)
_x86 = '_x86' if arch == '32' else ''
+opts = sys.argv[2:] or ['--onefile']
+print(f'Building {arch}bit version with options {opts}')
+
FILE_DESCRIPTION = 'yt-dlp%s' % (' (32 Bit)' if _x86 else '')
# root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
@@ -72,11 +74,12 @@ excluded_modules = ['test', 'ytdlp_plugins', 'youtube-dl', 'youtube-dlc']
PyInstaller.__main__.run([
'--name=yt-dlp%s' % _x86,
- '--onefile',
'--icon=devscripts/logo.ico',
*[f'--exclude-module={module}' for module in excluded_modules],
*[f'--hidden-import={module}' for module in dependancies],
'--upx-exclude=vcruntime140.dll',
+ '--noconfirm',
+ *opts,
'yt_dlp/__main__.py',
])
SetVersion('dist/yt-dlp%s.exe' % _x86, VERSION_FILE)