Merge pull request #7 from mvolli/master
spelling/language corrections from mvolli
This commit is contained in:
@@ -123,7 +123,7 @@ public class Client {
|
||||
|
||||
this.server.start(); // for staying alive
|
||||
|
||||
// create a thread who will send the frame
|
||||
// create a thread which will send the frame
|
||||
Runnable runnable_sender = new Runnable() {
|
||||
public void run() {
|
||||
senderLoop();
|
||||
@@ -176,7 +176,7 @@ public class Client {
|
||||
}
|
||||
}
|
||||
catch (FermeExceptionNoSession e) {
|
||||
// User have no session need to re-authenticate
|
||||
// User has no session need to re-authenticate
|
||||
|
||||
ret = this.server.getConfiguration();
|
||||
if (ret != Error.Type.OK) {
|
||||
@@ -240,7 +240,7 @@ public class Client {
|
||||
}
|
||||
|
||||
if (ret != Error.Type.OK) {
|
||||
Job frame_to_reset = this.renderingJob; // copie it because the sendError will take ~5min to execute
|
||||
Job frame_to_reset = this.renderingJob; // copy it because the sendError will take ~5min to execute
|
||||
this.renderingJob = null;
|
||||
this.gui.error(Error.humanString(ret));
|
||||
this.sendError(step, frame_to_reset, ret);
|
||||
@@ -370,7 +370,7 @@ public class Client {
|
||||
|
||||
protected void sendError(int step_, Job job_to_reset_, Error.Type error) {
|
||||
if (this.disableErrorSending) {
|
||||
this.log.debug("Error sending is disable, do not send log");
|
||||
this.log.debug("Error sending is disabled, do not send log");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ public class Client {
|
||||
}
|
||||
catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
// no exception should be raise to actual launcher (applet or standalone)
|
||||
// no exception should be raised to actual launcher (applet or standalone)
|
||||
}
|
||||
|
||||
if (error != null && error == Error.Type.RENDERER_CRASHED) {
|
||||
@@ -416,7 +416,7 @@ public class Client {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the date of the next request, or null is there is not delay (null <=> now)
|
||||
* @return the date of the next request, or null if there is not delay (null <=> now)
|
||||
*/
|
||||
public Calendar nextJobRequest() {
|
||||
if (this.config.requestTime == null) {
|
||||
@@ -511,7 +511,7 @@ public class Client {
|
||||
String command1[] = ajob.getRenderCommand().split(" ");
|
||||
int size_command = command1.length + 2; // + 2 for script
|
||||
|
||||
if (this.config.getNbCores() > 0) { // user have specified something
|
||||
if (this.config.getNbCores() > 0) { // user has specified something
|
||||
size_command += 2;
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ public class Client {
|
||||
}
|
||||
else if (command1[i].equals(".e")) {
|
||||
command[index] = ajob.getRendererPath();
|
||||
// the number of cores have to be put after the binary and before the scene arg
|
||||
// the number of cores has to be put after the binary and before the scene arg
|
||||
if (this.config.getNbCores() > 0) {
|
||||
index += 1;
|
||||
command[index] = "-t";
|
||||
@@ -612,7 +612,7 @@ public class Client {
|
||||
script_file.delete();
|
||||
}
|
||||
|
||||
ajob.setRenderDuration((int) ((rending_end - rending_start) / 1000 + 1)); // render time is in seconds but the getTime is in millisecond
|
||||
ajob.setRenderDuration((int) ((rending_end - rending_start) / 1000 + 1)); // render time is in seconds but the getTime is in milliseconds
|
||||
|
||||
ajob.setMaxOutputNbLines(nb_lines);
|
||||
int exit_value = 0;
|
||||
@@ -645,7 +645,7 @@ public class Client {
|
||||
File[] files = this.config.workingDirectory.listFiles(textFilter);
|
||||
|
||||
if (files.length == 0) {
|
||||
this.log.error("Client::runRenderer no picture file found (after finished render (namefile_without_extension " + namefile_without_extension + ")");
|
||||
this.log.error("Client::runRenderer no picture file found (after render finished (namefile_without_extension " + namefile_without_extension + ")");
|
||||
|
||||
if (ajob.getAskForRendererKill()) {
|
||||
this.log.debug("Client::runRenderer renderer didn't generate any frame but died due to a kill request");
|
||||
@@ -716,7 +716,7 @@ public class Client {
|
||||
if (md5_local.equals(ajob_.getSceneMD5()) == false) {
|
||||
System.err.println("md5 of the downloaded file and the local file are not the same (local '" + md5_local + "' scene: '" + ajob_.getSceneMD5() + "')");
|
||||
this.log.error("Client::downloadSceneFile mismatch on md5 local: '" + md5_local + "' server: '" + ajob_.getSceneMD5() + "'");
|
||||
// md5 of the file downloaded and the file excepted is not the same
|
||||
// md5 of the downloaded file doesn't match the expected hash
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
@@ -733,7 +733,7 @@ public class Client {
|
||||
File renderer_achive_local_path_file = new File(renderer_achive_local_path);
|
||||
|
||||
if (renderer_achive_local_path_file.exists()) {
|
||||
// the archive have been already downloaded
|
||||
// the archive has been already downloaded
|
||||
}
|
||||
else {
|
||||
// we must download the archive
|
||||
@@ -750,7 +750,7 @@ public class Client {
|
||||
|
||||
if (md5_local.equals(ajob.getRenderMd5()) == false) {
|
||||
this.log.error("Client::downloadExecutable mismatch on md5 local: '" + md5_local + "' server: '" + ajob.getRenderMd5() + "'");
|
||||
// md5 of the file downloaded and the file excepted is not the same
|
||||
// md5 of the downloaded file doesn't match the expected hash
|
||||
return -10;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -120,15 +120,15 @@ public class Error {
|
||||
case AUTHENTICATION_FAILED:
|
||||
return "Failed to authenticate, please check your login and password";
|
||||
case NOOUTPUTFILE:
|
||||
return "Renderer have generated no output file, it's mostly a wrong project configuration or your are missing required libraries. Will try an another project in few minutes.";
|
||||
return "Renderer has generated no output file, possibly a wrong project configuration or you are missing required libraries. Will try another project in a few minutes.";
|
||||
case RENDERER_CRASHED:
|
||||
return "Renderer have crashed. It's mostly due to a bad project or not enough memory. There is nothing you can do about it. Will try an another project in few minutes.";
|
||||
return "Renderer has crashed. It's mostly due to a bad project or not enough memory. There is nothing you can do about it. Will try another project in a few minutes.";
|
||||
case RENDERER_MISSING_LIBRARIES:
|
||||
return "Failed to launch renderer. Please check if you have necessary libraries installed and if you have enough free place in working directory.";
|
||||
return "Failed to launch renderer. Please check if you have necessary libraries installed and if you have enough free space in your working directory.";
|
||||
case RENDERER_KILLED:
|
||||
return "The renderer stopped because either you asked to stop or the server did (usually for a render time too high).";
|
||||
case SESSION_DISABLED:
|
||||
return "The server have disabled your session. Your client may have generated a broken frame (GPU not compatible, not enough RAM/VRAM, etc).";
|
||||
return "The server has disabled your session. Your client may have generated a broken frame (GPU not compatible, not enough RAM/VRAM, etc).";
|
||||
case OS_NOT_SUPPORTED:
|
||||
return "Operating System not supported.";
|
||||
case CPU_NOT_SUPPORTED:
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Job {
|
||||
private String revision;
|
||||
private String pictureFilename;
|
||||
private String path; // path inside of the archive
|
||||
private int renderDuration; // in second
|
||||
private int renderDuration; // in seconds
|
||||
private long memoryUsed; // in kB
|
||||
private String rendererCommand;
|
||||
private String script;
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.sheepit.client;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Container to ease passing around a tuple of two objects. This object provides a sensible
|
||||
* Container to ease passing around a pair of two objects. This object provides a sensible
|
||||
* implementation of equals(), returning true if equals() is true on each of the contained
|
||||
* objects.
|
||||
*/
|
||||
|
||||
@@ -125,7 +125,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
||||
Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
|
||||
ServerCode ret = Utils.statusIsOK(document, "keepmealive");
|
||||
if (ret == ServerCode.KEEPMEALIVE_STOP_RENDERING) {
|
||||
this.log.debug("Server::keeepmealive server ask to kill local render process");
|
||||
this.log.debug("Server::keeepmealive server asked to kill local render process");
|
||||
// kill the current process, it will generate an error but it's okay
|
||||
if (this.client != null && this.client.getRenderingJob() != null && this.client.getRenderingJob().getProcess() != null) {
|
||||
OS.getOS().kill(this.client.getRenderingJob().getProcess());
|
||||
@@ -212,14 +212,14 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
||||
NodeList ns = null;
|
||||
ns = document.getElementsByTagName("config");
|
||||
if (ns.getLength() == 0) {
|
||||
this.log.error("getConfiguration error: failed to parse XML, no node 'config_serveur'");
|
||||
this.log.error("getConfiguration error: failed to parse XML, no node 'config_serveur'"); // 'config_server' ?
|
||||
return Error.Type.WRONG_CONFIGURATION;
|
||||
}
|
||||
config_node = (Element) ns.item(0);
|
||||
|
||||
ns = config_node.getElementsByTagName("request");
|
||||
if (ns.getLength() == 0) {
|
||||
this.log.error("getConfiguration error: failed to parse XML, node 'config' have no child node 'request'");
|
||||
this.log.error("getConfiguration error: failed to parse XML, node 'config' has no child node 'request'");
|
||||
return Error.Type.WRONG_CONFIGURATION;
|
||||
}
|
||||
for (int i = 0; i < ns.getLength(); i++) {
|
||||
|
||||
@@ -79,7 +79,7 @@ public class Linux extends OS {
|
||||
scanner.close();
|
||||
}
|
||||
catch (java.lang.NoClassDefFoundError e) {
|
||||
System.err.println("OS.Linux::getCPU error " + e + " mostly because Scanner class was introducted by Java 5 and you are running are lower version");
|
||||
System.err.println("OS.Linux::getCPU error " + e + " mostly because Scanner class was introducted by Java 5 and you are running a lower version");
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -107,7 +107,7 @@ public class Linux extends OS {
|
||||
scanner.close();
|
||||
}
|
||||
catch (java.lang.NoClassDefFoundError e) {
|
||||
System.err.println("Machine::type error " + e + " mostly because Scanner class was introducted by Java 5 and you are running are lower version");
|
||||
System.err.println("Machine::type error " + e + " mostly because Scanner class was introducted by Java 5 and you are running a lower version");
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -96,7 +96,7 @@ public class WinProcess {
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
if (this.handle != null) {
|
||||
// Kernel32.INSTANCE.CloseHandle(this.handle); // do not close the handle because the parent Process object might still alive
|
||||
// Kernel32.INSTANCE.CloseHandle(this.handle); // do not close the handle because the parent Process object might still be alive
|
||||
this.handle = null;
|
||||
}
|
||||
this.pid = -1;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Worker {
|
||||
@Option(name = "-compute-method", usage = "CPU: only use cpu, GPU: only use gpu, CPU_GPU: can use cpu and gpu (not at the same time) if -gpu is not use it will not use the gpu", metaVar = "CPU", required = false)
|
||||
private String method = null;
|
||||
|
||||
@Option(name = "-cores", usage = "Number of core/thread to use for the render", metaVar = "3", required = false)
|
||||
@Option(name = "-cores", usage = "Number of cores/threads to use for the render", metaVar = "3", required = false)
|
||||
private int nb_cores = -1;
|
||||
|
||||
@Option(name = "--verbose", usage = "Display log", required = false)
|
||||
@@ -80,7 +80,7 @@ public class Worker {
|
||||
@Option(name = "-extras", usage = "Extras data push on the authentication request", required = false)
|
||||
private String extras = null;
|
||||
|
||||
@Option(name = "-ui", usage = "Specify the user interface to you use, default 'text', available 'oneline', 'text'", required = false)
|
||||
@Option(name = "-ui", usage = "Specify the user interface to use, default 'text', available 'oneline', 'text'", required = false)
|
||||
private String ui_type = "text";
|
||||
|
||||
@Option(name = "--version", usage = "Display application version", required = false)
|
||||
@@ -249,7 +249,7 @@ public class Worker {
|
||||
}
|
||||
|
||||
if (compute_method == ComputeType.CPU_ONLY && config.getGPUDevice() != null) {
|
||||
System.err.println("You choose to only use the CPU but a GPU was also provided. You can not do bought.");
|
||||
System.err.println("You choose to only use the CPU but a GPU was also provided. You can not do both.");
|
||||
System.err.println("Aborting");
|
||||
System.exit(2);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ public class Worker {
|
||||
Gui gui;
|
||||
if (ui_type.equals("oneline")) {
|
||||
if (config.getPrintLog()) {
|
||||
System.out.println("OneLine ui can not be used if the verbose mode is enable");
|
||||
System.out.println("OneLine UI can not be used if verbose mode is enabled");
|
||||
System.exit(2);
|
||||
}
|
||||
gui = new GuiTextOneLine();
|
||||
|
||||
Reference in New Issue
Block a user