See https://www.reddit.com/r/factorio/comments/191qnmm/comment/kgxml1q/
Application directory is https://wiki.factorio.com/Application_directory
Logfile location is set by combining
|
char *homeDir = get_home_dir(); |
|
char *factorioLogfile = malloc(strlen(homeDir) + strlen(POSITION_INFO_PATH) + 1); |
|
char *get_home_dir() |
|
{ |
|
#ifdef _WIN32 |
|
char *appdata = getenv("APPDATA"); |
|
return appdata; |
|
#else |
|
char *homeDir = getenv("HOME"); |
|
if (!homeDir) |
|
{ |
|
struct passwd *pwd = getpwuid(getuid()); |
|
if (pwd) |
|
homeDir = pwd->pw_dir; |
|
} |
|
return homeDir; |
|
#endif |
|
} |
|
#define POSITION_INFO_PATH "/Factorio/script-output/mumble_positional-audio_information.txt" |
When running on Linux, the app directory should resolve to ".../.factorio/..." not ".../Factorio/..."
Moreso on Mac it should be "~/Library/Application Support/factorio" so more #ifdef's will be needed per-platform
See https://www.reddit.com/r/factorio/comments/191qnmm/comment/kgxml1q/
Application directory is https://wiki.factorio.com/Application_directory
Logfile location is set by combining
Factorio-Proximity-Voice-Chat/mumble/logfile.c
Lines 75 to 76 in 8eeaac7
Factorio-Proximity-Voice-Chat/mumble/logfile.c
Lines 34 to 49 in 8eeaac7
Factorio-Proximity-Voice-Chat/mumble/logfile.c
Line 18 in 8eeaac7
When running on Linux, the app directory should resolve to ".../.factorio/..." not ".../Factorio/..."
Moreso on Mac it should be "~/Library/Application Support/factorio" so more #ifdef's will be needed per-platform