Commit fc72ca83 LN

1

1 个父辈 e1067ae1
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender"> <appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/NW.log" /> <file value="logs/NeoStation.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <rollingStyle value="Date" />
......
...@@ -56,8 +56,16 @@ namespace TSA_V ...@@ -56,8 +56,16 @@ namespace TSA_V
try try
{ {
process.StartInfo.FileName = @"python.exe"; // process.StartInfo.FileName = @"python.exe";
//process.StartInfo.FileName = "D:\\python-3.9.6-embed-amd64\\python.exe";
string pyFile = Application.StartupPath + @"\python-3.9.6-embed-amd64\python.exe";
if (!File.Exists(pyFile))
{
LogUtil.error($"hand start : 文件{pyFile}不存在");
return;
}
process.StartInfo.FileName = pyFile;
//传递给进程 //传递给进程
process.StartInfo.Arguments = sArguments; process.StartInfo.Arguments = sArguments;
process.StartInfo.UseShellExecute = false;//是否使用操作系统shell启动 process.StartInfo.UseShellExecute = false;//是否使用操作系统shell启动
...@@ -78,6 +86,9 @@ namespace TSA_V ...@@ -78,6 +86,9 @@ namespace TSA_V
catch (Win32Exception e) catch (Win32Exception e)
{ {
LogUtil.error($"文件{ScriptFileName}启动出错:" + e.ToString()); LogUtil.error($"文件{ScriptFileName}启动出错:" + e.ToString());
}catch(Exception ex)
{
LogUtil.error($"文件{ScriptFileName}启动出错:" + ex.ToString());
} }
} }
private static int GetCameraCount() private static int GetCameraCount()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!