mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Making the initial stuff working, getting an installer, when running from VS.
This commit is contained in:
parent
a63bf734d4
commit
57e2044839
1023 changed files with 20896 additions and 19456 deletions
|
@ -171,47 +171,46 @@ namespace ExternalCommand {
|
|||
string arguments = config.Argument[commando];
|
||||
output = null;
|
||||
error = null;
|
||||
if (!string.IsNullOrEmpty(commandline)) {
|
||||
using (Process process = new Process())
|
||||
{
|
||||
// Fix variables
|
||||
commandline = FilenameHelper.FillVariables(commandline, true);
|
||||
commandline = FilenameHelper.FillCmdVariables(commandline, true);
|
||||
if (!string.IsNullOrEmpty(commandline))
|
||||
{
|
||||
using Process process = new Process();
|
||||
// Fix variables
|
||||
commandline = FilenameHelper.FillVariables(commandline, true);
|
||||
commandline = FilenameHelper.FillCmdVariables(commandline, true);
|
||||
|
||||
arguments = FilenameHelper.FillVariables(arguments, false);
|
||||
arguments = FilenameHelper.FillCmdVariables(arguments, false);
|
||||
arguments = FilenameHelper.FillVariables(arguments, false);
|
||||
arguments = FilenameHelper.FillCmdVariables(arguments, false);
|
||||
|
||||
process.StartInfo.FileName = FilenameHelper.FillCmdVariables(commandline, true);
|
||||
process.StartInfo.Arguments = FormatArguments(arguments, fullPath);
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
if (config.RedirectStandardOutput) {
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
}
|
||||
if (config.RedirectStandardError) {
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
}
|
||||
if (verb != null) {
|
||||
process.StartInfo.Verb = verb;
|
||||
}
|
||||
LOG.InfoFormat("Starting : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
if (config.RedirectStandardOutput) {
|
||||
output = process.StandardOutput.ReadToEnd();
|
||||
if (config.ShowStandardOutputInLog && output.Trim().Length > 0) {
|
||||
LOG.InfoFormat("Output:\n{0}", output);
|
||||
}
|
||||
}
|
||||
if (config.RedirectStandardError) {
|
||||
error = process.StandardError.ReadToEnd();
|
||||
if (error.Trim().Length > 0) {
|
||||
LOG.WarnFormat("Error:\n{0}", error);
|
||||
}
|
||||
}
|
||||
LOG.InfoFormat("Finished : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
return process.ExitCode;
|
||||
}
|
||||
}
|
||||
process.StartInfo.FileName = FilenameHelper.FillCmdVariables(commandline, true);
|
||||
process.StartInfo.Arguments = FormatArguments(arguments, fullPath);
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
if (config.RedirectStandardOutput) {
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
}
|
||||
if (config.RedirectStandardError) {
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
}
|
||||
if (verb != null) {
|
||||
process.StartInfo.Verb = verb;
|
||||
}
|
||||
LOG.InfoFormat("Starting : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
process.Start();
|
||||
process.WaitForExit();
|
||||
if (config.RedirectStandardOutput) {
|
||||
output = process.StandardOutput.ReadToEnd();
|
||||
if (config.ShowStandardOutputInLog && output.Trim().Length > 0) {
|
||||
LOG.InfoFormat("Output:\n{0}", output);
|
||||
}
|
||||
}
|
||||
if (config.RedirectStandardError) {
|
||||
error = process.StandardError.ReadToEnd();
|
||||
if (error.Trim().Length > 0) {
|
||||
LOG.WarnFormat("Error:\n{0}", error);
|
||||
}
|
||||
}
|
||||
LOG.InfoFormat("Finished : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
return process.ExitCode;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue