UPDATE MOMENT , ACTUALLY UPDATES
This commit is contained in:
BIN
API/Tiri.zip
Normal file
BIN
API/Tiri.zip
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
version = 1.01
|
version = 1.21
|
||||||
|
|
||||||
[ACCOUNT]
|
[ACCOUNT]
|
||||||
key = NK
|
key = NK
|
||||||
|
|||||||
27
CLI/Init.py
27
CLI/Init.py
@@ -1,7 +1,7 @@
|
|||||||
#it Wasnt the venv .... 😁🔫 --> 🏠🔥 --> 👶🏻👷🏻💀
|
#it Wasnt the venv .... 😁🔫 --> 🏠🔥 --> 👶🏻👷🏻💀
|
||||||
|
|
||||||
APP_VERSION = 1.01
|
APP_VERSION = 1.21
|
||||||
|
import zipfile
|
||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -11,6 +11,10 @@ import sys
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import filedialog
|
from tkinter import filedialog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='TiropitLauncher CLI & Back-End')
|
parser = argparse.ArgumentParser(description='TiropitLauncher CLI & Back-End')
|
||||||
parser.add_argument('-backend', help="Runs the app in backend mode (no UI)", action="store_true")
|
parser.add_argument('-backend', help="Runs the app in backend mode (no UI)", action="store_true")
|
||||||
|
|
||||||
@@ -112,8 +116,6 @@ def select_folder():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def TiropitLogin():
|
def TiropitLogin():
|
||||||
class menuData():
|
class menuData():
|
||||||
def menuInstructions():
|
def menuInstructions():
|
||||||
@@ -170,7 +172,6 @@ def loadConfig():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [Update Functions] <------------------------------------------------------------------------------------------------------------ [Begin]
|
# [Update Functions] <------------------------------------------------------------------------------------------------------------ [Begin]
|
||||||
|
|
||||||
def CheckForUpdate(log=False):
|
def CheckForUpdate(log=False):
|
||||||
@@ -188,12 +189,26 @@ def CheckForUpdate(log=False):
|
|||||||
if float(version) > float(currentVersion):
|
if float(version) > float(currentVersion):
|
||||||
|
|
||||||
if log:print(f"Downloading & Installing Update {version}")
|
if log:print(f"Downloading & Installing Update {version}")
|
||||||
download_file("https://kevinblog.sytes.net/APIS/TiropitLauncher/TiropitAPI.php", "test.mogus")
|
download_file("https://kevinblog.sytes.net/APIS/TiropitLauncher/Tiri.zip", "update.zip")
|
||||||
|
unzipFile("update.zip", ".")
|
||||||
|
print("Assuming Update Done - Exiting , Restart Tiropit")
|
||||||
else:
|
else:
|
||||||
if log:print(f"Already using latest version -> {currentVersion}")
|
if log:print(f"Already using latest version -> {currentVersion}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def unzipFile(filename,path):
|
||||||
|
os.makedirs(path, exist_ok=True)
|
||||||
|
|
||||||
|
with zipfile.ZipFile(filename, "r") as zf:
|
||||||
|
zf.extractall(path)
|
||||||
|
print(f"Extract Done :) to {path}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def download_file(url, filename):
|
def download_file(url, filename):
|
||||||
|
|
||||||
with requests.get(url, stream=True) as r:
|
with requests.get(url, stream=True) as r:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{"status":"error","message":"No SteamID provided","version":"1.0.5"}
|
|
||||||
Reference in New Issue
Block a user