示例#1
0
def download_emuiibo(module, temp_directory, deepsea_version, parameters,
                     deepsea_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 deepsea_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)
示例#2
0
文件: modules.py 项目: Ta180m/Isotope
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)
示例#3
0
def download_hekate(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None

    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(temp_directory)

    common.delete_path(bundle_path)
    
    common.copy_module_file('hekate', 'bootlogo.bmp', os.path.join(temp_directory, 'bootloader', 'bootlogo.bmp'))
    common.copy_module_file('hekate', 'hekate_ipl.ini', os.path.join(temp_directory, 'bootloader', 'hekate_ipl.ini'))
    common.sed('KOSMOS_VERSION', kosmos_version, os.path.join(temp_directory, 'bootloader', 'hekate_ipl.ini'))

    payload = common.find_file(os.path.join(temp_directory, 'hekate_ctcaer_*.bin'))
    if len(payload) != 0:
        shutil.copyfile(payload[0], os.path.join(temp_directory, 'bootloader', 'update.bin'))
        common.mkdir(os.path.join(temp_directory, 'atmosphere'))
        shutil.copyfile(payload[0], os.path.join(temp_directory, 'atmosphere', 'reboot_payload.bin'))

    if not kosmos_build:
        common.mkdir(os.path.join(temp_directory, '..', 'must_have'))
        shutil.move(os.path.join(temp_directory, 'bootloader'), os.path.join(temp_directory, '..', 'must_have'))
        shutil.move(os.path.join(temp_directory, 'atmosphere'), os.path.join(temp_directory, '..', 'must_have'))

    return release.tag_name
示例#4
0
def download_hekate(module, temp_directory):
    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', 'hekate_ipl.ini',
        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.mkdir(temp_directory.joinpath('../hekate'))
        common.move(
            payload[0],
            temp_directory.joinpath('../hekate/',
                                    Path(payload[0]).name))

    common.delete(
        temp_directory.joinpath(
            'nyx_usb_max_rate (run once per windows pc).reg'))

    return release.tag_name
示例#5
0
def download_sys_clk(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None

    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(temp_directory)

    common.delete_path(bundle_path)
    common.mkdir(os.path.join(temp_directory, 'atmosphere', 'contents'))
    shutil.move(
        os.path.join(temp_directory, 'atmosphere', 'titles',
                     '00FF0000636C6BFF'),
        os.path.join(temp_directory, 'atmosphere', 'contents',
                     '00FF0000636C6BFF'))
    common.delete_path(os.path.join(temp_directory, 'atmosphere', 'titles'))
    if kosmos_build:
        common.delete_path(
            os.path.join(temp_directory, 'atmosphere', 'contents',
                         '00FF0000636C6BFF', 'flags', 'boot2.flag'))
    common.delete_path(os.path.join(temp_directory, 'README.md'))
    common.copy_module_file(
        'sys-clk', 'toolbox.json',
        os.path.join(temp_directory, 'atmosphere', 'contents',
                     '00FF0000636C6BFF', 'toolbox.json'))

    return release.tag_name
示例#6
0
文件: modules.py 项目: Ta180m/Isotope
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('ISOTOPE_VERSION', isotope_version,
               temp_directory.joinpath('bootloader/hekate_ipl.ini'))
    return get_version(module, release, 0)
示例#7
0
def download_atmosphere(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None

    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(temp_directory)

    common.delete_path(bundle_path)
    common.delete_path(
        os.path.join(temp_directory, 'switch', 'reboot_to_payload.nro'))
    common.delete_path(
        os.path.join(temp_directory, 'atmosphere', 'reboot_payload.bin'))

    payload_path = download_asset(module, release, 1)
    if payload_path is None:
        return None

    common.mkdir(os.path.join(temp_directory, 'bootloader', 'payloads'))
    shutil.move(
        payload_path,
        os.path.join(temp_directory, 'bootloader', 'payloads',
                     'fusee-primary.bin'))

    common.copy_module_file(
        'atmosphere', 'system_settings.ini',
        os.path.join(temp_directory, 'atmosphere', 'config',
                     'system_settings.ini'))

    if not kosmos_build:
        common.delete_path(os.path.join(temp_directory, 'hbmenu.nro'))

    return release.tag_name
示例#8
0
def download_emuiibo(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None

    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(temp_directory)

    common.delete_path(bundle_path)
    common.mkdir(os.path.join(temp_directory, 'atmosphere', 'contents'))
    shutil.move(
        os.path.join(temp_directory, 'SdOut', 'atmosphere', 'contents',
                     '0100000000000352'),
        os.path.join(temp_directory, 'atmosphere', 'contents',
                     '0100000000000352'))
    common.mkdir(os.path.join(temp_directory, 'switch', '.overlays'))
    shutil.move(
        os.path.join(temp_directory, 'SdOut', 'switch', '.overlays',
                     'emuiibo.ovl'),
        os.path.join(temp_directory, 'switch', '.overlays', 'emuiibo.ovl'))
    common.delete_path(os.path.join(temp_directory, 'SdOut'))
    if kosmos_build:
        common.delete_path(
            os.path.join(temp_directory, 'atmosphere', 'contents',
                         '0100000000000352', 'flags', 'boot2.flag'))
    common.copy_module_file(
        'emuiibo', 'toolbox.json',
        os.path.join(temp_directory, 'atmosphere', 'contents',
                     '0100000000000352', 'toolbox.json'))

    return release.tag_name
示例#9
0
def download_kosmos_toolbox(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    app_path = download_asset(module, release, 0)
    if app_path is None:
        return None

    common.mkdir(os.path.join(temp_directory, 'switch', 'KosmosToolbox'))
    shutil.move(app_path, os.path.join(temp_directory, 'switch', 'KosmosToolbox', 'KosmosToolbox.nro'))
    common.copy_module_file('kosmos-toolbox', 'config.json', os.path.join(temp_directory, 'switch', 'KosmosToolbox', 'config.json'))

    return release.tag_name
示例#10
0
def download_kosmos_updater(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    app_path = download_asset(module, release, 0)
    if app_path is None:
        return None

    common.mkdir(os.path.join(temp_directory, 'switch', 'KosmosUpdater'))
    shutil.move(app_path, os.path.join(temp_directory, 'switch', 'KosmosUpdater', 'KosmosUpdater.nro'))
    common.copy_module_file('kosmos-updater', 'internal.db', os.path.join(temp_directory, 'switch', 'KosmosUpdater', 'internal.db'))
    common.sed('KOSMOS_VERSION', kosmos_version, os.path.join(temp_directory, 'switch', 'KosmosUpdater', 'internal.db'))

    return release.tag_name
示例#11
0
文件: modules.py 项目: Ta180m/Isotope
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('ISOTOPE_VERSION', isotope_version,
               temp_directory.joinpath('switch/Isotope-Updater/internal.db'))

    return get_version(module, release, 0)
示例#12
0
def download_hekate_icons(module, temp_directory):
    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_icons', 'hekate_ipl.ini',
        temp_directory.joinpath('bootloader/hekate_ipl.ini'))

    return release.tag_name
示例#13
0
文件: modules.py 项目: Ta180m/Isotope
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('isotope-toolbox', 'config.json',
                            temp_directory.joinpath('switch/Isotope-Toolbox/config.json'))

    return get_version(module, release, 0)
示例#14
0
def download_ldn_mitm(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None
    
    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(temp_directory)
    
    common.delete_path(bundle_path)
    if kosmos_build:
        common.delete_path(os.path.join(temp_directory, 'atmosphere', 'contents', '4200000000000010', 'flags', 'boot2.flag'))
    common.copy_module_file('ldn_mitm', 'toolbox.json', os.path.join(temp_directory, 'atmosphere', 'contents', '4200000000000010', 'toolbox.json'))

    return release.tag_name
示例#15
0
def download_kosmos_updater(module, temp_directory, deepsea_version, deepsea_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/DeepSea-Updater'))
    common.move(app_path, temp_directory.joinpath(
        'switch/DeepSea-Updater/DeepSea-Updater.nro'))
    common.copy_module_file('deepsea-updater', 'internal.db',
                            temp_directory.joinpath('switch/DeepSea-Updater/internal.db'))
    common.sed('DEEPSEA_VERSION', deepsea_version,
               temp_directory.joinpath('switch/DeepSea-Updater/internal.db'))

    return get_version(module, release, 0)
示例#16
0
def download_ldn_mitm(module, temp_directory):
    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(
        'ldn_mitm', 'toolbox.json',
        temp_directory.joinpath(
            'atmosphere/contents/4200000000000010/toolbox.json'))

    return release.tag_name
示例#17
0
def download_sys_clk(module, temp_directory):
    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('README.md'))
    common.copy_module_file(
        'sys-clk', 'toolbox.json',
        temp_directory.joinpath(
            'atmosphere/contents/00FF0000636C6BFF/toolbox.json'))

    return release.tag_name
示例#18
0
文件: modules.py 项目: Ta180m/Isotope
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)
示例#19
0
def download_deepsea_toolbox(module, temp_directory, deepsea_version,
                             parameters, deepsea_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/DeepSea-Toolbox'))

    common.move(
        app_path,
        temp_directory.joinpath('switch/DeepSea-Toolbox/DeepSea-Toolbox.nro'))

    common.copy_module_file(
        'hekate-toolbox', 'config.json',
        temp_directory.joinpath('switch/DeepSea-Toolbox/config.json'))

    return get_version(module, release, 0)
示例#20
0
def download_hekate(module, temp_directory, deepsea_version, parameters,
                    deepsea_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', deepsea_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 deepsea_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)
示例#21
0
def download_haxchi(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None

    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(temp_directory)

    common.delete_path(bundle_path)
    common.delete_path(os.path.join(temp_directory, 'haxchi', 'config.txt'))
    common.copy_module_file(
        'haxchi', 'config.txt',
        os.path.join(temp_directory, 'haxchi', 'config.txt'))
    common.copy_module_file(
        'haxchi', 'homebrew_launcher.elf',
        os.path.join(temp_directory, 'haxchi', 'homebrew_launcher.elf'))

    return get_version(module, release, 0)
示例#22
0
def download_ftpiiu(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    app_path = download_asset(module, release, 0)
    if app_path is None:
        return None

    common.mkdir(
        os.path.join(temp_directory, 'wiiu', 'apps', 'ftpiiu_everywhere'))
    shutil.move(
        app_path,
        os.path.join(temp_directory, 'wiiu', 'apps', 'ftpiiu_everywhere',
                     'ftpiiu_everywhere.elf'))
    common.copy_module_file(
        'ftpiiu', 'icon.png',
        os.path.join(temp_directory, 'wiiu', 'apps', 'ftpiiu_everywhere',
                     'icon.png'))
    common.copy_module_file(
        'ftpiiu', 'meta.xml',
        os.path.join(temp_directory, 'wiiu', 'apps', 'ftpiiu_everywhere',
                     'meta.xml'))

    return get_version(module, release, 0)
示例#23
0
def download_sys_clk(module, temp_directory, deepsea_version, parameters,
                     deepsea_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 deepsea_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)
示例#24
0
def download_mocha(module, temp_directory, kosmos_version, kosmos_build):
    release = get_latest_release(module)
    bundle_path = download_asset(module, release, 0)
    if bundle_path is None:
        return None

    common.mkdir(os.path.join(temp_directory, 'wiiu', 'apps', 'mocha'))
    with zipfile.ZipFile(bundle_path, 'r') as zip_ref:
        zip_ref.extractall(
            os.path.join(temp_directory, 'wiiu', 'apps', 'mocha'))

    common.delete_path(bundle_path)
    common.copy_module_file(
        'mocha', 'config.ini',
        os.path.join(temp_directory, 'wiiu', 'apps', 'mocha', 'config.ini'))
    common.copy_module_file(
        'mocha', 'icon.png',
        os.path.join(temp_directory, 'wiiu', 'apps', 'mocha', 'icon.png'))
    common.copy_module_file(
        'mocha', 'meta.xml',
        os.path.join(temp_directory, 'wiiu', 'apps', 'mocha', 'meta.xml'))

    return get_version(module, release, 0)
示例#25
0
def download_jstypehax(module, temp_directory, kosmos_version, kosmos_build):
    common.mkdir(os.path.join(temp_directory, 'wiiu'))
    common.copy_module_file(
        'jstypehax', 'payload.elf',
        os.path.join(temp_directory, 'wiiu', 'payload.elf'))
    return 'latest'