diff --git a/README.md b/README.md index acdab06..e290fea 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,6 @@ python3 -m nuitka --onefile --standalone --windows-icon-from-ico=foodie-dash.ico ``` ## Files -File compiled by Nuitka: [compiled_client.py](https://github.com/Lncvrt/Foodie-Archive/blob/client/compiled_client.py) +File compiled by Nuitka: [compiled_client.py](https://git.lncvrt.xyz/Berry-Dash/foodie-dash-py/raw/branch/client/compiled_client.py) -File the compiled client calls: [client.py](https://github.com/Lncvrt/Foodie-Archive/blob/client/client.py) +File the compiled client calls: [client.py](https://git.lncvrt.xyz/Berry-Dash/foodie-dash-py/raw/branch/client/client.py) diff --git a/client.py b/client.py index 701c514..c9dd1a0 100644 --- a/client.py +++ b/client.py @@ -18,45 +18,15 @@ try: except: version = 'n/a' - #client_version is not defined here, it's defined in the compiled version (https://github.com/Lncvrt/Foodie-Archive/blob/client/compiled_client.py) + #client_version is not defined here, it's defined in the compiled version (https://git.lncvrt.xyz/Berry-Dash/foodie-dash-py/raw/branch/client/compiled_client.py) if version != 'n/a' and version != client_version: messagebox.showwarning("Update required", f"Foodie Dash has a required update\n\nYour version: {client_version}\nLatest version: {version}\n\nPress \"OK\" to update") - window = Tk() - window.withdraw() - - default_file_name = "Foodie Dash.exe" - save_path = filedialog.asksaveasfilename( - defaultextension=".exe", - filetypes=[("Executable Files", "*.exe")], - initialfile=default_file_name - ) - - window.destroy() - - if save_path: - try: - print("Downloading update") - response = requests.get(f"https://github.com/Lncvrt/Foodie-Archive/releases/latest/download/Foodie-Dash.exe") - os.system("cls") - - if response.status_code == 200: - try: - with open(save_path, 'wb') as file: - file.write(response.content) - messagebox.showinfo("Update downloaded successfully", f"Run the file that has been downloaded to your computer at {save_path} to use the update.") - except Exception as error: - messagebox.showerror("Error while downloading update", f"There was an error while attempting to download the file.\n\nIf you are attempting to save the file to a running program, please try closing the program or temporaily save the file with a different name, or contact us at lncvrtreal@gmail.com for info on how to fix this issue.Error:\n\nError: {error}") - else: - messagebox.showerror("Error while downloading update", f"There was an error while attempting to download the file.\n\nError: {response.text} (code: {response.status_code})\n\nPlease try again or contact us at lncvrtreal@gmail.com for info on how to fix this issue.") - except: - messagebox.showerror("Error while downloading update", "There was an error while attempting to download the file.\n\nPlease try again or contact us at lncvrtreal@gmail.com for info on how to fix this issue.") - else: - messagebox.showerror("Error while downloading update", "There was an error while attempting to download the file.\n\nPlease try again or contact us at lncvrtreal@gmail.com for info on how to fix this issue.") + webbrowser.open("https://git.lncvrt.xyz/Berry-Dash/foodie-dash-py/releases/latest") else: try: - response = requests.get("https://raw.githubusercontent.com/Lncvrt/Foodie-Archive/refs/heads/main/foodie-dash.py") - + response = requests.get("https://git.lncvrt.xyz/Berry-Dash/foodie-dash-py/raw/branch/main/foodie-dash.py") + if response.status_code == 200: exec(response.text.strip()) else: @@ -64,4 +34,4 @@ try: except Exception as error: messagebox.showerror("Foodie Dash has Crashed", f"Foodie Dash has crashed, please report this issue to https://github.com/Lncvrt/Foodie-Archive/issues.\n\nError: {error}") except Exception as error: - messagebox.showerror("Unable to launch", f"Unable to launch updater\n\nError: {error}") \ No newline at end of file + messagebox.showerror("Unable to launch", f"Unable to launch updater\n\nError: {error}")