mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
This commit is contained in:
@ -582,7 +582,7 @@ public class BaseNoGui {
|
||||
if (!indexFile.isFile() || !(avrCoreFolder.exists() && avrCoreFolder.isDirectory())) {
|
||||
File distFile = findDefaultPackageFile();
|
||||
if (distFile != null) {
|
||||
ArchiveExtractor.extract(distFile, BaseNoGui.getSettingsFolder(), 0, true);
|
||||
new ArchiveExtractor(getPlatform()).extract(distFile, BaseNoGui.getSettingsFolder(), 0, true);
|
||||
} else if (!indexFile.isFile()) {
|
||||
// Otherwise create an empty packages index
|
||||
FileOutputStream out = null;
|
||||
|
@ -244,4 +244,19 @@ public class Platform {
|
||||
public String getOsArch() {
|
||||
return System.getProperty("os.arch");
|
||||
}
|
||||
|
||||
public void symlink(File something, File somewhere) throws IOException, InterruptedException {
|
||||
Process process = Runtime.getRuntime().exec(new String[]{"ln", "-s", something.getAbsolutePath(), somewhere.getAbsolutePath()}, null, null);
|
||||
process.waitFor();
|
||||
}
|
||||
|
||||
public void link(File something, File somewhere) throws IOException, InterruptedException {
|
||||
Process process = Runtime.getRuntime().exec(new String[]{"ln", something.getAbsolutePath(), somewhere.getAbsolutePath()}, null, null);
|
||||
process.waitFor();
|
||||
}
|
||||
|
||||
public void chmod(File file, int mode) throws IOException, InterruptedException {
|
||||
Process process = Runtime.getRuntime().exec(new String[]{"chmod", Integer.toOctalString(mode), file.getAbsolutePath()}, null, null);
|
||||
process.waitFor();
|
||||
}
|
||||
}
|
||||
|
@ -362,4 +362,13 @@ public class Platform extends processing.app.Platform {
|
||||
scripts.add(new File(folder, "post_install.bat"));
|
||||
return scripts;
|
||||
}
|
||||
|
||||
public void symlink(File something, File somewhere) throws IOException, InterruptedException {
|
||||
}
|
||||
|
||||
public void link(File something, File somewhere) throws IOException, InterruptedException {
|
||||
}
|
||||
|
||||
public void chmod(File file, int mode) throws IOException, InterruptedException {
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user