Pārlūkot izejas kodu

zhao:解决32位下无法录制的问题

tags/录制修改前
耀 pirms 4 gadiem
vecāks
revīzija
f5c8c19f0b

+ 1
- 1
Common/system/FFMpeg.cs Parādīt failu

@@ -17,7 +17,7 @@ namespace Common.system
17 17
     /// ffmpeg帮助类
18 18
     /// 创建人:赵耀
19 19
     /// 创建时间::2020年8月22日
20
-    /// 需要安装\ffmpeg\bin\Setup Screen Capturer Recorder v0.12.10.exe
20
+    /// 需要安装\SSCR\Setup Screen Capturer Recorder v0.12.10.exe
21 21
     /// 本地调试需要配置环境变量 将ffmpeg.exe位置配置到环境变量的path中
22 22
     /// </summary>
23 23
     public class FFMpeg

+ 1
- 1
XHWK.WKTool/App.cs Parādīt failu

@@ -523,7 +523,7 @@ namespace XHWK.WKTool
523 523
             string StandardOutput = "";
524 524
             try
525 525
             {
526
-                InstallProcess.StartInfo.FileName = FileToolsCommon.GetFileAbsolutePath(@"/ffmpeg/bin/Setup Screen Capturer Recorder v0.12.10.exe");   //绝对路径
526
+                InstallProcess.StartInfo.FileName = FileToolsCommon.GetFileAbsolutePath(@"/SSCR/Setup Screen Capturer Recorder v0.12.10.exe");   //绝对路径
527 527
                 InstallProcess.StartInfo.UseShellExecute = false;           //不使用操作系统外壳程序启动
528 528
                 InstallProcess.StartInfo.RedirectStandardError = true;      //重定向标准错误输出
529 529
                 InstallProcess.StartInfo.RedirectStandardOutput = true;

+ 24
- 0
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs Parādīt failu

@@ -27,6 +27,30 @@ namespace XHWK.WKTool
27 27
         {
28 28
             InitializeComponent();
29 29
             ResizeMode = ResizeMode.NoResize;
30
+            new Thread(o =>
31
+            {
32
+                if (!FileToolsCommon.IsExistDirectory(FileToolsCommon.GetFileAbsolutePath("/ffmpeg/")))
33
+                {
34
+                    try
35
+                    {
36
+                        //根据系统解压ffmpeg
37
+                        if (Environment.Is64BitOperatingSystem)
38
+                        {
39
+                            //64
40
+                            ZipHelper.UnZip(FileToolsCommon.GetFileAbsolutePath("/ffmpegx64.zip"), FileToolsCommon.GetFileAbsolutePath());
41
+                        }
42
+                        else
43
+                        {
44
+                            //32
45
+                            ZipHelper.UnZip(FileToolsCommon.GetFileAbsolutePath("/ffmpegx32.zip"), FileToolsCommon.GetFileAbsolutePath());
46
+                        }
47
+                    }
48
+                    catch (Exception ex)
49
+                    {
50
+                        ZipHelper.UnZip(FileToolsCommon.GetFileAbsolutePath("/ffmpegx64.zip"), FileToolsCommon.GetFileAbsolutePath());
51
+                    }
52
+                }
53
+            }).Start();
30 54
             if (!APP.CheckScreenCapturerRecorder())
31 55
             {
32 56
                 MessageWindow.Show("首次运行需安装环境,请在确定后依次点击“English-OK-Next>-Next>Install”完成安装!");

Binārs
XHWK.WKTool/SSCR/Setup Screen Capturer Recorder v0.12.10.exe Parādīt failu


+ 12
- 0
XHWK.WKTool/XHWK.WKTool.csproj Parādīt failu

@@ -287,6 +287,12 @@
287 287
       <Generator>ResXFileCodeGenerator</Generator>
288 288
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
289 289
     </EmbeddedResource>
290
+    <EmbeddedResource Include="ffmpegx32.zip">
291
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
292
+    </EmbeddedResource>
293
+    <EmbeddedResource Include="ffmpegx64.zip">
294
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
295
+    </EmbeddedResource>
290 296
     <None Include="packages.config" />
291 297
     <EmbeddedResource Include="PrintTool\data\compress\compress.ps">
292 298
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -1614,5 +1620,11 @@
1614 1620
     <Resource Include="Images\countdown1_6.png" />
1615 1621
     <Resource Include="Images\countdown1_7.png" />
1616 1622
   </ItemGroup>
1623
+  <ItemGroup />
1624
+  <ItemGroup>
1625
+    <EmbeddedResource Include="SSCR\Setup Screen Capturer Recorder v0.12.10.exe">
1626
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1627
+    </EmbeddedResource>
1628
+  </ItemGroup>
1617 1629
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1618 1630
 </Project>

Binārs
XHWK.WKTool/ffmpegx32.zip Parādīt failu


Binārs
XHWK.WKTool/ffmpegx64.zip Parādīt failu


Notiek ielāde…
Atcelt
Saglabāt