Exemplo n.º 1
0
 private String createTemporaryPreinstallFile() {
   try {
     File tempFile = File.createTempFile("preinstall", null);
     tempFile.deleteOnExit();
     InstallUtil.copyResourceToFile("/gnu/io/installer/resources/macosx/preinstall", tempFile);
     String absPath = tempFile.getAbsolutePath();
     Process p = Runtime.getRuntime().exec(new String[] {"chmod", "a+x", absPath});
     p.waitFor();
     return absPath;
   } catch (Throwable t) {
   }
   return null;
 }
Exemplo n.º 2
0
 private void installAuthKit() {
   boolean usingJWS = false;
   final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
   if (originalClassLoader.toString().toLowerCase().indexOf("jnlp") != -1) usingJWS = true;
   if (usingJWS) return;
   try {
     File tempFile = new File(jarFolder, "libAuthKit.jnilib");
     tempFile.deleteOnExit();
     InstallUtil.copyResourceToFile(
         "/gnu/io/installer/resources/macosx/lib/libAuthKit.jnilib", tempFile);
   } catch (Throwable t) {
     System.out.println("installAuthKit Throwable " + t);
   }
 }