Skip to content

Commit

Permalink
major changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KorryKatti committed Apr 4, 2024
1 parent 62fc906 commit 71222d0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 80 deletions.
4 changes: 0 additions & 4 deletions appfiles/activate_env.bat

This file was deleted.

4 changes: 0 additions & 4 deletions appfiles/activate_env.sh

This file was deleted.

13 changes: 1 addition & 12 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@

def activate_virtualenv():
if os.name == 'posix': # Unix-like OS (Linux/Mac)
subprocess.run(["/bin/bash", "-c", "source myenv/bin/activate"], shell=True)
elif os.name == 'nt': # Windows
subprocess.run(["myenv\\Scripts\\activate.bat"], shell=True)

import json
import requests
import customtkinter as ctk
Expand All @@ -13,8 +6,6 @@ def activate_virtualenv():
import os
import shutil



def read_version():
with open('config.json', 'r') as f:
config_data = json.load(f)
Expand All @@ -35,8 +26,6 @@ def close_window(window):
window.destroy()

def compare_versions():
activate_virtualenv()

# Delete the "update" folder if it exists
update_folder = "update"
if os.path.exists(update_folder):
Expand All @@ -61,7 +50,7 @@ def compare_versions():
label = ctk.CTkLabel(app, text=result_message, wraplength=380)
label.pack(pady=20)

# Close the window after 7 seconds
# Close the window after 3 seconds
app.after(3000, close_window, app)

app.mainloop()
Expand Down
23 changes: 0 additions & 23 deletions run_main.bat

This file was deleted.

22 changes: 0 additions & 22 deletions run_main.sh

This file was deleted.

15 changes: 0 additions & 15 deletions updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,6 @@ def main():
# Copy files from update to the current directory
copy_files(update_dir, os.path.dirname(__file__))

# Create virtual environment
python_executable = sys.executable
os.system(f"{python_executable} -m venv myenv")
print("Virtual environment created")

# Activate the virtual environment and execute activation script
if sys.platform == "win32":
activation_script = os.path.join('myenv', 'Scripts', 'activate.bat')
subprocess.run([activation_script], shell=True)
else:
activation_script = os.path.join('myenv', 'bin', 'activate')
activate_command = f"source {activation_script} && pip install -r requirements.txt"
os.system(activate_command)


# Install requirements
os.system("pip install -r requirements.txt")

Expand Down

0 comments on commit 71222d0

Please sign in to comment.