1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

VCMIDirs: add hack to run from single directory on Mac and Linux

Also change working directory to where binary is on all platforms except Android
This commit is contained in:
Arseniy Shestakov
2017-08-13 17:20:57 +03:00
parent 40af43c46e
commit fee999300e
3 changed files with 22 additions and 7 deletions

View File

@@ -609,7 +609,7 @@ void handleLinuxSignal(int sig)
int main(int argc, char * argv[])
{
#ifdef VCMI_APPLE
#ifndef VCMI_WINDOWS
// Correct working dir executable folder (not bundle folder) so we can use executable relative paths
std::string executablePath = argv[0];
std::string workDir = executablePath.substr(0, executablePath.rfind('/'));