]>
jfr.im git - yt-dlp.git/blob - pyinst32.py
1 from __future__
import unicode_literals
2 from PyInstaller
.utils
.win32
.versioninfo
import (
3 VarStruct
, VarFileInfo
, StringStruct
, StringTable
,
4 StringFileInfo
, FixedFileInfo
, VSVersionInfo
, SetVersion
,
6 import PyInstaller
.__main
__
8 from datetime
import datetime
10 FILE_DESCRIPTION
= 'Media Downloader 32 Bit Version'
12 exec(compile(open('youtube_dlc/version.py').read(), 'youtube_dlc/version.py', 'exec'))
14 _LATEST_VERSION
= locals()['__version__']
16 _OLD_VERSION
= _LATEST_VERSION
.rsplit("-", 1)
18 if len(_OLD_VERSION
) > 0:
19 old_ver
= _OLD_VERSION
[0]
22 if len(_OLD_VERSION
) > 1:
23 old_rev
= _OLD_VERSION
[1]
26 # ver = f'{datetime.today():%Y.%m.%d}'
27 ver
= now
.strftime("%Y.%m.%d")
32 rev
= int(old_rev
) + 1
38 version
= _SEPARATOR
.join(filter(None, [ver
, str(rev
)]))
42 version_list
= ver
.split(".")
43 _year
, _month
, _day
= [int(value
) for value
in version_list
]
47 _ver_tuple
= _year
, _month
, _day
, _rev
49 version_file
= VSVersionInfo(
66 StringStruct("Comments", "Youtube-dlc_x86 Command Line Interface."),
67 StringStruct("CompanyName", "theidel@uni-bremen.de"),
68 StringStruct("FileDescription", FILE_DESCRIPTION
),
69 StringStruct("FileVersion", version
),
70 StringStruct("InternalName", "youtube-dlc_x86"),
73 "theidel@uni-bremen.de | UNLICENSE",
75 StringStruct("OriginalFilename", "youtube-dlc_x86.exe"),
76 StringStruct("ProductName", "Youtube-dlc_x86"),
77 StringStruct("ProductVersion", version
+ "_x86 | git.io/JUGsM"),
82 VarFileInfo([VarStruct("Translation", [0, 1200])])
86 PyInstaller
.__main
__.run([
87 '--name=youtube-dlc_x86',
89 '--icon=win/icon/cloud.ico',
90 'youtube_dlc/__main__.py',
92 SetVersion('dist/youtube-dlc_x86.exe', version_file
)