This commit is contained in:
noahc3 2019-05-03 10:10:58 -05:00 committed by Nichole Mattera
parent af580b9b5a
commit 5e071c0d7a
17 changed files with 74 additions and 12 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
Modules/compiled/

View file

@ -4,13 +4,22 @@
import subprocess as sbp
import os
import shutil
import sys
import time
from distutils.dir_util import copy_tree
modules = ["appstore", "bootlogo", "edizon", "goldleaf",
"hbmenu", "hekate_payload", "must_have", "kosmosupdater",
"sys-ftpd", "sys-netcheat", "kosmos_toolkit", "emuiibo",
"lockpick", "hid-mitm", "sys-clk", "ldn_mitm"] # Everything that will be merged together
p2 = "compiled" # How the merged folder should be called
output_dir = "compiled" # How the merged folder should be called
if len(sys.argv) != 2:
print("usage: merger.py <kosmos_version>")
exit()
version = sys.argv[1]
print("""
https://github.com/AtlasNX/Kosmos
@ -28,17 +37,25 @@ print("""
It could be that a permissions error will pop up, fix it by restarting the python script! We don\'t really know why that happens!
""") # Fancy stuff
if os.path.exists("compiled"):
shutil.rmtree("compiled") # Delete Content of "compiled" if it exists!
if os.path.exists(output_dir):
shutil.rmtree(output_dir) # Delete Content of "compiled" if it exists!
os.makedirs("compiled") # Double check
os.makedirs(output_dir) # Double check
# Copy modules to "compiled" directory
working_dir = os.path.dirname(os.path.realpath(__file__))
for path in modules:
fol = os.listdir(path)
for i in fol:
p1 = os.path.join(path,i)
p3 = 'cp -r ' + p1 +' ' + p2+'/.'
sbp.Popen(p3,shell=True)
time.sleep(0.1)
path = os.path.join(working_dir, path)
copy_tree(path, output_dir)
# Check every file in the output directory for the {$KOSMOS_VERSION} token and replace it with
# the supplied Kosmos version.
for directory, subdirectories, files in os.walk(output_dir):
for file in files:
contents = open(os.path.join(directory, file)).read()
contents = contents.replace("{$KOSMOS_VERSION}", version)
handle = open(os.path.join(directory, file), "w")
handle.write(contents)
handle.close()
print("Done!")

41
Modules/merger_legacy.py Normal file
View file

@ -0,0 +1,41 @@
#!/usr/bin/env python
# Merges all modules together because I'm lazy ;^)
import subprocess as sbp
import os
import shutil
import time
modules = ["appstore", "bootlogo", "edizon", "goldleaf",
"hbmenu", "hekate_payload", "must_have", "kosmosupdater",
"sys-ftpd", "sys-netcheat", "kosmos_toolkit", "emuiibo",
"lockpick", "hid-mitm", "sys-clk", "ldn_mitm"] # Everything that will be merged together
p2 = "compiled" # How the merged folder should be called
print("""
https://github.com/AtlasNX/Kosmos
____ __.
| |/ _|____ ______ _____ ____ ______
| < / _ \/ ___// \ / _ \/ ___/
| | ( <_> )___ \| Y Y ( <_> )___ \
|____|__ \____/____ >__|_| /\____/____ >
\/ \/ \/ \/
By: @AtlasNX (AtlasNX/Kosmos on Github)
It could be that a permissions error will pop up, fix it by restarting the python script! We don\'t really know why that happens!
""") # Fancy stuff
if os.path.exists("compiled"):
shutil.rmtree("compiled") # Delete Content of "compiled" if it exists!
os.makedirs("compiled") # Double check
for path in modules:
fol = os.listdir(path)
for i in fol:
p1 = os.path.join(path,i)
p3 = 'cp -r ' + p1 +' ' + p2+'/.'
sbp.Popen(p3,shell=True)
time.sleep(0.1)
print("Done!")

View file

@ -8,6 +8,9 @@ stage2_entrypoint = 0xF0000000
; Note: Disabling debugmode will cause parts of ams.tma to not work, in the future.
debugmode = 1
debugmode_user = 0
; Note: Disabling usermode exception handlers will cause atmosphere to not fail gracefully under error conditions.
; Support will not be provided to users who disable these. If you do not know what you are doing, leave them on.
disable_user_exception_handlers = 0
[stratosphere]
; To force-enable nogc, add nogc = 1

View file

@ -1,14 +1,14 @@
[config]
autoboot=1
autoboot_list=0
bootwait=5
bootwait=2
customlogo=1
verification=1
backlight=100
autohosoff=0
autonogc=1
{AtlasNX/Kosmos v12.1.1}
{AtlasNX/Kosmos v12.2}
{ }
{Discord: discord.teamatlasnx.com}
{Github: git.teamatlasnx.com}

Binary file not shown.