From e3b7ea6c24012016ec7072797fefddd17de27e1d Mon Sep 17 00:00:00 2001 From: KevinKor01 Date: Thu, 18 Sep 2025 15:09:36 +0300 Subject: [PATCH] UPDATE MOMENT , ACTUALLY UPDATES --- API/Tiri.zip | Bin 0 -> 1421 bytes CLI/Config.ini | 2 +- CLI/Init.py | 29 ++++++++++++++++++++++------- CLI/test.mogus | 1 - 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 API/Tiri.zip delete mode 100644 CLI/test.mogus diff --git a/API/Tiri.zip b/API/Tiri.zip new file mode 100644 index 0000000000000000000000000000000000000000..ec45b4e1eeed119da8dac4635f6daaa206630d4a GIT binary patch literal 1421 zcmV;81#?00#g7090vmX)bVil~-*~<3jTEUs0*Vd-BH`K-Le|FKz!t~O?XD>i;=gzH#g6SblnY9TXJ+T+ znc11il4mPeCPX{|TdgxL;Y>aF@Q=t+w%qu@>5rTW*|F@^M*K*EC`(fs$&44|JZEw7 zeL)2M(l4HrqT>4#-7Hx`JDtw)^(6c{{vJ+eFf7P{C3ZSwy+*S3#0|rgtY{c|onK)@ zBvIPI+GnV`6E8x1T(XCXChPR*klrK7n6ctz%$vtwbJrBu@p zM+9X$9*<^lHu-xpJ@5R9&;>lpC3U->$(ntZjAv^mkK_1OP~P=nMdf1_i{V}O`f4`s z-g_DxD;APC4s#SNu!#|I1j6DO=wxaJTSA&i!^cP*rG1Ktax|Hxb5_MOl&NTfL$yTr$boCHMn9$U%kUaQh2uB}@@QiV51Xel5w4iVV z(Iep`l9UTbvh<-Am9<~SWsMil+H(IRmMsXS+5TR$Wwx1MsgNX%s7wAOJQkrs%LgI3 zw>7C=6*gk3tOrR(Vo^QkwW!r$JYY`SRX5mm)eWX+{jS~SmIhFGQITUpU$775k6^Ef zL1yZ_MD!qDXyA?%aJ#J~=K?b}tXK;S&5fCUBz!ZR^PGD1pl!IXHI!=)I-!%10|Nz` ztGaQZKKicb`MZ+lq7HPu-*pR0_r66`-`qi2at(=@q-0gqrf*NTBxAqncAFkt&}W*| z4`>n!_nNZDx@45FPIjEH*23MMGi+t$?!LPd>NU^QG`L1^bKY>V&TI8kg@3L}YOncH zVxI?p5uUb$Taw#CJ|S2gas7ayq4XI^1l<8CUa_s2UP~AwCZdctlvWt1*>SwK8lIy|ovznSN!(7k5|>xI9WVK=vyWqZFR}10Q zL3{*xpw2+o6yR<}Bvz{5+KL9--ep=07R~*e4~M;jQr`Rd6{+Gr&yr+8q9=D79JX?l z4)C33FdV``@5^C*IK4j;fg~7Iyg{Fskit&EKg_DYQj#Q)1~*8yDJjK()`@*O547>#GAa51@@%;BK6MvFX=$_=A;NoDkiBfokPFt*t|cW(B|5iW@X-%xC+O%9Qz-;HUGcCs8xY_MXj{f z_@2r&3ADrxf>r!VQ{eawU$I=w*uVQs0OghRC4^C6~-{K4k` zKTt~n0zU&300ICA02;nATd=XIlpO^C0Fw>?00#g700000000000JMPs0000~X>w^U baCuNm1qJ{B000310RS}s002S-00000#MGHl literal 0 HcmV?d00001 diff --git a/CLI/Config.ini b/CLI/Config.ini index 9f61f79..1094eaf 100644 --- a/CLI/Config.ini +++ b/CLI/Config.ini @@ -1,5 +1,5 @@ [DEFAULT] -version = 1.01 +version = 1.21 [ACCOUNT] key = NK diff --git a/CLI/Init.py b/CLI/Init.py index c088ef2..130194e 100644 --- a/CLI/Init.py +++ b/CLI/Init.py @@ -1,7 +1,7 @@ #it Wasnt the venv .... πŸ˜πŸ”« --> 🏠πŸ”₯ --> πŸ‘ΆπŸ»πŸ‘·πŸ»πŸ’€ -APP_VERSION = 1.01 - +APP_VERSION = 1.21 +import zipfile import configparser import os from pathlib import Path @@ -11,6 +11,10 @@ import sys import tkinter as tk from tkinter import filedialog + + + + parser = argparse.ArgumentParser(description='TiropitLauncher CLI & Back-End') 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(): class menuData(): def menuInstructions(): @@ -170,7 +172,6 @@ def loadConfig(): - # [Update Functions] <------------------------------------------------------------------------------------------------------------ [Begin] def CheckForUpdate(log=False): @@ -179,7 +180,7 @@ def CheckForUpdate(log=False): response = requests.get(TiropitCLI.url + "/api/getTiropitVersion") if log:print(f"ResponseCode:{response.status_code}") data = response.json() - + if log:print(f"ResponseJSON:{data}") version = float(data["Version"]) @@ -188,12 +189,26 @@ def CheckForUpdate(log=False): if float(version) > float(currentVersion): 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: 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): with requests.get(url, stream=True) as r: diff --git a/CLI/test.mogus b/CLI/test.mogus deleted file mode 100644 index 0dfe776..0000000 --- a/CLI/test.mogus +++ /dev/null @@ -1 +0,0 @@ -{"status":"error","message":"No SteamID provided","version":"1.0.5"} \ No newline at end of file