Skip to content
Snippets Groups Projects
Commit a98a7bb8 authored by Manlio Bacco's avatar Manlio Bacco
Browse files

No commit message

No commit message
parent f8d84d08
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: AAL Studio Application Packager
Bundle-SymbolicName: org.universaal.tools.packaging.tool; singleton:=true
Bundle-Version: 0.8.2
Bundle-Version: 0.8.3
Bundle-Activator: org.universaal.tools.packaging.tool.Activator
Require-Bundle: org.eclipse.core.runtime,
javax.xml,
......
package org.universaal.tools.packaging.tool;
import java.io.File;
import java.io.PrintStream;
import java.math.BigInteger;
import java.security.SecureRandom;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -15,6 +20,8 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
public static String tempDir;
/**
* The constructor
*/
......@@ -29,6 +36,14 @@ public class Activator extends AbstractUIPlugin {
super.start(context);
plugin = this;
SecureRandom random = new SecureRandom();
tempDir = System.getProperty("java.io.tmpdir")+"MPA_"+new BigInteger(130, random).toString(32);
new File(tempDir).mkdirs();
System.out.println("*** [Application Packager] - The log file is available at "+tempDir+" ***");
System.setOut(new PrintStream(new File(tempDir+"/log.txt")));
System.setErr(new PrintStream(new File(tempDir+"/errlog.txt")));
}
/*
......
......@@ -7,8 +7,6 @@ import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -38,8 +36,8 @@ public class GUI extends WizardMod {
private static GUI instance;
private String tempDir;
private String destination;
private String tempDir = org.universaal.tools.packaging.tool.Activator.tempDir;
public GUI(List<IProject> parts) {
......@@ -237,8 +235,6 @@ public class GUI extends WizardMod {
private void createTempContainer(){
try{
SecureRandom random = new SecureRandom();
tempDir = System.getProperty("java.io.tmpdir")+"/MPA_"+new BigInteger(130, random).toString(32)+"/";
File f = new File(tempDir);
f.mkdir();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment