Search in sources :

Example 1 with LoggerProxy

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();
    }
}
Also used : Executor(org.robovm.compiler.util.Executor) LoggerProxy(org.robovm.compiler.log.LoggerProxy) NSObject(com.dd.plist.NSObject) NSString(com.dd.plist.NSString) Logger(org.robovm.compiler.log.Logger) File(java.io.File)

Aggregations

NSObject (com.dd.plist.NSObject)1 NSString (com.dd.plist.NSString)1 File (java.io.File)1 Logger (org.robovm.compiler.log.Logger)1 LoggerProxy (org.robovm.compiler.log.LoggerProxy)1 Executor (org.robovm.compiler.util.Executor)1