mirror of
https://github.com/Mas0nShi/typoraCracker.git
synced 2023-07-10 13:41:20 +08:00
23 lines
546 B
Python
23 lines
546 B
Python
from utils import get_version, download_file, extract_file, log, DOWNLOAD_LINK
|
|
import os
|
|
|
|
BASE_DIR = os.path.dirname(__file__)
|
|
|
|
|
|
def win_x64_version():
|
|
url = DOWNLOAD_LINK["win"]["x64"]
|
|
dir = os.path.join(BASE_DIR, "win/x64")
|
|
|
|
download_path = os.path.join(dir, os.path.basename(url))
|
|
download_file(url, download_path)
|
|
extract_file(download_path, dir)
|
|
version = get_version(dir)
|
|
|
|
open(os.path.join(dir, "LATEST_VERSION"), "w").write(version)
|
|
log.success(version)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
win_x64_version()
|
|
|