Added better temp folder detection (using $TMP and '.' as fallbacks for $TEMP).
1 parent 8175ce7 commit 36faf3f372aa7f687d6cdde0a3c99420e2c40b0d
@Sönke Ludwig Sönke Ludwig authored on 19 Jan 2013
Showing 1 changed file
View
8
source/app.d
flags ~= "-of"~(dub.binaryPath~outfile).toNativeString();
} else {
import std.random;
auto rnd = to!string(uniform(uint.min, uint.max)) ~ "-";
run_exe_file = environment.get("TEMP")~"\\.rdmd\\source\\"~rnd~outfile;
auto tmp = environment.get("TEMP");
if( !tmp.length ) tmp = environment.get("TMP");
if( !tmp.length ) tmp = ".";
run_exe_file = tmp~"\\.rdmd\\source\\"~rnd~outfile;
flags ~= "-of"~run_exe_file;
}
 
auto settings = dub.getBuildSettings(build_platform, build_config);