use of org.robovm.compiler.log.LoggerProxy in project robovm by robovm.
the class IOSTarget method generateDsym.
private void generateDsym(final File dir, final String executable, boolean copyToIndexedDir) throws IOException {
final File dsymDir = new File(dir.getParentFile(), dir.getName() + ".dSYM");
final File exePath = new File(dir, executable);
FileUtils.deleteDirectory(dsymDir);
Logger logger = new LoggerProxy(config.getLogger()) {
@Override
public void warn(String format, Object... args) {
if (!(format.startsWith("warning:") && format.contains("could not find object file symbol for symbol"))) {
// Suppress this kind of warnings for now. See robovm/robovm#1126.
super.warn(format, args);
}
}
};
final Process process = new Executor(logger, "xcrun").args("dsymutil", "-o", dsymDir, exePath).execAsync();
if (copyToIndexedDir) {
new Thread() {
public void run() {
try {
process.waitFor();
} catch (InterruptedException e) {
return;
}
copyToIndexedDir(dir, executable, dsymDir, exePath);
}
}.start();
}
}