Skip to content

Commit

Permalink
add map as ips prerequisite
Browse files Browse the repository at this point in the history
  • Loading branch information
3096 committed Jun 12, 2019
1 parent 08bb049 commit 524425c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
11 changes: 8 additions & 3 deletions Makefile
@@ -1,15 +1,20 @@
# TODO (Khangaroo): Make this process a lot less hacky (no, export did not work)
# See MakefileNSO

.PHONY: all clean starlight starlight_patch_$(S2VER)/*.ips send
.PHONY: all clean starlight send

S2VER ?= 310
S2VERSTR ?= 3.1.0
S2ROMTYPE ?= US

all: starlight

starlight:
$(MAKE) all -f MakefileNSO
$(MAKE) all -f MakefileNSO S2VER=$(S2VER) S2VERSTR=$(S2VERSTR)
$(MAKE) starlight_patch_$(S2VER)/*.ips

starlight_patch_$(S2VER)/*.ips: patches/*.slpatch patches/configs/$(S2VER).config scripts/genPatch.py
starlight_patch_$(S2VER)/*.ips: patches/*.slpatch patches/configs/$(S2VER).config patches/maps/$(S2VER)/*.map \
build$(S2VER)/starlight310.map scripts/genPatch.py
@rm -f starlight_patch_$(S2VER)/*.ips
python3 scripts/genPatch.py $(S2VER)

Expand Down
11 changes: 7 additions & 4 deletions scripts/sendPatch.py
Expand Up @@ -38,6 +38,12 @@ def ensuredirectory(connection,root,path):


consoleIP = sys.argv[1]
if '.' not in consoleIP:
print(sys.argv[0], "ERROR: Please specify with `IP=[Your console's IP]`")
sys.exit(-1)

consolePort = 5000

if len(sys.argv) < 3:
romType = 'US'
else:
Expand All @@ -48,12 +54,10 @@ def ensuredirectory(connection,root,path):
else:
version = sys.argv[3]

consolePort = 5000

curDir = os.curdir

ftp = FTP()
print('Connecting to console...')
print(f'Connecting to {consoleIP}... ', end='')
ftp.connect(consoleIP, consolePort)
print('Connected!')

Expand Down Expand Up @@ -87,4 +91,3 @@ def ensuredirectory(connection,root,path):
sdPath = f'/atmosphere/titles/{titleIdLookup[romType]}/exefs/subsdk0'
print(f'Sending {sdPath}')
ftp.storbinary(f'STOR {sdPath}', open(f'Starlight{version}.nso', 'rb'))

0 comments on commit 524425c

Please sign in to comment.