mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-19 04:06:10 +02:00
cafa6f3d61
Ships a dual-NRO native launcher that checks GitHub Releases, updates both NROs from gen1recomp-*-switch.zip with matching NACP versions, and stays silent unless an update needs confirm.
33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
#ifndef GEN1_OTA_FS_H
|
|
#define GEN1_OTA_FS_H
|
|
|
|
#include "ota_protocol.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Read installed game version from sibling version.txt or NRO nacp-less stamp file.
|
|
* Expects switch/gen1recomp/version.txt containing X.Y.Z. Returns 0 on success. */
|
|
int ota_fs_read_installed_version(const char *install_dir, char *out, size_t out_len);
|
|
|
|
/* SHA-256 hex (lowercase) of file. Returns 0 on success. */
|
|
int ota_fs_sha256_file(const char *path, char *out_hex, size_t out_len);
|
|
|
|
/* Apply verified temp payload (extracted game NRO) using atomic plan. Returns 0 on success. */
|
|
int ota_fs_atomic_replace_game(const char *install_dir, const char *verified_game_nro,
|
|
char *err, size_t err_len);
|
|
|
|
/* Atomically replace any named NRO under install_dir (copy→.part→rename). */
|
|
int ota_fs_atomic_replace_nro(const char *install_dir, const char *nro_name,
|
|
const char *verified_nro, char *err, size_t err_len);
|
|
|
|
/* Hand off to game NRO via envSetNextLoad (Switch) or no-op stub (host). */
|
|
int ota_fs_handoff_to_game(const char *game_nro_path, char *err, size_t err_len);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|