2020-09-20 01:21:28 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <switch.h>
|
|
|
|
#include <sstream>
|
|
|
|
#include <iomanip>
|
|
|
|
#include <iostream>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <iterator>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <filesystem>
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
#include <unzipper.h>
|
|
|
|
|
|
|
|
#include <borealis.hpp>
|
|
|
|
|
|
|
|
#include "progress_event.hpp"
|
|
|
|
#include "constants.hpp"
|
|
|
|
#include "utils.hpp"
|
|
|
|
|
|
|
|
static constexpr u32 MaxTitleCount = 64000;
|
|
|
|
|
|
|
|
typedef struct Title {
|
|
|
|
std::string id;
|
|
|
|
std::string name;
|
|
|
|
bool operator ==(const Title&x) const {
|
|
|
|
return id == x.id;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator <(const Title&x) const {
|
|
|
|
return id < x.id;
|
|
|
|
}
|
|
|
|
} Title;
|
|
|
|
|
2020-09-20 23:11:34 +01:00
|
|
|
void extract(const char* filename, const char* workingPath = ROOT_PATH, int overwriteInis = 1);
|
2020-09-20 01:21:28 +01:00
|
|
|
std::string formatApplicationId(u64 ApplicationId);
|
|
|
|
std::vector<Title> getInstalledTitlesNs();
|
|
|
|
std::vector<Title> excludeTitles(const char* path, std::vector<Title> listedTitles);
|
|
|
|
void writeTitlesToFile(std::set<std::string> titles);
|
|
|
|
void extractCheats(const char * zipPath, std::vector<Title> titles, CFW cfw, bool credits = false);
|
|
|
|
void removeCheats(CFW cfw);
|