mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
moved url to definition.py
This commit is contained in:
parent
ffb75f868d
commit
7db29fc9bd
3 changed files with 6 additions and 3 deletions
|
@ -5,7 +5,7 @@ import json
|
|||
import sys
|
||||
import os
|
||||
|
||||
VERSION_FILE_URL = "https://raw.githubusercontent.com/Faraphel/MKWF-Install/master/version"
|
||||
from .definition import *
|
||||
|
||||
|
||||
def check_update(self):
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
CREATE_NO_WINDOW = 0x08000000
|
||||
VERSION = "0.8.1"
|
||||
GITHUB_REPOSITORY = "Faraphel/MKWF-Install"
|
||||
GITHUB_CONTENT_ROOT = f"https://raw.githubusercontent.com/{GITHUB_REPOSITORY}/master/"
|
||||
VERSION_FILE_URL = GITHUB_CONTENT_ROOT + "version"
|
||||
|
||||
get_filename = lambda file: ".".join(file.split(".")[:-1])
|
||||
get_nodir = lambda file: file.replace("\\", "/").split("/")[-1]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import requests
|
||||
import os
|
||||
|
||||
root = "https://raw.githubusercontent.com/Faraphel/MKWF-Install/master/"
|
||||
from .definition import *
|
||||
|
||||
|
||||
def get_github_file(self, file):
|
||||
|
@ -9,7 +9,7 @@ def get_github_file(self, file):
|
|||
returncode = 0
|
||||
if self.boolvar_disable_download.get(): return 2
|
||||
|
||||
dl = requests.get(root+file, allow_redirects=True, stream=True)
|
||||
dl = requests.get(GITHUB_CONTENT_ROOT+file, allow_redirects=True, stream=True)
|
||||
if os.path.exists(file):
|
||||
if int(dl.headers['Content-Length']) == os.path.getsize(file): return 1
|
||||
else: returncode = 3
|
||||
|
|
Loading…
Reference in a new issue