символьные ссылки в планировщике
This commit is contained in:
@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
public static final int planner_version = 5;
|
||||
public static final int planner_version = 6;
|
||||
public static final int testingMaxKernels = 64; //вообще говоря, это параметр машины.
|
||||
//--
|
||||
public static final String ComponentsDirectoryName = "Components";
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1146;
|
||||
version = 1147;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
void prepareWorkspace() override {
|
||||
String binary_src = parent->getWorkspace() + "/0";
|
||||
String binary_dst = workspace + "/" + binary_name;
|
||||
Utils::Copy(binary_src, binary_dst);
|
||||
Utils::Ln(binary_src, binary_dst);
|
||||
if (!usr_par.isEmpty()) {
|
||||
String parPath = String(id) + "/usr.par";
|
||||
File parFile = File(parPath, usr_par);
|
||||
|
||||
@@ -65,6 +65,15 @@ public:
|
||||
//printf("cp '%s' return code = %d\n",src.getCharArray(), i);
|
||||
#endif
|
||||
}
|
||||
static void Ln(const String& src, const String& dst) {
|
||||
#if __cplusplus >= 201703L
|
||||
std::filesystem::create_symlink(src.getCharArray(), dst.getCharArray());
|
||||
#else
|
||||
String command = "ln -s " + String::DQuotes(src) + " " + String::DQuotes(dst);
|
||||
int i = system(command.getCharArray());
|
||||
//printf("cp '%s' return code = %d\n",src.getCharArray(), i);
|
||||
#endif
|
||||
}
|
||||
static void CopyDirectory(const String& src, const String& dst) {
|
||||
#if __cplusplus >= 201703L
|
||||
std::filesystem::copy((src+ "/.").getCharArray(), dst.getCharArray(), std::filesystem::copy_options::recursive);
|
||||
|
||||
@@ -1 +1 @@
|
||||
5
|
||||
6
|
||||
Reference in New Issue
Block a user