Files
OmniNX-Installer-Payload/source/install.h
T
niklascfw 664216fa11 Move pack files instead of copying; one file-op core for all modes
Install: staging and sd:/ are on the same card, so pack folders are now
moved with f_rename (a missing target folder moves in one step, existing
ones are merged file by file). Copying is only a per-entry fallback.
The staging cleanup afterwards only removes empty folders.

Deletion: one f_stat per list entry, no full recursive count before
deleting; large folders are detected with a probe that stops after 51
entries. Progress lines count processed entries instead of needing an
extra pass for a total.

Six copy/delete walkers (fs.c + install.c) are replaced by fs_delete_tree,
fs_move_tree and fs_move_file sharing one path buffer and one copy buffer
per run; the 'alternative copy method' retry is gone. extras/hekate-ams-pro
is moved too. Backups keep copy semantics.
2026-11-12 22:57:26 +01:00

46 lines
1.7 KiB
C

/*
* OmniNX Installer - Installation Logic
*/
#pragma once
#include "version.h"
#include <utils/types.h>
#include <stddef.h>
// Installation modes
typedef enum {
INSTALL_MODE_UPDATE, // OmniNX detected - selective deletion
INSTALL_MODE_CLEAN // No OmniNX - selective deletion from clean list
} install_mode_t;
// If a sub-menu aborts to Hekate / update.bin (does not return if launch succeeds)
void installer_launch_hekate_payload(void);
// Main installation function (optional debug: see DEBUG_INI.md in repo root)
int perform_installation(omninx_variant_t pack_variant, install_mode_t mode);
// Update mode operations (install_update.c)
int update_mode_cleanup(omninx_variant_t variant);
int update_mode_install(omninx_variant_t variant);
int cleanup_staging_directory(omninx_variant_t pack_variant);
// Remove other OmniNX staging directories (Standard/Light/OC) that exist, except the one just installed
int cleanup_other_staging_directories(omninx_variant_t installed_variant);
// Clean install operations (install_clean.c)
int clean_mode_backup(void);
int clean_mode_wipe(void);
int clean_mode_restore(void);
int clean_mode_install(omninx_variant_t variant);
void install_preserve_update_cleanup_begin(void);
void install_preserve_update_cleanup_end(void);
// Shared helpers (install.c) - used by install_update.c and install_clean.c
void install_set_color(u32 color);
void install_check_and_clear_screen_if_needed(void);
bool install_path_exists(const char *path);
int install_move_staging_root_files(const char *staging, const char *dst_root);
int install_move_tree(const char *src, const char *dst_parent, const char *display_name);
int install_delete_tree(const char *path);
int delete_path_lists_grouped(const char *folder_display_name, ...);