Skip to content

Commit

Permalink
STABLE v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hadcl4 committed Apr 20, 2022
1 parent c419ab1 commit 94c931d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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):")
Expand Down Expand Up @@ -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...")
Expand Down
15 changes: 13 additions & 2 deletions thunder-cli
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -252,3 +260,6 @@ fi
if [[ "$1" == "--mesaconfig" ]]; then
--mesaconfig
fi
if [[ "$1" == "--clear-cache" ]]; then
--clear-cache
fi
4 changes: 4 additions & 0 deletions updater
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 94c931d

Please sign in to comment.