Skip to content

Commit

Permalink
Release 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
noirscape committed Dec 12, 2018
1 parent a79b3db commit 2d8dd9b
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions switchguideupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from enum import Enum

BASE_URL = 'http://amsupdater.catgirlsin.space/json/'
VERSION = '1.3.0'
VERSION = '1.4.0'

class WindowState(Enum):
MAIN_MENU = 0
Expand All @@ -32,14 +32,15 @@ def download_file(remote_name, local_path):
shutil.copyfileobj(r, output_path)

def update_atmosphere():
download_file(BASE_URL + 'fusee-primary.bin', '/fusee-primary.bin')
download_file(BASE_URL + 'fusee-secondary.bin', '/fusee-secondary.bin')
download_file(BASE_URL + 'fusee-primary.bin', '/atmosphere/fusee-primary.bin')
download_file(BASE_URL + 'atmosphere/fusee-secondary.bin', '/atmosphere/fusee-secondary.bin')
os.makedirs('/atmosphere/titles/0100000000000032/', exist_ok=True)
download_file(BASE_URL + 'atmosphere/titles/0100000000000032/exefs.nsp', '/atmosphere/titles/0100000000000032/exefs.nsp')
os.makedirs('/atmosphere/titles/0100000000000034/', exist_ok=True)
download_file(BASE_URL + 'atmosphere/titles/0100000000000034/exefs.nsp', '/atmosphere/titles/0100000000000034/exefs.nsp')
os.makedirs('/atmosphere/titles/0100000000000036/', exist_ok=True)
download_file(BASE_URL + 'atmosphere/titles/0100000000000036/exefs.nsp', '/atmosphere/titles/0100000000000036/exefs.nsp')
zerodoteightdottwoupdate()

def update_hekate():
download_file(BASE_URL + 'hekate.bin', '/bootloader/update.bin')
Expand All @@ -57,6 +58,20 @@ def update_self():
with open(sys.argv[0], 'wb') as current_script:
shutil.copyfileobj(r, current_script)

def zerodoteightdottwoupdate():
update_hekate_config = False
os.makedirs('/atmosphere', exist_ok=True)
if os.path.isfile('/BCT.ini'):
os.remove('/BCT.ini')
if os.path.isfile('/fusee-primary.bin'):
os.remove('/fusee-primary.bin')
update_hekate_config = True
if os.path.isfile('/fusee-secondary.bin'):
os.remove('/fusee-secondary.bin')
if update_hekate_config:
os.remove('/bootloader/hekate_ipl.ini')
download_file('http://amsupdater.catgirlsin.space/json/hekate_ipl.ini', '/bootloader/hekate_ipl.ini')

def fetch_json():
## Get remote.json
r = urllib.request.urlopen(BASE_URL + 'version.json')
Expand Down

0 comments on commit 2d8dd9b

Please sign in to comment.