From 94c931d003ad1079acf76b55e7cea5289f42f2ef Mon Sep 17 00:00:00 2001 From: hadcl4 Date: Wed, 20 Apr 2022 18:59:22 -0500 Subject: [PATCH] STABLE v1.1.0 --- main.py | 7 ++++++- thunder-cli | 15 +++++++++++++-- updater | 4 ++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index a5bf0c3..f44f63d 100755 --- a/main.py +++ b/main.py @@ -240,7 +240,7 @@ def refreshup(): process = subprocess.Popen(command, stdout=True, stderr=True, shell=True) def config(): global browser - config = Window(app, bg="darkgrey", title="Thunder - Configuration", height=800, width=600) + config = Window(app, bg="darkgrey", title="Thunder - Configuration", height=850, width=600) choosecol = Text(config, text="Choose the window's color: (Restart Required)") def blue_color(): color_choice = "darkblue" @@ -344,6 +344,7 @@ def galliumconfig(): Text(config, text="Other Settings:") PushButton(config, text="Mesa (Restart Required)", command=mesaconfig) PushButton(config, text="GALLIUM_HUD (Restart Required)", command=galliumconfig) + PushButton(config, text="Clear Web Browser Cache", command=clear_cache) def system(): system = Window(app, bg="darkgrey", title="Thunder - System Info") textsys = Text(system, text="System Info (config.txt):") @@ -387,6 +388,10 @@ def sysinfo(): def setup(): command = f'x-terminal-emulator -e "/home/$USER/Thunder/thunder-cli --setup"' process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) +def clear_cache(): + command = f'/usr/local/bin/thunder-cli --clear-cache' + process = subprocess.Popen(command, stdout=True, stderr=True, shell=True) + info("Thunder - Clear Cache", "Web browser cache has been cleared.") def restartgameadd(): app.destroy() print("Restarting Thunder...") diff --git a/thunder-cli b/thunder-cli index f7714c4..eb59629 100755 --- a/thunder-cli +++ b/thunder-cli @@ -21,10 +21,11 @@ function --help { echo "thunder-cli --log | View Thunder's log. Useful for debugging. Logging must be enabled by editing 'start'. Instructions are included there." echo "thunder-cli --update | Update Thunder (both GUI and CLI)" echo "thunder-cli --dev | Enter devmode" + echo "thunder-cli --clear-cache | Clear web browser cache" } function --version { - echo "STABLE v1.0.9" + echo "STABLE v1.1.0" } function --gui { @@ -34,7 +35,7 @@ function --gui { function --setup { read -p "Enter the name of the game you wish to setup (or to view a list enter 'viewlist'), hit enter without an argument to exit: " setupgame if [[ $setupgame == "viewlist" ]] ;then - cd ~/Thunder/database; ls + cd ~/Thunder/database; ls *.sh --setup else cd ~/Thunder/database @@ -198,6 +199,13 @@ function --mesaconfig { nano ${HOME}/.thunder/mesa.cfg } +function --clear-cache { + echo "Clearing cache..." + rm -rf ${HOME}/.cache/main.py + rm -rf ${HOME}/.cache/thunderwebhelper + rm -rf ${HOME}/.cache/viewdoc +} + if [[ "$1" == "--help" ]] ;then --help fi @@ -252,3 +260,6 @@ fi if [[ "$1" == "--mesaconfig" ]]; then --mesaconfig fi +if [[ "$1" == "--clear-cache" ]]; then + --clear-cache +fi diff --git a/updater b/updater index e1534a3..5099ddc 100644 --- a/updater +++ b/updater @@ -47,5 +47,9 @@ if [[ $thunderversion == "STABLE v1.0.8" ]]; then echo "Updating thunder-cli..." sudo cp thunder-cli /usr/local/bin/thunder-cli fi +if [[ $thunderversion == "STABLE v1.0.9" ]]; then +echo "Updating thunder-cli..." +sudo cp thunder-cli /usr/local/bin/thunder-cli +fi echo "Closing in 10 seconds. Please reopen Thunder for changes to take effect." sleep 10s