Exemplo n.º 1
0
 protected void createLibFolder() {
   File libFile =
       new File(
           InstallUtil.getFolderPath(InstallUtil.kLocalDomain, InstallUtil.kDomainLibraryFolder));
   libFolder = new File(libFile, JavaExtensions);
   if (!libFolder.canWrite()) {
     libFile =
         new File(
             InstallUtil.getFolderPath(InstallUtil.kUserDomain, InstallUtil.kDomainLibraryFolder));
     libFolder = new File(libFile, JavaExtensions);
     if (!libFolder.exists()) {
       libFolder.mkdirs();
     }
   }
 }
Exemplo n.º 2
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.º 3
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);
   }
 }