private static void installNatives(File folder) throws Exception { OperatingSystem os = SystemUtils.getOS(); if (os == OperatingSystem.WINDOWS) { if (!new File(folder.getPath() + "/jinput-dx8_64.dll").exists()) { extractFromClasspath("/windows/jinput-dx8_64.dll", folder); extractFromClasspath("/windows/jinput-dx8.dll", folder); extractFromClasspath("/windows/jinput-raw_64.dll", folder); extractFromClasspath("/windows/jinput-raw.dll", folder); extractFromClasspath("/windows/lwjgl.dll", folder); extractFromClasspath("/windows/lwjgl64.dll", folder); extractFromClasspath("/windows/OpenAL32.dll", folder); extractFromClasspath("/windows/OpenAL64.dll", folder); } else { Log.message("Natives already exist."); } } else if (os == OperatingSystem.SOLARIS) { if (!new File(folder.getPath() + "/liblwjgl.so").exists()) { extractFromClasspath("/solaris/liblwjgl.so", folder); extractFromClasspath("/solaris/liblwjgl64.so", folder); extractFromClasspath("/solaris/libopenal.so", folder); extractFromClasspath("/solaris/libopenal64.so", folder); } else { Log.message("Natives already exist."); } } else if (os == OperatingSystem.LINUX) { if (!new File(folder.getPath() + "/liblwjgl.so").exists()) { extractFromClasspath("/linux/liblwjgl.so", folder); extractFromClasspath("/linux/liblwjgl64.so", folder); extractFromClasspath("/linux/libopenal.so", folder); extractFromClasspath("/linux/libopenal64.so", folder); } else { Log.message("Natives already exist."); } } else if (os == OperatingSystem.MACOSX) { if (!new File(folder.getPath() + "/openal.dylib").exists()) { extractFromClasspath("/macosx/liblwjgl.jnilib", folder); extractFromClasspath("/macosx/liblwjgl-osx.jnilib", folder); extractFromClasspath("/macosx/openal.dylib", folder); } else { Log.message("Natives already exist."); } } else { } System.setProperty("net.java.games.input.librarypath", folder.getAbsolutePath()); }
private void emitDefault(TypeElement baseType, Log log, Message message) { TypeElement rootEnclosing = Utils.findRootEnclosingType(getMessageElement()); if (rootEnclosing != null && Utils.typeEquals(baseType.asType(), rootEnclosing.asType()) && this == message.getOriginalContainer()) { log.message( message.getKind(), getMessageElement(), getMessageAnnotation(), getMessageAnnotationValue(), message.getText()); } else { MessageContainer original = message.getOriginalContainer(); log.message( message.getKind(), baseType, null, null, wrapText( original.getMessageElement(), original.getMessageAnnotation(), message.getText())); } }