From 277351c3943ff3a3caf2ee341e35dfccb4d2d620 Mon Sep 17 00:00:00 2001 From: Waterdish Date: Sun, 22 Oct 2023 18:32:23 -0700 Subject: [PATCH] Fix OTR build on actual device. Removes temp dir usage --- app/jni/src/soh/soh/Extractor/Extract.cpp | 6 ++++-- app/jni/src/soh/src/boot/build.c.in | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/jni/src/soh/soh/Extractor/Extract.cpp b/app/jni/src/soh/soh/Extractor/Extract.cpp index bb558c6..fcfdcf3 100644 --- a/app/jni/src/soh/soh/Extractor/Extract.cpp +++ b/app/jni/src/soh/soh/Extractor/Extract.cpp @@ -542,7 +542,7 @@ const char* Extractor::GetZapdVerStr() const { } std::string Extractor::Mkdtemp() { - std::string temp_dir = std::filesystem::temp_directory_path().string(); + std::string temp_dir = SDL_AndroidGetExternalStoragePath();//std::filesystem::temp_directory_path().string(); // create 6 random alphanumeric characters static const char charset[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -581,7 +581,9 @@ bool Extractor::CallZapd(std::string installPath, std::string exportdir) { std::filesystem::copy(installPath + "/assets", tempdir + "/assets", std::filesystem::copy_options::recursive | std::filesystem::copy_options::update_existing); #else - std::filesystem::create_symlink(installPath + "/assets", tempdir + "/assets"); + //std::filesystem::create_symlink(installPath + "/assets", tempdir + "/assets"); + std::filesystem::copy(installPath + "/assets", tempdir + "/assets", + std::filesystem::copy_options::recursive | std::filesystem::copy_options::update_existing); #endif std::filesystem::current_path(tempdir); diff --git a/app/jni/src/soh/src/boot/build.c.in b/app/jni/src/soh/src/boot/build.c.in index f4c2899..b1c11f3 100644 --- a/app/jni/src/soh/src/boot/build.c.in +++ b/app/jni/src/soh/src/boot/build.c.in @@ -1,7 +1,7 @@ const char gBuildVersion[] = "@PROJECT_BUILD_NAME@ (@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@)"; -const int gBuildVersionMajor = @CMAKE_PROJECT_VERSION_MAJOR@; -const int gBuildVersionMinor = @CMAKE_PROJECT_VERSION_MINOR@; -const int gBuildVersionPatch = @CMAKE_PROJECT_VERSION_PATCH@; +const int gBuildVersionMajor = 7;//@CMAKE_PROJECT_VERSION_MAJOR@; +const int gBuildVersionMinor = 1;//@CMAKE_PROJECT_VERSION_MINOR@; +const int gBuildVersionPatch = 1;//@CMAKE_PROJECT_VERSION_PATCH@; const char gBuildTeam[] = "@PROJECT_TEAM@"; const char gBuildDate[] = __DATE__ " " __TIME__; const char gBuildMakeOption[] = "";