feat(ios): cleanup, remove unused code

Signed-off-by: rooot <hey@rooot.gay>
This commit is contained in:
rooot 2025-03-31 18:48:29 +02:00
parent 10f0c21ba2
commit 6fd9879192
No known key found for this signature in database
GPG key ID: 3582D7B034FF964F
2 changed files with 5 additions and 29 deletions
loader/src

View file

@ -1,6 +1,7 @@
#include "crashlog.hpp"
#include <fmt/core.h>
#include "about.hpp"
#include "../loader/ModImpl.hpp"
#include <Geode/Utils.hpp>
using namespace geode::prelude;
@ -42,11 +43,11 @@ void crashlog::printMods(std::stringstream& stream) {
using namespace std::string_view_literals;
for (auto& mod : mods) {
stream << fmt::format("{} | [{}] {}\n",
mod->isCurrentlyLoading() ? "o"sv :
mod->isEnabled() ? "x"sv :
mod->isCurrentlyLoading() ? "o"sv :
mod->isEnabled() ? "x"sv :
mod->hasLoadProblems() ? "!"sv : // thank you for this bug report
mod->targetsOutdatedVersion() ? "*"sv : // thank you very much for this bug report
mod->shouldLoad() ? "~"sv :
mod->shouldLoad() ? "~"sv :
" "sv,
mod->getVersion().toVString(), mod->getID()
);
@ -65,7 +66,7 @@ std::string crashlog::writeCrashlog(geode::Mod* faultyMod, std::string const& in
// add a file to let Geode know on next launch that it crashed previously
// this could also be done by saving a loader setting or smth but eh.
(void)utils::file::writeBinary(crashlog::getCrashLogDirectory() / "last-crashed", {});
std::stringstream file;
file << getDateString(false) << "\n"

View file

@ -145,31 +145,6 @@ public:
};
}
else {
#ifdef GEODE_IS_IOS
// Unzipping because for JIT-Less, dylibs need to be signed, and we can't really sign them if they're archived...
auto tempDir = dirs::getModRuntimeDir() / m_id;
auto datePath = tempDir / "modified-at";
auto modifiedDate = std::filesystem::last_write_time(dirs::getModsDir() / (m_id + ".geode"));
auto modifiedCount = std::chrono::duration_cast<std::chrono::milliseconds>(modifiedDate.time_since_epoch());
auto modifiedHash = std::to_string(modifiedCount.count());
std::error_code ec;
std::filesystem::remove_all(tempDir, ec);
if (!ec) {
(void)utils::file::createDirectoryAll(tempDir);
auto res = file::writeString(datePath, modifiedHash);
if (!res) {
log::warn("Failed to write modified date of geode zip: {}", res.unwrapErr());
}
auto unzip = file::Unzip::create(dirs::getModsDir() / (m_id + ".geode"));
if (unzip.isOk()) {
if (!unzip.unwrap().hasEntry(m_id + GEODE_PLATFORM_EXTENSION)) {
log::error("Unable to find platform binary under the name \"{}\"", m_id + GEODE_PLATFORM_EXTENSION);
}
(void)unzip.unwrap().extractAllTo(tempDir);
log::debug("Extracted {}", m_id);
}
}
#endif
m_status = DownloadStatusDone {
.version = version
};