Skip to content

Commit

Permalink
Fix OTR build on actual device. Removes temp dir usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Waterdish committed Oct 23, 2023
1 parent 938679a commit 277351c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/jni/src/soh/soh/Extractor/Extract.cpp
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions 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[] = "";
Expand Down

0 comments on commit 277351c

Please sign in to comment.