Initial commit
This commit is contained in:
parent
534b935442
commit
84caa6dea0
129
.github/workflows/buildRelease.yml
vendored
Normal file
129
.github/workflows/buildRelease.yml
vendored
Normal file
|
@ -0,0 +1,129 @@
|
|||
name: BuildRelease
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Increment version
|
||||
run: |
|
||||
echo ::set-env name=TAG_NAME::$(cat ./VERSION)
|
||||
|
||||
- name: Bump release version
|
||||
id: bump_version
|
||||
uses: christian-draeger/increment-semantic-version@1.0.1
|
||||
with:
|
||||
current-version: '${{ env.TAG_NAME }}'
|
||||
version-fragment: 'bug'
|
||||
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8.3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
if [ -f ./builder/requirements.txt ]; then pip3 install -r ./builder/requirements.txt; fi
|
||||
|
||||
- name: Create config script
|
||||
env:
|
||||
gitPass: ${{ secrets.SLX_GIT_PASS }}
|
||||
gitToken: ${{ secrets.SLX_GIT_TOKEN }}
|
||||
gitUser: ${{ secrets.SLX_GIT_USER }}
|
||||
run: |
|
||||
echo -e "version = 'v${{ steps.bump_version.outputs.next-version }}'\ngithub_username = '$gitUser'\ngithub_password = '$gitPass'\ngitlab_private_access_token = '$gitToken'"> ./builder/config.py
|
||||
|
||||
- name: Compile DeepSea Zip
|
||||
run: |
|
||||
cd ./builder
|
||||
python ./builder.py deepsea output="./deepsea.zip" > ../output
|
||||
|
||||
- name: Compile DeepSea-patches Zip
|
||||
run: |
|
||||
cd ./builder
|
||||
python ./builder.py deepsea-patches output="./deepsea-patched.zip" >> ../output
|
||||
|
||||
- name: Compile DeepSea-minimal Zip
|
||||
run: |
|
||||
cd ./builder
|
||||
python ./builder.py deepsea-mini output="./deepsea-minimal.zip" >> ../output
|
||||
|
||||
- name: Bump VERSION
|
||||
run: |
|
||||
echo ${{ steps.bump_version.outputs.next-version }} > ./VERSION
|
||||
|
||||
- uses: pCYSl5EDgo/cat@master
|
||||
id: release
|
||||
with:
|
||||
path: ./output
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.bump_version.outputs.next-version }}
|
||||
release_name: Release ${{ steps.bump_version.outputs.next-version }}
|
||||
body: |
|
||||
${{ steps.release.outputs.text }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
|
||||
- name: Upload Release Asset - DeepSea
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./builder/deepsea.zip
|
||||
asset_name: deepsea_v${{ steps.bump_version.outputs.next-version }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
|
||||
- name: Upload Release Asset - DeepSea-Patches
|
||||
id: upload-release-asset2
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./builder/deepsea-patched.zip
|
||||
asset_name: deepsea-patched_v${{ steps.bump_version.outputs.next-version }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
|
||||
|
||||
- name: Upload Release Asset - DeepSea-Minimal
|
||||
id: upload-release-asset3
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./builder/deepsea-minimal.zip
|
||||
asset_name: deepsea-minimal_v${{ steps.bump_version.outputs.next-version }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -m "[Auto] bump push after build" -a
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
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.
|
68
README.md
68
README.md
|
@ -1,2 +1,68 @@
|
|||
# Isotope
|
||||
A custom all-in-one CFW package for the Nintendo Switch, based on Kosmos and Deepsea
|
||||
|
||||
## A custom all-in-one CFW package for the Nintendo Switch, based on Kosmos and Deepsea.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
* Vanilla Atmosphère
|
||||
* Always up-to-date packages
|
||||
* Background FTP Server
|
||||
* Updating directly from your console
|
||||
* Customize button bindings
|
||||
* Easy drag and drop install
|
||||
* Ability to enable autoboot without touching config files
|
||||
* Starting and reloading system modules without restarting
|
||||
* The latest and greatest homebrew from the scene
|
||||
* **and much more!**
|
||||
|
||||
|
||||
## How to use
|
||||
Follow this guide to mod your switch: https://switch.homebrew.guide
|
||||
|
||||
Download the latest release and put it on your SD Card<br />
|
||||
Send the Hekate payload to your Switch in RCM mode and launch the CFW
|
||||
|
||||
|
||||
## Featuring
|
||||
#### Minimal Package
|
||||
* [Atmosphère](https://github.com/Atmosphere-NX/Atmosphere)
|
||||
* [Hekate](https://github.com/CTCaer/hekate)
|
||||
|
||||
#### Normal - everything above, AND
|
||||
* [Hekate Icons](https://github.com/NicholeMattera/Hekate-Icons)
|
||||
* [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)
|
||||
* [Awoo Installer](https://github.com/Huntereb/Awoo-Installer)
|
||||
* [Hekate Toolbox](https://github.com/WerWolv/Hekate-Toolbox)
|
||||
* [Isotope Updater](https://github.com/Ta180m/Isotope-Updater)
|
||||
* [Isotope Cleaner](https://github.com/Ta180m/Isotope-Cleaner)
|
||||
* [JKSV](https://github.com/J-D-K/JKSV)
|
||||
* [nxmtp](https://github.com/liuervehc/nxmtp)
|
||||
* [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM)
|
||||
* [Tesla-Menu](https://github.com/WerWolv/Tesla-Menu)
|
||||
* [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)
|
||||
* [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm)
|
||||
|
||||
#### Patched - everything above, AND
|
||||
* [HarukoNX/PKG2-Patches](https://github.com/HarukoNX/PKG2-Patches)
|
||||
* [HarukoNX/ES-Patches](https://github.com/HarukoNX/ES-Patches)
|
||||
|
||||
|
||||
## Credits
|
||||
* Thanks to Team AtlasNX for the original all-in-one CFW package, Kosmos
|
||||
* Thanks to Team Neptune for their revival of Kosmos, DeepSea
|
||||
|
||||
|
||||
## Notes
|
||||
Though we offer a "patched" package that enables the installation and usage of your backup and unlawfully obtained games, we do not condone piracy. The reason we offer this package is because we rather include it ourself instead of letting users go to other sources and use more shady versions of our or other CFW's/packages. Its up to the end user to decide if he wants to be on the good or the bad side, just like in life. The patches used are from [HarukoNX/PKG2-Patches](https://github.com/HarukoNX/PKG2-Patches) and [HarukoNX/ES-Patches](https://github.com/HarukoNX/PKG2-Patches).
|
||||
|
||||
We will not offer any kind of support related to the patches or piracy.
|
||||
|
|
1
_config.yml
Normal file
1
_config.yml
Normal file
|
@ -0,0 +1 @@
|
|||
theme: jekyll-theme-cayman
|
60
builder/Modules/atmosphere/system_settings.ini
Normal file
60
builder/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!0x5000
|
||||
|
||||
; 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
builder/Modules/emuiibo/toolbox.json
Normal file
5
builder/Modules/emuiibo/toolbox.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name" : "emuiibo",
|
||||
"tid" : "0100000000000352",
|
||||
"requires_reboot": true
|
||||
}
|
29
builder/Modules/hekate-toolbox/config.json
Normal file
29
builder/Modules/hekate-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
|
||||
}
|
||||
]
|
||||
}
|
BIN
builder/Modules/hekate/bootlogo.bmp
Normal file
BIN
builder/Modules/hekate/bootlogo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 MiB |
39
builder/Modules/hekate/hekate_ipl.ini
Normal file
39
builder/Modules/hekate/hekate_ipl.ini
Normal file
|
@ -0,0 +1,39 @@
|
|||
[config]
|
||||
autoboot=0
|
||||
autoboot_list=0
|
||||
bootwait=3
|
||||
verification=1
|
||||
backlight=100
|
||||
autohosoff=0
|
||||
autonogc=1
|
||||
updater2p=1
|
||||
|
||||
{Isotope/Istope ISOTOPE_VERSION}
|
||||
{}
|
||||
{Github: https://github.com/Ta180m/Isotope}
|
||||
{}
|
||||
|
||||
{--- Custom Firmware ---}
|
||||
[CFW (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/res/icon_payload.bmp
|
||||
{}
|
||||
|
||||
[CFW (EMUMMC)]
|
||||
emummcforce=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/res/icon_payload.bmp
|
||||
{}
|
||||
|
||||
{--- Stock ---}
|
||||
[Stock (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
stock=1
|
||||
icon=bootloader/res/icon_switch.bmp
|
||||
{}
|
41
builder/Modules/hekate/hekate_ipl_patches.ini
Normal file
41
builder/Modules/hekate/hekate_ipl_patches.ini
Normal file
|
@ -0,0 +1,41 @@
|
|||
[config]
|
||||
autoboot=0
|
||||
autoboot_list=0
|
||||
bootwait=3
|
||||
verification=1
|
||||
backlight=100
|
||||
autohosoff=0
|
||||
autonogc=1
|
||||
updater2p=1
|
||||
|
||||
{Isotope/Istope ISOTOPE_VERSION}
|
||||
{}
|
||||
{Github: https://github.com/Ta180m/Isotope}
|
||||
{}
|
||||
|
||||
{--- Custom Firmware ---}
|
||||
[CFW (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
kip1patch=nosigchk
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/res/icon_payload.bmp
|
||||
{}
|
||||
|
||||
[CFW (EMUMMC)]
|
||||
emummcforce=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
kip1patch=nosigchk
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/res/icon_payload.bmp
|
||||
{}
|
||||
|
||||
{--- Stock ---}
|
||||
[Stock (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
stock=1
|
||||
icon=bootloader/res/icon_switch.bmp
|
||||
{}
|
5
builder/Modules/isotope-updater/internal.db
Normal file
5
builder/Modules/isotope-updater/internal.db
Normal file
|
@ -0,0 +1,5 @@
|
|||
version = "ISOTOPE_VERSION";
|
||||
installed_files = [ ];
|
||||
received_exfat_warning = false;
|
||||
received_ignore_config_warning = false;
|
||||
ignore_config_files = false;
|
5
builder/Modules/ldn_mitm/toolbox.json
Normal file
5
builder/Modules/ldn_mitm/toolbox.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name" : "ldn_mitm",
|
||||
"tid" : "4200000000000010",
|
||||
"requires_reboot": true
|
||||
}
|
5
builder/Modules/sys-clk/toolbox.json
Normal file
5
builder/Modules/sys-clk/toolbox.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name" : "sys-clk",
|
||||
"tid" : "00FF0000636C6BFF",
|
||||
"requires_reboot": false
|
||||
}
|
139
builder/builder.py
Normal file
139
builder/builder.py
Normal file
|
@ -0,0 +1,139 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Isotope 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 Isotope Version from the config file.',
|
||||
metavar='IsotopeVersion')
|
||||
subparsers = parser.add_subparsers()
|
||||
|
||||
# Isotope subcommands
|
||||
parser_isotope = subparsers.add_parser(
|
||||
'isotope', help='Create a release build of Isotope.')
|
||||
parser_isotope.add_argument('output', help='Zip file to create.')
|
||||
parser_isotope.set_defaults(command=common.Command.Isotope)
|
||||
|
||||
# SDSetup subcommands
|
||||
parser_sdsetup = subparsers.add_parser(
|
||||
'sdsetup', help='Create a Isotope 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)
|
||||
|
||||
# Isotope Minimal subcommands
|
||||
parser_isotope = subparsers.add_parser(
|
||||
'isotope-mini', help='Create a release build of Isotope Minimal.')
|
||||
parser_isotope.add_argument('output', help='Zip file to create.')
|
||||
parser_isotope.set_defaults(command=common.Command.IsotopeMinimal)
|
||||
|
||||
# Isotope with patches subcommands
|
||||
parser_isotope_patches = subparsers.add_parser(
|
||||
'isotope-patches', help='Create a release build of Isotope with patches.')
|
||||
parser_isotope_patches.add_argument('output', help='Zip file to create.')
|
||||
parser_isotope_patches.set_defaults(command=common.Command.IsotopePatches)
|
||||
|
||||
# Isotope minimal with patches subcommands
|
||||
parser_isotope_minimal_patches = subparsers.add_parser(
|
||||
'isotope-mini-patches', help='Create a release build of Isotope Minimal with patches.')
|
||||
parser_isotope_minimal_patches.add_argument('output', help='Zip file to create.')
|
||||
parser_isotope_minimal_patches.set_defaults(command=common.Command.IsotopeMinimalPatches)
|
||||
|
||||
# Parse arguments
|
||||
args = parser.parse_args()
|
||||
|
||||
if not hasattr(args, 'command'):
|
||||
parser.print_help()
|
||||
sys.exit()
|
||||
|
||||
return args
|
||||
|
||||
|
||||
def get_isotope_version(args):
|
||||
if args.version is not None:
|
||||
return args.version
|
||||
return config.version
|
||||
|
||||
|
||||
def init_version_messages(args, isotope_version):
|
||||
if args.command == common.Command.Isotope:
|
||||
return [f'Isotope {isotope_version} built with:']
|
||||
elif args.command == common.Command.SDSetup and not args.auto:
|
||||
return ['SDSetup Modules built with:']
|
||||
elif args.command == common.Command.IsotopeMinimal:
|
||||
return [f'Isotope Minimal {isotope_version} built with:']
|
||||
elif args.command == common.Command.IsotopePatches:
|
||||
return [f'Isotope with Patches {isotope_version} built with:']
|
||||
elif args.command == common.Command.IsotopeMinimalPatches:
|
||||
return [f'Isotope Minimal with Patches {isotope_version} built with:']
|
||||
return []
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = parse_args()
|
||||
|
||||
temp_directory = common.generate_temp_path()
|
||||
common.mkdir(temp_directory)
|
||||
isotope_version = get_isotope_version(args)
|
||||
|
||||
auto_build = False
|
||||
if hasattr(args, 'auto'):
|
||||
auto_build = args.auto
|
||||
|
||||
version_messages = init_version_messages(args, isotope_version)
|
||||
|
||||
build_messages = modules.build(
|
||||
temp_directory, isotope_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'))
|
105
builder/common.py
Normal file
105
builder/common.py
Normal file
|
@ -0,0 +1,105 @@
|
|||
#
|
||||
# Isotope 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):
|
||||
Isotope = 0
|
||||
SDSetup = 1
|
||||
IsotopeMinimal = 2
|
||||
IsotopePatches = 3
|
||||
IsotopeMinimalPatches = 4
|
||||
|
||||
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
builder/config_template.py
Normal file
9
builder/config_template.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Current version of Isotope
|
||||
version = 'v1.3.1'
|
||||
|
||||
# GitHub Login Information
|
||||
github_username = ''
|
||||
github_password = ''
|
||||
|
||||
# GitLab Login Information
|
||||
gitlab_private_access_token = ''
|
64
builder/isotope-minimal-patches.json
Normal file
64
builder/isotope-minimal-patches.json
Normal file
|
@ -0,0 +1,64 @@
|
|||
[
|
||||
{
|
||||
"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": "PKG2-Patches",
|
||||
"download_function_name": "download_pkg2_patches",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "HarukoNX",
|
||||
"repo_name": "PKG2-Patches",
|
||||
"asset_patterns": [
|
||||
".*fusee.*\\.zip",
|
||||
".*hekate.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "ES-Patches",
|
||||
"download_function_name": "download_es_patches",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "HarukoNX",
|
||||
"repo_name": "ES-Patches",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
}
|
||||
]
|
33
builder/isotope-minimal.json
Normal file
33
builder/isotope-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
|
||||
}
|
||||
]
|
365
builder/isotope-patches.json
Normal file
365
builder/isotope-patches.json
Normal file
|
@ -0,0 +1,365 @@
|
|||
[
|
||||
{
|
||||
"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": "Awoo Installer",
|
||||
"download_function_name": "download_awoo",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Huntereb",
|
||||
"repo_name": "Awoo-Installer",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Hekate Toolbox",
|
||||
"download_function_name": "download_hekate_toolbox",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "Hekate-Toolbox",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Isotope Updater",
|
||||
"download_function_name": "download_isotope_updater",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Ta180m",
|
||||
"repo_name": "Isotope-Updater",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Isotope Cleaner",
|
||||
"download_function_name": "download_isotope_cleaner",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Ta180m",
|
||||
"repo_name": "Isotope-Cleaner",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "JKSV",
|
||||
"download_function_name": "download_jksv",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "J-D-K",
|
||||
"repo_name": "JKSV",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "NXMTP",
|
||||
"download_function_name": "download_nxmtp",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "liuervehc",
|
||||
"repo_name": "nxmtp",
|
||||
"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_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": "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
|
||||
},
|
||||
{
|
||||
"name": "PKG2-Patches",
|
||||
"download_function_name": "download_pkg2_patches",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "HarukoNX",
|
||||
"repo_name": "PKG2-Patches",
|
||||
"asset_patterns": [
|
||||
".*fusee.*\\.zip",
|
||||
".*hekate.*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "ES-Patches",
|
||||
"download_function_name": "download_es_patches",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "HarukoNX",
|
||||
"repo_name": "ES-Patches",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
}
|
||||
]
|
334
builder/isotope.json
Normal file
334
builder/isotope.json
Normal file
|
@ -0,0 +1,334 @@
|
|||
[
|
||||
{
|
||||
"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": "Awoo Installer",
|
||||
"download_function_name": "download_awoo",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Huntereb",
|
||||
"repo_name": "Awoo-Installer",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Hekate Toolbox",
|
||||
"download_function_name": "download_hekate_toolbox",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "Hekate-Toolbox",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Isotope Updater",
|
||||
"download_function_name": "download_isotope_updater",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Ta180m",
|
||||
"repo_name": "Isotope-Updater",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Isotope Cleaner",
|
||||
"download_function_name": "download_isotope_cleaner",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Ta180m",
|
||||
"repo_name": "Isotope-Cleaner",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "JKSV",
|
||||
"download_function_name": "download_jksv",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "J-D-K",
|
||||
"repo_name": "JKSV",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "NXMTP",
|
||||
"download_function_name": "download_nxmtp",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "liuervehc",
|
||||
"repo_name": "nxmtp",
|
||||
"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_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": "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
|
||||
}
|
||||
]
|
704
builder/modules.py
Normal file
704
builder/modules.py
Normal file
|
@ -0,0 +1,704 @@
|
|||
#
|
||||
# Isotope 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 os
|
||||
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()
|
||||
|
||||
opener = urllib.request.URLopener()
|
||||
opener.addheader(
|
||||
'User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36')
|
||||
opener.retrieve(
|
||||
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, isotope_version, isotope_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.copy_module_file('atmosphere', 'system_settings.ini', temp_directory.joinpath(
|
||||
'atmosphere/config/system_settings.ini'))
|
||||
|
||||
if not isotope_build:
|
||||
common.delete(temp_directory.joinpath('hbmenu.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_hekate(module, temp_directory, isotope_version, isotope_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.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.sed('DEEPSEA_VERSION', isotope_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 isotope_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, isotope_version, isotope_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)
|
||||
shutil.move(os.path.join(temp_directory, 'bootloader', 'res', 'icon_payload.bmp'),
|
||||
os.path.join(temp_directory, 'bootloader', 'res', 'icon_payload_o.bmp'))
|
||||
|
||||
shutil.move(os.path.join(temp_directory, 'bootloader', 'res', 'icon_switch.bmp'),
|
||||
os.path.join(temp_directory, 'bootloader', 'res', 'icon_switch_o.bmp'))
|
||||
|
||||
shutil.move(os.path.join(temp_directory, 'bootloader', 'res', 'payload.bmp'),
|
||||
os.path.join(temp_directory, 'bootloader', 'res', 'icon_payload.bmp'))
|
||||
|
||||
shutil.move(os.path.join(temp_directory, 'bootloader', 'res', 'switch.bmp'),
|
||||
os.path.join(temp_directory, 'bootloader', 'res', 'icon_switch.bmp'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_appstore(module, temp_directory, isotope_version, isotope_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, isotope_version, isotope_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, isotope_version, isotope_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 isotope_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, isotope_version, isotope_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_isotope_cleaner(module, temp_directory, isotope_version, isotope_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_isotope_toolbox(module, temp_directory, isotope_version, isotope_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/Isotope-Toolbox'))
|
||||
|
||||
common.move(app_path, temp_directory.joinpath(
|
||||
'switch/Isotope-Toolbox/Isotope-Toolbox.nro'))
|
||||
|
||||
common.copy_module_file('hekate-toolbox', 'config.json',
|
||||
temp_directory.joinpath('switch/Isotope-Toolbox/config.json'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_isotope_updater(module, temp_directory, isotope_version, isotope_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/Isotope-Updater'))
|
||||
common.move(app_path, temp_directory.joinpath(
|
||||
'switch/Isotope-Updater/Isotope-Updater.nro'))
|
||||
common.copy_module_file('isotope-updater', 'internal.db',
|
||||
temp_directory.joinpath('switch/Isotope-Updater/internal.db'))
|
||||
common.sed('DEEPSEA_VERSION', isotope_version,
|
||||
temp_directory.joinpath('switch/Isotope-Updater/internal.db'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_ldn_mitm(module, temp_directory, isotope_version, isotope_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 isotope_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, isotope_version, isotope_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, isotope_version, isotope_build):
|
||||
release = get_latest_release(module)
|
||||
payload_path = download_asset(module, release, 0)
|
||||
if payload_path is None:
|
||||
return None
|
||||
|
||||
if isotope_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, isotope_version, isotope_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, isotope_version, isotope_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, isotope_version, isotope_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, isotope_version, isotope_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, isotope_version, isotope_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 isotope_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, isotope_version, isotope_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 isotope_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, isotope_version, isotope_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 isotope_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, isotope_version, isotope_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_awoo(module, temp_directory, isotope_version, isotope_build):
|
||||
release = get_latest_release(module)
|
||||
app_path = download_asset(module, release, 0)
|
||||
if app_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(app_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_jksv(module, temp_directory, isotope_version, isotope_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/JKSV'))
|
||||
common.move(app_path, temp_directory.joinpath(
|
||||
'switch/JKSV/JKSV.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_nxmtp(module, temp_directory, isotope_version, isotope_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/nxmtp'))
|
||||
common.move(app_path, temp_directory.joinpath(
|
||||
'switch/nxmtp/nxmtp.nro'))
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_pkg2_patches(module, temp_directory, isotope_version, isotope_build):
|
||||
release = get_latest_release(module)
|
||||
fusee_patches_path = download_asset(module, release, 0)
|
||||
if fusee_patches_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(fusee_patches_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(fusee_patches_path)
|
||||
|
||||
hekate_patches_path = download_asset(module, release, 1)
|
||||
if hekate_patches_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(hekate_patches_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(hekate_patches_path)
|
||||
common.delete(temp_directory.joinpath('bootloader/hekate_ipl.ini'))
|
||||
common.copy_module_file('hekate', 'hekate_ipl_patches.ini',
|
||||
temp_directory.joinpath('bootloader/hekate_ipl.ini'))
|
||||
common.sed('DEEPSEA_VERSION', isotope_version,
|
||||
temp_directory.joinpath('bootloader/hekate_ipl.ini'))
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def download_es_patches(module, temp_directory, isotope_version, isotope_build):
|
||||
release = get_latest_release(module)
|
||||
es_patches_path = download_asset(module, release, 0)
|
||||
if es_patches_path is None:
|
||||
return None
|
||||
|
||||
with zipfile.ZipFile(es_patches_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(temp_directory)
|
||||
|
||||
common.delete(es_patches_path)
|
||||
|
||||
return get_version(module, release, 0)
|
||||
|
||||
|
||||
def build(temp_directory, isotope_version, command, auto_build):
|
||||
results = []
|
||||
|
||||
modules_filename = 'isotope.json'
|
||||
if command == common.Command.IsotopeMinimal:
|
||||
modules_filename = 'isotope-minimal.json'
|
||||
elif command == common.Command.SDSetup:
|
||||
modules_filename = 'sdsetup.json'
|
||||
elif command == common.Command.IsotopePatches:
|
||||
modules_filename = "isotope-patches.json"
|
||||
elif command == common.Command.IsotopeMinimalPatches:
|
||||
modules_filename = "isotope-minimal-patches.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:
|
||||
# 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,
|
||||
isotope_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 Isotope Build
|
||||
else:
|
||||
# Download the module.
|
||||
# print(f'Downloading {module["name"]}...')
|
||||
download = globals()[module['download_function_name']]
|
||||
version = download(module, temp_directory,
|
||||
isotope_version, True)
|
||||
if version is None:
|
||||
return None
|
||||
results.append(f' {module["name"]} - {version}')
|
||||
|
||||
return results
|
3
builder/requirements.txt
Normal file
3
builder/requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
PyGithub
|
||||
python-gitlab
|
||||
xmltodict
|
243
builder/sdsetup.json
Normal file
243
builder/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": "Hekate Toolbox",
|
||||
"download_function_name": "download_hekate_toolbox",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "WerWolv",
|
||||
"repo_name": "Hekate-Toolbox",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Isotope Updater",
|
||||
"download_function_name": "download_isotope_updater",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Ta180m",
|
||||
"repo_name": "Isotope-Updater",
|
||||
"asset_patterns": [
|
||||
".*\\.nro"
|
||||
],
|
||||
"group": null,
|
||||
"version_pattern": null
|
||||
},
|
||||
"sdsetup_module_name": null
|
||||
},
|
||||
{
|
||||
"name": "Isotope Cleaner",
|
||||
"download_function_name": "download_isotope_cleaner",
|
||||
"git": {
|
||||
"service": 0,
|
||||
"org_name": "Ta180m",
|
||||
"repo_name": "Isotope-Cleaner",
|
||||
"asset_patterns": [
|
||||
".*\\.zip"
|
||||
],
|
||||
"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": "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