Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.simantics.utils;bundle-version="1.1.0",
- org.simantics;bundle-version="1.0.0",
- org.slf4j.api
+ org.slf4j.api,
+ gnu.trove3;bundle-version="3.0.3"
Export-Package: org.simantics.fmil.core
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
-import org.simantics.Simantics;
import org.simantics.fmil.core.ExecEnvironment.ARCHType;
import org.simantics.fmil.core.ExecEnvironment.OSType;
import org.simantics.utils.FileUtils;
*/
private static int OK = 0;
private static int ERROR = 1;
- private static String UNSATISFIED_LINK = "Method not found. DLL might not be loaded properly.";
- private static String TEMP_FMU_DIRECTORY_NAME = "fmil";
+ private static String UNSATISFIED_LINK = "Method not found. DLL might not be loaded properly.";
+ public static final String TEMP_FMU_DIRECTORY_NAME = "fmil";
public static String TEMP_FMU_COMMON_DIRECTORY;
public static String LOCK_FILE_NAME = "fmil.lock";
}
/**
- * Static: initialize fmu temp folder
+ * Static: initialize fmu temp folder from current working directory
*/
static {
- File dir = Simantics.getTemporaryDirectory(TEMP_FMU_DIRECTORY_NAME);
- TEMP_FMU_COMMON_DIRECTORY = dir.getAbsolutePath();
+ TEMP_FMU_COMMON_DIRECTORY = Paths.get(".").toAbsolutePath().normalize().toString();
+ }
+
+ public static void setTempFMUCommonDir(File dir) {
+ TEMP_FMU_COMMON_DIRECTORY = dir.getAbsolutePath();
}
-
private String fmuDir;
private int id;