Browse Source

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

tags/录制修改前
耀 4 years ago
parent
commit
f5c8c19f0b

+ 1
- 1
Common/system/FFMpeg.cs View File

17
     /// ffmpeg帮助类
17
     /// ffmpeg帮助类
18
     /// 创建人:赵耀
18
     /// 创建人:赵耀
19
     /// 创建时间::2020年8月22日
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
     /// 本地调试需要配置环境变量 将ffmpeg.exe位置配置到环境变量的path中
21
     /// 本地调试需要配置环境变量 将ffmpeg.exe位置配置到环境变量的path中
22
     /// </summary>
22
     /// </summary>
23
     public class FFMpeg
23
     public class FFMpeg

+ 1
- 1
XHWK.WKTool/App.cs View File

523
             string StandardOutput = "";
523
             string StandardOutput = "";
524
             try
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
                 InstallProcess.StartInfo.UseShellExecute = false;           //不使用操作系统外壳程序启动
527
                 InstallProcess.StartInfo.UseShellExecute = false;           //不使用操作系统外壳程序启动
528
                 InstallProcess.StartInfo.RedirectStandardError = true;      //重定向标准错误输出
528
                 InstallProcess.StartInfo.RedirectStandardError = true;      //重定向标准错误输出
529
                 InstallProcess.StartInfo.RedirectStandardOutput = true;
529
                 InstallProcess.StartInfo.RedirectStandardOutput = true;

+ 24
- 0
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs View File

27
         {
27
         {
28
             InitializeComponent();
28
             InitializeComponent();
29
             ResizeMode = ResizeMode.NoResize;
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
             if (!APP.CheckScreenCapturerRecorder())
54
             if (!APP.CheckScreenCapturerRecorder())
31
             {
55
             {
32
                 MessageWindow.Show("首次运行需安装环境,请在确定后依次点击“English-OK-Next>-Next>Install”完成安装!");
56
                 MessageWindow.Show("首次运行需安装环境,请在确定后依次点击“English-OK-Next>-Next>Install”完成安装!");

BIN
XHWK.WKTool/SSCR/Setup Screen Capturer Recorder v0.12.10.exe View File


+ 12
- 0
XHWK.WKTool/XHWK.WKTool.csproj View File

287
       <Generator>ResXFileCodeGenerator</Generator>
287
       <Generator>ResXFileCodeGenerator</Generator>
288
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
288
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
289
     </EmbeddedResource>
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
     <None Include="packages.config" />
296
     <None Include="packages.config" />
291
     <EmbeddedResource Include="PrintTool\data\compress\compress.ps">
297
     <EmbeddedResource Include="PrintTool\data\compress\compress.ps">
292
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
298
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1614
     <Resource Include="Images\countdown1_6.png" />
1620
     <Resource Include="Images\countdown1_6.png" />
1615
     <Resource Include="Images\countdown1_7.png" />
1621
     <Resource Include="Images\countdown1_7.png" />
1616
   </ItemGroup>
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
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1629
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1618
 </Project>
1630
 </Project>

BIN
XHWK.WKTool/ffmpegx32.zip View File


BIN
XHWK.WKTool/ffmpegx64.zip View File


Loading…
Cancel
Save