Initial commit
This commit is contained in:
parent
101cc2e498
commit
a12338ab64
140
.gitignore
vendored
Normal file
140
.gitignore
vendored
Normal file
|
@ -0,0 +1,140 @@
|
|||
config.py
|
||||
.vscode
|
||||
tmp/
|
||||
*.zip
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
339
LICENSE.md
Normal file
339
LICENSE.md
Normal file
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
BIN
Modules/atmosphere/01890C643E9D6E17B2CDA77A9749ECB9A4F676D6.ips
Normal file
BIN
Modules/atmosphere/01890C643E9D6E17B2CDA77A9749ECB9A4F676D6.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/0767302E1881700608344A3859BC57013150A375.ips
Normal file
BIN
Modules/atmosphere/0767302E1881700608344A3859BC57013150A375.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/3EC573CB22744A993DFE281701E9CBFE66C03ABD.ips
Normal file
BIN
Modules/atmosphere/3EC573CB22744A993DFE281701E9CBFE66C03ABD.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/723DF02F6955D903DF7134105A16D48F06012DB1.ips
Normal file
BIN
Modules/atmosphere/723DF02F6955D903DF7134105A16D48F06012DB1.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/7421EC6021AC73DD60A635BC2B3AD6FCAE2A6481.ips
Normal file
BIN
Modules/atmosphere/7421EC6021AC73DD60A635BC2B3AD6FCAE2A6481.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/7B4123290DE2A6F52DE4AB72BEA1A83D11214C71.ips
Normal file
BIN
Modules/atmosphere/7B4123290DE2A6F52DE4AB72BEA1A83D11214C71.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/7C5894688EDA24907BC9CE7013630F365B366E4A.ips
Normal file
BIN
Modules/atmosphere/7C5894688EDA24907BC9CE7013630F365B366E4A.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/96529C3226BEE906EE651754C33FE3E24ECAE832.ips
Normal file
BIN
Modules/atmosphere/96529C3226BEE906EE651754C33FE3E24ECAE832.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/967F4C3DFC7B165E4F7981373EC1798ACA234A45.ips
Normal file
BIN
Modules/atmosphere/967F4C3DFC7B165E4F7981373EC1798ACA234A45.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/98446A07BC664573F1578F3745C928D05AB73349.ips
Normal file
BIN
Modules/atmosphere/98446A07BC664573F1578F3745C928D05AB73349.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/C088ADC91417EBAE6ADBDF3E47946858CAFE1A82.ips
Normal file
BIN
Modules/atmosphere/C088ADC91417EBAE6ADBDF3E47946858CAFE1A82.ips
Normal file
Binary file not shown.
BIN
Modules/atmosphere/C79F22F18169FCD3B3698A881394F6240385CDB1.ips
Normal file
BIN
Modules/atmosphere/C79F22F18169FCD3B3698A881394F6240385CDB1.ips
Normal file
Binary file not shown.
60
Modules/atmosphere/system_settings.ini
Normal file
60
Modules/atmosphere/system_settings.ini
Normal file
|
@ -0,0 +1,60 @@
|
|||
; Disable uploading error reports to Nintendo
|
||||
[eupld]
|
||||
upload_enabled = u8!0x0
|
||||
|
||||
; Control whether RO should ease its validation of NROs.
|
||||
; (note: this is normally not necessary, and ips patches can be used.)
|
||||
[ro]
|
||||
ease_nro_restriction = u8!0x0
|
||||
|
||||
; Atmosphere custom settings
|
||||
[atmosphere]
|
||||
; Reboot from fatal automatically after some number of milliseconds.
|
||||
; If field is not present or 0, fatal will wait indefinitely for user input.
|
||||
fatal_auto_reboot_interval = u64!0x0
|
||||
|
||||
; Make the power menu's "reboot" button reboot to payload.
|
||||
; Set to "normal" for normal reboot, "rcm" for rcm reboot.
|
||||
power_menu_reboot_function = str!payload
|
||||
|
||||
; Controls whether dmnt cheats should be toggled on or off by
|
||||
; default. 1 = toggled on by default, 0 = toggled off by default.
|
||||
dmnt_cheats_enabled_by_default = u8!0x0
|
||||
|
||||
; Controls whether dmnt should always save cheat toggle state
|
||||
; for restoration on new game launch. 1 = always save toggles,
|
||||
; 0 = only save toggles if toggle file exists.
|
||||
dmnt_always_save_cheat_toggles = u8!0x0
|
||||
|
||||
; Enable writing to BIS partitions for HBL.
|
||||
; This is probably undesirable for normal usage.
|
||||
enable_hbl_bis_write = u8!0x0
|
||||
|
||||
; Enable reading the CAL0 partition for HBL.
|
||||
; This is probably undesirable for normal usage.
|
||||
enable_hbl_cal_read = u8!0x0
|
||||
|
||||
; Controls whether fs.mitm should redirect save files
|
||||
; to directories on the sd card.
|
||||
; 0 = Do not redirect, 1 = Redirect.
|
||||
; NOTE: EXPERIMENTAL
|
||||
; If you do not know what you are doing, do not touch this yet.
|
||||
fsmitm_redirect_saves_to_sd = u8!0x0
|
||||
|
||||
; Controls whether to enable the deprecated hid mitm
|
||||
; to fix compatibility with old homebrew.
|
||||
; 0 = Do not enable, 1 = Enable.
|
||||
; Please note this setting may be removed in a
|
||||
; future release of Atmosphere.
|
||||
enable_deprecated_hid_mitm = u8!0x0
|
||||
|
||||
[hbloader]
|
||||
; Controls the size of the homebrew heap when running as applet.
|
||||
; If set to zero, all available applet memory is used as heap.
|
||||
; The default is zero.
|
||||
applet_heap_size = u64!0x0
|
||||
|
||||
; Controls the amount of memory to reserve when running as applet
|
||||
; for usage by other applets. This setting has no effect if
|
||||
; applet_heap_size is non-zero. The default is 0x8600000.
|
||||
applet_heap_reservation_size = u64!0x8600000
|
5
Modules/emuiibo/toolbox.json
Normal file
5
Modules/emuiibo/toolbox.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name" : "emuiibo",
|
||||
"tid" : "0100000000000352",
|
||||
"requires_reboot": true
|
||||
}
|
BIN
Modules/hekate/Logo.bmp
Normal file
BIN
Modules/hekate/Logo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
Modules/hekate/bootlogo.bmp
Normal file
BIN
Modules/hekate/bootlogo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 MiB |
BIN
Modules/hekate/eummc.bmp
Normal file
BIN
Modules/hekate/eummc.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 MiB |
BIN
Modules/hekate/eummclogo.bmp
Normal file
BIN
Modules/hekate/eummclogo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
42
Modules/hekate/hekate_ipl.ini
Normal file
42
Modules/hekate/hekate_ipl.ini
Normal file
|
@ -0,0 +1,42 @@
|
|||
[config]
|
||||
autoboot=0
|
||||
autoboot_list=0
|
||||
bootwait=1
|
||||
verification=1
|
||||
backlight=100
|
||||
autohosoff=0
|
||||
autonogc=1
|
||||
updater2p=1
|
||||
|
||||
{BeanNX/Bean KOSMOS_VERSION}
|
||||
{}
|
||||
{Discord: discord.teamatlasnx.com}
|
||||
{Github: git.teamatlasnx.com}
|
||||
{Patreon: patreon.teamatlasnx.com}
|
||||
{Pegascape DNS: pegascape.sdsetup.com}
|
||||
{}
|
||||
|
||||
{--- Custom Firmware ---}
|
||||
[CFW (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/bean/Logo.bmp
|
||||
{}
|
||||
|
||||
[CFW (EMUMMC)]
|
||||
emummcforce=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
atmosphere=1
|
||||
logopath=bootloader/eummc.bmp
|
||||
icon=bootloader/bean/eummclogo.bmp
|
||||
{}
|
||||
|
||||
{--- Stock ---}
|
||||
[Stock (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
stock=1
|
||||
icon=bootloader/bean/stock.bmp
|
||||
{}
|
BIN
Modules/hekate/stock.bmp
Normal file
BIN
Modules/hekate/stock.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
29
Modules/kosmos-toolbox/config.json
Normal file
29
Modules/kosmos-toolbox/config.json
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"sysmodules" : [
|
||||
{
|
||||
"name" : "bootsoundnx",
|
||||
"tid" : "00FF0000000002AA",
|
||||
"requires_reboot": true
|
||||
},
|
||||
{
|
||||
"name" : "hid-mitm",
|
||||
"tid" : "0100000000000FAF",
|
||||
"requires_reboot": true
|
||||
},
|
||||
{
|
||||
"name" : "nxsh",
|
||||
"tid" : "43000000000000FF",
|
||||
"requires_reboot": false
|
||||
},
|
||||
{
|
||||
"name" : "ojds-nx",
|
||||
"tid" : "0100000000000901",
|
||||
"requires_reboot": false
|
||||
},
|
||||
{
|
||||
"name" : "sys-netcheat",
|
||||
"tid" : "430000000000000A",
|
||||
"requires_reboot": false
|
||||
}
|
||||
]
|
||||
}
|
5
Modules/kosmos-updater/internal.db
Normal file
5
Modules/kosmos-updater/internal.db
Normal file
|
@ -0,0 +1,5 @@
|
|||
version = "KOSMOS_VERSION";
|
||||
installed_files = [ ];
|
||||
received_exfat_warning = false;
|
||||
received_ignore_config_warning = false;
|
||||
ignore_config_files = false;
|
5
Modules/ldn_mitm/toolbox.json
Normal file
5
Modules/ldn_mitm/toolbox.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name" : "ldn_mitm",
|
||||
"tid" : "4200000000000010",
|
||||
"requires_reboot": true
|
||||
}
|
5
Modules/sys-clk/toolbox.json
Normal file
5
Modules/sys-clk/toolbox.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name" : "sys-clk",
|
||||
"tid" : "00FF0000636C6BFF",
|
||||
"requires_reboot": false
|
||||
}
|
33
README.md
33
README.md
|
@ -1,2 +1,33 @@
|
|||
# DeepSea
|
||||
DeepSea the all new CFW package for the Nintendo Switch
|
||||
## DeepSea the all new CFW package for the Nintendo Switch
|
||||
|
||||
#### If you are having some trouble setting anything up you can join the [discord](http://invite.sdshrekup.com)
|
||||
|
||||
##### This CFW package comes with these applications:
|
||||
* [Atmosphère](https://github.com/Atmosphere-NX/Atmosphere)
|
||||
* [Hekate](https://github.com/CTCaer/hekate)
|
||||
* [Homebrew App Store](https://gitlab.com/4TU/hb-appstore)
|
||||
* [EdiZon](https://github.com/WerWolv/EdiZon)
|
||||
* [emuiibo](https://github.com/XorTroll/emuiibo)
|
||||
* [Goldleaf](https://github.com/XorTroll/Goldleaf)
|
||||
* [Kosmos Cleaner](https://github.com/AtlasNX/Kosmos-Cleaner)
|
||||
* [Kosmos Toolbox](https://github.com/AtlasNX/Kosmos-Toolbox)
|
||||
* [Kosmos Updater](https://github.com/AtlasNX/Kosmos-Updater)
|
||||
* [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm)
|
||||
* [Lockpick](https://github.com/shchmue/Lockpick)
|
||||
* [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM)
|
||||
* [nxdumptool](https://github.com/DarkMatterCore/nxdumptool)
|
||||
* [nx-ovlloader](https://github.com/WerWolv/nx-ovlloader)
|
||||
* [ovlSysmodules](https://github.com/WerWolv/ovl-sysmodules)
|
||||
* [Status Monitor Overlay](https://github.com/masagrator/Status-Monitor-Overlay)
|
||||
* [sys-clk](https://github.com/retronx-team/sys-clk)
|
||||
* [sys-con](https://github.com/cathery/sys-con)
|
||||
* [sys-ftpd-light](https://github.com/cathery/sys-ftpd-light)
|
||||
* [Tesla-Menu](https://github.com/WerWolv/Tesla-Menu)
|
||||
|
||||
|
||||
## Credits
|
||||
* I gotta thank Daniel 💻#7205 aka Daniel C for creating the discord with me
|
||||
* Slluxx#8184 For helping me with a boat load of stuff and choosing the name of the CFW package for us
|
||||
* FennecTECH#4926 For spamming the discord chat full of images
|
||||
* And seasonal coochie#8888 for boosting the server and also voicing his opinion
|
||||
|
|
114
builder.py
Normal file
114
builder.py
Normal file
|
@ -0,0 +1,114 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Kosmos Builder
|
||||
# Copyright (C) 2020 Nichole Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
|
||||
import argparse
|
||||
import common
|
||||
import config
|
||||
import modules
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'-v', '--version',
|
||||
default=None,
|
||||
type=str,
|
||||
help='Overrides the Kosmos Version from the config file.',
|
||||
metavar='KosmosVersion')
|
||||
subparsers = parser.add_subparsers()
|
||||
|
||||
# Kosmos subcommands
|
||||
parser_kosmos = subparsers.add_parser('beanNX', help='Create a release build of Kosmos.')
|
||||
parser_kosmos.add_argument('output', help='Zip file to create.')
|
||||
parser_kosmos.set_defaults(command=common.Command.Kosmos)
|
||||
|
||||
# SDSetup subcommands
|
||||
parser_sdsetup = subparsers.add_parser('sdsetup', help='Create a Kosmos modules for SDSetup.')
|
||||
parser_sdsetup.add_argument('output', help='Directory to output modules to.')
|
||||
parser_sdsetup.add_argument(
|
||||
'-a', '--auto',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Perform an auto build.')
|
||||
parser_sdsetup.set_defaults(command=common.Command.SDSetup)
|
||||
|
||||
# Kosmos Minimal subcommands
|
||||
parser_kosmos = subparsers.add_parser('beanNX-mini', help='Create a release build of Kosmos Minimal.')
|
||||
parser_kosmos.add_argument('output', help='Zip file to create.')
|
||||
parser_kosmos.set_defaults(command=common.Command.KosmosMinimal)
|
||||
|
||||
# Parse arguments
|
||||
args = parser.parse_args()
|
||||
|
||||
if not hasattr(args, 'command'):
|
||||
parser.print_help()
|
||||
sys.exit()
|
||||
|
||||
return args
|
||||
|
||||
def get_kosmos_version(args):
|
||||
if args.version is not None:
|
||||
return args.version
|
||||
return config.version
|
||||
|
||||
def init_version_messages(args, kosmos_version):
|
||||
if args.command == common.Command.Kosmos:
|
||||
return [ f'BeanNX {kosmos_version} built with:' ]
|
||||
elif args.command == common.Command.SDSetup and not args.auto:
|
||||
return [ 'SDSetup Modules built with:' ]
|
||||
elif args.command == common.Command.KosmosMinimal:
|
||||
return [ f'BeanNX Minimal {kosmos_version} built with:' ]
|
||||
return []
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = parse_args()
|
||||
|
||||
temp_directory = common.generate_temp_path()
|
||||
common.mkdir(temp_directory)
|
||||
kosmos_version = get_kosmos_version(args)
|
||||
|
||||
auto_build = False
|
||||
if hasattr(args, 'auto'):
|
||||
auto_build = args.auto
|
||||
|
||||
version_messages = init_version_messages(args, kosmos_version)
|
||||
|
||||
build_messages = modules.build(temp_directory, kosmos_version, args.command, auto_build)
|
||||
|
||||
common.delete(args.output)
|
||||
|
||||
if build_messages is not None:
|
||||
version_messages += build_messages
|
||||
|
||||
if args.command == common.Command.SDSetup:
|
||||
common.move(temp_directory, args.output)
|
||||
else:
|
||||
shutil.make_archive(
|
||||
Path(args.output).stem,
|
||||
'zip',
|
||||
temp_directory)
|
||||
|
||||
for message in version_messages:
|
||||
print(message)
|
||||
|
||||
common.delete(Path.cwd().joinpath('tmp'))
|
103
common.py
Normal file
103
common.py
Normal file
|
@ -0,0 +1,103 @@
|
|||
#
|
||||
# Kosmos Builder
|
||||
# Copyright (C) 2020 Nichole Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
|
||||
import enum
|
||||
import glob
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import uuid
|
||||
|
||||
class Command(enum.Enum):
|
||||
Kosmos = 0
|
||||
SDSetup = 1
|
||||
KosmosMinimal = 2
|
||||
|
||||
class GitService(enum.Enum):
|
||||
GitHub = 0
|
||||
GitLab = 1
|
||||
SourceForge = 2
|
||||
|
||||
def generate_temp_path():
|
||||
return Path.cwd().joinpath('tmp', str(uuid.uuid4()))
|
||||
|
||||
def delete(source):
|
||||
sourcePath = Path(source)
|
||||
|
||||
if not sourcePath.exists():
|
||||
return
|
||||
|
||||
if sourcePath.is_file():
|
||||
sourcePath.unlink()
|
||||
return
|
||||
|
||||
for fileSourcePath in sourcePath.iterdir():
|
||||
delete(fileSourcePath)
|
||||
|
||||
if fileSourcePath.is_dir():
|
||||
fileSourcePath.rmdir()
|
||||
|
||||
if sourcePath.is_dir():
|
||||
sourcePath.rmdir()
|
||||
return
|
||||
|
||||
def copy_module_file(module_name, file_name, destination):
|
||||
sourcePath = Path.cwd().joinpath('Modules', module_name, file_name)
|
||||
return shutil.copyfile(sourcePath, destination)
|
||||
|
||||
def copy_module_folder(module_name, folder_name, destination):
|
||||
sourcePath = Path.cwd().joinpath('Modules', module_name, file_name)
|
||||
return shutil.copytree(sourcePath, destination)
|
||||
|
||||
def find_file(pattern):
|
||||
return glob.glob(str(pattern), recursive=False)
|
||||
|
||||
def sed(pattern, replace, file_path):
|
||||
lines = []
|
||||
with open(file_path, 'r') as text_file:
|
||||
lines += text_file.readlines()
|
||||
with open(file_path, 'w') as text_file:
|
||||
for line in lines:
|
||||
text_file.write(re.sub(pattern, replace, line))
|
||||
|
||||
def mkdir(dest):
|
||||
Path(dest).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
def move(source, dest):
|
||||
sourcePath = Path(source)
|
||||
destPath = Path(dest)
|
||||
|
||||
if not sourcePath.exists():
|
||||
return
|
||||
|
||||
if sourcePath.is_file():
|
||||
sourcePath.rename(destPath)
|
||||
return
|
||||
|
||||
if not destPath.exists():
|
||||
destPath.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
for fileSourcePath in sourcePath.iterdir():
|
||||
fileDestPath = destPath.joinpath(fileSourcePath.name)
|
||||
|
||||
if fileSourcePath.is_dir():
|
||||
fileDestPath.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
move(fileSourcePath, fileDestPath)
|
9
config_template.py
Normal file
9
config_template.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Current version of Kosmos
|
||||
version = 'v15.1'
|
||||
|
||||
# GitHub Login Information
|
||||
github_username = ''
|
||||
github_password = ''
|
||||
|
||||
# GitLab Login Information
|
||||
gitlab_private_access_token = ''
|
33
kosmos-minimal.json
Normal file
33
kosmos-minimal.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
[
|
||||
{
|
||||
"name": "Atmosphère",
|
||||
"download_function_name": "download_atmosphere",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Atmosphere-NX",
|
||||
"repo_name": "Atmosphere",
|
||||
"asset_patterns": [
|
||||
".*atmosphere.*\\.zip",
|
||||
".*fusee.*\\.bin"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Hekate",
|
||||
"download_function_name": "download_hekate",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "CTCaer",
|
||||
"repo_name": "hekate",
|
||||
"asset_patterns": [
|
||||
".*hekate.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
}
|
||||
]
|
319
kosmos.json
Normal file
319
kosmos.json
Normal file
|
@ -0,0 +1,319 @@
|
|||
[
|
||||
{
|
||||
"name": "Atmosphère",
|
||||
"download_function_name": "download_atmosphere",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Atmosphere-NX",
|
||||
"repo_name": "Atmosphere",
|
||||
"asset_patterns": [
|
||||
".*atmosphere.*\\.zip",
|
||||
".*fusee.*\\.bin"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Hekate",
|
||||
"download_function_name": "download_hekate",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "CTCaer",
|
||||
"repo_name": "hekate",
|
||||
"asset_patterns": [
|
||||
".*hekate.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Hekate Icons",
|
||||
"download_function_name": "download_hekate_icons",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "NicholeMattera",
|
||||
"repo_name": "Hekate-Icons",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Homebrew App Store",
|
||||
"download_function_name": "download_appstore",
|
||||
"git": {
|
||||
"service": 1,
|
||||
"org_name": "4TU",
|
||||
"repo_name": "hb-appstore",
|
||||
"asset_patterns": [
|
||||
"\\[.*\\.nro\\.zip\\]\\((.*\\.nro\\.zip)\\)"
|
||||
],
|
||||
"group": 0,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "EdiZon",
|
||||
"download_function_name": "download_edizon",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "EdiZon",
|
||||
"asset_patterns": [
|
||||
".*\\.nro",
|
||||
".*\\.ovl"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Emuiibo",
|
||||
"download_function_name": "download_emuiibo",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "XorTroll",
|
||||
"repo_name": "emuiibo",
|
||||
"asset_patterns": [
|
||||
".*emuiibo.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Goldleaf",
|
||||
"download_function_name": "download_goldleaf",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "XorTroll",
|
||||
"repo_name": "Goldleaf",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Kosmos Cleaner",
|
||||
"download_function_name": "download_kosmos_cleaner",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "AtlasNX",
|
||||
"repo_name": "Kosmos-Cleaner",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Kosmos Toolbox",
|
||||
"download_function_name": "download_kosmos_toolbox",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "AtlasNX",
|
||||
"repo_name": "Kosmos-Toolbox",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Kosmos Updater",
|
||||
"download_function_name": "download_kosmos_updater",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "AtlasNX",
|
||||
"repo_name": "Kosmos-Updater",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "ldn_mitm",
|
||||
"download_function_name": "download_ldn_mitm",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "spacemeowx2",
|
||||
"repo_name": "ldn_mitm",
|
||||
"asset_patterns": [
|
||||
".*ldn_mitm.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Lockpick",
|
||||
"download_function_name": "download_lockpick",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "shchmue",
|
||||
"repo_name": "Lockpick",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Lockpick_RCM",
|
||||
"download_function_name": "download_lockpick_rcm",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "shchmue",
|
||||
"repo_name": "Lockpick_RCM",
|
||||
"asset_patterns": [
|
||||
".*\\.bin"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "nxdumptool",
|
||||
"download_function_name": "download_nxdumptool",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "DarkMatterCore",
|
||||
"repo_name": "nxdumptool",
|
||||
"asset_patterns": [
|
||||
".*nxdumptool.*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "nx-ovlloader",
|
||||
"download_function_name": "download_nx_ovlloader",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "nx-ovlloader",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "ovlSysModules",
|
||||
"download_function_name": "download_ovl_sysmodules",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "ovl-sysmodules",
|
||||
"asset_patterns": [
|
||||
".*\\.ovl"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Status Monitor Overlay",
|
||||
"download_function_name": "download_status_monitor_overlay",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "masagrator",
|
||||
"repo_name": "Status-Monitor-Overlay",
|
||||
"asset_patterns": [
|
||||
".*\\.ovl"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "sys-clk",
|
||||
"download_function_name": "download_sys_clk",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "retronx-team",
|
||||
"repo_name": "sys-clk",
|
||||
"asset_patterns": [
|
||||
".*sys-clk-.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "sys-con",
|
||||
"download_function_name": "download_sys_con",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "cathery",
|
||||
"repo_name": "sys-con",
|
||||
"asset_patterns": [
|
||||
".*sys-con-.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "sys-ftpd-light",
|
||||
"download_function_name": "download_sys_ftpd_light",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "cathery",
|
||||
"repo_name": "sys-ftpd-light",
|
||||
"asset_patterns": [
|
||||
".*sys-ftpd-light.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Tesla-Menu",
|
||||
"download_function_name": "download_tesla_menu",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "Tesla-Menu",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
}
|
||||
]
|
553
modules.py
Normal file
553
modules.py
Normal file
|
@ -0,0 +1,553 @@
|
|||
#
|
||||
# Kosmos Builder
|
||||
# Copyright (C) 2020 Nichole Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
#
|
||||
|
||||
import common
|
||||
import config
|
||||
from github import Github
|
||||
from gitlab import Gitlab
|
||||
import json
|
||||
import re
|
||||
import shutil
|
||||
import urllib.request
|
||||
import uuid
|
||||
import xmltodict
|
||||
import zipfile
|
||||
|
||||
gh = Github(config.github_username, config.github_password)
|
||||
gl = Gitlab('https://gitlab.com', private_token=config.gitlab_private_access_token)
|
||||
gl.auth()
|
||||
|
||||
def get_latest_release(module, include_prereleases = True):
|
||||
if common.GitService(module['git']['service']) == common.GitService.GitHub:
|
||||
try:
|
||||
repo = gh.get_repo(f'{module["git"]["org_name"]}/{module["git"]["repo_name"]}')
|
||||
except:
|
||||
print(f'[Error] Unable to find repo: {module["git"]["org_name"]}/{module["git"]["repo_name"]}')
|
||||
return None
|
||||
|
||||
releases = repo.get_releases()
|
||||
if releases.totalCount == 0:
|
||||
print(f'[Error] Unable to find any releases for repo: {module["git"]["org_name"]}/{module["git"]["repo_name"]}')
|
||||
return None
|
||||
|
||||
if include_prereleases:
|
||||
return releases[0]
|
||||
|
||||
for release in releases:
|
||||
if not release.prerelease:
|
||||
return release
|
||||
|
||||
return None
|
||||
elif common.GitService(module['git']['service']) == common.GitService.GitLab:
|
||||
try:
|
||||
project = gl.projects.get(f'{module["git"]["org_name"]}/{module["git"]["repo_name"]}')
|
||||
except:
|
||||
print(f'[Error] Unable to find repo: {module["git"]["org_name"]}/{module["git"]["repo_name"]}')
|
||||
return None
|
||||
|
||||
tags = project.tags.list()
|
||||
for tag in tags:
|
||||
if tag.release is not None:
|
||||
return tag
|
||||
|
||||
print(f'[Error] Unable to find any releases for repo: {module["git"]["org_name"]}/{module["git"]["repo_name"]}')
|
||||
return None
|
||||
else:
|
||||
releases = None
|
||||
with urllib.request.urlopen(f'https://sourceforge.net/projects/{module["git"]["repo_name"]}/rss?path=/') as fd:
|
||||
releases = xmltodict.parse(fd.read().decode('utf-8'))
|
||||
|
||||
return releases
|
||||
|
||||
def download_asset(module, release, index):
|
||||
pattern = module['git']['asset_patterns'][index]
|
||||
|
||||
if common.GitService(module['git']['service']) == common.GitService.GitHub:
|
||||
if release is None:
|
||||
return None
|
||||
|
||||
matched_asset = None
|
||||
for asset in release.get_assets():
|
||||
if re.search(pattern, asset.name):
|
||||
matched_asset = asset
|
||||
break
|
||||
|
||||
if matched_asset is None:
|
||||
print(f'[Error] Unable to find asset that match pattern: "{pattern}"')
|
||||
return None
|
||||
|
||||
download_path = common.generate_temp_path()
|
||||
urllib.request.urlretrieve(matched_asset.browser_download_url, download_path)
|
||||
|
||||
return download_path
|
||||
elif common.GitService(module['git']['service']) == common.GitService.GitLab:
|
||||
group = module['git']['group']
|
||||
|
||||
match = re.search(pattern, release.release['description'])
|
||||
if match is None:
|
||||
return None
|
||||
|
||||
groups = match.groups()
|
||||
if len(groups) <= group:
|
||||
return None
|
||||
|
||||
download_path = common.generate_temp_path()
|
||||
urllib.request.urlretrieve(f'https://gitlab.com/{module["git"]["org_name"]}/{module["git"]["repo_name"]}{groups[group]}', download_path)
|
||||
|
||||
return download_path
|
||||
else:
|
||||
matched_item = None
|
||||
for item in release['rss']['channel']['item']:
|
||||
if re.search(pattern, item['title']):
|
||||
matched_item = item
|
||||
break
|
||||
|
||||
if matched_item is None:
|
||||
print(f'[Error] Unable to find asset that match pattern: "{pattern}"')
|
||||
return None
|
||||
|
||||
download_path = common.generate_temp_path()
|
||||
urllib.request.urlretrieve(matched_item['link'], download_path)
|
||||
|
||||
return download_path
|
||||
|
||||
def find_asset(release, pattern):
|
||||
for asset in release.get_assets():
|
||||
if re.search(pattern, asset.name):
|
||||
return asset
|
||||
|
||||
return None
|
||||
|
||||
def get_version(module, release, index):
|
||||
if common.GitService(module['git']['service']) == common.GitService.GitHub:
|
||||
return release.tag_name
|
||||
elif common.GitService(module['git']['service']) == common.GitService.GitLab:
|
||||
return release.name
|
||||
else:
|
||||
matched_item = None
|
||||
for item in release['rss']['channel']['item']:
|
||||
if re.search(module['git']['asset_patterns'][index], item['title']):
|
||||
matched_item = item
|
||||
break
|
||||
|
||||
if matched_item is None:
|
||||
return "Latest"
|
||||
|
||||
match = re.search(module['git']['version_pattern'], matched_item['title'])
|
||||
if match is None:
|
||||
return "Latest"
|
||||
|
||||
groups = match.groups()
|
||||
if len(groups) == 0:
|
||||
return "Latest"
|
||||
|
||||
return groups[0]
|
||||
|
||||
def download_atmosphere(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
common.delete(temp_directory.joinpath('switch/reboot_to_payload.nro'))
|
||||
common.delete(temp_directory.joinpath('switch'))
|
||||
common.delete(temp_directory.joinpath('atmosphere/reboot_payload.bin'))
|
||||
|
||||
payload_path = download_asset(module, release, 1)
|
||||
if payload_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('bootloader/payloads'))
|
||||
common.move(payload_path, temp_directory.joinpath('bootloader/payloads/fusee-primary.bin'))
|
||||
|
||||
common.mkdir(temp_directory.joinpath('atmosphere/exefs_patches/bootlogo'))
|
||||
common.copy_module_file('atmosphere', '3EC573CB22744A993DFE281701E9CBFE66C03ABD.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/3EC573CB22744A993DFE281701E9CBFE66C03ABD.ips'))
|
||||
common.copy_module_file('atmosphere', '7B4123290DE2A6F52DE4AB72BEA1A83D11214C71.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/7B4123290DE2A6F52DE4AB72BEA1A83D11214C71.ips'))
|
||||
common.copy_module_file('atmosphere', '7C5894688EDA24907BC9CE7013630F365B366E4A.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/7C5894688EDA24907BC9CE7013630F365B366E4A.ips'))
|
||||
common.copy_module_file('atmosphere', '723DF02F6955D903DF7134105A16D48F06012DB1.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/723DF02F6955D903DF7134105A16D48F06012DB1.ips'))
|
||||
common.copy_module_file('atmosphere', '967F4C3DFC7B165E4F7981373EC1798ACA234A45.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/967F4C3DFC7B165E4F7981373EC1798ACA234A45.ips'))
|
||||
common.copy_module_file('atmosphere', '01890C643E9D6E17B2CDA77A9749ECB9A4F676D6.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/01890C643E9D6E17B2CDA77A9749ECB9A4F676D6.ips'))
|
||||
common.copy_module_file('atmosphere', '7421EC6021AC73DD60A635BC2B3AD6FCAE2A6481.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/7421EC6021AC73DD60A635BC2B3AD6FCAE2A6481.ips'))
|
||||
common.copy_module_file('atmosphere', '96529C3226BEE906EE651754C33FE3E24ECAE832.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/96529C3226BEE906EE651754C33FE3E24ECAE832.ips'))
|
||||
common.copy_module_file('atmosphere', '98446A07BC664573F1578F3745C928D05AB73349.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/98446A07BC664573F1578F3745C928D05AB73349.ips'))
|
||||
common.copy_module_file('atmosphere', '0767302E1881700608344A3859BC57013150A375.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/0767302E1881700608344A3859BC57013150A375.ips'))
|
||||
common.copy_module_file('atmosphere', 'C088ADC91417EBAE6ADBDF3E47946858CAFE1A82.ips', temp_directory.joinpath('atmosphere/exefs_patches/bootlogo/C088ADC91417EBAE6ADBDF3E47946858CAFE1A82.ips'))
|
||||
|
||||
common.copy_module_file('atmosphere', 'system_settings.ini', temp_directory.joinpath('atmosphere/config/system_settings.ini'))
|
||||
|
||||
if not kosmos_build:
|
||||
common.delete(temp_directory.joinpath('hbmenu.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_hekate(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
|
||||
common.mkdir(temp_directory.joinpath('bootloader/bean'))
|
||||
common.copy_module_file('hekate', 'Logo.bmp', temp_directory.joinpath('bootloader/bean/Logo.bmp'))
|
||||
common.copy_module_file('hekate', 'stock.bmp', temp_directory.joinpath('bootloader/bean/stock.bmp'))
|
||||
common.copy_module_file('hekate', 'eummclogo.bmp', temp_directory.joinpath('bootloader/bean/eummclogo.bmp'))
|
||||
common.copy_module_file('hekate', 'bootlogo.bmp', temp_directory.joinpath('bootloader/bootlogo.bmp'))
|
||||
common.copy_module_file('hekate', 'hekate_ipl.ini', temp_directory.joinpath('bootloader/hekate_ipl.ini'))
|
||||
common.copy_module_file('hekate', 'eummc.bmp', temp_directory.joinpath('bootloader/eummc.bmp'))
|
||||
common.sed('KOSMOS_VERSION', kosmos_version, temp_directory.joinpath('bootloader/hekate_ipl.ini'))
|
||||
|
||||
payload = common.find_file(temp_directory.joinpath('hekate_ctcaer_*.bin'))
|
||||
if len(payload) != 0:
|
||||
shutil.copyfile(payload[0], temp_directory.joinpath('bootloader/update.bin'))
|
||||
common.mkdir(temp_directory.joinpath('atmosphere'))
|
||||
shutil.copyfile(payload[0], temp_directory.joinpath('atmosphere/reboot_payload.bin'))
|
||||
|
||||
common.delete(temp_directory.joinpath('nyx_usb_max_rate (run once per windows pc).reg'))
|
||||
|
||||
if not kosmos_build:
|
||||
common.mkdir(temp_directory.joinpath('../must_have'))
|
||||
common.move(temp_directory.joinpath('bootloader'), temp_directory.joinpath('../must_have/bootloader'))
|
||||
common.move(temp_directory.joinpath('atmosphere/reboot_payload.bin'), temp_directory.joinpath('../must_have/atmosphere/reboot_payload.bin'))
|
||||
common.delete(temp_directory.joinpath('atmosphere'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_hekate_icons(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
common.move(temp_directory.joinpath('bootloader/res/icon_payload.bmp'), temp_directory.joinpath('bootloader/res/icon_payload_hue.bmp'))
|
||||
common.move(temp_directory.joinpath('bootloader/res/icon_payload_custom.bmp'), temp_directory.joinpath('bootloader/res/icon_payload.bmp'))
|
||||
common.move(temp_directory.joinpath('bootloader/res/icon_switch.bmp'), temp_directory.joinpath('bootloader/res/icon_switch_hue.bmp'))
|
||||
common.move(temp_directory.joinpath('bootloader/res/icon_switch_custom.bmp'), temp_directory.joinpath('bootloader/res/icon_switch.bmp'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_appstore(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
common.mkdir(temp_directory.joinpath('switch/appstore'))
|
||||
common.move(temp_directory.joinpath('appstore.nro'), temp_directory.joinpath('switch/appstore/appstore.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_edizon(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/EdiZon'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/EdiZon/EdiZon.nro'))
|
||||
|
||||
overlay_path = download_asset(module, release, 1)
|
||||
if overlay_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/.overlays'))
|
||||
common.move(overlay_path, temp_directory.joinpath('switch/.overlays/ovlEdiZon.ovl'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_emuiibo(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
common.mkdir(temp_directory.joinpath('atmosphere/contents'))
|
||||
common.move(temp_directory.joinpath('SdOut/atmosphere/contents/0100000000000352'), temp_directory.joinpath('atmosphere/contents/0100000000000352'))
|
||||
common.mkdir(temp_directory.joinpath('switch/.overlays'))
|
||||
common.move(temp_directory.joinpath('SdOut/switch/.overlays/emuiibo.ovl'), temp_directory.joinpath('switch/.overlays/emuiibo.ovl'))
|
||||
common.delete(temp_directory.joinpath('SdOut'))
|
||||
if kosmos_build:
|
||||
common.delete(temp_directory.joinpath('atmosphere/contents/0100000000000352/flags/boot2.flag'))
|
||||
common.copy_module_file('emuiibo', 'toolbox.json', temp_directory.joinpath('atmosphere/contents/0100000000000352/toolbox.json'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_goldleaf(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/Goldleaf'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/Goldleaf/Goldleaf.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_kosmos_cleaner(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_kosmos_toolbox(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/KosmosToolbox'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/KosmosToolbox/KosmosToolbox.nro'))
|
||||
common.copy_module_file('kosmos-toolbox', 'config.json', temp_directory.joinpath('switch/KosmosToolbox/config.json'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_kosmos_updater(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/KosmosUpdater'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/KosmosUpdater/KosmosUpdater.nro'))
|
||||
common.copy_module_file('kosmos-updater', 'internal.db', temp_directory.joinpath('switch/KosmosUpdater/internal.db'))
|
||||
common.sed('KOSMOS_VERSION', kosmos_version, temp_directory.joinpath('switch/KosmosUpdater/internal.db'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_ldn_mitm(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
if kosmos_build:
|
||||
common.delete(temp_directory.joinpath('atmosphere/contents/4200000000000010/flags/boot2.flag'))
|
||||
common.copy_module_file('ldn_mitm', 'toolbox.json', temp_directory.joinpath('atmosphere/contents/4200000000000010/toolbox.json'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_lockpick(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/Lockpick'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/Lockpick/Lockpick.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_lockpick_rcm(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
payload_path = download_asset(module, release, 0)
|
||||
if payload_path is None:
|
||||
return None
|
||||
|
||||
if kosmos_build:
|
||||
common.mkdir(temp_directory.joinpath('bootloader/payloads'))
|
||||
common.move(payload_path, temp_directory.joinpath('bootloader/payloads/Lockpick_RCM.bin'))
|
||||
else:
|
||||
common.move(payload_path, temp_directory.joinpath('Lockpick_RCM.bin'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_nxdumptool(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/NXDumpTool'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/NXDumpTool/NXDumpTool.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_nx_ovlloader(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_ovl_sysmodules(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/.overlays'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/.overlays/ovlSysmodules.ovl'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_status_monitor_overlay(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
common.mkdir(temp_directory.joinpath('switch/.overlays'))
|
||||
common.move(app_path, temp_directory.joinpath('switch/.overlays/Status-Monitor-Overlay.ovl'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_sys_clk(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
if kosmos_build:
|
||||
common.delete(temp_directory.joinpath('atmosphere/contents/00FF0000636C6BFF/flags/boot2.flag'))
|
||||
common.delete(temp_directory.joinpath('README.md'))
|
||||
common.copy_module_file('sys-clk', 'toolbox.json', temp_directory.joinpath('atmosphere/contents/00FF0000636C6BFF/toolbox.json'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_sys_con(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
if kosmos_build:
|
||||
common.delete(temp_directory.joinpath('atmosphere/contents/690000000000000D/flags/boot2.flag'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_sys_ftpd_light(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
if kosmos_build:
|
||||
common.delete(temp_directory.joinpath('atmosphere/contents/420000000000000E/flags/boot2.flag'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def download_tesla_menu(module, temp_directory, kosmos_version, kosmos_build):
|
||||
release = get_latest_release(module)
|
||||
bundle_path = download_asset(module, release, 0)
|
||||
if bundle_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(bundle_path)
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
def build(temp_directory, kosmos_version, command, auto_build):
|
||||
results = []
|
||||
|
||||
modules_filename = 'kosmos.json'
|
||||
if command == common.Command.KosmosMinimal:
|
||||
modules_filename = 'kosmos-minimal.json'
|
||||
elif command == common.Command.SDSetup:
|
||||
modules_filename = 'sdsetup.json'
|
||||
|
||||
# Open up modules.json
|
||||
with open(modules_filename) as json_file:
|
||||
# Parse JSON
|
||||
data = json.load(json_file)
|
||||
|
||||
# Loop through modules
|
||||
for module in data:
|
||||
# Running a SDSetup Build
|
||||
if command == common.Command.SDSetup:
|
||||
# Only show prompts when it's not an auto build.
|
||||
if not auto_build:
|
||||
print(f'Downloading {module["name"]}...')
|
||||
|
||||
# Make sure module directory is created.
|
||||
module_directory = temp_directory.joinpath(module['sdsetup_module_name'])
|
||||
common.mkdir(module_directory)
|
||||
|
||||
# Download the module.
|
||||
download = globals()[module['download_function_name']]
|
||||
version = download(module, module_directory, kosmos_version, False)
|
||||
if version is None:
|
||||
return None
|
||||
|
||||
# Auto builds have a different prompt at the end for parsing.
|
||||
if auto_build:
|
||||
results.append(f'{module["sdsetup_module_name"]}:{version}')
|
||||
else:
|
||||
results.append(f' {module["name"]} - {version}')
|
||||
|
||||
# Running a Kosmos Build
|
||||
else:
|
||||
# Download the module.
|
||||
print(f'Downloading {module["name"]}...')
|
||||
download = globals()[module['download_function_name']]
|
||||
version = download(module, temp_directory, kosmos_version, True)
|
||||
if version is None:
|
||||
return None
|
||||
results.append(f' {module["name"]} - {version}')
|
||||
|
||||
return results
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
PyGithub
|
||||
python-gitlab
|
||||
xmltodict
|
243
sdsetup.json
Normal file
243
sdsetup.json
Normal file
|
@ -0,0 +1,243 @@
|
|||
[
|
||||
{
|
||||
"name": "Atmosphère",
|
||||
"download_function_name": "download_atmosphere",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Atmosphere-NX",
|
||||
"repo_name": "Atmosphere",
|
||||
"asset_patterns": [
|
||||
".*atmosphere.*\\.zip",
|
||||
".*fusee.*\\.bin"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "must_have"
|
||||
},
|
||||
{
|
||||
"name": "Hekate",
|
||||
"download_function_name": "download_hekate",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "CTCaer",
|
||||
"repo_name": "hekate",
|
||||
"asset_patterns": [
|
||||
".*hekate.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "hekate"
|
||||
},
|
||||
{
|
||||
"name": "Hekate Icons",
|
||||
"download_function_name": "download_hekate_icons",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "NicholeMattera",
|
||||
"repo_name": "Hekate-Icons",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "hekate_icons"
|
||||
},
|
||||
{
|
||||
"name": "Emuiibo",
|
||||
"download_function_name": "download_emuiibo",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "XorTroll",
|
||||
"repo_name": "emuiibo",
|
||||
"asset_patterns": [
|
||||
".*emuiibo.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "emuiibo"
|
||||
},
|
||||
{
|
||||
"name": "Kosmos Cleaner",
|
||||
"download_function_name": "download_kosmos_cleaner",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "AtlasNX",
|
||||
"repo_name": "Kosmos-Cleaner",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "kosmos_cleaner"
|
||||
},
|
||||
{
|
||||
"name": "Kosmos Toolbox",
|
||||
"download_function_name": "download_kosmos_toolbox",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "AtlasNX",
|
||||
"repo_name": "Kosmos-Toolbox",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "kosmos_toolbox"
|
||||
},
|
||||
{
|
||||
"name": "Kosmos Updater",
|
||||
"download_function_name": "download_kosmos_updater",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "AtlasNX",
|
||||
"repo_name": "Kosmos-Updater",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "kosmos_updater"
|
||||
},
|
||||
{
|
||||
"name": "ldn_mitm",
|
||||
"download_function_name": "download_ldn_mitm",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "spacemeowx2",
|
||||
"repo_name": "ldn_mitm",
|
||||
"asset_patterns": [
|
||||
".*ldn_mitm.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "ldn_mitm"
|
||||
},
|
||||
{
|
||||
"name": "Lockpick_RCM",
|
||||
"download_function_name": "download_lockpick_rcm",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "shchmue",
|
||||
"repo_name": "Lockpick_RCM",
|
||||
"asset_patterns": [
|
||||
".*\\.bin"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "lockpick_rcm"
|
||||
},
|
||||
{
|
||||
"name": "nx-ovlloader",
|
||||
"download_function_name": "download_nx_ovlloader",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "nx-ovlloader",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "nx_ovlloader"
|
||||
},
|
||||
{
|
||||
"name": "ovlSysModules",
|
||||
"download_function_name": "download_ovl_sysmodules",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "ovl-sysmodules",
|
||||
"asset_patterns": [
|
||||
".*\\.ovl"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "ovl_sysmodules"
|
||||
},
|
||||
{
|
||||
"name": "Status Monitor Overlay",
|
||||
"download_function_name": "download_status_monitor_overlay",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "masagrator",
|
||||
"repo_name": "Status-Monitor-Overlay",
|
||||
"asset_patterns": [
|
||||
".*\\.ovl"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "status_monitor_overlay"
|
||||
},
|
||||
{
|
||||
"name": "sys-clk",
|
||||
"download_function_name": "download_sys_clk",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "retronx-team",
|
||||
"repo_name": "sys-clk",
|
||||
"asset_patterns": [
|
||||
".*sys-clk-.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "sys_clk"
|
||||
},
|
||||
{
|
||||
"name": "sys-con",
|
||||
"download_function_name": "download_sys_con",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "cathery",
|
||||
"repo_name": "sys-con",
|
||||
"asset_patterns": [
|
||||
".*sys-con-.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "sys_con"
|
||||
},
|
||||
{
|
||||
"name": "sys-ftpd-light",
|
||||
"download_function_name": "download_sys_ftpd_light",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "cathery",
|
||||
"repo_name": "sys-ftpd-light",
|
||||
"asset_patterns": [
|
||||
".*sys-ftpd-light.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "sys_ftpd"
|
||||
},
|
||||
{
|
||||
"name": "Tesla-Menu",
|
||||
"download_function_name": "download_tesla_menu",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "Tesla-Menu",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": "tesla_menu"
|
||||
}
|
||||
]
|
Reference in a new issue