Fix OTR build on actual device. Removes temp dir usage

This commit is contained in:
Waterdish
2023-10-22 18:32:23 -07:00
parent 938679af8d
commit 277351c394
2 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -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);
+3 -3
View File
@@ -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[] = "";