jindou před 1 rokem
revize
63dab6689b
85 změnil soubory, kde provedl 20220 přidání a 0 odebrání
  1. 74 0
      CMakeLists.txt
  2. 545 0
      CMakeLists.txt.user
  3. 1 0
      build/.cmake/api/v1/query/client-vscode/query.json
  4. 1459 0
      build/.cmake/api/v1/reply/cache-v2-9b61aad38a2cdeb13b92.json
  5. 956 0
      build/.cmake/api/v1/reply/cmakeFiles-v1-5dd8b96b15971767d98a.json
  6. 69 0
      build/.cmake/api/v1/reply/codemodel-v2-e4dea866c05882e25318.json
  7. 14 0
      build/.cmake/api/v1/reply/directory-.-Debug-d0094a50bb2071803777.json
  8. 132 0
      build/.cmake/api/v1/reply/index-2024-06-19T07-40-20-0095.json
  9. 538 0
      build/.cmake/api/v1/reply/target-dfota_tools-Debug-d99071d4a05c894dbb30.json
  10. 58 0
      build/.cmake/api/v1/reply/target-dfota_tools_autogen-Debug-e79886f9513fb5f7a9c5.json
  11. 133 0
      build/.cmake/api/v1/reply/toolchains-v1-c03f4590e2b68eb46af1.json
  12. 446 0
      build/CMakeCache.txt
  13. 72 0
      build/CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake
  14. 83 0
      build/CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake
  15. binární
      build/CMakeFiles/3.26.0-rc1/CMakeDetermineCompilerABI_C.bin
  16. binární
      build/CMakeFiles/3.26.0-rc1/CMakeDetermineCompilerABI_CXX.bin
  17. 6 0
      build/CMakeFiles/3.26.0-rc1/CMakeRCCompiler.cmake
  18. 15 0
      build/CMakeFiles/3.26.0-rc1/CMakeSystem.cmake
  19. 868 0
      build/CMakeFiles/3.26.0-rc1/CompilerIdC/CMakeCCompilerId.c
  20. binární
      build/CMakeFiles/3.26.0-rc1/CompilerIdC/a.exe
  21. 857 0
      build/CMakeFiles/3.26.0-rc1/CompilerIdCXX/CMakeCXXCompilerId.cpp
  22. binární
      build/CMakeFiles/3.26.0-rc1/CompilerIdCXX/a.exe
  23. 81 0
      build/CMakeFiles/CMakeConfigureLog.yaml
  24. 16 0
      build/CMakeFiles/CMakeDirectoryInformation.cmake
  25. 3 0
      build/CMakeFiles/CMakeRuleHashes.txt
  26. 174 0
      build/CMakeFiles/Makefile.cmake
  27. 139 0
      build/CMakeFiles/Makefile2
  28. 4 0
      build/CMakeFiles/TargetDirectories.txt
  29. 1 0
      build/CMakeFiles/cmake.check_cache
  30. 31 0
      build/CMakeFiles/dfota_tools.dir/DependInfo.cmake
  31. 325 0
      build/CMakeFiles/dfota_tools.dir/build.make
  32. 42 0
      build/CMakeFiles/dfota_tools.dir/cmake_clean.cmake
  33. 2 0
      build/CMakeFiles/dfota_tools.dir/compiler_depend.make
  34. 2 0
      build/CMakeFiles/dfota_tools.dir/compiler_depend.ts
  35. 2 0
      build/CMakeFiles/dfota_tools.dir/depend.make
  36. 17 0
      build/CMakeFiles/dfota_tools.dir/flags.make
  37. 1 0
      build/CMakeFiles/dfota_tools.dir/includes_C.rsp
  38. 1 0
      build/CMakeFiles/dfota_tools.dir/includes_CXX.rsp
  39. 1 0
      build/CMakeFiles/dfota_tools.dir/linkLibs.rsp
  40. 1 0
      build/CMakeFiles/dfota_tools.dir/objects1.rsp
  41. 16 0
      build/CMakeFiles/dfota_tools.dir/progress.make
  42. 427 0
      build/CMakeFiles/dfota_tools_autogen.dir/AutogenInfo.json
  43. 18 0
      build/CMakeFiles/dfota_tools_autogen.dir/DependInfo.cmake
  44. 88 0
      build/CMakeFiles/dfota_tools_autogen.dir/build.make
  45. 10 0
      build/CMakeFiles/dfota_tools_autogen.dir/cmake_clean.cmake
  46. 2 0
      build/CMakeFiles/dfota_tools_autogen.dir/compiler_depend.make
  47. 2 0
      build/CMakeFiles/dfota_tools_autogen.dir/compiler_depend.ts
  48. 2 0
      build/CMakeFiles/dfota_tools_autogen.dir/progress.make
  49. 1 0
      build/CMakeFiles/dfota_tools_zh_CN.ts_lst_file
  50. 1 0
      build/CMakeFiles/progress.marks
  51. 519 0
      build/Makefile
  52. 49 0
      build/cmake_install.cmake
  53. 80 0
      build/compile_commands.json
  54. 17 0
      build_date_time.cpp
  55. 91 0
      build_date_time.h
  56. 10 0
      dfotaConfig.h
  57. 203 0
      dfota_tools_zh_CN.ts
  58. binární
      exe/DFOTA_TOOLS_V0002.exe
  59. 54 0
      main.cpp
  60. 617 0
      mainwindow.cpp
  61. 75 0
      mainwindow.h
  62. 691 0
      mainwindow.ui
  63. 522 0
      src/bsdiff/bsdiff.c
  64. 72 0
      src/bsdiff/bsdiff.h
  65. 214 0
      src/bsdiff/bspatch.c
  66. 52 0
      src/bsdiff/bspatch.h
  67. 150 0
      src/crc32.cpp
  68. 12 0
      src/crc32.h
  69. 1835 0
      src/dfota.cpp
  70. 165 0
      src/dfota.h
  71. 83 0
      src/lzma/inc/7zFile.h
  72. 375 0
      src/lzma/inc/7zTypes.h
  73. 33 0
      src/lzma/inc/Compiler.h
  74. 121 0
      src/lzma/inc/LzFind.h
  75. 57 0
      src/lzma/inc/LzHash.h
  76. 234 0
      src/lzma/inc/LzmaDec.h
  77. 76 0
      src/lzma/inc/LzmaEnc.h
  78. 11 0
      src/lzma/inc/Precomp.h
  79. 427 0
      src/lzma/lzma.c
  80. 22 0
      src/lzma/lzma.h
  81. 3 0
      src/lzma/src/1111-CMakeLists.txt
  82. 286 0
      src/lzma/src/7zFile.c
  83. 1128 0
      src/lzma/src/LzFind.c
  84. 1209 0
      src/lzma/src/LzmaDec.c
  85. 2991 0
      src/lzma/src/LzmaEnc.c

+ 74 - 0
CMakeLists.txt

@@ -0,0 +1,74 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(dfota_tools VERSION 0.1)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+set(CMAKE_CXX_FLAGS "-mwindows")
+
+find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets LinguistTools REQUIRED)
+find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets LinguistTools REQUIRED)
+
+set(TS_FILES dfota_tools_zh_CN.ts)
+
+
+#递归获取所有当前目录及子目录下的C文件
+file(GLOB_RECURSE c_files src/*.c src/*.CPP src/*.h)
+
+set(PROJECT_SOURCES
+        main.cpp
+        mainwindow.cpp
+        mainwindow.h
+        dfotaConfig.h
+        build_date_time.cpp
+        build_date_time.h
+        mainwindow.ui
+        ${c_files}
+        ${TS_FILES}
+)
+
+if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
+    qt_add_executable(dfota_tools
+        MANUAL_FINALIZATION
+        ${PROJECT_SOURCES}
+    )
+# Define target properties for Android with Qt 6 as:
+#    set_property(TARGET dfota_tools APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+#                 ${CMAKE_CURRENT_SOURCE_DIR}/android)
+# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
+
+    qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
+else()
+    if(ANDROID)
+        add_library(dfota_tools SHARED
+            ${PROJECT_SOURCES}
+        )
+# Define properties for Android with Qt 5 after find_package() calls as:
+#    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
+    else()
+        add_executable(dfota_tools
+            ${PROJECT_SOURCES}
+        )
+    endif()
+
+    qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
+endif()
+
+target_link_libraries(dfota_tools PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
+
+set_target_properties(dfota_tools PROPERTIES
+    MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
+    MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+    MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+)
+
+if(QT_VERSION_MAJOR EQUAL 6)
+    qt_finalize_executable(dfota_tools)
+endif()

+ 545 - 0
CMakeLists.txt.user

@@ -0,0 +1,545 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 5.0.2, 2024-05-17T21:32:29. -->
+<qtcreator>
+ <data>
+  <variable>EnvironmentId</variable>
+  <value type="QByteArray">{69aa39e5-ee7a-4d83-8b65-a7eb5575c581}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+    <value type="QString" key="language">Cpp</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+    </valuemap>
+   </valuemap>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+    <value type="QString" key="language">QmlJS</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+    </valuemap>
+   </valuemap>
+   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
+   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+   <value type="int" key="EditorConfiguration.IndentSize">4</value>
+   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+   <value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
+   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+   <value type="int" key="EditorConfiguration.TabSize">8</value>
+   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+   <value type="bool" key="EditorConfiguration.UseIndenter">false</value>
+   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+   <value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
+   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+   <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.PluginSettings</variable>
+  <valuemap type="QVariantMap">
+   <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
+    <value type="bool" key="AutoTest.Framework.Boost">true</value>
+    <value type="bool" key="AutoTest.Framework.CTest">false</value>
+    <value type="bool" key="AutoTest.Framework.Catch">true</value>
+    <value type="bool" key="AutoTest.Framework.GTest">true</value>
+    <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
+    <value type="bool" key="AutoTest.Framework.QtTest">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
+   <value type="int" key="AutoTest.RunAfterBuild">0</value>
+   <value type="bool" key="AutoTest.UseGlobal">true</value>
+   <valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
+    <value type="QString">-fno-delayed-template-parsing</value>
+   </valuelist>
+   <value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
+   <value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
+   <valuemap type="QVariantMap" key="ClangTools">
+    <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
+    <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
+    <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
+    <value type="int" key="ClangTools.ParallelJobs">4</value>
+    <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
+    <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
+    <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
+    <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
+   </valuemap>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="DeviceType">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qt5.15.2_mingw81_32_static</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">qt5.15.2_mingw81_32_static</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c85ce074-8ea2-48c3-9244-054171bb8894}</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+    <value type="QString" key="CMake.Build.Type">Debug</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GNMake Makefiles JOM
+-DCMAKE_BUILD_TYPE:STRING=Debug
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-qt5_15_2_mingw81_32_static-Debug</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+    <value type="QString" key="CMake.Build.Type">Release</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GNMake Makefiles JOM
+-DCMAKE_BUILD_TYPE:STRING=Release
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-qt5_15_2_mingw81_32_static-Release</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+    <value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GNMake Makefiles JOM
+-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-qt5_15_2_mingw81_32_static-RelWithDebInfo</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
+    <value type="QString" key="CMake.Build.Type">MinSizeRel</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GNMake Makefiles JOM
+-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-qt5_15_2_mingw81_32_static-MinSizeRel</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
+    <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <valuelist type="QVariantList" key="CustomOutputParsers"/>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">dfota_tools</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.dfota_tools</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">dfota_tools</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/80_work/VS-Code-C/dfota/dfota_tools/build-dfota_tools-qt5_15_2_mingw81_32_static-Release</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.1</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="DeviceType">Desktop</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.12.12 MinGW 32-bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.12.12 MinGW 32-bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.51212.win32_mingw73_kit</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+    <value type="QString" key="CMake.Build.Type">Debug</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GMinGW Makefiles
+-DCMAKE_BUILD_TYPE:STRING=Debug
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-Desktop_Qt_5_12_12_MinGW_32_bit-Debug</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+    <value type="QString" key="CMake.Build.Type">Release</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GMinGW Makefiles
+-DCMAKE_BUILD_TYPE:STRING=Release
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/80_work/VS-Code-C/dfota/dfota_tools/build-dfota_tools-Desktop_Qt_5_12_12_MinGW_32_bit-Release</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+    <value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GMinGW Makefiles
+-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-Desktop_Qt_5_12_12_MinGW_32_bit-RelWithDebInfo</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
+    <value type="QString" key="CMake.Build.Type">MinSizeRel</value>
+    <value type="QString" key="CMake.Initial.Parameters">-GMinGW Makefiles
+-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
+-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\80_work\VS-Code-C\dfota\dfota_tools\build-dfota_tools-Desktop_Qt_5_12_12_MinGW_32_bit-MinSizeRel</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">all</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+       <value type="QString">clean</value>
+      </valuelist>
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
+    <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <valuelist type="QVariantList" key="CustomOutputParsers"/>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">dfota_tools</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.dfota_tools</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">dfota_tools</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">2</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">22</value>
+ </data>
+ <data>
+  <variable>Version</variable>
+  <value type="int">22</value>
+ </data>
+</qtcreator>

+ 1 - 0
build/.cmake/api/v1/query/client-vscode/query.json

@@ -0,0 +1 @@
+{"requests":[{"kind":"cache","version":2},{"kind":"codemodel","version":2},{"kind":"toolchains","version":1},{"kind":"cmakeFiles","version":1}]}

+ 1459 - 0
build/.cmake/api/v1/reply/cache-v2-9b61aad38a2cdeb13b92.json

@@ -0,0 +1,1459 @@
+{
+	"entries" : 
+	[
+		{
+			"name" : "CMAKE_ADDR2LINE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/addr2line.exe"
+		},
+		{
+			"name" : "CMAKE_AR",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ar.exe"
+		},
+		{
+			"name" : "CMAKE_BUILD_TYPE",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "No help, variable specified on the command line."
+				}
+			],
+			"type" : "STRING",
+			"value" : "Debug"
+		},
+		{
+			"name" : "CMAKE_CACHEFILE_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "This is the directory where this CMakeCache.txt was created"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "d:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build"
+		},
+		{
+			"name" : "CMAKE_CACHE_MAJOR_VERSION",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Major version of cmake used to create the current loaded cache"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "3"
+		},
+		{
+			"name" : "CMAKE_CACHE_MINOR_VERSION",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Minor version of cmake used to create the current loaded cache"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "26"
+		},
+		{
+			"name" : "CMAKE_CACHE_PATCH_VERSION",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Patch version of cmake used to create the current loaded cache"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "0"
+		},
+		{
+			"name" : "CMAKE_COLOR_MAKEFILE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Enable/Disable color output during build."
+				}
+			],
+			"type" : "BOOL",
+			"value" : "ON"
+		},
+		{
+			"name" : "CMAKE_COMMAND",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to CMake executable."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "C:/Program Files/CMake/bin/cmake.exe"
+		},
+		{
+			"name" : "CMAKE_CPACK_COMMAND",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to cpack program executable."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "C:/Program Files/CMake/bin/cpack.exe"
+		},
+		{
+			"name" : "CMAKE_CTEST_COMMAND",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to ctest program executable."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "C:/Program Files/CMake/bin/ctest.exe"
+		},
+		{
+			"name" : "CMAKE_CXX_COMPILER",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "CXX compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe"
+		},
+		{
+			"name" : "CMAKE_CXX_COMPILER_AR",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ar.exe"
+		},
+		{
+			"name" : "CMAKE_CXX_COMPILER_RANLIB",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ranlib.exe"
+		},
+		{
+			"name" : "CMAKE_CXX_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the CXX compiler during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_CXX_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the CXX compiler during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-g"
+		},
+		{
+			"name" : "CMAKE_CXX_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the CXX compiler during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-Os -DNDEBUG"
+		},
+		{
+			"name" : "CMAKE_CXX_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the CXX compiler during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-O3 -DNDEBUG"
+		},
+		{
+			"name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-O2 -g -DNDEBUG"
+		},
+		{
+			"name" : "CMAKE_CXX_STANDARD_LIBRARIES",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Libraries linked by default with all C++ applications."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32"
+		},
+		{
+			"name" : "CMAKE_C_COMPILER",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "C compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe"
+		},
+		{
+			"name" : "CMAKE_C_COMPILER_AR",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ar.exe"
+		},
+		{
+			"name" : "CMAKE_C_COMPILER_RANLIB",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ranlib.exe"
+		},
+		{
+			"name" : "CMAKE_C_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the C compiler during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_C_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the C compiler during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-g"
+		},
+		{
+			"name" : "CMAKE_C_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the C compiler during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-Os -DNDEBUG"
+		},
+		{
+			"name" : "CMAKE_C_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the C compiler during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-O3 -DNDEBUG"
+		},
+		{
+			"name" : "CMAKE_C_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the C compiler during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-O2 -g -DNDEBUG"
+		},
+		{
+			"name" : "CMAKE_C_STANDARD_LIBRARIES",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Libraries linked by default with all C applications."
+				}
+			],
+			"type" : "STRING",
+			"value" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32"
+		},
+		{
+			"name" : "CMAKE_DLLTOOL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/dlltool.exe"
+		},
+		{
+			"name" : "CMAKE_EDIT_COMMAND",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to cache edit program executable."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "C:/Program Files/CMake/bin/cmake-gui.exe"
+		},
+		{
+			"name" : "CMAKE_EXECUTABLE_FORMAT",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Executable file format"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "Unknown"
+		},
+		{
+			"name" : "CMAKE_EXE_LINKER_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_EXPORT_COMPILE_COMMANDS",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "No help, variable specified on the command line."
+				}
+			],
+			"type" : "BOOL",
+			"value" : "TRUE"
+		},
+		{
+			"name" : "CMAKE_EXTRA_GENERATOR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Name of external makefile project generator."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_FIND_PACKAGE_REDIRECTS_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake."
+				}
+			],
+			"type" : "STATIC",
+			"value" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/pkgRedirects"
+		},
+		{
+			"name" : "CMAKE_GENERATOR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Name of generator."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "Unix Makefiles"
+		},
+		{
+			"name" : "CMAKE_GENERATOR_INSTANCE",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Generator instance identifier."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_GENERATOR_PLATFORM",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Name of generator platform."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_GENERATOR_TOOLSET",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Name of generator toolset."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_GNUtoMS",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Convert GNU import libraries to MS format (requires Visual Studio)"
+				}
+			],
+			"type" : "BOOL",
+			"value" : "OFF"
+		},
+		{
+			"name" : "CMAKE_HOME_DIRECTORY",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Source directory with the top level CMakeLists.txt file for this project"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools"
+		},
+		{
+			"name" : "CMAKE_INSTALL_PREFIX",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Install path prefix, prepended onto install directories."
+				}
+			],
+			"type" : "PATH",
+			"value" : "C:/Program Files (x86)/dfota_tools"
+		},
+		{
+			"name" : "CMAKE_LINKER",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ld.exe"
+		},
+		{
+			"name" : "CMAKE_MAKE_PROGRAM",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/make.exe"
+		},
+		{
+			"name" : "CMAKE_MODULE_LINKER_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of modules during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of modules during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of modules during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_NM",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/nm.exe"
+		},
+		{
+			"name" : "CMAKE_NUMBER_OF_MAKEFILES",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "number of local generators"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "1"
+		},
+		{
+			"name" : "CMAKE_OBJCOPY",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/objcopy.exe"
+		},
+		{
+			"name" : "CMAKE_OBJDUMP",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/objdump.exe"
+		},
+		{
+			"name" : "CMAKE_PLATFORM_INFO_INITIALIZED",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Platform information initialized"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "1"
+		},
+		{
+			"name" : "CMAKE_PROJECT_DESCRIPTION",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_PROJECT_HOMEPAGE_URL",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_PROJECT_NAME",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "dfota_tools"
+		},
+		{
+			"name" : "CMAKE_PROJECT_VERSION",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "0.1"
+		},
+		{
+			"name" : "CMAKE_PROJECT_VERSION_MAJOR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "0"
+		},
+		{
+			"name" : "CMAKE_PROJECT_VERSION_MINOR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "1"
+		},
+		{
+			"name" : "CMAKE_PROJECT_VERSION_PATCH",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_PROJECT_VERSION_TWEAK",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_RANLIB",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ranlib.exe"
+		},
+		{
+			"name" : "CMAKE_RC_COMPILER",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "RC compiler"
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/windres.exe"
+		},
+		{
+			"name" : "CMAKE_RC_COMPILER_WORKS",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : ""
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "1"
+		},
+		{
+			"name" : "CMAKE_RC_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags for Windows Resource Compiler during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_RC_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags for Windows Resource Compiler during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_RC_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags for Windows Resource Compiler during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_RC_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags for Windows Resource Compiler during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_RC_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags for Windows Resource Compiler during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_READELF",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/readelf.exe"
+		},
+		{
+			"name" : "CMAKE_ROOT",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to CMake installation."
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "C:/Program Files/CMake/share/cmake-3.26"
+		},
+		{
+			"name" : "CMAKE_SHARED_LINKER_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of shared libraries during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_SKIP_INSTALL_RPATH",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "If set, runtime paths are not added when installing shared libraries, but are added when building."
+				}
+			],
+			"type" : "BOOL",
+			"value" : "NO"
+		},
+		{
+			"name" : "CMAKE_SKIP_RPATH",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "If set, runtime paths are not added when using shared libraries."
+				}
+			],
+			"type" : "BOOL",
+			"value" : "NO"
+		},
+		{
+			"name" : "CMAKE_STATIC_LINKER_FLAGS",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of static libraries during all build types."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of static libraries during DEBUG builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of static libraries during RELEASE builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds."
+				}
+			],
+			"type" : "STRING",
+			"value" : ""
+		},
+		{
+			"name" : "CMAKE_STRIP",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "Path to a program."
+				}
+			],
+			"type" : "FILEPATH",
+			"value" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/strip.exe"
+		},
+		{
+			"name" : "CMAKE_VERBOSE_MAKEFILE",
+			"properties" : 
+			[
+				{
+					"name" : "ADVANCED",
+					"value" : "1"
+				},
+				{
+					"name" : "HELPSTRING",
+					"value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo."
+				}
+			],
+			"type" : "BOOL",
+			"value" : "FALSE"
+		},
+		{
+			"name" : "QT_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "The directory containing a CMake configuration file for QT."
+				}
+			],
+			"type" : "PATH",
+			"value" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5"
+		},
+		{
+			"name" : "Qt5Core_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "The directory containing a CMake configuration file for Qt5Core."
+				}
+			],
+			"type" : "PATH",
+			"value" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core"
+		},
+		{
+			"name" : "Qt5Gui_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "The directory containing a CMake configuration file for Qt5Gui."
+				}
+			],
+			"type" : "PATH",
+			"value" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui"
+		},
+		{
+			"name" : "Qt5LinguistTools_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "The directory containing a CMake configuration file for Qt5LinguistTools."
+				}
+			],
+			"type" : "PATH",
+			"value" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools"
+		},
+		{
+			"name" : "Qt5Widgets_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "The directory containing a CMake configuration file for Qt5Widgets."
+				}
+			],
+			"type" : "PATH",
+			"value" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets"
+		},
+		{
+			"name" : "Qt5_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "The directory containing a CMake configuration file for Qt5."
+				}
+			],
+			"type" : "PATH",
+			"value" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5"
+		},
+		{
+			"name" : "_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "linker supports push/pop state"
+				}
+			],
+			"type" : "INTERNAL",
+			"value" : "TRUE"
+		},
+		{
+			"name" : "dfota_tools_BINARY_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build"
+		},
+		{
+			"name" : "dfota_tools_IS_TOP_LEVEL",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "ON"
+		},
+		{
+			"name" : "dfota_tools_SOURCE_DIR",
+			"properties" : 
+			[
+				{
+					"name" : "HELPSTRING",
+					"value" : "Value Computed by CMake"
+				}
+			],
+			"type" : "STATIC",
+			"value" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools"
+		}
+	],
+	"kind" : "cache",
+	"version" : 
+	{
+		"major" : 2,
+		"minor" : 0
+	}
+}

+ 956 - 0
build/.cmake/api/v1/reply/cmakeFiles-v1-5dd8b96b15971767d98a.json

@@ -0,0 +1,956 @@
+{
+	"inputs" : 
+	[
+		{
+			"path" : "CMakeLists.txt"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineSystem.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystem.cmake.in"
+		},
+		{
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/3.26.0-rc1/CMakeSystem.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeUnixFindMake.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCompilerIdDetection.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ADSP-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Borland-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Cray-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GHS-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/HP-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IAR-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Intel-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/LCC-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/MSVC-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PGI-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PathScale-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SCO-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TI-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Tasking-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Watcom-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XL-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XLClang-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindBinUtils.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-FindBinUtils.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in"
+		},
+		{
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCXXCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-Determine-CXX.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCompilerIdDetection.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ADSP-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Borland-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Cray-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GHS-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IAR-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Intel-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/MSVC-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PGI-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PathScale-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SCO-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TI-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Tasking-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Watcom-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindBinUtils.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-FindBinUtils.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompiler.cmake.in"
+		},
+		{
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeGenericSystem.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCInformation.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-C.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineRCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeRCCompiler.cmake.in"
+		},
+		{
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/3.26.0-rc1/CMakeRCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeRCInformation.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-windres.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestRCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitIncludeInfo.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitLinkInfo.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseLibraryArchitecture.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompilerABI.c"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompileFeatures.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Internal/FeatureTesting.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in"
+		},
+		{
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXInformation.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-CXX.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitIncludeInfo.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitLinkInfo.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseLibraryArchitecture.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompileFeatures.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Internal/FeatureTesting.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompiler.cmake.in"
+		},
+		{
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX-ABI.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ConfigVersion.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5Config.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ConfigVersion.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5Config.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ModuleLocation.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfigVersion.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfigVersion.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigVersion.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfig.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreMacros.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QICNSPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTgaPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTiffPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWbmpPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWebGLIntegrationPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWebpPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWindowsDirect2DIntegrationPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWindowsIntegrationPlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QXdgDesktopPortalThemePlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5Widgets_QWindowsVistaStylePlugin.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfigVersion.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake"
+		},
+		{
+			"isExternal" : true,
+			"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake"
+		},
+		{
+			"isCMake" : true,
+			"isExternal" : true,
+			"path" : "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake"
+		}
+	],
+	"kind" : "cmakeFiles",
+	"paths" : 
+	{
+		"build" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+		"source" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools"
+	},
+	"version" : 
+	{
+		"major" : 1,
+		"minor" : 0
+	}
+}

+ 69 - 0
build/.cmake/api/v1/reply/codemodel-v2-e4dea866c05882e25318.json

@@ -0,0 +1,69 @@
+{
+	"configurations" : 
+	[
+		{
+			"directories" : 
+			[
+				{
+					"build" : ".",
+					"jsonFile" : "directory-.-Debug-d0094a50bb2071803777.json",
+					"minimumCMakeVersion" : 
+					{
+						"string" : "3.5"
+					},
+					"projectIndex" : 0,
+					"source" : ".",
+					"targetIndexes" : 
+					[
+						0,
+						1
+					]
+				}
+			],
+			"name" : "Debug",
+			"projects" : 
+			[
+				{
+					"directoryIndexes" : 
+					[
+						0
+					],
+					"name" : "dfota_tools",
+					"targetIndexes" : 
+					[
+						0,
+						1
+					]
+				}
+			],
+			"targets" : 
+			[
+				{
+					"directoryIndex" : 0,
+					"id" : "dfota_tools::@6890427a1f51a3e7e1df",
+					"jsonFile" : "target-dfota_tools-Debug-d99071d4a05c894dbb30.json",
+					"name" : "dfota_tools",
+					"projectIndex" : 0
+				},
+				{
+					"directoryIndex" : 0,
+					"id" : "dfota_tools_autogen::@6890427a1f51a3e7e1df",
+					"jsonFile" : "target-dfota_tools_autogen-Debug-e79886f9513fb5f7a9c5.json",
+					"name" : "dfota_tools_autogen",
+					"projectIndex" : 0
+				}
+			]
+		}
+	],
+	"kind" : "codemodel",
+	"paths" : 
+	{
+		"build" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+		"source" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools"
+	},
+	"version" : 
+	{
+		"major" : 2,
+		"minor" : 5
+	}
+}

+ 14 - 0
build/.cmake/api/v1/reply/directory-.-Debug-d0094a50bb2071803777.json

@@ -0,0 +1,14 @@
+{
+	"backtraceGraph" : 
+	{
+		"commands" : [],
+		"files" : [],
+		"nodes" : []
+	},
+	"installers" : [],
+	"paths" : 
+	{
+		"build" : ".",
+		"source" : "."
+	}
+}

+ 132 - 0
build/.cmake/api/v1/reply/index-2024-06-19T07-40-20-0095.json

@@ -0,0 +1,132 @@
+{
+	"cmake" : 
+	{
+		"generator" : 
+		{
+			"multiConfig" : false,
+			"name" : "Unix Makefiles"
+		},
+		"paths" : 
+		{
+			"cmake" : "C:/Program Files/CMake/bin/cmake.exe",
+			"cpack" : "C:/Program Files/CMake/bin/cpack.exe",
+			"ctest" : "C:/Program Files/CMake/bin/ctest.exe",
+			"root" : "C:/Program Files/CMake/share/cmake-3.26"
+		},
+		"version" : 
+		{
+			"isDirty" : false,
+			"major" : 3,
+			"minor" : 26,
+			"patch" : 0,
+			"string" : "3.26.0-rc1",
+			"suffix" : "rc1"
+		}
+	},
+	"objects" : 
+	[
+		{
+			"jsonFile" : "codemodel-v2-e4dea866c05882e25318.json",
+			"kind" : "codemodel",
+			"version" : 
+			{
+				"major" : 2,
+				"minor" : 5
+			}
+		},
+		{
+			"jsonFile" : "cache-v2-9b61aad38a2cdeb13b92.json",
+			"kind" : "cache",
+			"version" : 
+			{
+				"major" : 2,
+				"minor" : 0
+			}
+		},
+		{
+			"jsonFile" : "cmakeFiles-v1-5dd8b96b15971767d98a.json",
+			"kind" : "cmakeFiles",
+			"version" : 
+			{
+				"major" : 1,
+				"minor" : 0
+			}
+		},
+		{
+			"jsonFile" : "toolchains-v1-c03f4590e2b68eb46af1.json",
+			"kind" : "toolchains",
+			"version" : 
+			{
+				"major" : 1,
+				"minor" : 0
+			}
+		}
+	],
+	"reply" : 
+	{
+		"client-vscode" : 
+		{
+			"query.json" : 
+			{
+				"requests" : 
+				[
+					{
+						"kind" : "cache",
+						"version" : 2
+					},
+					{
+						"kind" : "codemodel",
+						"version" : 2
+					},
+					{
+						"kind" : "toolchains",
+						"version" : 1
+					},
+					{
+						"kind" : "cmakeFiles",
+						"version" : 1
+					}
+				],
+				"responses" : 
+				[
+					{
+						"jsonFile" : "cache-v2-9b61aad38a2cdeb13b92.json",
+						"kind" : "cache",
+						"version" : 
+						{
+							"major" : 2,
+							"minor" : 0
+						}
+					},
+					{
+						"jsonFile" : "codemodel-v2-e4dea866c05882e25318.json",
+						"kind" : "codemodel",
+						"version" : 
+						{
+							"major" : 2,
+							"minor" : 5
+						}
+					},
+					{
+						"jsonFile" : "toolchains-v1-c03f4590e2b68eb46af1.json",
+						"kind" : "toolchains",
+						"version" : 
+						{
+							"major" : 1,
+							"minor" : 0
+						}
+					},
+					{
+						"jsonFile" : "cmakeFiles-v1-5dd8b96b15971767d98a.json",
+						"kind" : "cmakeFiles",
+						"version" : 
+						{
+							"major" : 1,
+							"minor" : 0
+						}
+					}
+				]
+			}
+		}
+	}
+}

+ 538 - 0
build/.cmake/api/v1/reply/target-dfota_tools-Debug-d99071d4a05c894dbb30.json

@@ -0,0 +1,538 @@
+{
+	"artifacts" : 
+	[
+		{
+			"path" : "dfota_tools.exe"
+		},
+		{
+			"path" : "dfota_tools.pdb"
+		}
+	],
+	"backtrace" : 1,
+	"backtraceGraph" : 
+	{
+		"commands" : 
+		[
+			"add_executable",
+			"target_link_libraries",
+			"set_target_properties",
+			"_populate_Widgets_target_properties",
+			"find_package"
+		],
+		"files" : 
+		[
+			"CMakeLists.txt",
+			"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake",
+			"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5Config.cmake"
+		],
+		"nodes" : 
+		[
+			{
+				"file" : 0
+			},
+			{
+				"command" : 0,
+				"file" : 0,
+				"line" : 56,
+				"parent" : 0
+			},
+			{
+				"command" : 1,
+				"file" : 0,
+				"line" : 64,
+				"parent" : 0
+			},
+			{
+				"command" : 4,
+				"file" : 0,
+				"line" : 17,
+				"parent" : 0
+			},
+			{
+				"file" : 2,
+				"parent" : 3
+			},
+			{
+				"command" : 4,
+				"file" : 2,
+				"line" : 28,
+				"parent" : 4
+			},
+			{
+				"file" : 1,
+				"parent" : 5
+			},
+			{
+				"command" : 3,
+				"file" : 1,
+				"line" : 160,
+				"parent" : 6
+			},
+			{
+				"command" : 2,
+				"file" : 1,
+				"line" : 32,
+				"parent" : 7
+			}
+		]
+	},
+	"compileGroups" : 
+	[
+		{
+			"compileCommandFragments" : 
+			[
+				{
+					"fragment" : "-mwindows -g -std=gnu++11"
+				}
+			],
+			"defines" : 
+			[
+				{
+					"backtrace" : 2,
+					"define" : "QT_CORE_LIB"
+				},
+				{
+					"backtrace" : 2,
+					"define" : "QT_GUI_LIB"
+				},
+				{
+					"backtrace" : 2,
+					"define" : "QT_WIDGETS_LIB"
+				}
+			],
+			"includes" : 
+			[
+				{
+					"path" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build"
+				},
+				{
+					"path" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools"
+				},
+				{
+					"backtrace" : 0,
+					"path" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/include"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtWidgets"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtGui"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtANGLE"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtCore"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/./mkspecs/win32-g++"
+				}
+			],
+			"language" : "CXX",
+			"languageStandard" : 
+			{
+				"backtraces" : 
+				[
+					2
+				],
+				"standard" : "11"
+			},
+			"sourceIndexes" : 
+			[
+				0,
+				1,
+				2,
+				5,
+				12,
+				14
+			]
+		},
+		{
+			"compileCommandFragments" : 
+			[
+				{
+					"fragment" : "-g"
+				}
+			],
+			"defines" : 
+			[
+				{
+					"backtrace" : 2,
+					"define" : "QT_CORE_LIB"
+				},
+				{
+					"backtrace" : 2,
+					"define" : "QT_GUI_LIB"
+				},
+				{
+					"backtrace" : 2,
+					"define" : "QT_WIDGETS_LIB"
+				}
+			],
+			"includes" : 
+			[
+				{
+					"path" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build"
+				},
+				{
+					"path" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools"
+				},
+				{
+					"backtrace" : 0,
+					"path" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/include"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtWidgets"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtGui"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtANGLE"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtCore"
+				},
+				{
+					"backtrace" : 2,
+					"isSystem" : true,
+					"path" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/./mkspecs/win32-g++"
+				}
+			],
+			"language" : "C",
+			"sourceIndexes" : 
+			[
+				8,
+				10,
+				24,
+				26,
+				27,
+				28,
+				29
+			]
+		}
+	],
+	"dependencies" : 
+	[
+		{
+			"backtrace" : 0,
+			"id" : "dfota_tools_autogen::@6890427a1f51a3e7e1df"
+		}
+	],
+	"id" : "dfota_tools::@6890427a1f51a3e7e1df",
+	"link" : 
+	{
+		"commandFragments" : 
+		[
+			{
+				"fragment" : "-mwindows -g",
+				"role" : "flags"
+			},
+			{
+				"fragment" : "",
+				"role" : "flags"
+			},
+			{
+				"backtrace" : 2,
+				"fragment" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Widgetsd.a",
+				"role" : "libraries"
+			},
+			{
+				"backtrace" : 8,
+				"fragment" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Guid.a",
+				"role" : "libraries"
+			},
+			{
+				"backtrace" : 8,
+				"fragment" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Cored.a",
+				"role" : "libraries"
+			},
+			{
+				"fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32",
+				"role" : "libraries"
+			}
+		],
+		"language" : "CXX"
+	},
+	"name" : "dfota_tools",
+	"nameOnDisk" : "dfota_tools.exe",
+	"paths" : 
+	{
+		"build" : ".",
+		"source" : "."
+	},
+	"sourceGroups" : 
+	[
+		{
+			"name" : "Source Files",
+			"sourceIndexes" : 
+			[
+				0,
+				1,
+				2,
+				5,
+				8,
+				10,
+				12,
+				14,
+				24,
+				26,
+				27,
+				28,
+				29
+			]
+		},
+		{
+			"name" : "Header Files",
+			"sourceIndexes" : 
+			[
+				3,
+				4,
+				6,
+				9,
+				11,
+				13,
+				15,
+				16,
+				17,
+				18,
+				19,
+				20,
+				21,
+				22,
+				23,
+				25,
+				31
+			]
+		},
+		{
+			"name" : "",
+			"sourceIndexes" : 
+			[
+				7,
+				30
+			]
+		},
+		{
+			"name" : "CMake Rules",
+			"sourceIndexes" : 
+			[
+				32
+			]
+		}
+	],
+	"sources" : 
+	[
+		{
+			"backtrace" : 0,
+			"compileGroupIndex" : 0,
+			"isGenerated" : true,
+			"path" : "build/dfota_tools_autogen/mocs_compilation.cpp",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 0,
+			"path" : "main.cpp",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 0,
+			"path" : "mainwindow.cpp",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "mainwindow.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "dfotaConfig.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 0,
+			"path" : "build_date_time.cpp",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "build_date_time.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "mainwindow.ui",
+			"sourceGroupIndex" : 2
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/bsdiff/bsdiff.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/bsdiff/bsdiff.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/bsdiff/bspatch.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/bsdiff/bspatch.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 0,
+			"path" : "src/crc32.cpp",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/crc32.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 0,
+			"path" : "src/dfota.cpp",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/dfota.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/7zFile.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/7zTypes.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/Compiler.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/LzFind.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/LzHash.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/LzmaDec.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/LzmaEnc.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/inc/Precomp.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/lzma/lzma.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"path" : "src/lzma/lzma.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/lzma/src/7zFile.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/lzma/src/LzFind.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/lzma/src/LzmaDec.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"compileGroupIndex" : 1,
+			"path" : "src/lzma/src/LzmaEnc.c",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 1,
+			"isGenerated" : true,
+			"path" : "dfota_tools_zh_CN.ts",
+			"sourceGroupIndex" : 2
+		},
+		{
+			"backtrace" : 0,
+			"isGenerated" : true,
+			"path" : "build/dfota_tools_autogen/include/ui_mainwindow.h",
+			"sourceGroupIndex" : 1
+		},
+		{
+			"backtrace" : 0,
+			"isGenerated" : true,
+			"path" : "dfota_tools_zh_CN.ts.rule",
+			"sourceGroupIndex" : 3
+		}
+	],
+	"type" : "EXECUTABLE"
+}

+ 58 - 0
build/.cmake/api/v1/reply/target-dfota_tools_autogen-Debug-e79886f9513fb5f7a9c5.json

@@ -0,0 +1,58 @@
+{
+	"backtrace" : 0,
+	"backtraceGraph" : 
+	{
+		"commands" : [],
+		"files" : 
+		[
+			"CMakeLists.txt"
+		],
+		"nodes" : 
+		[
+			{
+				"file" : 0
+			}
+		]
+	},
+	"id" : "dfota_tools_autogen::@6890427a1f51a3e7e1df",
+	"isGeneratorProvided" : true,
+	"name" : "dfota_tools_autogen",
+	"paths" : 
+	{
+		"build" : ".",
+		"source" : "."
+	},
+	"sourceGroups" : 
+	[
+		{
+			"name" : "",
+			"sourceIndexes" : 
+			[
+				0
+			]
+		},
+		{
+			"name" : "CMake Rules",
+			"sourceIndexes" : 
+			[
+				1
+			]
+		}
+	],
+	"sources" : 
+	[
+		{
+			"backtrace" : 0,
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/dfota_tools_autogen",
+			"sourceGroupIndex" : 0
+		},
+		{
+			"backtrace" : 0,
+			"isGenerated" : true,
+			"path" : "build/CMakeFiles/dfota_tools_autogen.rule",
+			"sourceGroupIndex" : 1
+		}
+	],
+	"type" : "UTILITY"
+}

+ 133 - 0
build/.cmake/api/v1/reply/toolchains-v1-c03f4590e2b68eb46af1.json

@@ -0,0 +1,133 @@
+{
+	"kind" : "toolchains",
+	"toolchains" : 
+	[
+		{
+			"compiler" : 
+			{
+				"id" : "GNU",
+				"implicit" : 
+				{
+					"includeDirectories" : 
+					[
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/include"
+					],
+					"linkDirectories" : 
+					[
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/lib",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib"
+					],
+					"linkFrameworkDirectories" : [],
+					"linkLibraries" : 
+					[
+						"mingw32",
+						"gcc",
+						"moldname",
+						"mingwex",
+						"advapi32",
+						"shell32",
+						"user32",
+						"kernel32",
+						"iconv",
+						"mingw32",
+						"gcc",
+						"moldname",
+						"mingwex"
+					]
+				},
+				"path" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe",
+				"version" : "7.3.0"
+			},
+			"language" : "C",
+			"sourceFileExtensions" : 
+			[
+				"c",
+				"m"
+			]
+		},
+		{
+			"compiler" : 
+			{
+				"id" : "GNU",
+				"implicit" : 
+				{
+					"includeDirectories" : 
+					[
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/include"
+					],
+					"linkDirectories" : 
+					[
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/lib",
+						"D:/tools/mingw-w64-v7.3.0/mingw64/lib"
+					],
+					"linkFrameworkDirectories" : [],
+					"linkLibraries" : 
+					[
+						"stdc++",
+						"mingw32",
+						"gcc_s",
+						"gcc",
+						"moldname",
+						"mingwex",
+						"advapi32",
+						"shell32",
+						"user32",
+						"kernel32",
+						"iconv",
+						"mingw32",
+						"gcc_s",
+						"gcc",
+						"moldname",
+						"mingwex"
+					]
+				},
+				"path" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe",
+				"version" : "7.3.0"
+			},
+			"language" : "CXX",
+			"sourceFileExtensions" : 
+			[
+				"C",
+				"M",
+				"c++",
+				"cc",
+				"cpp",
+				"cxx",
+				"mm",
+				"mpp",
+				"CPP",
+				"ixx",
+				"cppm"
+			]
+		},
+		{
+			"compiler" : 
+			{
+				"implicit" : {},
+				"path" : "D:/tools/mingw-w64-v7.3.0/mingw64/bin/windres.exe"
+			},
+			"language" : "RC",
+			"sourceFileExtensions" : 
+			[
+				"rc",
+				"RC"
+			]
+		}
+	],
+	"version" : 
+	{
+		"major" : 1,
+		"minor" : 0
+	}
+}

+ 446 - 0
build/CMakeCache.txt

@@ -0,0 +1,446 @@
+# This is the CMakeCache file.
+# For build in directory: d:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+# It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe
+# You can edit this file to change values found and used by cmake.
+# If you do not want to change any of the values, simply exit the editor.
+# If you do want to change a value, simply edit, save, and exit the editor.
+# The syntax for the file is as follows:
+# KEY:TYPE=VALUE
+# KEY is the name of a variable in the cache.
+# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
+# VALUE is the current value for the KEY.
+
+########################
+# EXTERNAL cache entries
+########################
+
+//Path to a program.
+CMAKE_ADDR2LINE:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/addr2line.exe
+
+//Path to a program.
+CMAKE_AR:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/ar.exe
+
+//No help, variable specified on the command line.
+CMAKE_BUILD_TYPE:STRING=Debug
+
+//Enable/Disable color output during build.
+CMAKE_COLOR_MAKEFILE:BOOL=ON
+
+//CXX compiler
+CMAKE_CXX_COMPILER:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe
+
+//A wrapper around 'ar' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_CXX_COMPILER_AR:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ar.exe
+
+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_CXX_COMPILER_RANLIB:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ranlib.exe
+
+//Flags used by the CXX compiler during all build types.
+CMAKE_CXX_FLAGS:STRING=
+
+//Flags used by the CXX compiler during DEBUG builds.
+CMAKE_CXX_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the CXX compiler during MINSIZEREL builds.
+CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the CXX compiler during RELEASE builds.
+CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the CXX compiler during RELWITHDEBINFO builds.
+CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
+
+//Libraries linked by default with all C++ applications.
+CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
+
+//C compiler
+CMAKE_C_COMPILER:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe
+
+//A wrapper around 'ar' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_C_COMPILER_AR:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ar.exe
+
+//A wrapper around 'ranlib' adding the appropriate '--plugin' option
+// for the GCC compiler
+CMAKE_C_COMPILER_RANLIB:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ranlib.exe
+
+//Flags used by the C compiler during all build types.
+CMAKE_C_FLAGS:STRING=
+
+//Flags used by the C compiler during DEBUG builds.
+CMAKE_C_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the C compiler during MINSIZEREL builds.
+CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the C compiler during RELEASE builds.
+CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the C compiler during RELWITHDEBINFO builds.
+CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
+
+//Libraries linked by default with all C applications.
+CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
+
+//Path to a program.
+CMAKE_DLLTOOL:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/dlltool.exe
+
+//Flags used by the linker during all build types.
+CMAKE_EXE_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during DEBUG builds.
+CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during MINSIZEREL builds.
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during RELEASE builds.
+CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during RELWITHDEBINFO builds.
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//No help, variable specified on the command line.
+CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
+
+//Value Computed by CMake.
+CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/pkgRedirects
+
+//Convert GNU import libraries to MS format (requires Visual Studio)
+CMAKE_GNUtoMS:BOOL=OFF
+
+//Install path prefix, prepended onto install directories.
+CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/dfota_tools
+
+//Path to a program.
+CMAKE_LINKER:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/ld.exe
+
+//Path to a program.
+CMAKE_MAKE_PROGRAM:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/make.exe
+
+//Flags used by the linker during the creation of modules during
+// all build types.
+CMAKE_MODULE_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of modules during
+// DEBUG builds.
+CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of modules during
+// MINSIZEREL builds.
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of modules during
+// RELEASE builds.
+CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of modules during
+// RELWITHDEBINFO builds.
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_NM:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/nm.exe
+
+//Path to a program.
+CMAKE_OBJCOPY:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/objcopy.exe
+
+//Path to a program.
+CMAKE_OBJDUMP:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/objdump.exe
+
+//Value Computed by CMake
+CMAKE_PROJECT_DESCRIPTION:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_NAME:STATIC=dfota_tools
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION:STATIC=0.1
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_MAJOR:STATIC=0
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_MINOR:STATIC=1
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_PATCH:STATIC=
+
+//Value Computed by CMake
+CMAKE_PROJECT_VERSION_TWEAK:STATIC=
+
+//Path to a program.
+CMAKE_RANLIB:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/ranlib.exe
+
+//RC compiler
+CMAKE_RC_COMPILER:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/windres.exe
+
+//Flags for Windows Resource Compiler during all build types.
+CMAKE_RC_FLAGS:STRING=
+
+//Flags for Windows Resource Compiler during DEBUG builds.
+CMAKE_RC_FLAGS_DEBUG:STRING=
+
+//Flags for Windows Resource Compiler during MINSIZEREL builds.
+CMAKE_RC_FLAGS_MINSIZEREL:STRING=
+
+//Flags for Windows Resource Compiler during RELEASE builds.
+CMAKE_RC_FLAGS_RELEASE:STRING=
+
+//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
+CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_READELF:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/readelf.exe
+
+//Flags used by the linker during the creation of shared libraries
+// during all build types.
+CMAKE_SHARED_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during DEBUG builds.
+CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during MINSIZEREL builds.
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during RELEASE builds.
+CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of shared libraries
+// during RELWITHDEBINFO builds.
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//If set, runtime paths are not added when installing shared libraries,
+// but are added when building.
+CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
+
+//If set, runtime paths are not added when using shared libraries.
+CMAKE_SKIP_RPATH:BOOL=NO
+
+//Flags used by the linker during the creation of static libraries
+// during all build types.
+CMAKE_STATIC_LINKER_FLAGS:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during DEBUG builds.
+CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during MINSIZEREL builds.
+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during RELEASE builds.
+CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during the creation of static libraries
+// during RELWITHDEBINFO builds.
+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_STRIP:FILEPATH=D:/tools/mingw-w64-v7.3.0/mingw64/bin/strip.exe
+
+//If this value is on, makefiles will be generated without the
+// .SILENT directive, and all commands will be echoed to the console
+// during the make.  This is useful for debugging only. With Visual
+// Studio IDE projects all commands are done without /nologo.
+CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
+
+//The directory containing a CMake configuration file for QT.
+QT_DIR:PATH=D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5
+
+//The directory containing a CMake configuration file for Qt5Core.
+Qt5Core_DIR:PATH=D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core
+
+//The directory containing a CMake configuration file for Qt5Gui.
+Qt5Gui_DIR:PATH=D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui
+
+//The directory containing a CMake configuration file for Qt5LinguistTools.
+Qt5LinguistTools_DIR:PATH=D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools
+
+//The directory containing a CMake configuration file for Qt5Widgets.
+Qt5Widgets_DIR:PATH=D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets
+
+//The directory containing a CMake configuration file for Qt5.
+Qt5_DIR:PATH=D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5
+
+//Value Computed by CMake
+dfota_tools_BINARY_DIR:STATIC=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+
+//Value Computed by CMake
+dfota_tools_IS_TOP_LEVEL:STATIC=ON
+
+//Value Computed by CMake
+dfota_tools_SOURCE_DIR:STATIC=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+
+
+########################
+# INTERNAL cache entries
+########################
+
+//ADVANCED property for variable: CMAKE_ADDR2LINE
+CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_AR
+CMAKE_AR-ADVANCED:INTERNAL=1
+//This is the directory where this CMakeCache.txt was created
+CMAKE_CACHEFILE_DIR:INTERNAL=d:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+//Major version of cmake used to create the current loaded cache
+CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
+//Minor version of cmake used to create the current loaded cache
+CMAKE_CACHE_MINOR_VERSION:INTERNAL=26
+//Patch version of cmake used to create the current loaded cache
+CMAKE_CACHE_PATCH_VERSION:INTERNAL=0
+//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
+CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
+//Path to CMake executable.
+CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe
+//Path to cpack program executable.
+CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cpack.exe
+//Path to ctest program executable.
+CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake/bin/ctest.exe
+//ADVANCED property for variable: CMAKE_CXX_COMPILER
+CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
+CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
+CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS
+CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
+CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
+CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
+CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
+CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES
+CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER
+CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER_AR
+CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
+CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS
+CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
+CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
+CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
+CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
+CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
+CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_DLLTOOL
+CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
+//Path to cache edit program executable.
+CMAKE_EDIT_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake-gui.exe
+//Executable file format
+CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
+CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
+CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
+CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//Name of external makefile project generator.
+CMAKE_EXTRA_GENERATOR:INTERNAL=
+//Name of generator.
+CMAKE_GENERATOR:INTERNAL=Unix Makefiles
+//Generator instance identifier.
+CMAKE_GENERATOR_INSTANCE:INTERNAL=
+//Name of generator platform.
+CMAKE_GENERATOR_PLATFORM:INTERNAL=
+//Name of generator toolset.
+CMAKE_GENERATOR_TOOLSET:INTERNAL=
+//Source directory with the top level CMakeLists.txt file for this
+// project
+CMAKE_HOME_DIRECTORY:INTERNAL=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+//ADVANCED property for variable: CMAKE_LINKER
+CMAKE_LINKER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
+CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
+CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
+CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
+CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_NM
+CMAKE_NM-ADVANCED:INTERNAL=1
+//number of local generators
+CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJCOPY
+CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJDUMP
+CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
+//Platform information initialized
+CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RANLIB
+CMAKE_RANLIB-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RC_COMPILER
+CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
+CMAKE_RC_COMPILER_WORKS:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RC_FLAGS
+CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
+CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
+CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
+CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
+CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_READELF
+CMAKE_READELF-ADVANCED:INTERNAL=1
+//Path to CMake installation.
+CMAKE_ROOT:INTERNAL=C:/Program Files/CMake/share/cmake-3.26
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
+CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
+CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
+CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
+CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_RPATH
+CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
+CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
+CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
+CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
+CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STRIP
+CMAKE_STRIP-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
+CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
+//linker supports push/pop state
+_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
+

+ 72 - 0
build/CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake

@@ -0,0 +1,72 @@
+set(CMAKE_C_COMPILER "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe")
+set(CMAKE_C_COMPILER_ARG1 "")
+set(CMAKE_C_COMPILER_ID "GNU")
+set(CMAKE_C_COMPILER_VERSION "7.3.0")
+set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
+set(CMAKE_C_COMPILER_WRAPPER "")
+set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
+set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
+set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
+set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
+set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
+set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
+set(CMAKE_C17_COMPILE_FEATURES "")
+set(CMAKE_C23_COMPILE_FEATURES "")
+
+set(CMAKE_C_PLATFORM_ID "MinGW")
+set(CMAKE_C_SIMULATE_ID "")
+set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU")
+set(CMAKE_C_SIMULATE_VERSION "")
+
+
+
+
+set(CMAKE_AR "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ar.exe")
+set(CMAKE_C_COMPILER_AR "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ar.exe")
+set(CMAKE_RANLIB "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ranlib.exe")
+set(CMAKE_C_COMPILER_RANLIB "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ranlib.exe")
+set(CMAKE_LINKER "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ld.exe")
+set(CMAKE_MT "")
+set(CMAKE_COMPILER_IS_GNUCC 1)
+set(CMAKE_C_COMPILER_LOADED 1)
+set(CMAKE_C_COMPILER_WORKS TRUE)
+set(CMAKE_C_ABI_COMPILED TRUE)
+
+set(CMAKE_C_COMPILER_ENV_VAR "CC")
+
+set(CMAKE_C_COMPILER_ID_RUN 1)
+set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
+set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
+set(CMAKE_C_LINKER_PREFERENCE 10)
+
+# Save compiler ABI information.
+set(CMAKE_C_SIZEOF_DATA_PTR "8")
+set(CMAKE_C_COMPILER_ABI "")
+set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
+set(CMAKE_C_LIBRARY_ARCHITECTURE "")
+
+if(CMAKE_C_SIZEOF_DATA_PTR)
+  set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
+endif()
+
+if(CMAKE_C_COMPILER_ABI)
+  set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
+endif()
+
+if(CMAKE_C_LIBRARY_ARCHITECTURE)
+  set(CMAKE_LIBRARY_ARCHITECTURE "")
+endif()
+
+set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
+if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
+  set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
+endif()
+
+
+
+
+
+set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/include")
+set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mingw32;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex")
+set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc;D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/lib;D:/tools/mingw-w64-v7.3.0/mingw64/lib")
+set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

+ 83 - 0
build/CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake

@@ -0,0 +1,83 @@
+set(CMAKE_CXX_COMPILER "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe")
+set(CMAKE_CXX_COMPILER_ARG1 "")
+set(CMAKE_CXX_COMPILER_ID "GNU")
+set(CMAKE_CXX_COMPILER_VERSION "7.3.0")
+set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
+set(CMAKE_CXX_COMPILER_WRAPPER "")
+set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
+set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
+set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17")
+set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
+set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
+set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
+set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
+set(CMAKE_CXX20_COMPILE_FEATURES "")
+set(CMAKE_CXX23_COMPILE_FEATURES "")
+
+set(CMAKE_CXX_PLATFORM_ID "MinGW")
+set(CMAKE_CXX_SIMULATE_ID "")
+set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU")
+set(CMAKE_CXX_SIMULATE_VERSION "")
+
+
+
+
+set(CMAKE_AR "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ar.exe")
+set(CMAKE_CXX_COMPILER_AR "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ar.exe")
+set(CMAKE_RANLIB "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ranlib.exe")
+set(CMAKE_CXX_COMPILER_RANLIB "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc-ranlib.exe")
+set(CMAKE_LINKER "D:/tools/mingw-w64-v7.3.0/mingw64/bin/ld.exe")
+set(CMAKE_MT "")
+set(CMAKE_COMPILER_IS_GNUCXX 1)
+set(CMAKE_CXX_COMPILER_LOADED 1)
+set(CMAKE_CXX_COMPILER_WORKS TRUE)
+set(CMAKE_CXX_ABI_COMPILED TRUE)
+
+set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
+
+set(CMAKE_CXX_COMPILER_ID_RUN 1)
+set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
+set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
+
+foreach (lang C OBJC OBJCXX)
+  if (CMAKE_${lang}_COMPILER_ID_RUN)
+    foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
+      list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
+    endforeach()
+  endif()
+endforeach()
+
+set(CMAKE_CXX_LINKER_PREFERENCE 30)
+set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
+
+# Save compiler ABI information.
+set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
+set(CMAKE_CXX_COMPILER_ABI "")
+set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
+set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
+
+if(CMAKE_CXX_SIZEOF_DATA_PTR)
+  set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
+endif()
+
+if(CMAKE_CXX_COMPILER_ABI)
+  set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
+endif()
+
+if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
+  set(CMAKE_LIBRARY_ARCHITECTURE "")
+endif()
+
+set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
+if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
+  set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
+endif()
+
+
+
+
+
+set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/include")
+set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;mingw32;gcc_s;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc_s;gcc;moldname;mingwex")
+set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0;D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc;D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/lib;D:/tools/mingw-w64-v7.3.0/mingw64/lib")
+set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

binární
build/CMakeFiles/3.26.0-rc1/CMakeDetermineCompilerABI_C.bin


binární
build/CMakeFiles/3.26.0-rc1/CMakeDetermineCompilerABI_CXX.bin


+ 6 - 0
build/CMakeFiles/3.26.0-rc1/CMakeRCCompiler.cmake

@@ -0,0 +1,6 @@
+set(CMAKE_RC_COMPILER "D:/tools/mingw-w64-v7.3.0/mingw64/bin/windres.exe")
+set(CMAKE_RC_COMPILER_ARG1 "")
+set(CMAKE_RC_COMPILER_LOADED 1)
+set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC)
+set(CMAKE_RC_OUTPUT_EXTENSION .obj)
+set(CMAKE_RC_COMPILER_ENV_VAR "RC")

+ 15 - 0
build/CMakeFiles/3.26.0-rc1/CMakeSystem.cmake

@@ -0,0 +1,15 @@
+set(CMAKE_HOST_SYSTEM "Windows-10.0.22631")
+set(CMAKE_HOST_SYSTEM_NAME "Windows")
+set(CMAKE_HOST_SYSTEM_VERSION "10.0.22631")
+set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
+
+
+
+set(CMAKE_SYSTEM "Windows-10.0.22631")
+set(CMAKE_SYSTEM_NAME "Windows")
+set(CMAKE_SYSTEM_VERSION "10.0.22631")
+set(CMAKE_SYSTEM_PROCESSOR "AMD64")
+
+set(CMAKE_CROSSCOMPILING "FALSE")
+
+set(CMAKE_SYSTEM_LOADED 1)

+ 868 - 0
build/CMakeFiles/3.26.0-rc1/CompilerIdC/CMakeCCompilerId.c

@@ -0,0 +1,868 @@
+#ifdef __cplusplus
+# error "A C++ compiler has been selected for C."
+#endif
+
+#if defined(__18CXX)
+# define ID_VOID_MAIN
+#endif
+#if defined(__CLASSIC_C__)
+/* cv-qualifiers did not exist in K&R C */
+# define const
+# define volatile
+#endif
+
+#if !defined(__has_include)
+/* If the compiler does not have __has_include, pretend the answer is
+   always no.  */
+#  define __has_include(x) 0
+#endif
+
+
+/* Version number components: V=Version, R=Revision, P=Patch
+   Version date components:   YYYY=Year, MM=Month,   DD=Day  */
+
+#if defined(__INTEL_COMPILER) || defined(__ICC)
+# define COMPILER_ID "Intel"
+# if defined(_MSC_VER)
+#  define SIMULATE_ID "MSVC"
+# endif
+# if defined(__GNUC__)
+#  define SIMULATE_ID "GNU"
+# endif
+  /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
+     except that a few beta releases use the old format with V=2021.  */
+# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
+#  define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
+#  define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
+#  if defined(__INTEL_COMPILER_UPDATE)
+#   define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+#  else
+#   define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER   % 10)
+#  endif
+# else
+#  define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
+#  define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
+   /* The third version component from --version is an update index,
+      but no macro is provided for it.  */
+#  define COMPILER_VERSION_PATCH DEC(0)
+# endif
+# if defined(__INTEL_COMPILER_BUILD_DATE)
+   /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
+#  define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
+# endif
+# if defined(_MSC_VER)
+   /* _MSC_VER = VVRR */
+#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# if defined(__GNUC__)
+#  define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+# elif defined(__GNUG__)
+#  define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+#  define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+#  define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
+# define COMPILER_ID "IntelLLVM"
+#if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_ID "GNU"
+#endif
+/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
+ * later.  Look for 6 digit vs. 8 digit version number to decide encoding.
+ * VVVV is no smaller than the current year when a version is released.
+ */
+#if __INTEL_LLVM_COMPILER < 1000000L
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER    % 10)
+#else
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER     % 100)
+#endif
+#if defined(_MSC_VER)
+  /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+#elif defined(__GNUG__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+#endif
+#if defined(__GNUC_MINOR__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+#endif
+#if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+#endif
+
+#elif defined(__PATHCC__)
+# define COMPILER_ID "PathScale"
+# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
+# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
+# if defined(__PATHCC_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
+# endif
+
+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
+# define COMPILER_ID "Embarcadero"
+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
+# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__     & 0xFFFF)
+
+#elif defined(__BORLANDC__)
+# define COMPILER_ID "Borland"
+  /* __BORLANDC__ = 0xVRR */
+# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
+# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
+
+#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
+# define COMPILER_ID "Watcom"
+   /* __WATCOMC__ = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__WATCOMC__)
+# define COMPILER_ID "OpenWatcom"
+   /* __WATCOMC__ = VVRP + 1100 */
+# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__SUNPRO_C)
+# define COMPILER_ID "SunPro"
+# if __SUNPRO_C >= 0x5100
+   /* __SUNPRO_C = 0xVRRP */
+#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
+#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
+#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_C    & 0xF)
+# else
+   /* __SUNPRO_CC = 0xVRP */
+#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
+#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
+#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_C    & 0xF)
+# endif
+
+#elif defined(__HP_cc)
+# define COMPILER_ID "HP"
+  /* __HP_cc = VVRRPP */
+# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
+# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__HP_cc     % 100)
+
+#elif defined(__DECC)
+# define COMPILER_ID "Compaq"
+  /* __DECC_VER = VVRRTPPPP */
+# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
+# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000  % 100)
+# define COMPILER_VERSION_PATCH DEC(__DECC_VER         % 10000)
+
+#elif defined(__IBMC__) && defined(__COMPILER_VER__)
+# define COMPILER_ID "zOS"
+  /* __IBMC__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__    % 10)
+
+#elif defined(__open_xl__) && defined(__clang__)
+# define COMPILER_ID "IBMClang"
+# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
+# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
+# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
+
+
+#elif defined(__ibmxl__) && defined(__clang__)
+# define COMPILER_ID "XLClang"
+# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
+# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
+# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
+
+
+#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
+# define COMPILER_ID "XL"
+  /* __IBMC__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__    % 10)
+
+#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
+# define COMPILER_ID "VisualAge"
+  /* __IBMC__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMC__    % 10)
+
+#elif defined(__NVCOMPILER)
+# define COMPILER_ID "NVHPC"
+# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
+# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
+# if defined(__NVCOMPILER_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
+# endif
+
+#elif defined(__PGI)
+# define COMPILER_ID "PGI"
+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
+# if defined(__PGIC_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
+# endif
+
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
+
+#elif defined(__TI_COMPILER_VERSION__)
+# define COMPILER_ID "TI"
+  /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
+# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
+# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000   % 1000)
+# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__        % 1000)
+
+#elif defined(__CLANG_FUJITSU)
+# define COMPILER_ID "FujitsuClang"
+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
+
+
+#elif defined(__FUJITSU)
+# define COMPILER_ID "Fujitsu"
+# if defined(__FCC_version__)
+#   define COMPILER_VERSION __FCC_version__
+# elif defined(__FCC_major__)
+#   define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+#   define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+#   define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# endif
+# if defined(__fcc_version)
+#   define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
+# elif defined(__FCC_VERSION)
+#   define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
+# endif
+
+
+#elif defined(__ghs__)
+# define COMPILER_ID "GHS"
+/* __GHS_VERSION_NUMBER = VVVVRP */
+# ifdef __GHS_VERSION_NUMBER
+# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
+# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER      % 10)
+# endif
+
+#elif defined(__TASKING__)
+# define COMPILER_ID "Tasking"
+  # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
+  # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
+# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
+
+#elif defined(__TINYC__)
+# define COMPILER_ID "TinyCC"
+
+#elif defined(__BCC__)
+# define COMPILER_ID "Bruce"
+
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
+#elif defined(__ARMCC_VERSION) && !defined(__clang__)
+# define COMPILER_ID "ARMCC"
+#if __ARMCC_VERSION >= 1000000
+  /* __ARMCC_VERSION = VRRPPPP */
+  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
+  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
+  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION     % 10000)
+#else
+  /* __ARMCC_VERSION = VRPPPP */
+  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
+  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
+  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION    % 10000)
+#endif
+
+
+#elif defined(__clang__) && defined(__apple_build_version__)
+# define COMPILER_ID "AppleClang"
+# if defined(_MSC_VER)
+#  define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+   /* _MSC_VER = VVRR */
+#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
+
+#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
+# define COMPILER_ID "ARMClang"
+  # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
+  # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
+  # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION     % 10000)
+# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
+
+#elif defined(__clang__)
+# define COMPILER_ID "Clang"
+# if defined(_MSC_VER)
+#  define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+   /* _MSC_VER = VVRR */
+#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+
+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
+# define COMPILER_ID "LCC"
+# define COMPILER_VERSION_MAJOR DEC(1)
+# if defined(__LCC__)
+#  define COMPILER_VERSION_MINOR DEC(__LCC__- 100)
+# endif
+# if defined(__LCC_MINOR__)
+#  define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
+# endif
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#  define SIMULATE_ID "GNU"
+#  define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+#  define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+#  if defined(__GNUC_PATCHLEVEL__)
+#   define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+#  endif
+# endif
+
+#elif defined(__GNUC__)
+# define COMPILER_ID "GNU"
+# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
+# if defined(__GNUC_MINOR__)
+#  define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif defined(_MSC_VER)
+# define COMPILER_ID "MSVC"
+  /* _MSC_VER = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
+# if defined(_MSC_FULL_VER)
+#  if _MSC_VER >= 1400
+    /* _MSC_FULL_VER = VVRRPPPPP */
+#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
+#  else
+    /* _MSC_FULL_VER = VVRRPPPP */
+#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
+#  endif
+# endif
+# if defined(_MSC_BUILD)
+#  define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
+# endif
+
+#elif defined(_ADI_COMPILER)
+# define COMPILER_ID "ADSP"
+#if defined(__VERSIONNUM__)
+  /* __VERSIONNUM__ = 0xVVRRPPTT */
+#  define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
+#  define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
+#  define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
+#  define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
+#endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# define COMPILER_ID "IAR"
+# if defined(__VER__) && defined(__ICCARM__)
+#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
+#  define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
+#  define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
+#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
+#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
+#  define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
+#  define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
+#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# endif
+
+#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
+# define COMPILER_ID "SDCC"
+# if defined(__SDCC_VERSION_MAJOR)
+#  define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
+#  define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
+#  define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
+# else
+  /* SDCC = VRP */
+#  define COMPILER_VERSION_MAJOR DEC(SDCC/100)
+#  define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
+#  define COMPILER_VERSION_PATCH DEC(SDCC    % 10)
+# endif
+
+
+/* These compilers are either not known or too old to define an
+  identification macro.  Try to identify the platform and guess that
+  it is the native compiler.  */
+#elif defined(__hpux) || defined(__hpua)
+# define COMPILER_ID "HP"
+
+#else /* unknown compiler */
+# define COMPILER_ID ""
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+   getting matched.  Store it in a pointer rather than an array
+   because some compilers will just produce instructions to fill the
+   array rather than assigning a pointer to a static array.  */
+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
+#ifdef SIMULATE_ID
+char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
+#endif
+
+#ifdef __QNXNTO__
+char const* qnxnto = "INFO" ":" "qnxnto[]";
+#endif
+
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
+#endif
+
+#define STRINGIFY_HELPER(X) #X
+#define STRINGIFY(X) STRINGIFY_HELPER(X)
+
+/* Identify known platforms by name.  */
+#if defined(__linux) || defined(__linux__) || defined(linux)
+# define PLATFORM_ID "Linux"
+
+#elif defined(__MSYS__)
+# define PLATFORM_ID "MSYS"
+
+#elif defined(__CYGWIN__)
+# define PLATFORM_ID "Cygwin"
+
+#elif defined(__MINGW32__)
+# define PLATFORM_ID "MinGW"
+
+#elif defined(__APPLE__)
+# define PLATFORM_ID "Darwin"
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+# define PLATFORM_ID "Windows"
+
+#elif defined(__FreeBSD__) || defined(__FreeBSD)
+# define PLATFORM_ID "FreeBSD"
+
+#elif defined(__NetBSD__) || defined(__NetBSD)
+# define PLATFORM_ID "NetBSD"
+
+#elif defined(__OpenBSD__) || defined(__OPENBSD)
+# define PLATFORM_ID "OpenBSD"
+
+#elif defined(__sun) || defined(sun)
+# define PLATFORM_ID "SunOS"
+
+#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
+# define PLATFORM_ID "AIX"
+
+#elif defined(__hpux) || defined(__hpux__)
+# define PLATFORM_ID "HP-UX"
+
+#elif defined(__HAIKU__)
+# define PLATFORM_ID "Haiku"
+
+#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
+# define PLATFORM_ID "BeOS"
+
+#elif defined(__QNX__) || defined(__QNXNTO__)
+# define PLATFORM_ID "QNX"
+
+#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
+# define PLATFORM_ID "Tru64"
+
+#elif defined(__riscos) || defined(__riscos__)
+# define PLATFORM_ID "RISCos"
+
+#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
+# define PLATFORM_ID "SINIX"
+
+#elif defined(__UNIX_SV__)
+# define PLATFORM_ID "UNIX_SV"
+
+#elif defined(__bsdos__)
+# define PLATFORM_ID "BSDOS"
+
+#elif defined(_MPRAS) || defined(MPRAS)
+# define PLATFORM_ID "MP-RAS"
+
+#elif defined(__osf) || defined(__osf__)
+# define PLATFORM_ID "OSF1"
+
+#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
+# define PLATFORM_ID "SCO_SV"
+
+#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
+# define PLATFORM_ID "ULTRIX"
+
+#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
+# define PLATFORM_ID "Xenix"
+
+#elif defined(__WATCOMC__)
+# if defined(__LINUX__)
+#  define PLATFORM_ID "Linux"
+
+# elif defined(__DOS__)
+#  define PLATFORM_ID "DOS"
+
+# elif defined(__OS2__)
+#  define PLATFORM_ID "OS2"
+
+# elif defined(__WINDOWS__)
+#  define PLATFORM_ID "Windows3x"
+
+# elif defined(__VXWORKS__)
+#  define PLATFORM_ID "VxWorks"
+
+# else /* unknown platform */
+#  define PLATFORM_ID
+# endif
+
+#elif defined(__INTEGRITY)
+# if defined(INT_178B)
+#  define PLATFORM_ID "Integrity178"
+
+# else /* regular Integrity */
+#  define PLATFORM_ID "Integrity"
+# endif
+
+# elif defined(_ADI_COMPILER)
+#  define PLATFORM_ID "ADSP"
+
+#else /* unknown platform */
+# define PLATFORM_ID
+
+#endif
+
+/* For windows compilers MSVC and Intel we can determine
+   the architecture of the compiler being used.  This is because
+   the compilers do not have flags that can change the architecture,
+   but rather depend on which compiler is being used
+*/
+#if defined(_WIN32) && defined(_MSC_VER)
+# if defined(_M_IA64)
+#  define ARCHITECTURE_ID "IA64"
+
+# elif defined(_M_ARM64EC)
+#  define ARCHITECTURE_ID "ARM64EC"
+
+# elif defined(_M_X64) || defined(_M_AMD64)
+#  define ARCHITECTURE_ID "x64"
+
+# elif defined(_M_IX86)
+#  define ARCHITECTURE_ID "X86"
+
+# elif defined(_M_ARM64)
+#  define ARCHITECTURE_ID "ARM64"
+
+# elif defined(_M_ARM)
+#  if _M_ARM == 4
+#   define ARCHITECTURE_ID "ARMV4I"
+#  elif _M_ARM == 5
+#   define ARCHITECTURE_ID "ARMV5I"
+#  else
+#   define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
+#  endif
+
+# elif defined(_M_MIPS)
+#  define ARCHITECTURE_ID "MIPS"
+
+# elif defined(_M_SH)
+#  define ARCHITECTURE_ID "SHx"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__WATCOMC__)
+# if defined(_M_I86)
+#  define ARCHITECTURE_ID "I86"
+
+# elif defined(_M_IX86)
+#  define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# if defined(__ICCARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__ICCRX__)
+#  define ARCHITECTURE_ID "RX"
+
+# elif defined(__ICCRH850__)
+#  define ARCHITECTURE_ID "RH850"
+
+# elif defined(__ICCRL78__)
+#  define ARCHITECTURE_ID "RL78"
+
+# elif defined(__ICCRISCV__)
+#  define ARCHITECTURE_ID "RISCV"
+
+# elif defined(__ICCAVR__)
+#  define ARCHITECTURE_ID "AVR"
+
+# elif defined(__ICC430__)
+#  define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__ICCV850__)
+#  define ARCHITECTURE_ID "V850"
+
+# elif defined(__ICC8051__)
+#  define ARCHITECTURE_ID "8051"
+
+# elif defined(__ICCSTM8__)
+#  define ARCHITECTURE_ID "STM8"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__ghs__)
+# if defined(__PPC64__)
+#  define ARCHITECTURE_ID "PPC64"
+
+# elif defined(__ppc__)
+#  define ARCHITECTURE_ID "PPC"
+
+# elif defined(__ARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__x86_64__)
+#  define ARCHITECTURE_ID "x64"
+
+# elif defined(__i386__)
+#  define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__TI_COMPILER_VERSION__)
+# if defined(__TI_ARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__MSP430__)
+#  define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__TMS320C28XX__)
+#  define ARCHITECTURE_ID "TMS320C28x"
+
+# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
+#  define ARCHITECTURE_ID "TMS320C6x"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+# elif defined(__ADSPSHARC__)
+#  define ARCHITECTURE_ID "SHARC"
+
+# elif defined(__ADSPBLACKFIN__)
+#  define ARCHITECTURE_ID "Blackfin"
+
+#elif defined(__TASKING__)
+
+# if defined(__CTC__) || defined(__CPTC__)
+#  define ARCHITECTURE_ID "TriCore"
+
+# elif defined(__CMCS__)
+#  define ARCHITECTURE_ID "MCS"
+
+# elif defined(__CARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__CARC__)
+#  define ARCHITECTURE_ID "ARC"
+
+# elif defined(__C51__)
+#  define ARCHITECTURE_ID "8051"
+
+# elif defined(__CPCP__)
+#  define ARCHITECTURE_ID "PCP"
+
+# else
+#  define ARCHITECTURE_ID ""
+# endif
+
+#else
+#  define ARCHITECTURE_ID
+#endif
+
+/* Convert integer to decimal digit literals.  */
+#define DEC(n)                   \
+  ('0' + (((n) / 10000000)%10)), \
+  ('0' + (((n) / 1000000)%10)),  \
+  ('0' + (((n) / 100000)%10)),   \
+  ('0' + (((n) / 10000)%10)),    \
+  ('0' + (((n) / 1000)%10)),     \
+  ('0' + (((n) / 100)%10)),      \
+  ('0' + (((n) / 10)%10)),       \
+  ('0' +  ((n) % 10))
+
+/* Convert integer to hex digit literals.  */
+#define HEX(n)             \
+  ('0' + ((n)>>28 & 0xF)), \
+  ('0' + ((n)>>24 & 0xF)), \
+  ('0' + ((n)>>20 & 0xF)), \
+  ('0' + ((n)>>16 & 0xF)), \
+  ('0' + ((n)>>12 & 0xF)), \
+  ('0' + ((n)>>8  & 0xF)), \
+  ('0' + ((n)>>4  & 0xF)), \
+  ('0' + ((n)     & 0xF))
+
+/* Construct a string literal encoding the version number. */
+#ifdef COMPILER_VERSION
+char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
+
+/* Construct a string literal encoding the version number components. */
+#elif defined(COMPILER_VERSION_MAJOR)
+char const info_version[] = {
+  'I', 'N', 'F', 'O', ':',
+  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
+  COMPILER_VERSION_MAJOR,
+# ifdef COMPILER_VERSION_MINOR
+  '.', COMPILER_VERSION_MINOR,
+#  ifdef COMPILER_VERSION_PATCH
+   '.', COMPILER_VERSION_PATCH,
+#   ifdef COMPILER_VERSION_TWEAK
+    '.', COMPILER_VERSION_TWEAK,
+#   endif
+#  endif
+# endif
+  ']','\0'};
+#endif
+
+/* Construct a string literal encoding the internal version number. */
+#ifdef COMPILER_VERSION_INTERNAL
+char const info_version_internal[] = {
+  'I', 'N', 'F', 'O', ':',
+  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
+  'i','n','t','e','r','n','a','l','[',
+  COMPILER_VERSION_INTERNAL,']','\0'};
+#elif defined(COMPILER_VERSION_INTERNAL_STR)
+char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
+#endif
+
+/* Construct a string literal encoding the version number components. */
+#ifdef SIMULATE_VERSION_MAJOR
+char const info_simulate_version[] = {
+  'I', 'N', 'F', 'O', ':',
+  's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
+  SIMULATE_VERSION_MAJOR,
+# ifdef SIMULATE_VERSION_MINOR
+  '.', SIMULATE_VERSION_MINOR,
+#  ifdef SIMULATE_VERSION_PATCH
+   '.', SIMULATE_VERSION_PATCH,
+#   ifdef SIMULATE_VERSION_TWEAK
+    '.', SIMULATE_VERSION_TWEAK,
+#   endif
+#  endif
+# endif
+  ']','\0'};
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+   getting matched.  Store it in a pointer rather than an array
+   because some compilers will just produce instructions to fill the
+   array rather than assigning a pointer to a static array.  */
+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
+
+
+
+#if !defined(__STDC__) && !defined(__clang__)
+# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
+#  define C_VERSION "90"
+# else
+#  define C_VERSION
+# endif
+#elif __STDC_VERSION__ > 201710L
+# define C_VERSION "23"
+#elif __STDC_VERSION__ >= 201710L
+# define C_VERSION "17"
+#elif __STDC_VERSION__ >= 201000L
+# define C_VERSION "11"
+#elif __STDC_VERSION__ >= 199901L
+# define C_VERSION "99"
+#else
+# define C_VERSION "90"
+#endif
+const char* info_language_standard_default =
+  "INFO" ":" "standard_default[" C_VERSION "]";
+
+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
+#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) ||           \
+     defined(__TI_COMPILER_VERSION__)) &&                                     \
+  !defined(__STRICT_ANSI__)
+  "ON"
+#else
+  "OFF"
+#endif
+"]";
+
+/*--------------------------------------------------------------------------*/
+
+#ifdef ID_VOID_MAIN
+void main() {}
+#else
+# if defined(__CLASSIC_C__)
+int main(argc, argv) int argc; char *argv[];
+# else
+int main(int argc, char* argv[])
+# endif
+{
+  int require = 0;
+  require += info_compiler[argc];
+  require += info_platform[argc];
+  require += info_arch[argc];
+#ifdef COMPILER_VERSION_MAJOR
+  require += info_version[argc];
+#endif
+#ifdef COMPILER_VERSION_INTERNAL
+  require += info_version_internal[argc];
+#endif
+#ifdef SIMULATE_ID
+  require += info_simulate[argc];
+#endif
+#ifdef SIMULATE_VERSION_MAJOR
+  require += info_simulate_version[argc];
+#endif
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+  require += info_cray[argc];
+#endif
+  require += info_language_standard_default[argc];
+  require += info_language_extensions_default[argc];
+  (void)argv;
+  return require;
+}
+#endif

binární
build/CMakeFiles/3.26.0-rc1/CompilerIdC/a.exe


+ 857 - 0
build/CMakeFiles/3.26.0-rc1/CompilerIdCXX/CMakeCXXCompilerId.cpp

@@ -0,0 +1,857 @@
+/* This source file must have a .cpp extension so that all C++ compilers
+   recognize the extension without flags.  Borland does not know .cxx for
+   example.  */
+#ifndef __cplusplus
+# error "A C compiler has been selected for C++."
+#endif
+
+#if !defined(__has_include)
+/* If the compiler does not have __has_include, pretend the answer is
+   always no.  */
+#  define __has_include(x) 0
+#endif
+
+
+/* Version number components: V=Version, R=Revision, P=Patch
+   Version date components:   YYYY=Year, MM=Month,   DD=Day  */
+
+#if defined(__COMO__)
+# define COMPILER_ID "Comeau"
+  /* __COMO_VERSION__ = VRR */
+# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
+# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
+
+#elif defined(__INTEL_COMPILER) || defined(__ICC)
+# define COMPILER_ID "Intel"
+# if defined(_MSC_VER)
+#  define SIMULATE_ID "MSVC"
+# endif
+# if defined(__GNUC__)
+#  define SIMULATE_ID "GNU"
+# endif
+  /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
+     except that a few beta releases use the old format with V=2021.  */
+# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
+#  define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
+#  define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
+#  if defined(__INTEL_COMPILER_UPDATE)
+#   define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+#  else
+#   define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER   % 10)
+#  endif
+# else
+#  define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
+#  define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
+   /* The third version component from --version is an update index,
+      but no macro is provided for it.  */
+#  define COMPILER_VERSION_PATCH DEC(0)
+# endif
+# if defined(__INTEL_COMPILER_BUILD_DATE)
+   /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
+#  define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
+# endif
+# if defined(_MSC_VER)
+   /* _MSC_VER = VVRR */
+#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# if defined(__GNUC__)
+#  define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+# elif defined(__GNUG__)
+#  define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+#  define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+#  define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
+# define COMPILER_ID "IntelLLVM"
+#if defined(_MSC_VER)
+# define SIMULATE_ID "MSVC"
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_ID "GNU"
+#endif
+/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
+ * later.  Look for 6 digit vs. 8 digit version number to decide encoding.
+ * VVVV is no smaller than the current year when a version is released.
+ */
+#if __INTEL_LLVM_COMPILER < 1000000L
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER    % 10)
+#else
+# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
+# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER     % 100)
+#endif
+#if defined(_MSC_VER)
+  /* _MSC_VER = VVRR */
+# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+#endif
+#if defined(__GNUC__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+#elif defined(__GNUG__)
+# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
+#endif
+#if defined(__GNUC_MINOR__)
+# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+#endif
+#if defined(__GNUC_PATCHLEVEL__)
+# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+#endif
+
+#elif defined(__PATHCC__)
+# define COMPILER_ID "PathScale"
+# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
+# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
+# if defined(__PATHCC_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
+# endif
+
+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
+# define COMPILER_ID "Embarcadero"
+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
+# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__     & 0xFFFF)
+
+#elif defined(__BORLANDC__)
+# define COMPILER_ID "Borland"
+  /* __BORLANDC__ = 0xVRR */
+# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
+# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
+
+#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
+# define COMPILER_ID "Watcom"
+   /* __WATCOMC__ = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__WATCOMC__)
+# define COMPILER_ID "OpenWatcom"
+   /* __WATCOMC__ = VVRP + 1100 */
+# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
+# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
+# if (__WATCOMC__ % 10) > 0
+#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
+# endif
+
+#elif defined(__SUNPRO_CC)
+# define COMPILER_ID "SunPro"
+# if __SUNPRO_CC >= 0x5100
+   /* __SUNPRO_CC = 0xVRRP */
+#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
+#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
+#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC    & 0xF)
+# else
+   /* __SUNPRO_CC = 0xVRP */
+#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
+#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
+#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC    & 0xF)
+# endif
+
+#elif defined(__HP_aCC)
+# define COMPILER_ID "HP"
+  /* __HP_aCC = VVRRPP */
+# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
+# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
+# define COMPILER_VERSION_PATCH DEC(__HP_aCC     % 100)
+
+#elif defined(__DECCXX)
+# define COMPILER_ID "Compaq"
+  /* __DECCXX_VER = VVRRTPPPP */
+# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
+# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000  % 100)
+# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER         % 10000)
+
+#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
+# define COMPILER_ID "zOS"
+  /* __IBMCPP__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
+
+#elif defined(__open_xl__) && defined(__clang__)
+# define COMPILER_ID "IBMClang"
+# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
+# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
+# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
+
+
+#elif defined(__ibmxl__) && defined(__clang__)
+# define COMPILER_ID "XLClang"
+# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
+# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
+# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
+# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
+
+
+#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
+# define COMPILER_ID "XL"
+  /* __IBMCPP__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
+
+#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
+# define COMPILER_ID "VisualAge"
+  /* __IBMCPP__ = VRP */
+# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
+# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
+
+#elif defined(__NVCOMPILER)
+# define COMPILER_ID "NVHPC"
+# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
+# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
+# if defined(__NVCOMPILER_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
+# endif
+
+#elif defined(__PGI)
+# define COMPILER_ID "PGI"
+# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
+# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
+# if defined(__PGIC_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
+# endif
+
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
+# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
+
+#elif defined(__TI_COMPILER_VERSION__)
+# define COMPILER_ID "TI"
+  /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
+# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
+# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000   % 1000)
+# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__        % 1000)
+
+#elif defined(__CLANG_FUJITSU)
+# define COMPILER_ID "FujitsuClang"
+# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# define COMPILER_VERSION_INTERNAL_STR __clang_version__
+
+
+#elif defined(__FUJITSU)
+# define COMPILER_ID "Fujitsu"
+# if defined(__FCC_version__)
+#   define COMPILER_VERSION __FCC_version__
+# elif defined(__FCC_major__)
+#   define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
+#   define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
+#   define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
+# endif
+# if defined(__fcc_version)
+#   define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
+# elif defined(__FCC_VERSION)
+#   define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
+# endif
+
+
+#elif defined(__ghs__)
+# define COMPILER_ID "GHS"
+/* __GHS_VERSION_NUMBER = VVVVRP */
+# ifdef __GHS_VERSION_NUMBER
+# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
+# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
+# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER      % 10)
+# endif
+
+#elif defined(__TASKING__)
+# define COMPILER_ID "Tasking"
+  # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
+  # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
+# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
+
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
+#elif defined(__ARMCC_VERSION) && !defined(__clang__)
+# define COMPILER_ID "ARMCC"
+#if __ARMCC_VERSION >= 1000000
+  /* __ARMCC_VERSION = VRRPPPP */
+  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
+  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
+  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION     % 10000)
+#else
+  /* __ARMCC_VERSION = VRPPPP */
+  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
+  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
+  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION    % 10000)
+#endif
+
+
+#elif defined(__clang__) && defined(__apple_build_version__)
+# define COMPILER_ID "AppleClang"
+# if defined(_MSC_VER)
+#  define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+   /* _MSC_VER = VVRR */
+#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
+
+#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
+# define COMPILER_ID "ARMClang"
+  # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
+  # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
+  # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION     % 10000)
+# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
+
+#elif defined(__clang__)
+# define COMPILER_ID "Clang"
+# if defined(_MSC_VER)
+#  define SIMULATE_ID "MSVC"
+# endif
+# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
+# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
+# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+# if defined(_MSC_VER)
+   /* _MSC_VER = VVRR */
+#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
+#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
+# endif
+
+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
+# define COMPILER_ID "LCC"
+# define COMPILER_VERSION_MAJOR DEC(1)
+# if defined(__LCC__)
+#  define COMPILER_VERSION_MINOR DEC(__LCC__- 100)
+# endif
+# if defined(__LCC_MINOR__)
+#  define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
+# endif
+# if defined(__GNUC__) && defined(__GNUC_MINOR__)
+#  define SIMULATE_ID "GNU"
+#  define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
+#  define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
+#  if defined(__GNUC_PATCHLEVEL__)
+#   define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+#  endif
+# endif
+
+#elif defined(__GNUC__) || defined(__GNUG__)
+# define COMPILER_ID "GNU"
+# if defined(__GNUC__)
+#  define COMPILER_VERSION_MAJOR DEC(__GNUC__)
+# else
+#  define COMPILER_VERSION_MAJOR DEC(__GNUG__)
+# endif
+# if defined(__GNUC_MINOR__)
+#  define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
+# endif
+# if defined(__GNUC_PATCHLEVEL__)
+#  define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
+# endif
+
+#elif defined(_MSC_VER)
+# define COMPILER_ID "MSVC"
+  /* _MSC_VER = VVRR */
+# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
+# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
+# if defined(_MSC_FULL_VER)
+#  if _MSC_VER >= 1400
+    /* _MSC_FULL_VER = VVRRPPPPP */
+#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
+#  else
+    /* _MSC_FULL_VER = VVRRPPPP */
+#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
+#  endif
+# endif
+# if defined(_MSC_BUILD)
+#  define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
+# endif
+
+#elif defined(_ADI_COMPILER)
+# define COMPILER_ID "ADSP"
+#if defined(__VERSIONNUM__)
+  /* __VERSIONNUM__ = 0xVVRRPPTT */
+#  define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
+#  define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
+#  define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
+#  define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
+#endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# define COMPILER_ID "IAR"
+# if defined(__VER__) && defined(__ICCARM__)
+#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
+#  define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
+#  define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
+#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
+#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
+#  define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
+#  define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
+#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
+# endif
+
+
+/* These compilers are either not known or too old to define an
+  identification macro.  Try to identify the platform and guess that
+  it is the native compiler.  */
+#elif defined(__hpux) || defined(__hpua)
+# define COMPILER_ID "HP"
+
+#else /* unknown compiler */
+# define COMPILER_ID ""
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+   getting matched.  Store it in a pointer rather than an array
+   because some compilers will just produce instructions to fill the
+   array rather than assigning a pointer to a static array.  */
+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
+#ifdef SIMULATE_ID
+char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
+#endif
+
+#ifdef __QNXNTO__
+char const* qnxnto = "INFO" ":" "qnxnto[]";
+#endif
+
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
+#endif
+
+#define STRINGIFY_HELPER(X) #X
+#define STRINGIFY(X) STRINGIFY_HELPER(X)
+
+/* Identify known platforms by name.  */
+#if defined(__linux) || defined(__linux__) || defined(linux)
+# define PLATFORM_ID "Linux"
+
+#elif defined(__MSYS__)
+# define PLATFORM_ID "MSYS"
+
+#elif defined(__CYGWIN__)
+# define PLATFORM_ID "Cygwin"
+
+#elif defined(__MINGW32__)
+# define PLATFORM_ID "MinGW"
+
+#elif defined(__APPLE__)
+# define PLATFORM_ID "Darwin"
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+# define PLATFORM_ID "Windows"
+
+#elif defined(__FreeBSD__) || defined(__FreeBSD)
+# define PLATFORM_ID "FreeBSD"
+
+#elif defined(__NetBSD__) || defined(__NetBSD)
+# define PLATFORM_ID "NetBSD"
+
+#elif defined(__OpenBSD__) || defined(__OPENBSD)
+# define PLATFORM_ID "OpenBSD"
+
+#elif defined(__sun) || defined(sun)
+# define PLATFORM_ID "SunOS"
+
+#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
+# define PLATFORM_ID "AIX"
+
+#elif defined(__hpux) || defined(__hpux__)
+# define PLATFORM_ID "HP-UX"
+
+#elif defined(__HAIKU__)
+# define PLATFORM_ID "Haiku"
+
+#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
+# define PLATFORM_ID "BeOS"
+
+#elif defined(__QNX__) || defined(__QNXNTO__)
+# define PLATFORM_ID "QNX"
+
+#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
+# define PLATFORM_ID "Tru64"
+
+#elif defined(__riscos) || defined(__riscos__)
+# define PLATFORM_ID "RISCos"
+
+#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
+# define PLATFORM_ID "SINIX"
+
+#elif defined(__UNIX_SV__)
+# define PLATFORM_ID "UNIX_SV"
+
+#elif defined(__bsdos__)
+# define PLATFORM_ID "BSDOS"
+
+#elif defined(_MPRAS) || defined(MPRAS)
+# define PLATFORM_ID "MP-RAS"
+
+#elif defined(__osf) || defined(__osf__)
+# define PLATFORM_ID "OSF1"
+
+#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
+# define PLATFORM_ID "SCO_SV"
+
+#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
+# define PLATFORM_ID "ULTRIX"
+
+#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
+# define PLATFORM_ID "Xenix"
+
+#elif defined(__WATCOMC__)
+# if defined(__LINUX__)
+#  define PLATFORM_ID "Linux"
+
+# elif defined(__DOS__)
+#  define PLATFORM_ID "DOS"
+
+# elif defined(__OS2__)
+#  define PLATFORM_ID "OS2"
+
+# elif defined(__WINDOWS__)
+#  define PLATFORM_ID "Windows3x"
+
+# elif defined(__VXWORKS__)
+#  define PLATFORM_ID "VxWorks"
+
+# else /* unknown platform */
+#  define PLATFORM_ID
+# endif
+
+#elif defined(__INTEGRITY)
+# if defined(INT_178B)
+#  define PLATFORM_ID "Integrity178"
+
+# else /* regular Integrity */
+#  define PLATFORM_ID "Integrity"
+# endif
+
+# elif defined(_ADI_COMPILER)
+#  define PLATFORM_ID "ADSP"
+
+#else /* unknown platform */
+# define PLATFORM_ID
+
+#endif
+
+/* For windows compilers MSVC and Intel we can determine
+   the architecture of the compiler being used.  This is because
+   the compilers do not have flags that can change the architecture,
+   but rather depend on which compiler is being used
+*/
+#if defined(_WIN32) && defined(_MSC_VER)
+# if defined(_M_IA64)
+#  define ARCHITECTURE_ID "IA64"
+
+# elif defined(_M_ARM64EC)
+#  define ARCHITECTURE_ID "ARM64EC"
+
+# elif defined(_M_X64) || defined(_M_AMD64)
+#  define ARCHITECTURE_ID "x64"
+
+# elif defined(_M_IX86)
+#  define ARCHITECTURE_ID "X86"
+
+# elif defined(_M_ARM64)
+#  define ARCHITECTURE_ID "ARM64"
+
+# elif defined(_M_ARM)
+#  if _M_ARM == 4
+#   define ARCHITECTURE_ID "ARMV4I"
+#  elif _M_ARM == 5
+#   define ARCHITECTURE_ID "ARMV5I"
+#  else
+#   define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
+#  endif
+
+# elif defined(_M_MIPS)
+#  define ARCHITECTURE_ID "MIPS"
+
+# elif defined(_M_SH)
+#  define ARCHITECTURE_ID "SHx"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__WATCOMC__)
+# if defined(_M_I86)
+#  define ARCHITECTURE_ID "I86"
+
+# elif defined(_M_IX86)
+#  define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
+# if defined(__ICCARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__ICCRX__)
+#  define ARCHITECTURE_ID "RX"
+
+# elif defined(__ICCRH850__)
+#  define ARCHITECTURE_ID "RH850"
+
+# elif defined(__ICCRL78__)
+#  define ARCHITECTURE_ID "RL78"
+
+# elif defined(__ICCRISCV__)
+#  define ARCHITECTURE_ID "RISCV"
+
+# elif defined(__ICCAVR__)
+#  define ARCHITECTURE_ID "AVR"
+
+# elif defined(__ICC430__)
+#  define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__ICCV850__)
+#  define ARCHITECTURE_ID "V850"
+
+# elif defined(__ICC8051__)
+#  define ARCHITECTURE_ID "8051"
+
+# elif defined(__ICCSTM8__)
+#  define ARCHITECTURE_ID "STM8"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__ghs__)
+# if defined(__PPC64__)
+#  define ARCHITECTURE_ID "PPC64"
+
+# elif defined(__ppc__)
+#  define ARCHITECTURE_ID "PPC"
+
+# elif defined(__ARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__x86_64__)
+#  define ARCHITECTURE_ID "x64"
+
+# elif defined(__i386__)
+#  define ARCHITECTURE_ID "X86"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+#elif defined(__TI_COMPILER_VERSION__)
+# if defined(__TI_ARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__MSP430__)
+#  define ARCHITECTURE_ID "MSP430"
+
+# elif defined(__TMS320C28XX__)
+#  define ARCHITECTURE_ID "TMS320C28x"
+
+# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
+#  define ARCHITECTURE_ID "TMS320C6x"
+
+# else /* unknown architecture */
+#  define ARCHITECTURE_ID ""
+# endif
+
+# elif defined(__ADSPSHARC__)
+#  define ARCHITECTURE_ID "SHARC"
+
+# elif defined(__ADSPBLACKFIN__)
+#  define ARCHITECTURE_ID "Blackfin"
+
+#elif defined(__TASKING__)
+
+# if defined(__CTC__) || defined(__CPTC__)
+#  define ARCHITECTURE_ID "TriCore"
+
+# elif defined(__CMCS__)
+#  define ARCHITECTURE_ID "MCS"
+
+# elif defined(__CARM__)
+#  define ARCHITECTURE_ID "ARM"
+
+# elif defined(__CARC__)
+#  define ARCHITECTURE_ID "ARC"
+
+# elif defined(__C51__)
+#  define ARCHITECTURE_ID "8051"
+
+# elif defined(__CPCP__)
+#  define ARCHITECTURE_ID "PCP"
+
+# else
+#  define ARCHITECTURE_ID ""
+# endif
+
+#else
+#  define ARCHITECTURE_ID
+#endif
+
+/* Convert integer to decimal digit literals.  */
+#define DEC(n)                   \
+  ('0' + (((n) / 10000000)%10)), \
+  ('0' + (((n) / 1000000)%10)),  \
+  ('0' + (((n) / 100000)%10)),   \
+  ('0' + (((n) / 10000)%10)),    \
+  ('0' + (((n) / 1000)%10)),     \
+  ('0' + (((n) / 100)%10)),      \
+  ('0' + (((n) / 10)%10)),       \
+  ('0' +  ((n) % 10))
+
+/* Convert integer to hex digit literals.  */
+#define HEX(n)             \
+  ('0' + ((n)>>28 & 0xF)), \
+  ('0' + ((n)>>24 & 0xF)), \
+  ('0' + ((n)>>20 & 0xF)), \
+  ('0' + ((n)>>16 & 0xF)), \
+  ('0' + ((n)>>12 & 0xF)), \
+  ('0' + ((n)>>8  & 0xF)), \
+  ('0' + ((n)>>4  & 0xF)), \
+  ('0' + ((n)     & 0xF))
+
+/* Construct a string literal encoding the version number. */
+#ifdef COMPILER_VERSION
+char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
+
+/* Construct a string literal encoding the version number components. */
+#elif defined(COMPILER_VERSION_MAJOR)
+char const info_version[] = {
+  'I', 'N', 'F', 'O', ':',
+  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
+  COMPILER_VERSION_MAJOR,
+# ifdef COMPILER_VERSION_MINOR
+  '.', COMPILER_VERSION_MINOR,
+#  ifdef COMPILER_VERSION_PATCH
+   '.', COMPILER_VERSION_PATCH,
+#   ifdef COMPILER_VERSION_TWEAK
+    '.', COMPILER_VERSION_TWEAK,
+#   endif
+#  endif
+# endif
+  ']','\0'};
+#endif
+
+/* Construct a string literal encoding the internal version number. */
+#ifdef COMPILER_VERSION_INTERNAL
+char const info_version_internal[] = {
+  'I', 'N', 'F', 'O', ':',
+  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
+  'i','n','t','e','r','n','a','l','[',
+  COMPILER_VERSION_INTERNAL,']','\0'};
+#elif defined(COMPILER_VERSION_INTERNAL_STR)
+char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
+#endif
+
+/* Construct a string literal encoding the version number components. */
+#ifdef SIMULATE_VERSION_MAJOR
+char const info_simulate_version[] = {
+  'I', 'N', 'F', 'O', ':',
+  's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
+  SIMULATE_VERSION_MAJOR,
+# ifdef SIMULATE_VERSION_MINOR
+  '.', SIMULATE_VERSION_MINOR,
+#  ifdef SIMULATE_VERSION_PATCH
+   '.', SIMULATE_VERSION_PATCH,
+#   ifdef SIMULATE_VERSION_TWEAK
+    '.', SIMULATE_VERSION_TWEAK,
+#   endif
+#  endif
+# endif
+  ']','\0'};
+#endif
+
+/* Construct the string literal in pieces to prevent the source from
+   getting matched.  Store it in a pointer rather than an array
+   because some compilers will just produce instructions to fill the
+   array rather than assigning a pointer to a static array.  */
+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
+
+
+
+#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
+#  if defined(__INTEL_CXX11_MODE__)
+#    if defined(__cpp_aggregate_nsdmi)
+#      define CXX_STD 201402L
+#    else
+#      define CXX_STD 201103L
+#    endif
+#  else
+#    define CXX_STD 199711L
+#  endif
+#elif defined(_MSC_VER) && defined(_MSVC_LANG)
+#  define CXX_STD _MSVC_LANG
+#else
+#  define CXX_STD __cplusplus
+#endif
+
+const char* info_language_standard_default = "INFO" ":" "standard_default["
+#if CXX_STD > 202002L
+  "23"
+#elif CXX_STD > 201703L
+  "20"
+#elif CXX_STD >= 201703L
+  "17"
+#elif CXX_STD >= 201402L
+  "14"
+#elif CXX_STD >= 201103L
+  "11"
+#else
+  "98"
+#endif
+"]";
+
+const char* info_language_extensions_default = "INFO" ":" "extensions_default["
+#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) ||           \
+     defined(__TI_COMPILER_VERSION__)) &&                                     \
+  !defined(__STRICT_ANSI__)
+  "ON"
+#else
+  "OFF"
+#endif
+"]";
+
+/*--------------------------------------------------------------------------*/
+
+int main(int argc, char* argv[])
+{
+  int require = 0;
+  require += info_compiler[argc];
+  require += info_platform[argc];
+  require += info_arch[argc];
+#ifdef COMPILER_VERSION_MAJOR
+  require += info_version[argc];
+#endif
+#ifdef COMPILER_VERSION_INTERNAL
+  require += info_version_internal[argc];
+#endif
+#ifdef SIMULATE_ID
+  require += info_simulate[argc];
+#endif
+#ifdef SIMULATE_VERSION_MAJOR
+  require += info_simulate_version[argc];
+#endif
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+  require += info_cray[argc];
+#endif
+  require += info_language_standard_default[argc];
+  require += info_language_extensions_default[argc];
+  (void)argv;
+  return require;
+}

binární
build/CMakeFiles/3.26.0-rc1/CompilerIdCXX/a.exe


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 81 - 0
build/CMakeFiles/CMakeConfigureLog.yaml


+ 16 - 0
build/CMakeFiles/CMakeDirectoryInformation.cmake

@@ -0,0 +1,16 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# Relative path conversion top directories.
+set(CMAKE_RELATIVE_PATH_TOP_SOURCE "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools")
+set(CMAKE_RELATIVE_PATH_TOP_BINARY "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build")
+
+# Force unix paths in dependencies.
+set(CMAKE_FORCE_UNIX_PATHS 1)
+
+
+# The C and CXX include file regular expressions for this directory.
+set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
+set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
+set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
+set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

+ 3 - 0
build/CMakeFiles/CMakeRuleHashes.txt

@@ -0,0 +1,3 @@
+# Hashes of file build rules.
+7496abe196804e504875f8c2944f2250 CMakeFiles/dfota_tools_autogen
+d11df5ffda2e46bf26ad4d7d609fb85f D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfota_tools_zh_CN.ts

+ 174 - 0
build/CMakeFiles/Makefile.cmake

@@ -0,0 +1,174 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# The generator used is:
+set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
+
+# The top level Makefile was generated from the following files:
+set(CMAKE_MAKEFILE_DEPENDS
+  "CMakeCache.txt"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompilerABI.c"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCInformation.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompiler.cmake.in"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXInformation.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCompilerIdDetection.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCXXCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompileFeatures.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineRCCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineSystem.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindBinUtils.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeGenericSystem.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitIncludeInfo.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitLinkInfo.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseLibraryArchitecture.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeRCCompiler.cmake.in"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeRCInformation.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystem.cmake.in"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestRCCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeUnixFindMake.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ADSP-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Borland-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Cray-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GHS-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-C.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-CXX.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-FindBinUtils.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/HP-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IAR-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Intel-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/LCC-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/MSVC-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PGI-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PathScale-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SCO-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TI-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Tasking-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Watcom-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XL-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XLClang-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Internal/FeatureTesting.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-Determine-CXX.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX-ABI.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-windres.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows.cmake"
+  "C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/CMakeLists.txt"
+  "CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeRCCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeSystem.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5Config.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ConfigVersion.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ModuleLocation.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfig.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigVersion.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreMacros.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfigVersion.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QICNSPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTgaPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTiffPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWbmpPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWebGLIntegrationPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWebpPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWindowsDirect2DIntegrationPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWindowsIntegrationPlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QXdgDesktopPortalThemePlugin.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfigVersion.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfigVersion.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake"
+  "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5Widgets_QWindowsVistaStylePlugin.cmake"
+  )
+
+# The corresponding makefile is:
+set(CMAKE_MAKEFILE_OUTPUTS
+  "Makefile"
+  "CMakeFiles/cmake.check_cache"
+  )
+
+# Byproducts of CMake generate step:
+set(CMAKE_MAKEFILE_PRODUCTS
+  "CMakeFiles/3.26.0-rc1/CMakeSystem.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeRCCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake"
+  "CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake"
+  "CMakeFiles/dfota_tools_autogen.dir/AutogenInfo.json"
+  "CMakeFiles/CMakeDirectoryInformation.cmake"
+  )
+
+# Dependency information for all targets:
+set(CMAKE_DEPEND_INFO_FILES
+  "CMakeFiles/dfota_tools.dir/DependInfo.cmake"
+  "CMakeFiles/dfota_tools_autogen.dir/DependInfo.cmake"
+  )

+ 139 - 0
build/CMakeFiles/Makefile2

@@ -0,0 +1,139 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = "C:/Program Files/CMake/bin/cmake.exe"
+
+# The command to remove a file.
+RM = "C:/Program Files/CMake/bin/cmake.exe" -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+
+#=============================================================================
+# Directory level rules for the build root directory
+
+# The main recursive "all" target.
+all: CMakeFiles/dfota_tools.dir/all
+.PHONY : all
+
+# The main recursive "preinstall" target.
+preinstall:
+.PHONY : preinstall
+
+# The main recursive "clean" target.
+clean: CMakeFiles/dfota_tools.dir/clean
+clean: CMakeFiles/dfota_tools_autogen.dir/clean
+.PHONY : clean
+
+#=============================================================================
+# Target rules for target CMakeFiles/dfota_tools.dir
+
+# All Build rule for target.
+CMakeFiles/dfota_tools.dir/all: CMakeFiles/dfota_tools_autogen.dir/all
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/depend
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/build
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 "Built target dfota_tools"
+.PHONY : CMakeFiles/dfota_tools.dir/all
+
+# Build rule for subdir invocation for target.
+CMakeFiles/dfota_tools.dir/rule: cmake_check_build_system
+	$(CMAKE_COMMAND) -E cmake_progress_start D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles 16
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/dfota_tools.dir/all
+	$(CMAKE_COMMAND) -E cmake_progress_start D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles 0
+.PHONY : CMakeFiles/dfota_tools.dir/rule
+
+# Convenience name for target.
+dfota_tools: CMakeFiles/dfota_tools.dir/rule
+.PHONY : dfota_tools
+
+# clean rule for target.
+CMakeFiles/dfota_tools.dir/clean:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/clean
+.PHONY : CMakeFiles/dfota_tools.dir/clean
+
+#=============================================================================
+# Target rules for target CMakeFiles/dfota_tools_autogen.dir
+
+# All Build rule for target.
+CMakeFiles/dfota_tools_autogen.dir/all:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools_autogen.dir/build.make CMakeFiles/dfota_tools_autogen.dir/depend
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools_autogen.dir/build.make CMakeFiles/dfota_tools_autogen.dir/build
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=16 "Built target dfota_tools_autogen"
+.PHONY : CMakeFiles/dfota_tools_autogen.dir/all
+
+# Build rule for subdir invocation for target.
+CMakeFiles/dfota_tools_autogen.dir/rule: cmake_check_build_system
+	$(CMAKE_COMMAND) -E cmake_progress_start D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles 1
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/dfota_tools_autogen.dir/all
+	$(CMAKE_COMMAND) -E cmake_progress_start D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles 0
+.PHONY : CMakeFiles/dfota_tools_autogen.dir/rule
+
+# Convenience name for target.
+dfota_tools_autogen: CMakeFiles/dfota_tools_autogen.dir/rule
+.PHONY : dfota_tools_autogen
+
+# clean rule for target.
+CMakeFiles/dfota_tools_autogen.dir/clean:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools_autogen.dir/build.make CMakeFiles/dfota_tools_autogen.dir/clean
+.PHONY : CMakeFiles/dfota_tools_autogen.dir/clean
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+	$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+

+ 4 - 0
build/CMakeFiles/TargetDirectories.txt

@@ -0,0 +1,4 @@
+D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools.dir
+D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/edit_cache.dir
+D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/rebuild_cache.dir
+D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools_autogen.dir

+ 1 - 0
build/CMakeFiles/cmake.check_cache

@@ -0,0 +1 @@
+# This file is generated by cmake for dependency checking of the CMakeCache.txt file

+ 31 - 0
build/CMakeFiles/dfota_tools.dir/DependInfo.cmake

@@ -0,0 +1,31 @@
+
+# Consider dependencies only in project.
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
+
+# The set of languages for which implicit dependencies are needed:
+set(CMAKE_DEPENDS_LANGUAGES
+  )
+
+# The set of dependency files which are needed:
+set(CMAKE_DEPENDS_DEPENDENCY_FILES
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c" "CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c" "CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c" "CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c" "CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c" "CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c" "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c" "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp" "CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj" "gcc" "CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp" "CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj" "gcc" "CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp" "CMakeFiles/dfota_tools.dir/main.cpp.obj" "gcc" "CMakeFiles/dfota_tools.dir/main.cpp.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp" "CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj" "gcc" "CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp" "CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj.d"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp" "CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj" "gcc" "CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj.d"
+  )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
+  )
+
+# Fortran module output directory.
+set(CMAKE_Fortran_TARGET_MODULE_DIR "")

+ 325 - 0
build/CMakeFiles/dfota_tools.dir/build.make

@@ -0,0 +1,325 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# Delete rule output on recipe failure.
+.DELETE_ON_ERROR:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = "C:/Program Files/CMake/bin/cmake.exe"
+
+# The command to remove a file.
+RM = "C:/Program Files/CMake/bin/cmake.exe" -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+
+# Include any dependencies generated for this target.
+include CMakeFiles/dfota_tools.dir/depend.make
+# Include any dependencies generated by the compiler for this target.
+include CMakeFiles/dfota_tools.dir/compiler_depend.make
+
+# Include the progress variables for this target.
+include CMakeFiles/dfota_tools.dir/progress.make
+
+# Include the compile flags for this target's objects.
+include CMakeFiles/dfota_tools.dir/flags.make
+
+D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfota_tools_zh_CN.ts: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfota_tools_zh_CN.ts"
+	D:/Qt/Qt5.12.12/5.12.12/mingw73_32/bin/lupdate.exe @D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools_zh_CN.ts_lst_file -ts D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfota_tools_zh_CN.ts
+
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj: CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj: dfota_tools_autogen/mocs_compilation.cpp
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj -MF CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj.d -o CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp
+
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp > CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.i
+
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp -o CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.s
+
+CMakeFiles/dfota_tools.dir/main.cpp.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/main.cpp.obj: CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+CMakeFiles/dfota_tools.dir/main.cpp.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp
+CMakeFiles/dfota_tools.dir/main.cpp.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/dfota_tools.dir/main.cpp.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/main.cpp.obj -MF CMakeFiles/dfota_tools.dir/main.cpp.obj.d -o CMakeFiles/dfota_tools.dir/main.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp
+
+CMakeFiles/dfota_tools.dir/main.cpp.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dfota_tools.dir/main.cpp.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp > CMakeFiles/dfota_tools.dir/main.cpp.i
+
+CMakeFiles/dfota_tools.dir/main.cpp.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dfota_tools.dir/main.cpp.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp -o CMakeFiles/dfota_tools.dir/main.cpp.s
+
+CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj: CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp
+CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj -MF CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj.d -o CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp
+
+CMakeFiles/dfota_tools.dir/mainwindow.cpp.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dfota_tools.dir/mainwindow.cpp.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp > CMakeFiles/dfota_tools.dir/mainwindow.cpp.i
+
+CMakeFiles/dfota_tools.dir/mainwindow.cpp.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dfota_tools.dir/mainwindow.cpp.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp -o CMakeFiles/dfota_tools.dir/mainwindow.cpp.s
+
+CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj: CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp
+CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj -MF CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj.d -o CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp
+
+CMakeFiles/dfota_tools.dir/build_date_time.cpp.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dfota_tools.dir/build_date_time.cpp.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp > CMakeFiles/dfota_tools.dir/build_date_time.cpp.i
+
+CMakeFiles/dfota_tools.dir/build_date_time.cpp.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dfota_tools.dir/build_date_time.cpp.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp -o CMakeFiles/dfota_tools.dir/build_date_time.cpp.s
+
+CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c
+CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building C object CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj -MF CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj.d -o CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c
+
+CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c > CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.i
+
+CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c -o CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.s
+
+CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c
+CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building C object CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj -MF CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj.d -o CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c
+
+CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c > CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.i
+
+CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c -o CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.s
+
+CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj: CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp
+CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj -MF CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj.d -o CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp
+
+CMakeFiles/dfota_tools.dir/src/crc32.cpp.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dfota_tools.dir/src/crc32.cpp.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp > CMakeFiles/dfota_tools.dir/src/crc32.cpp.i
+
+CMakeFiles/dfota_tools.dir/src/crc32.cpp.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dfota_tools.dir/src/crc32.cpp.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp -o CMakeFiles/dfota_tools.dir/src/crc32.cpp.s
+
+CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj: CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp
+CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building CXX object CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj -MF CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj.d -o CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp
+
+CMakeFiles/dfota_tools.dir/src/dfota.cpp.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dfota_tools.dir/src/dfota.cpp.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp > CMakeFiles/dfota_tools.dir/src/dfota.cpp.i
+
+CMakeFiles/dfota_tools.dir/src/dfota.cpp.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dfota_tools.dir/src/dfota.cpp.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp -o CMakeFiles/dfota_tools.dir/src/dfota.cpp.s
+
+CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c
+CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building C object CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj -MF CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj.d -o CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c
+
+CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c > CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.i
+
+CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c -o CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.s
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c
+CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building C object CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj -MF CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj.d -o CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c > CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.i
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c -o CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.s
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building C object CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj -MF CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj.d -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c > CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.i
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.s
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building C object CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj -MF CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj.d -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c > CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.i
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.s
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj: CMakeFiles/dfota_tools.dir/flags.make
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj: CMakeFiles/dfota_tools.dir/includes_C.rsp
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj: CMakeFiles/dfota_tools.dir/compiler_depend.ts
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Building C object CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj -MF CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj.d -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.i"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c > CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.i
+
+CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.s"
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.s
+
+# Object files for target dfota_tools
+dfota_tools_OBJECTS = \
+"CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj" \
+"CMakeFiles/dfota_tools.dir/main.cpp.obj" \
+"CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj" \
+"CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj" \
+"CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj" \
+"CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj" \
+"CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj" \
+"CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj" \
+"CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj" \
+"CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj" \
+"CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj" \
+"CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj" \
+"CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj"
+
+# External object files for target dfota_tools
+dfota_tools_EXTERNAL_OBJECTS =
+
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/main.cpp.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/build.make
+dfota_tools.exe: D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Widgetsd.a
+dfota_tools.exe: D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Guid.a
+dfota_tools.exe: D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Cored.a
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/linkLibs.rsp
+dfota_tools.exe: CMakeFiles/dfota_tools.dir/objects1.rsp
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) "Linking CXX executable dfota_tools.exe"
+	"C:/Program Files/CMake/bin/cmake.exe" -E rm -f CMakeFiles/dfota_tools.dir/objects.a
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/ar.exe qc CMakeFiles/dfota_tools.dir/objects.a @CMakeFiles/dfota_tools.dir/objects1.rsp
+	D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -mwindows -g -Wl,--whole-archive CMakeFiles/dfota_tools.dir/objects.a -Wl,--no-whole-archive -o dfota_tools.exe -Wl,--out-implib,libdfota_tools.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/dfota_tools.dir/linkLibs.rsp
+
+# Rule to build all files generated by this target.
+CMakeFiles/dfota_tools.dir/build: dfota_tools.exe
+.PHONY : CMakeFiles/dfota_tools.dir/build
+
+CMakeFiles/dfota_tools.dir/clean:
+	$(CMAKE_COMMAND) -P CMakeFiles/dfota_tools.dir/cmake_clean.cmake
+.PHONY : CMakeFiles/dfota_tools.dir/clean
+
+CMakeFiles/dfota_tools.dir/depend: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfota_tools_zh_CN.ts
+	$(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools.dir/DependInfo.cmake --color=$(COLOR)
+.PHONY : CMakeFiles/dfota_tools.dir/depend
+

+ 42 - 0
build/CMakeFiles/dfota_tools.dir/cmake_clean.cmake

@@ -0,0 +1,42 @@
+file(REMOVE_RECURSE
+  "CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj"
+  "CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj.d"
+  "CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj"
+  "CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj.d"
+  "CMakeFiles/dfota_tools.dir/main.cpp.obj"
+  "CMakeFiles/dfota_tools.dir/main.cpp.obj.d"
+  "CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj"
+  "CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj"
+  "CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj"
+  "CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj.d"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj"
+  "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj.d"
+  "CMakeFiles/dfota_tools_zh_CN.ts_lst_file"
+  "CMakeFiles/dfota_tools_autogen.dir/AutogenUsed.txt"
+  "CMakeFiles/dfota_tools_autogen.dir/ParseCache.txt"
+  "dfota_tools_autogen"
+  "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfota_tools_zh_CN.ts"
+  "dfota_tools.exe"
+  "dfota_tools.exe.manifest"
+  "dfota_tools.pdb"
+  "libdfota_tools.dll.a"
+)
+
+# Per-language clean rules from dependency scanning.
+foreach(lang C CXX)
+  include(CMakeFiles/dfota_tools.dir/cmake_clean_${lang}.cmake OPTIONAL)
+endforeach()

+ 2 - 0
build/CMakeFiles/dfota_tools.dir/compiler_depend.make

@@ -0,0 +1,2 @@
+# Empty compiler generated dependencies file for dfota_tools.
+# This may be replaced when dependencies are built.

+ 2 - 0
build/CMakeFiles/dfota_tools.dir/compiler_depend.ts

@@ -0,0 +1,2 @@
+# CMAKE generated file: DO NOT EDIT!
+# Timestamp file for compiler generated dependencies management for dfota_tools.

+ 2 - 0
build/CMakeFiles/dfota_tools.dir/depend.make

@@ -0,0 +1,2 @@
+# Empty dependencies file for dfota_tools.
+# This may be replaced when dependencies are built.

+ 17 - 0
build/CMakeFiles/dfota_tools.dir/flags.make

@@ -0,0 +1,17 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# compile C with D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe
+# compile CXX with D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe
+C_DEFINES = -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB
+
+C_INCLUDES = @CMakeFiles/dfota_tools.dir/includes_C.rsp
+
+C_FLAGS = -g
+
+CXX_DEFINES = -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB
+
+CXX_INCLUDES = @CMakeFiles/dfota_tools.dir/includes_CXX.rsp
+
+CXX_FLAGS = -mwindows -g -std=gnu++11
+

+ 1 - 0
build/CMakeFiles/dfota_tools.dir/includes_C.rsp

@@ -0,0 +1 @@
+-I"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build" -I"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools" -I"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/include" -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtWidgets -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtGui -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtANGLE -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtCore -isystem "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/./mkspecs/win32-g++"

+ 1 - 0
build/CMakeFiles/dfota_tools.dir/includes_CXX.rsp

@@ -0,0 +1 @@
+-I"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build" -I"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools" -I"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/include" -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtWidgets -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtGui -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtANGLE -isystem D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtCore -isystem "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/./mkspecs/win32-g++"

+ 1 - 0
build/CMakeFiles/dfota_tools.dir/linkLibs.rsp

@@ -0,0 +1 @@
+ D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Widgetsd.a D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Guid.a D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/libQt5Cored.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 

+ 1 - 0
build/CMakeFiles/dfota_tools.dir/objects1.rsp

@@ -0,0 +1 @@
+CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj CMakeFiles/dfota_tools.dir/main.cpp.obj CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj

+ 16 - 0
build/CMakeFiles/dfota_tools.dir/progress.make

@@ -0,0 +1,16 @@
+CMAKE_PROGRESS_1 = 1
+CMAKE_PROGRESS_2 = 2
+CMAKE_PROGRESS_3 = 3
+CMAKE_PROGRESS_4 = 4
+CMAKE_PROGRESS_5 = 5
+CMAKE_PROGRESS_6 = 6
+CMAKE_PROGRESS_7 = 7
+CMAKE_PROGRESS_8 = 8
+CMAKE_PROGRESS_9 = 9
+CMAKE_PROGRESS_10 = 10
+CMAKE_PROGRESS_11 = 11
+CMAKE_PROGRESS_12 = 12
+CMAKE_PROGRESS_13 = 13
+CMAKE_PROGRESS_14 = 14
+CMAKE_PROGRESS_15 = 15
+

+ 427 - 0
build/CMakeFiles/dfota_tools_autogen.dir/AutogenInfo.json

@@ -0,0 +1,427 @@
+{
+	"BUILD_DIR" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen",
+	"CMAKE_BINARY_DIR" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+	"CMAKE_CURRENT_BINARY_DIR" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+	"CMAKE_CURRENT_SOURCE_DIR" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools",
+	"CMAKE_EXECUTABLE" : "C:/Program Files/CMake/bin/cmake.exe",
+	"CMAKE_LIST_FILES" : 
+	[
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/CMakeLists.txt",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineSystem.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystem.cmake.in",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/3.26.0-rc1/CMakeSystem.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeUnixFindMake.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCompilerIdDetection.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ADSP-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMCC-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMClang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/AppleClang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Borland-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Bruce-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Compaq-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Cray-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Embarcadero-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Fujitsu-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GHS-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/HP-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IAR-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Intel-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/LCC-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/MSVC-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVHPC-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVIDIA-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PGI-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PathScale-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SCO-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SDCC-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SunPro-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TI-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Tasking-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Watcom-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XL-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XLClang-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/zOS-C-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindBinUtils.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-FindBinUtils.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCXXCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-Determine-CXX.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCompilerIdDetection.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ADSP-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMCC-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/ARMClang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/AppleClang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Borland-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Cray-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Embarcadero-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Fujitsu-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GHS-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/HP-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IAR-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMClang-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Intel-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/MSVC-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVHPC-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/NVIDIA-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PGI-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/PathScale-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SCO-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/TI-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Tasking-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/Watcom-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XL-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeFindBinUtils.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-FindBinUtils.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompiler.cmake.in",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeGenericSystem.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCInformation.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-C.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineRCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeRCCompiler.cmake.in",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/3.26.0-rc1/CMakeRCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeRCInformation.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-windres.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestRCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitIncludeInfo.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitLinkInfo.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseLibraryArchitecture.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompilerABI.c",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompileFeatures.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Internal/FeatureTesting.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/3.26.0-rc1/CMakeCCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXInformation.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU-CXX.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Compiler/GNU.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitIncludeInfo.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseImplicitLinkInfo.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseLibraryArchitecture.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeDetermineCompileFeatures.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Internal/FeatureTesting.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompiler.cmake.in",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/3.26.0-rc1/CMakeCXXCompiler.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX-ABI.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ConfigVersion.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5Config.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ConfigVersion.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5Config.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5/Qt5ModuleLocation.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfigVersion.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfigVersion.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigVersion.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfig.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Core/Qt5CoreMacros.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QICNSPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTgaPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTiffPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWbmpPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWebGLIntegrationPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWebpPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWindowsDirect2DIntegrationPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QWindowsIntegrationPlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5Gui_QXdgDesktopPortalThemePlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5Widgets_QWindowsVistaStylePlugin.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfigVersion.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeParseArguments.cmake"
+	],
+	"CMAKE_SOURCE_DIR" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools",
+	"DEP_FILE" : "",
+	"DEP_FILE_RULE_NAME" : "",
+	"HEADERS" : 
+	[
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.h",
+			"MU",
+			"EWIEGA46WW/moc_build_date_time.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/dfotaConfig.h",
+			"MU",
+			"EWIEGA46WW/moc_dfotaConfig.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.h",
+			"MU",
+			"EWIEGA46WW/moc_mainwindow.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.h",
+			"MU",
+			"FDOZJQTNCN/moc_bsdiff.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.h",
+			"MU",
+			"FDOZJQTNCN/moc_bspatch.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.h",
+			"MU",
+			"UVLADIE3JM/moc_crc32.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.h",
+			"MU",
+			"UVLADIE3JM/moc_dfota.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/7zFile.h",
+			"MU",
+			"TE25QGT6I7/moc_7zFile.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/7zTypes.h",
+			"MU",
+			"TE25QGT6I7/moc_7zTypes.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/Compiler.h",
+			"MU",
+			"TE25QGT6I7/moc_Compiler.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/LzFind.h",
+			"MU",
+			"TE25QGT6I7/moc_LzFind.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/LzHash.h",
+			"MU",
+			"TE25QGT6I7/moc_LzHash.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/LzmaDec.h",
+			"MU",
+			"TE25QGT6I7/moc_LzmaDec.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/LzmaEnc.h",
+			"MU",
+			"TE25QGT6I7/moc_LzmaEnc.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/inc/Precomp.h",
+			"MU",
+			"TE25QGT6I7/moc_Precomp.cpp",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.h",
+			"MU",
+			"YTRRAVVH2T/moc_lzma.cpp",
+			null
+		]
+	],
+	"HEADER_EXTENSIONS" : [ "h", "hh", "h++", "hm", "hpp", "hxx", "in", "txx" ],
+	"INCLUDE_DIR" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/include",
+	"MOC_COMPILATION_FILE" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp",
+	"MOC_DEFINITIONS" : [ "QT_CORE_LIB", "QT_GUI_LIB", "QT_WIDGETS_LIB" ],
+	"MOC_DEPEND_FILTERS" : 
+	[
+		[
+			"Q_PLUGIN_METADATA",
+			"[\n][ \t]*Q_PLUGIN_METADATA[ \t]*\\([^\\)]*FILE[ \t]*\"([^\"]+)\""
+		]
+	],
+	"MOC_INCLUDES" : 
+	[
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+		"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtWidgets",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtGui",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtANGLE",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/include/QtCore",
+		"D:/Qt/Qt5.12.12/5.12.12/mingw73_32/mkspecs/win32-g++",
+		"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++",
+		"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32",
+		"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward",
+		"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include",
+		"D:/tools/mingw-w64-v7.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed",
+		"D:/tools/mingw-w64-v7.3.0/mingw64/x86_64-w64-mingw32/include"
+	],
+	"MOC_MACRO_NAMES" : [ "Q_OBJECT", "Q_GADGET", "Q_NAMESPACE", "Q_NAMESPACE_EXPORT" ],
+	"MOC_OPTIONS" : [],
+	"MOC_PATH_PREFIX" : false,
+	"MOC_PREDEFS_CMD" : 
+	[
+		"D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe",
+		"-dM",
+		"-E",
+		"-c",
+		"C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp"
+	],
+	"MOC_PREDEFS_FILE" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/moc_predefs.h",
+	"MOC_RELAXED_MODE" : false,
+	"MOC_SKIP" : [],
+	"MULTI_CONFIG" : false,
+	"PARALLEL" : 4,
+	"PARSE_CACHE_FILE" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools_autogen.dir/ParseCache.txt",
+	"QT_MOC_EXECUTABLE" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/bin/moc.exe",
+	"QT_UIC_EXECUTABLE" : "D:/Qt/Qt5.12.12/5.12.12/mingw73_32/bin/uic.exe",
+	"QT_VERSION_MAJOR" : 5,
+	"QT_VERSION_MINOR" : 12,
+	"SETTINGS_FILE" : "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools_autogen.dir/AutogenUsed.txt",
+	"SOURCES" : 
+	[
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c",
+			"MU",
+			null
+		],
+		[
+			"D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c",
+			"MU",
+			null
+		]
+	],
+	"UIC_OPTIONS" : [],
+	"UIC_SEARCH_PATHS" : [],
+	"UIC_SKIP" : [],
+	"UIC_UI_FILES" : [],
+	"VERBOSITY" : 0
+}

+ 18 - 0
build/CMakeFiles/dfota_tools_autogen.dir/DependInfo.cmake

@@ -0,0 +1,18 @@
+
+# Consider dependencies only in project.
+set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
+
+# The set of languages for which implicit dependencies are needed:
+set(CMAKE_DEPENDS_LANGUAGES
+  )
+
+# The set of dependency files which are needed:
+set(CMAKE_DEPENDS_DEPENDENCY_FILES
+  )
+
+# Targets to which this target links which contain Fortran sources.
+set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES
+  )
+
+# Fortran module output directory.
+set(CMAKE_Fortran_TARGET_MODULE_DIR "")

+ 88 - 0
build/CMakeFiles/dfota_tools_autogen.dir/build.make

@@ -0,0 +1,88 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# Delete rule output on recipe failure.
+.DELETE_ON_ERROR:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = "C:/Program Files/CMake/bin/cmake.exe"
+
+# The command to remove a file.
+RM = "C:/Program Files/CMake/bin/cmake.exe" -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+
+# Utility rule file for dfota_tools_autogen.
+
+# Include any custom commands dependencies for this target.
+include CMakeFiles/dfota_tools_autogen.dir/compiler_depend.make
+
+# Include the progress variables for this target.
+include CMakeFiles/dfota_tools_autogen.dir/progress.make
+
+CMakeFiles/dfota_tools_autogen:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Automatic MOC and UIC for target dfota_tools"
+	"C:/Program Files/CMake/bin/cmake.exe" -E cmake_autogen D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools_autogen.dir/AutogenInfo.json Debug
+
+dfota_tools_autogen: CMakeFiles/dfota_tools_autogen
+dfota_tools_autogen: CMakeFiles/dfota_tools_autogen.dir/build.make
+.PHONY : dfota_tools_autogen
+
+# Rule to build all files generated by this target.
+CMakeFiles/dfota_tools_autogen.dir/build: dfota_tools_autogen
+.PHONY : CMakeFiles/dfota_tools_autogen.dir/build
+
+CMakeFiles/dfota_tools_autogen.dir/clean:
+	$(CMAKE_COMMAND) -P CMakeFiles/dfota_tools_autogen.dir/cmake_clean.cmake
+.PHONY : CMakeFiles/dfota_tools_autogen.dir/clean
+
+CMakeFiles/dfota_tools_autogen.dir/depend:
+	$(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles/dfota_tools_autogen.dir/DependInfo.cmake --color=$(COLOR)
+.PHONY : CMakeFiles/dfota_tools_autogen.dir/depend
+

+ 10 - 0
build/CMakeFiles/dfota_tools_autogen.dir/cmake_clean.cmake

@@ -0,0 +1,10 @@
+file(REMOVE_RECURSE
+  "CMakeFiles/dfota_tools_autogen"
+  "dfota_tools_autogen/include/ui_mainwindow.h"
+  "dfota_tools_autogen/mocs_compilation.cpp"
+)
+
+# Per-language clean rules from dependency scanning.
+foreach(lang )
+  include(CMakeFiles/dfota_tools_autogen.dir/cmake_clean_${lang}.cmake OPTIONAL)
+endforeach()

+ 2 - 0
build/CMakeFiles/dfota_tools_autogen.dir/compiler_depend.make

@@ -0,0 +1,2 @@
+# Empty custom commands generated dependencies file for dfota_tools_autogen.
+# This may be replaced when dependencies are built.

+ 2 - 0
build/CMakeFiles/dfota_tools_autogen.dir/compiler_depend.ts

@@ -0,0 +1,2 @@
+# CMAKE generated file: DO NOT EDIT!
+# Timestamp file for custom commands dependencies management for dfota_tools_autogen.

+ 2 - 0
build/CMakeFiles/dfota_tools_autogen.dir/progress.make

@@ -0,0 +1,2 @@
+CMAKE_PROGRESS_1 = 16
+

+ 1 - 0
build/CMakeFiles/dfota_tools_zh_CN.ts_lst_file

@@ -0,0 +1 @@
+D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools

+ 1 - 0
build/CMakeFiles/progress.marks

@@ -0,0 +1 @@
+16

+ 519 - 0
build/Makefile

@@ -0,0 +1,519 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.26
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+# Allow only one "make -f Makefile2" at a time, but pass parallelism.
+.NOTPARALLEL:
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = "C:/Program Files/CMake/bin/cmake.exe"
+
+# The command to remove a file.
+RM = "C:/Program Files/CMake/bin/cmake.exe" -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target edit_cache
+edit_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+	"C:/Program Files/CMake/bin/cmake-gui.exe" -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+	"C:/Program Files/CMake/bin/cmake.exe" --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# The main all target
+all: cmake_check_build_system
+	$(CMAKE_COMMAND) -E cmake_progress_start D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build//CMakeFiles/progress.marks
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
+	$(CMAKE_COMMAND) -E cmake_progress_start D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
+clean:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+	$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+#=============================================================================
+# Target rules for targets named dfota_tools
+
+# Build rule for target.
+dfota_tools: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 dfota_tools
+.PHONY : dfota_tools
+
+# fast build rule for target.
+dfota_tools/fast:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/build
+.PHONY : dfota_tools/fast
+
+#=============================================================================
+# Target rules for targets named dfota_tools_autogen
+
+# Build rule for target.
+dfota_tools_autogen: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 dfota_tools_autogen
+.PHONY : dfota_tools_autogen
+
+# fast build rule for target.
+dfota_tools_autogen/fast:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools_autogen.dir/build.make CMakeFiles/dfota_tools_autogen.dir/build
+.PHONY : dfota_tools_autogen/fast
+
+build_date_time.obj: build_date_time.cpp.obj
+.PHONY : build_date_time.obj
+
+# target to build an object file
+build_date_time.cpp.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj
+.PHONY : build_date_time.cpp.obj
+
+build_date_time.i: build_date_time.cpp.i
+.PHONY : build_date_time.i
+
+# target to preprocess a source file
+build_date_time.cpp.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/build_date_time.cpp.i
+.PHONY : build_date_time.cpp.i
+
+build_date_time.s: build_date_time.cpp.s
+.PHONY : build_date_time.s
+
+# target to generate assembly for a file
+build_date_time.cpp.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/build_date_time.cpp.s
+.PHONY : build_date_time.cpp.s
+
+dfota_tools_autogen/mocs_compilation.obj: dfota_tools_autogen/mocs_compilation.cpp.obj
+.PHONY : dfota_tools_autogen/mocs_compilation.obj
+
+# target to build an object file
+dfota_tools_autogen/mocs_compilation.cpp.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj
+.PHONY : dfota_tools_autogen/mocs_compilation.cpp.obj
+
+dfota_tools_autogen/mocs_compilation.i: dfota_tools_autogen/mocs_compilation.cpp.i
+.PHONY : dfota_tools_autogen/mocs_compilation.i
+
+# target to preprocess a source file
+dfota_tools_autogen/mocs_compilation.cpp.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.i
+.PHONY : dfota_tools_autogen/mocs_compilation.cpp.i
+
+dfota_tools_autogen/mocs_compilation.s: dfota_tools_autogen/mocs_compilation.cpp.s
+.PHONY : dfota_tools_autogen/mocs_compilation.s
+
+# target to generate assembly for a file
+dfota_tools_autogen/mocs_compilation.cpp.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.s
+.PHONY : dfota_tools_autogen/mocs_compilation.cpp.s
+
+main.obj: main.cpp.obj
+.PHONY : main.obj
+
+# target to build an object file
+main.cpp.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/main.cpp.obj
+.PHONY : main.cpp.obj
+
+main.i: main.cpp.i
+.PHONY : main.i
+
+# target to preprocess a source file
+main.cpp.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/main.cpp.i
+.PHONY : main.cpp.i
+
+main.s: main.cpp.s
+.PHONY : main.s
+
+# target to generate assembly for a file
+main.cpp.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/main.cpp.s
+.PHONY : main.cpp.s
+
+mainwindow.obj: mainwindow.cpp.obj
+.PHONY : mainwindow.obj
+
+# target to build an object file
+mainwindow.cpp.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj
+.PHONY : mainwindow.cpp.obj
+
+mainwindow.i: mainwindow.cpp.i
+.PHONY : mainwindow.i
+
+# target to preprocess a source file
+mainwindow.cpp.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/mainwindow.cpp.i
+.PHONY : mainwindow.cpp.i
+
+mainwindow.s: mainwindow.cpp.s
+.PHONY : mainwindow.s
+
+# target to generate assembly for a file
+mainwindow.cpp.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/mainwindow.cpp.s
+.PHONY : mainwindow.cpp.s
+
+src/bsdiff/bsdiff.obj: src/bsdiff/bsdiff.c.obj
+.PHONY : src/bsdiff/bsdiff.obj
+
+# target to build an object file
+src/bsdiff/bsdiff.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj
+.PHONY : src/bsdiff/bsdiff.c.obj
+
+src/bsdiff/bsdiff.i: src/bsdiff/bsdiff.c.i
+.PHONY : src/bsdiff/bsdiff.i
+
+# target to preprocess a source file
+src/bsdiff/bsdiff.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.i
+.PHONY : src/bsdiff/bsdiff.c.i
+
+src/bsdiff/bsdiff.s: src/bsdiff/bsdiff.c.s
+.PHONY : src/bsdiff/bsdiff.s
+
+# target to generate assembly for a file
+src/bsdiff/bsdiff.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.s
+.PHONY : src/bsdiff/bsdiff.c.s
+
+src/bsdiff/bspatch.obj: src/bsdiff/bspatch.c.obj
+.PHONY : src/bsdiff/bspatch.obj
+
+# target to build an object file
+src/bsdiff/bspatch.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj
+.PHONY : src/bsdiff/bspatch.c.obj
+
+src/bsdiff/bspatch.i: src/bsdiff/bspatch.c.i
+.PHONY : src/bsdiff/bspatch.i
+
+# target to preprocess a source file
+src/bsdiff/bspatch.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.i
+.PHONY : src/bsdiff/bspatch.c.i
+
+src/bsdiff/bspatch.s: src/bsdiff/bspatch.c.s
+.PHONY : src/bsdiff/bspatch.s
+
+# target to generate assembly for a file
+src/bsdiff/bspatch.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.s
+.PHONY : src/bsdiff/bspatch.c.s
+
+src/crc32.obj: src/crc32.cpp.obj
+.PHONY : src/crc32.obj
+
+# target to build an object file
+src/crc32.cpp.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj
+.PHONY : src/crc32.cpp.obj
+
+src/crc32.i: src/crc32.cpp.i
+.PHONY : src/crc32.i
+
+# target to preprocess a source file
+src/crc32.cpp.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/crc32.cpp.i
+.PHONY : src/crc32.cpp.i
+
+src/crc32.s: src/crc32.cpp.s
+.PHONY : src/crc32.s
+
+# target to generate assembly for a file
+src/crc32.cpp.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/crc32.cpp.s
+.PHONY : src/crc32.cpp.s
+
+src/dfota.obj: src/dfota.cpp.obj
+.PHONY : src/dfota.obj
+
+# target to build an object file
+src/dfota.cpp.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj
+.PHONY : src/dfota.cpp.obj
+
+src/dfota.i: src/dfota.cpp.i
+.PHONY : src/dfota.i
+
+# target to preprocess a source file
+src/dfota.cpp.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/dfota.cpp.i
+.PHONY : src/dfota.cpp.i
+
+src/dfota.s: src/dfota.cpp.s
+.PHONY : src/dfota.s
+
+# target to generate assembly for a file
+src/dfota.cpp.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/dfota.cpp.s
+.PHONY : src/dfota.cpp.s
+
+src/lzma/lzma.obj: src/lzma/lzma.c.obj
+.PHONY : src/lzma/lzma.obj
+
+# target to build an object file
+src/lzma/lzma.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj
+.PHONY : src/lzma/lzma.c.obj
+
+src/lzma/lzma.i: src/lzma/lzma.c.i
+.PHONY : src/lzma/lzma.i
+
+# target to preprocess a source file
+src/lzma/lzma.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.i
+.PHONY : src/lzma/lzma.c.i
+
+src/lzma/lzma.s: src/lzma/lzma.c.s
+.PHONY : src/lzma/lzma.s
+
+# target to generate assembly for a file
+src/lzma/lzma.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.s
+.PHONY : src/lzma/lzma.c.s
+
+src/lzma/src/7zFile.obj: src/lzma/src/7zFile.c.obj
+.PHONY : src/lzma/src/7zFile.obj
+
+# target to build an object file
+src/lzma/src/7zFile.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj
+.PHONY : src/lzma/src/7zFile.c.obj
+
+src/lzma/src/7zFile.i: src/lzma/src/7zFile.c.i
+.PHONY : src/lzma/src/7zFile.i
+
+# target to preprocess a source file
+src/lzma/src/7zFile.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.i
+.PHONY : src/lzma/src/7zFile.c.i
+
+src/lzma/src/7zFile.s: src/lzma/src/7zFile.c.s
+.PHONY : src/lzma/src/7zFile.s
+
+# target to generate assembly for a file
+src/lzma/src/7zFile.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.s
+.PHONY : src/lzma/src/7zFile.c.s
+
+src/lzma/src/LzFind.obj: src/lzma/src/LzFind.c.obj
+.PHONY : src/lzma/src/LzFind.obj
+
+# target to build an object file
+src/lzma/src/LzFind.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj
+.PHONY : src/lzma/src/LzFind.c.obj
+
+src/lzma/src/LzFind.i: src/lzma/src/LzFind.c.i
+.PHONY : src/lzma/src/LzFind.i
+
+# target to preprocess a source file
+src/lzma/src/LzFind.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.i
+.PHONY : src/lzma/src/LzFind.c.i
+
+src/lzma/src/LzFind.s: src/lzma/src/LzFind.c.s
+.PHONY : src/lzma/src/LzFind.s
+
+# target to generate assembly for a file
+src/lzma/src/LzFind.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.s
+.PHONY : src/lzma/src/LzFind.c.s
+
+src/lzma/src/LzmaDec.obj: src/lzma/src/LzmaDec.c.obj
+.PHONY : src/lzma/src/LzmaDec.obj
+
+# target to build an object file
+src/lzma/src/LzmaDec.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj
+.PHONY : src/lzma/src/LzmaDec.c.obj
+
+src/lzma/src/LzmaDec.i: src/lzma/src/LzmaDec.c.i
+.PHONY : src/lzma/src/LzmaDec.i
+
+# target to preprocess a source file
+src/lzma/src/LzmaDec.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.i
+.PHONY : src/lzma/src/LzmaDec.c.i
+
+src/lzma/src/LzmaDec.s: src/lzma/src/LzmaDec.c.s
+.PHONY : src/lzma/src/LzmaDec.s
+
+# target to generate assembly for a file
+src/lzma/src/LzmaDec.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.s
+.PHONY : src/lzma/src/LzmaDec.c.s
+
+src/lzma/src/LzmaEnc.obj: src/lzma/src/LzmaEnc.c.obj
+.PHONY : src/lzma/src/LzmaEnc.obj
+
+# target to build an object file
+src/lzma/src/LzmaEnc.c.obj:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj
+.PHONY : src/lzma/src/LzmaEnc.c.obj
+
+src/lzma/src/LzmaEnc.i: src/lzma/src/LzmaEnc.c.i
+.PHONY : src/lzma/src/LzmaEnc.i
+
+# target to preprocess a source file
+src/lzma/src/LzmaEnc.c.i:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.i
+.PHONY : src/lzma/src/LzmaEnc.c.i
+
+src/lzma/src/LzmaEnc.s: src/lzma/src/LzmaEnc.c.s
+.PHONY : src/lzma/src/LzmaEnc.s
+
+# target to generate assembly for a file
+src/lzma/src/LzmaEnc.c.s:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/dfota_tools.dir/build.make CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.s
+.PHONY : src/lzma/src/LzmaEnc.c.s
+
+# Help Target
+help:
+	@echo "The following are some of the valid targets for this Makefile:"
+	@echo "... all (the default if no target is provided)"
+	@echo "... clean"
+	@echo "... depend"
+	@echo "... edit_cache"
+	@echo "... rebuild_cache"
+	@echo "... dfota_tools_autogen"
+	@echo "... dfota_tools"
+	@echo "... build_date_time.obj"
+	@echo "... build_date_time.i"
+	@echo "... build_date_time.s"
+	@echo "... dfota_tools_autogen/mocs_compilation.obj"
+	@echo "... dfota_tools_autogen/mocs_compilation.i"
+	@echo "... dfota_tools_autogen/mocs_compilation.s"
+	@echo "... main.obj"
+	@echo "... main.i"
+	@echo "... main.s"
+	@echo "... mainwindow.obj"
+	@echo "... mainwindow.i"
+	@echo "... mainwindow.s"
+	@echo "... src/bsdiff/bsdiff.obj"
+	@echo "... src/bsdiff/bsdiff.i"
+	@echo "... src/bsdiff/bsdiff.s"
+	@echo "... src/bsdiff/bspatch.obj"
+	@echo "... src/bsdiff/bspatch.i"
+	@echo "... src/bsdiff/bspatch.s"
+	@echo "... src/crc32.obj"
+	@echo "... src/crc32.i"
+	@echo "... src/crc32.s"
+	@echo "... src/dfota.obj"
+	@echo "... src/dfota.i"
+	@echo "... src/dfota.s"
+	@echo "... src/lzma/lzma.obj"
+	@echo "... src/lzma/lzma.i"
+	@echo "... src/lzma/lzma.s"
+	@echo "... src/lzma/src/7zFile.obj"
+	@echo "... src/lzma/src/7zFile.i"
+	@echo "... src/lzma/src/7zFile.s"
+	@echo "... src/lzma/src/LzFind.obj"
+	@echo "... src/lzma/src/LzFind.i"
+	@echo "... src/lzma/src/LzFind.s"
+	@echo "... src/lzma/src/LzmaDec.obj"
+	@echo "... src/lzma/src/LzmaDec.i"
+	@echo "... src/lzma/src/LzmaDec.s"
+	@echo "... src/lzma/src/LzmaEnc.obj"
+	@echo "... src/lzma/src/LzmaEnc.i"
+	@echo "... src/lzma/src/LzmaEnc.s"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+	$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+

+ 49 - 0
build/cmake_install.cmake

@@ -0,0 +1,49 @@
+# Install script for directory: D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools
+
+# Set the install prefix
+if(NOT DEFINED CMAKE_INSTALL_PREFIX)
+  set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/dfota_tools")
+endif()
+string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+  if(BUILD_TYPE)
+    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+  else()
+    set(CMAKE_INSTALL_CONFIG_NAME "Debug")
+  endif()
+  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+endif()
+
+# Set the component getting installed.
+if(NOT CMAKE_INSTALL_COMPONENT)
+  if(COMPONENT)
+    message(STATUS "Install component: \"${COMPONENT}\"")
+    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+  else()
+    set(CMAKE_INSTALL_COMPONENT)
+  endif()
+endif()
+
+# Is this installation the result of a crosscompile?
+if(NOT DEFINED CMAKE_CROSSCOMPILING)
+  set(CMAKE_CROSSCOMPILING "FALSE")
+endif()
+
+# Set default install directory permissions.
+if(NOT DEFINED CMAKE_OBJDUMP)
+  set(CMAKE_OBJDUMP "D:/tools/mingw-w64-v7.3.0/mingw64/bin/objdump.exe")
+endif()
+
+if(CMAKE_INSTALL_COMPONENT)
+  set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
+else()
+  set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
+endif()
+
+string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
+       "${CMAKE_INSTALL_MANIFEST_FILES}")
+file(WRITE "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/${CMAKE_INSTALL_MANIFEST}"
+     "${CMAKE_INSTALL_MANIFEST_CONTENT}")

+ 80 - 0
build/compile_commands.json

@@ -0,0 +1,80 @@
+[
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_CXX.rsp -mwindows -g -std=gnu++11 -o CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build/dfota_tools_autogen/mocs_compilation.cpp",
+  "output": "CMakeFiles/dfota_tools.dir/dfota_tools_autogen/mocs_compilation.cpp.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_CXX.rsp -mwindows -g -std=gnu++11 -o CMakeFiles/dfota_tools.dir/main.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/main.cpp",
+  "output": "CMakeFiles/dfota_tools.dir/main.cpp.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_CXX.rsp -mwindows -g -std=gnu++11 -o CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/mainwindow.cpp",
+  "output": "CMakeFiles/dfota_tools.dir/mainwindow.cpp.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_CXX.rsp -mwindows -g -std=gnu++11 -o CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build_date_time.cpp",
+  "output": "CMakeFiles/dfota_tools.dir/build_date_time.cpp.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bsdiff.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/bsdiff/bsdiff.c.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/bsdiff/bspatch.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/bsdiff/bspatch.c.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_CXX.rsp -mwindows -g -std=gnu++11 -o CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/crc32.cpp",
+  "output": "CMakeFiles/dfota_tools.dir/src/crc32.cpp.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/c++.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_CXX.rsp -mwindows -g -std=gnu++11 -o CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/dfota.cpp",
+  "output": "CMakeFiles/dfota_tools.dir/src/dfota.cpp.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/lzma.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/lzma/lzma.c.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/7zFile.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/lzma/src/7zFile.c.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzFind.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/lzma/src/LzFind.c.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaDec.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaDec.c.obj"
+},
+{
+  "directory": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/build",
+  "command": "D:/tools/mingw-w64-v7.3.0/mingw64/bin/gcc.exe -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB @CMakeFiles/dfota_tools.dir/includes_C.rsp -g -o CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj -c D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c",
+  "file": "D:/80_work/VS-Code-C/dfota/dfota_tools/dfota_tools/src/lzma/src/LzmaEnc.c",
+  "output": "CMakeFiles/dfota_tools.dir/src/lzma/src/LzmaEnc.c.obj"
+}
+]

+ 17 - 0
build_date_time.cpp

@@ -0,0 +1,17 @@
+// build_date_time.cpp
+#include "build_date_time.h"
+
+static time_t get_build_timestamp() {
+    struct tm tm_;
+    tm_.tm_year = ((BUILD_YEAR_CH0 - '0') * 1000 + (BUILD_YEAR_CH1 - '0') * 100 + (BUILD_YEAR_CH2 - '0') * 10 + (BUILD_YEAR_CH3 - '0')) - 1900;
+    tm_.tm_mon = ((BUILD_MONTH_CH0 - '0') * 10 + (BUILD_MONTH_CH1 - '0')) - 1;
+    tm_.tm_mday = (BUILD_DAY_CH0 - '0') * 10 + (BUILD_DAY_CH1 - '0');
+    tm_.tm_hour = (BUILD_HOUR_CH0 - '0') * 10 + (BUILD_HOUR_CH1 - '0');
+    tm_.tm_min = (BUILD_MIN_CH0 - '0') * 10 + (BUILD_MIN_CH1 - '0');
+    tm_.tm_sec = (BUILD_SEC_CH0 - '0') * 10 + (BUILD_SEC_CH1 - '0');
+    tm_.tm_isdst = 0;
+    return mktime(&tm_);
+}
+
+const char g_build_date_time[] = BUILD_DATE_TIME;
+time_t g_build_timestamp = get_build_timestamp();

+ 91 - 0
build_date_time.h

@@ -0,0 +1,91 @@
+/**
+ * @file build_date_time.h
+ * @brief 处理宏 __DATE__ 和 __TIME__.
+ * @author Leopard-C (leopard.c@outlook.com)
+ * @version 0.1
+ * @date 2023-05-22
+ *
+ * @copyright Copyright (c) 2023-present, Jinbao Chen.
+ */
+#ifndef IC_MACRO_BUILD_DATE_TIME_H_
+#define IC_MACRO_BUILD_DATE_TIME_H_
+#include <stdio.h>
+#include <time.h>
+
+ // Example of __DATE__ string: "May 22 2023"
+ //                              01234567890
+
+#define BUILD_YEAR_CH0 (__DATE__[ 7])
+#define BUILD_YEAR_CH1 (__DATE__[ 8])
+#define BUILD_YEAR_CH2 (__DATE__[ 9])
+#define BUILD_YEAR_CH3 (__DATE__[10])
+
+#define BUILD_MONTH_IS_JAN (__DATE__[0] == 'J' && __DATE__[1] == 'a' && __DATE__[2] == 'n')
+#define BUILD_MONTH_IS_FEB (__DATE__[0] == 'F')
+#define BUILD_MONTH_IS_MAR (__DATE__[0] == 'M' && __DATE__[1] == 'a' && __DATE__[2] == 'r')
+#define BUILD_MONTH_IS_APR (__DATE__[0] == 'A' && __DATE__[1] == 'p')
+#define BUILD_MONTH_IS_MAY (__DATE__[0] == 'M' && __DATE__[1] == 'a' && __DATE__[2] == 'y')
+#define BUILD_MONTH_IS_JUN (__DATE__[0] == 'J' && __DATE__[1] == 'u' && __DATE__[2] == 'n')
+#define BUILD_MONTH_IS_JUL (__DATE__[0] == 'J' && __DATE__[1] == 'u' && __DATE__[2] == 'l')
+#define BUILD_MONTH_IS_AUG (__DATE__[0] == 'A' && __DATE__[1] == 'u')
+#define BUILD_MONTH_IS_SEP (__DATE__[0] == 'S')
+#define BUILD_MONTH_IS_OCT (__DATE__[0] == 'O')
+#define BUILD_MONTH_IS_NOV (__DATE__[0] == 'N')
+#define BUILD_MONTH_IS_DEC (__DATE__[0] == 'D')
+
+#define BUILD_MONTH_CH0 \
+    ((BUILD_MONTH_IS_OCT || BUILD_MONTH_IS_NOV || BUILD_MONTH_IS_DEC) ? '1' : '0')
+
+#define BUILD_MONTH_CH1 \
+    ( \
+        (BUILD_MONTH_IS_JAN) ? '1' : \
+        (BUILD_MONTH_IS_FEB) ? '2' : \
+        (BUILD_MONTH_IS_MAR) ? '3' : \
+        (BUILD_MONTH_IS_APR) ? '4' : \
+        (BUILD_MONTH_IS_MAY) ? '5' : \
+        (BUILD_MONTH_IS_JUN) ? '6' : \
+        (BUILD_MONTH_IS_JUL) ? '7' : \
+        (BUILD_MONTH_IS_AUG) ? '8' : \
+        (BUILD_MONTH_IS_SEP) ? '9' : \
+        (BUILD_MONTH_IS_OCT) ? '0' : \
+        (BUILD_MONTH_IS_NOV) ? '1' : \
+        (BUILD_MONTH_IS_DEC) ? '2' : \
+        /* error default */    '?' \
+    )
+
+#define BUILD_DAY_CH0 ((__DATE__[4] >= '0') ? (__DATE__[4]) : '0')
+#define BUILD_DAY_CH1 (__DATE__[ 5])
+
+// Example of __TIME__ string: "01:38:46"
+//                              01234567
+
+#define BUILD_HOUR_CH0 (__TIME__[0])
+#define BUILD_HOUR_CH1 (__TIME__[1])
+
+#define BUILD_MIN_CH0 (__TIME__[3])
+#define BUILD_MIN_CH1 (__TIME__[4])
+
+#define BUILD_SEC_CH0 (__TIME__[6])
+#define BUILD_SEC_CH1 (__TIME__[7])
+
+// DateTime. Example: 2022-05-22 01:38:46
+#define BUILD_DATE_TIME \
+    {\
+        BUILD_YEAR_CH0, BUILD_YEAR_CH1, BUILD_YEAR_CH2, BUILD_YEAR_CH3,\
+        '-',\
+        BUILD_MONTH_CH0, BUILD_MONTH_CH1,\
+        '-',\
+        BUILD_DAY_CH0, BUILD_DAY_CH1,\
+        ' ',\
+        BUILD_HOUR_CH0, BUILD_HOUR_CH1,\
+        ':',\
+        BUILD_MIN_CH0, BUILD_MIN_CH1,\
+        ':',\
+        BUILD_SEC_CH0, BUILD_SEC_CH1,\
+        '\0'\
+    }
+
+extern const char g_build_date_time[];
+extern time_t g_build_timestamp;
+
+#endif // IC_MACRO_BUILD_DATE_TIME_H_

+ 10 - 0
dfotaConfig.h

@@ -0,0 +1,10 @@
+#ifndef _DFOTACONFIG_H_
+#define _DFOTACONFIG_H_
+
+#include <windows.h>
+
+#define APP_VERSION "DFOTA_TOOLS_V0002"
+#define DFOTACONFIG_FILE "./dfotaConfig.ini"
+
+
+#endif // _DFOTACONFIG_H_

+ 203 - 0
dfota_tools_zh_CN.ts

@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="zh_CN">
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="mainwindow.ui" line="14"/>
+        <source>MainWindow</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="27"/>
+        <source>输入信息</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="156"/>
+        <source>选择新bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="175"/>
+        <source>第1个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="182"/>
+        <source>第2个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="189"/>
+        <source>第3个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="196"/>
+        <source>第4个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="203"/>
+        <source>第5个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="210"/>
+        <source>第6个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="217"/>
+        <source>第7个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="224"/>
+        <source>第8个旧版本bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="253"/>
+        <source>打包bin文件</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="435"/>
+        <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;SimSun&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;注意事项:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;1,文件格式必须是【.bin】;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;2,文件名必须以版本号结尾例如:【XXXX_01013002.bin】;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;3,文件大小不能超过256K字节;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;4,主程序路径下会自动生成初始化文件【dfotaConfig.ini】,记录相关信息以备下次使用;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;5,输入的,无论新/旧文件,如果尾部有20个附加字节,则会被剪掉;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;6,生成的打包bin文件,与new文件同路径;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;7,在当前路径下,生成log子目录,存放日志文件;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;8,在当前路径下,生成tmp子目录,存放过程临时文件;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;9,生成包选项:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=0,z_flag=0,无差分,无压缩;只有new文件的内容,没有old文件内容&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=0,z_flag=1,无差分,有压缩;只有new文件的内容,没有old文件内容&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=1,z_flag=0,禁止选项&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=1,z_flag=1,有差分,有压缩;有new文件的内容,有old文件内容(最多8个old)&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="485"/>
+        <source>差分</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="504"/>
+        <source>压缩</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="590"/>
+        <source>时间戳测试:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="603"/>
+        <source>CRC32测试</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="635"/>
+        <source>STM32 CRC32测试:切掉尾部长度=</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="391"/>
+        <source>升级包生成</source>
+        <oldsource>打包</oldsource>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="364"/>
+        <source>全不选</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="371"/>
+        <source>全选</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="405"/>
+        <source>包校验</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="398"/>
+        <source>包读取</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="110"/>
+        <source>新bin文件入口地址:0x</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="120"/>
+        <source>80000000</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="130"/>
+        <source>例如0x80000000</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="412"/>
+        <source>清除日志</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="419"/>
+        <source>退出</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="520"/>
+        <source>--</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="539"/>
+        <source>测试2</source>
+        <oldsource>测试</oldsource>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="619"/>
+        <source>4</source>
+        <oldsource>0</oldsource>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="555"/>
+        <source>1900-00-00 00:00:00.000</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="574"/>
+        <source>0</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="676"/>
+        <source>File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="685"/>
+        <source>Open</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>

binární
exe/DFOTA_TOOLS_V0002.exe


+ 54 - 0
main.cpp

@@ -0,0 +1,54 @@
+#include "dfotaConfig.h"
+#include "mainwindow.h"
+#include "build_date_time.h"
+
+#include <iostream>
+#include <string.h>
+
+#include <QApplication>
+#include <QLocale>
+#include <QTranslator>
+#include <QTextCodec>
+#include <QMutex>
+#include <QDateTime>
+#include <QDebug>
+#include <QDir>
+
+
+using namespace std;
+
+ #pragma execution_character_set("UTF-8")
+
+
+
+int main(int argc, char *argv[])
+{
+    setbuf(stdout,NULL);
+    // QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
+
+    // 写初始化配置文件,程序版本
+    WritePrivateProfileString("APP_INFOMATION", "APP_VERSION", APP_VERSION, DFOTACONFIG_FILE);
+    // qDebug() << APP_VERSION << endl;
+    // 写初始化配置文件,成程序编译时间
+    WritePrivateProfileString("APP_INFOMATION", "APP_BUILD_TIME", g_build_date_time, DFOTACONFIG_FILE);
+    // qDebug() << g_build_date_time << endl;
+    //std::strlcat();
+    //std::snprintf();
+    QApplication a(argc, argv);
+
+    QTranslator translator;
+    const QStringList uiLanguages = QLocale::system().uiLanguages();
+    for (const QString &locale : uiLanguages) {
+        const QString baseName = "dfota_tools_" + QLocale(locale).name();
+        if (translator.load(":/i18n/" + baseName)) {
+            a.installTranslator(&translator);
+            break;
+        }
+    }
+    MainWindow w;
+    w.show();
+    return a.exec();
+}
+
+
+

+ 617 - 0
mainwindow.cpp

@@ -0,0 +1,617 @@
+#include "dfotaConfig.h"
+#include "./src/dfota.h"
+#include "./src/crc32.h"
+#include "mainwindow.h"
+#include "./ui_mainwindow.h"
+#include "build_date_time.h"
+
+#include "./src/dfota.h"
+#include "iostream"
+#include "string.h"
+#include <string>
+#include <QMutex>
+#include <QDateTime>
+#include <QDebug>
+#include <QDir>
+#include <iostream>
+//#include <QDialog>//
+#include <QFileDialog>
+#include <QMessageBox>
+
+
+
+using namespace std;
+
+DFOTA dfota;
+typedef struct WindowLE{
+    QLineEdit le_devType;
+    QLineEdit le_newFile;
+    QLineEdit le_oldFile[MAX_OLDFILES_NUM];
+    QLineEdit le_pkgFile;
+
+}WindowLE_t;
+
+
+
+//void appendMsgOut(MainWindow *w,QString msg){
+//    emit w->MainWindow::qdebug_signals(msg);
+//};
+
+QMutex mutex;
+Ui::MainWindow *pui;
+void MainWindow::appendlog(QString msg){
+
+    emit this->process_bar_signals(0,"开始...");
+}
+void MainWindow::myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
+{
+    pui->textEdit_log->append(msg);
+    pui->textEdit_log->moveCursor(QTextCursor::End);
+
+
+
+    // pw->appendMsgOut(msg);
+    //创建log文件夹
+    QDir dir("log");
+    if (!dir.exists())
+    {
+         QDir dir;
+         dir.mkdir("log");
+    }
+
+    //创建log文件
+    QString currentDate = QDateTime::currentDateTime().toString("yyyyMMdd");
+    QString logName = "log" + currentDate + ".txt";
+    QString logFileName = "log/" + logName;
+
+
+    // 加锁
+    mutex.lock();
+
+    QByteArray localMsg = msg.toLocal8Bit();
+
+    //信息分类
+    QString strMsg("");
+    switch(type)
+    {
+    case QtDebugMsg:
+        strMsg = QString("Debug:");
+        break;
+    case QtInfoMsg:
+        strMsg = QString("Info:");
+        break;
+    case QtWarningMsg:
+        strMsg = QString("Warning:");
+        break;
+    case QtCriticalMsg:
+        strMsg = QString("Critical:");
+        break;
+    case QtFatalMsg:
+        strMsg = QString("Fatal:");
+        break;
+
+        default:
+            break;
+    }
+
+
+    //Release 版本默认不包含context这些信息:文件名、函数名、行数,需要在.pro项目文件加入以下代码,加入后最好重新构建项目使之生效:
+    //DEFINES += QT_MESSAGELOGCONTEXT
+
+    //在.pro文件定义以下的宏,可以屏蔽相应的日志输出
+    //DEFINES += QT_NO_WARNING_OUTPUT
+    //DEFINES += QT_NO_DEBUG_OUTPUT
+    //DEFINES += QT_NO_INFO_OUTPUT
+
+
+    //文件名、函数名、行数
+    strMsg += QString("Function: %1  File: %2  Line: %3 ").arg(context.function).arg(context.file).arg(context.line);
+
+    // 时间和内容
+    QString strDateTime = QDateTime::currentDateTime().toString("hh:mm:ss");
+    // QString strMessage = QString("%1 %2:%3").arg(strDateTime).arg(strMsg).arg(localMsg.constData());
+    QString strMessage = QString("%1 %2").arg(strDateTime).arg(strMsg);
+
+    strMessage += msg;
+
+    //写入文件
+    QFile file(logFileName);
+    if (!file.open(QIODevice::WriteOnly | QIODevice::Append))
+    {
+        file.close();
+        // return ;
+    }
+    QTextStream stream(&file);
+    stream << strMessage << "\r\n";;
+    file.flush();
+    file.close();
+
+
+    // 解锁
+    mutex.unlock();
+
+}
+
+void MainWindow::getConfig()
+{
+
+    QDir dir("tmp");
+    if (!dir.exists())
+    {
+         QDir dir;
+         dir.mkdir("tmp");
+    }
+
+    char get_string[MAX_PATH];
+    memset(get_string,0,sizeof (get_string));
+    // qDebug("%s\r\n",DFOTACONFIG_FILE);
+
+    GetPrivateProfileString("newBinFile", "ep", "", get_string, 9, DFOTACONFIG_FILE);
+
+    bool ok;
+    uint32_t ep = ui->lineEdit_ep->text().toUInt(&ok,16);
+    if((not ok)||(ep < 0x08000000)||(ep>(0x80000000+0x40000000))){
+        ui->lineEdit_ep->setText("80000000");
+        WritePrivateProfileString("newBinFile", "ep", "80000000", DFOTACONFIG_FILE);
+    }
+
+    ui->lineEdit_ep->setText(get_string);
+    // qDebug("%s\r\n",get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("newBinFile", "file", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_newFile->setText(get_string);
+    // qDebug("%s\r\n",get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_1", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile0->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_2", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile1->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_3", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile2->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_4", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile3->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_5", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile4->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_6", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile5->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_7", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile6->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("oldBinFile", "file_8", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile7->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    GetPrivateProfileString("pkgBinFile", "file", "", get_string, MAX_PATH, DFOTACONFIG_FILE);
+    ui->lineEdit_pkgFile->setText(get_string);
+    memset(get_string,0,sizeof (get_string));
+
+    // ui->textEdit_log->setText("");
+}
+void MainWindow::ep_slot(){
+    bool ok;
+    uint32_t ep = ui->lineEdit_ep->text().toUInt(&ok,16);
+    if((not ok)||(ep < 0x08000000)||(ep>(0x80000000+0x40000000))){
+        ui->lineEdit_ep->setText("80000000");
+        return;
+    }
+    WritePrivateProfileString("newBinFile", "ep", ui->lineEdit_ep->text().toStdString().c_str(), DFOTACONFIG_FILE);
+
+}
+QString getFileDir(const char* path){
+
+    char drive[MAX_PATH] = {0};
+    char dir[MAX_PATH] = {0};
+    char filename[MAX_PATH] = {0};
+    char ext[MAX_PATH] = {0};
+    QString FileDir;
+
+    _splitpath_s(path, drive, dir,filename, ext);
+
+    if(strlen(path) == 0)
+        FileDir = "";
+    else
+        FileDir = QString::fromStdString(drive)+QString::fromStdString(dir);
+
+    return FileDir;
+}
+
+void MainWindow::openNewFile_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_newFile->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("newBinFile", "file", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_newFile->setText(s);
+}
+void MainWindow::openOldFile0_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile0->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_1", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile0->setText(s);
+}
+void MainWindow::openOldFile1_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile1->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_2", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile1->setText(s);
+}
+
+void MainWindow::openOldFile2_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile2->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_3", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile2->setText(s);
+}
+
+void MainWindow::openOldFile3_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile3->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_4", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile3->setText(s);
+}
+
+void MainWindow::openOldFile4_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile4->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_5", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile4->setText(s);
+}
+
+void MainWindow::openOldFile5_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile5->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_6", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile5->setText(s);
+}
+
+void MainWindow::openOldFile6_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile6->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_7", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile6->setText(s);
+}
+
+void MainWindow::openOldFile7_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_oldFile7->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("oldBinFile", "file_8", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_oldFile7->setText(s);
+}
+
+void MainWindow::openPkgFolder_slot(){
+    QString fileDir = getFileDir(ui->lineEdit_pkgFile->text().toStdString().c_str());
+    QString s = QFileDialog::getOpenFileName(this,"open file dialog",fileDir,"二进制文件(*.bin)");
+    if(s.length()==0)return;
+    WritePrivateProfileString("pkgBinFile", "file", s.toStdString().c_str(), DFOTACONFIG_FILE);
+    ui->lineEdit_pkgFile->setText(s);
+}
+
+void MainWindow::editNewFile_slot(){
+    WritePrivateProfileString("newBinFile", "file", ui->lineEdit_newFile->text().toStdString().c_str(), DFOTACONFIG_FILE);
+
+}
+void MainWindow::editOldFile0_slot(){
+    WritePrivateProfileString("oldBinFile", "file_1", ui->lineEdit_oldFile0->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+void MainWindow::editOldFile1_slot(){
+    WritePrivateProfileString("oldBinFile", "file_2", ui->lineEdit_oldFile1->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editOldFile2_slot(){
+    WritePrivateProfileString("oldBinFile", "file_3", ui->lineEdit_oldFile2->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editOldFile3_slot(){
+    WritePrivateProfileString("oldBinFile", "file_4", ui->lineEdit_oldFile3->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editOldFile4_slot(){
+    WritePrivateProfileString("oldBinFile", "file_5", ui->lineEdit_oldFile4->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editOldFile5_slot(){
+    WritePrivateProfileString("oldBinFile", "file_6", ui->lineEdit_oldFile5->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editOldFile6_slot(){
+    WritePrivateProfileString("oldBinFile", "file_7", ui->lineEdit_oldFile6->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editOldFile7_slot(){
+    WritePrivateProfileString("oldBinFile", "file_8", ui->lineEdit_oldFile7->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+void MainWindow::editPkgFolder_slot(){
+    WritePrivateProfileString("pkgBinFile", "file", ui->lineEdit_pkgFile->text().toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+InputData_t inputData;
+void MainWindow::pkg_creater_slot()
+{
+
+    bool ok;
+    memset(&inputData,0,sizeof(inputData));
+    // 获取输入参数
+    // inputData.devType = ui->lineEdit_devType->text().toUShort(&ok,16);
+    inputData.ep = ui->lineEdit_ep->text().toUInt(&ok,16);
+
+    memcpy_s(inputData.newFilePath,MAX_PATH,ui->lineEdit_newFile->text().toStdString().c_str(),ui->lineEdit_newFile->text().toStdString().length());
+
+    if(ui->checkBox_old0->checkState())
+        memcpy_s(inputData.oldFilePath[0],MAX_PATH,ui->lineEdit_oldFile0->text().toStdString().c_str(),ui->lineEdit_oldFile0->text().toStdString().length());
+    if(ui->checkBox_old1->checkState())
+        memcpy_s(inputData.oldFilePath[1],MAX_PATH,ui->lineEdit_oldFile1->text().toStdString().c_str(),ui->lineEdit_oldFile1->text().toStdString().length());
+    if(ui->checkBox_old2->checkState())
+        memcpy_s(inputData.oldFilePath[2],MAX_PATH,ui->lineEdit_oldFile2->text().toStdString().c_str(),ui->lineEdit_oldFile2->text().toStdString().length());
+    if(ui->checkBox_old3->checkState())
+        memcpy_s(inputData.oldFilePath[3],MAX_PATH,ui->lineEdit_oldFile3->text().toStdString().c_str(),ui->lineEdit_oldFile3->text().toStdString().length());
+    if(ui->checkBox_old4->checkState())
+        memcpy_s(inputData.oldFilePath[4],MAX_PATH,ui->lineEdit_oldFile4->text().toStdString().c_str(),ui->lineEdit_oldFile4->text().toStdString().length());
+    if(ui->checkBox_old5->checkState())
+        memcpy_s(inputData.oldFilePath[5],MAX_PATH,ui->lineEdit_oldFile5->text().toStdString().c_str(),ui->lineEdit_oldFile5->text().toStdString().length());
+    if(ui->checkBox_old6->checkState())
+        memcpy_s(inputData.oldFilePath[6],MAX_PATH,ui->lineEdit_oldFile6->text().toStdString().c_str(),ui->lineEdit_oldFile6->text().toStdString().length());
+    if(ui->checkBox_old7->checkState())
+        memcpy_s(inputData.oldFilePath[7],MAX_PATH,ui->lineEdit_oldFile7->text().toStdString().c_str(),ui->lineEdit_oldFile7->text().toStdString().length());
+
+    memcpy_s(inputData.pkgFilePath,MAX_PATH,ui->lineEdit_pkgFile->text().toStdString().c_str(),ui->lineEdit_pkgFile->text().toStdString().length());
+
+    inputData.check_d = ui->checkBox_d->checkState();
+    inputData.check_z = ui->checkBox_z->checkState();
+
+
+    dfota.bsdiff_task(this,&inputData);
+
+}
+
+void MainWindow::pkg_read_slot(){
+
+    memset(&inputData,0,sizeof(inputData));
+    memcpy_s(inputData.pkgFilePath,MAX_PATH,ui->lineEdit_pkgFile->text().toStdString().c_str(),ui->lineEdit_pkgFile->text().toStdString().length());
+
+    dfota.read_task(this,&inputData);
+}
+void MainWindow::pkg_check_slot(){
+    bool ok;
+    memset(&inputData,0,sizeof(inputData));
+
+    // 获取输入参数
+    memcpy_s(inputData.newFilePath,MAX_PATH,ui->lineEdit_newFile->text().toStdString().c_str(),ui->lineEdit_newFile->text().toStdString().length());
+
+    if(ui->checkBox_old0->checkState())
+        memcpy_s(inputData.oldFilePath[0],MAX_PATH,ui->lineEdit_oldFile0->text().toStdString().c_str(),ui->lineEdit_oldFile0->text().toStdString().length());
+    if(ui->checkBox_old1->checkState())
+        memcpy_s(inputData.oldFilePath[1],MAX_PATH,ui->lineEdit_oldFile1->text().toStdString().c_str(),ui->lineEdit_oldFile1->text().toStdString().length());
+    if(ui->checkBox_old2->checkState())
+        memcpy_s(inputData.oldFilePath[2],MAX_PATH,ui->lineEdit_oldFile2->text().toStdString().c_str(),ui->lineEdit_oldFile2->text().toStdString().length());
+    if(ui->checkBox_old3->checkState())
+        memcpy_s(inputData.oldFilePath[3],MAX_PATH,ui->lineEdit_oldFile3->text().toStdString().c_str(),ui->lineEdit_oldFile3->text().toStdString().length());
+    if(ui->checkBox_old4->checkState())
+        memcpy_s(inputData.oldFilePath[4],MAX_PATH,ui->lineEdit_oldFile4->text().toStdString().c_str(),ui->lineEdit_oldFile4->text().toStdString().length());
+    if(ui->checkBox_old5->checkState())
+        memcpy_s(inputData.oldFilePath[5],MAX_PATH,ui->lineEdit_oldFile5->text().toStdString().c_str(),ui->lineEdit_oldFile5->text().toStdString().length());
+    if(ui->checkBox_old6->checkState())
+        memcpy_s(inputData.oldFilePath[6],MAX_PATH,ui->lineEdit_oldFile6->text().toStdString().c_str(),ui->lineEdit_oldFile6->text().toStdString().length());
+    if(ui->checkBox_old7->checkState())
+        memcpy_s(inputData.oldFilePath[7],MAX_PATH,ui->lineEdit_oldFile7->text().toStdString().c_str(),ui->lineEdit_oldFile7->text().toStdString().length());
+
+    memcpy_s(inputData.pkgFilePath,MAX_PATH,ui->lineEdit_pkgFile->text().toStdString().c_str(),ui->lineEdit_pkgFile->text().toStdString().length());
+
+    inputData.check_d = ui->checkBox_d->checkState();
+    inputData.check_z = ui->checkBox_z->checkState();
+
+
+    dfota.check_task(this,&inputData);
+
+}
+
+void MainWindow::bt_clrLog_solt(){
+    ui->textEdit_log->setText("");
+}
+
+void MainWindow::process_bar_solt(int p,QString msg){
+    ui->progressBar->setValue(p);
+    ui->label_bar_msg->setText(msg);
+}
+
+void MainWindow::pkg_set_path_solt(QString msg){
+    ui->lineEdit_pkgFile->setText(msg);
+    WritePrivateProfileString("pkgBinFile", "file", msg.toStdString().c_str(), DFOTACONFIG_FILE);
+}
+
+//PartiallyChecked
+void MainWindow::checkBox_all_solt(){
+    ui->checkBox_old0->setCheckState(Qt::Checked);
+    ui->checkBox_old1->setCheckState(Qt::Checked);
+    ui->checkBox_old2->setCheckState(Qt::Checked);
+    ui->checkBox_old3->setCheckState(Qt::Checked);
+    ui->checkBox_old4->setCheckState(Qt::Checked);
+    ui->checkBox_old5->setCheckState(Qt::Checked);
+    ui->checkBox_old6->setCheckState(Qt::Checked);
+    ui->checkBox_old7->setCheckState(Qt::Checked);
+}
+void MainWindow::checkBox_none_solt(){
+    ui->checkBox_old0->setCheckState(Qt::Unchecked);
+    ui->checkBox_old1->setCheckState(Qt::Unchecked);
+    ui->checkBox_old2->setCheckState(Qt::Unchecked);
+    ui->checkBox_old3->setCheckState(Qt::Unchecked);
+    ui->checkBox_old4->setCheckState(Qt::Unchecked);
+    ui->checkBox_old5->setCheckState(Qt::Unchecked);
+    ui->checkBox_old6->setCheckState(Qt::Unchecked);
+    ui->checkBox_old7->setCheckState(Qt::Unchecked);
+}
+
+void MainWindow::checkBox_d_solt(){
+    // d=0,z=0,-> d=0,z=0
+    // d=0,z=Z,-> d=0,z=Z
+    // d=1,z=0,-> 禁止
+    // d=D,z=Z,-> d=D,z=Z
+
+    if(ui->checkBox_d->checkState()==Qt::Checked&&ui->checkBox_z->checkState()==Qt::Unchecked){
+        QMessageBox::warning(this,"DFOTA","不允许的操作,有差分则必须有压缩");
+        ui->checkBox_d->setCheckState(Qt::Checked);ui->checkBox_z->setCheckState(Qt::Checked);
+    }
+}
+
+void MainWindow::checkBox_z_solt(){
+    // d=0,z=0,-> d=0,z=0
+    // d=0,z=Z,-> d=0,z=Z
+    // d=1,z=0,-> 禁止
+    // d=D,z=Z,-> d=D,z=Z
+
+    if(ui->checkBox_d->checkState()==Qt::Checked&&ui->checkBox_z->checkState()==Qt::Unchecked){
+        QMessageBox::warning(this,"DFOTA","不允许的操作,有差分则必须有压缩");
+        ui->checkBox_d->setCheckState(Qt::Checked);ui->checkBox_z->setCheckState(Qt::Checked);
+    }
+}
+
+void MainWindow::editTimeStamp_slot(){
+    char logMsg[256]={0};
+    bool ok;
+    time_t stamp = ui->lineEdit_time_stamp->text().toUInt();
+    get_stamp2string_s(stamp,logMsg);
+    ui->lineEdit_time_string->setText(logMsg);
+    return;
+}
+
+void MainWindow::editTimeString_slot(){
+    return;
+}
+
+void MainWindow::crc32_test_slot(){
+    bool ok;
+    int tail =0;
+
+    QString path = "";
+    uint8_t* buff = nullptr;
+    int size=0;
+    uint32_t crc=0;
+    int result=0;
+    char logMsg[256]={0};
+    int logLen=0;
+
+    path = QFileDialog::getOpenFileName(this,"请打开需要crc32计算的bin文件","./","二进制文件(*.bin)");
+    if(path.length() == 0) return;
+
+    buff = (uint8_t*)malloc(MAX_BIN_SIZE);
+    if(buff==nullptr) return;
+
+    result = my_fr(path.toStdString().c_str(),buff,&size);
+    if(result<=0)return;
+
+
+    if(size>MAX_BIN_SIZE){
+        QMessageBox::warning(this,"crc32测试结果","选择的文件 太大 了");
+       if(buff) free(buff);
+       return;
+    }
+    if((size-tail)<4){
+        QMessageBox::warning(this,"crc32测试结果","选择的文件 太小 了");
+       if(buff) free(buff);
+       return;
+    }
+    tail = ui->lineEdit_crc32_test->text().toUInt(&ok);
+    crc = crc32((uint32_t*)buff,(size-tail)/4);
+
+    snprintf(logMsg,sizeof(logMsg),"tail=%d,crc32 = 0x%08X.\r\n%s.\r\n",tail,crc,path.toStdString().c_str());
+    qDebug() << logMsg;
+    QMessageBox::warning(this,"crc32测试结果",logMsg);
+    if(buff) free(buff);
+}
+
+void MainWindow::test_solt(){
+    dfota_test();
+}
+
+MainWindow::MainWindow(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::MainWindow)
+{
+    char logMsg[256]={0};
+    ui->setupUi(this);
+    snprintf(logMsg,sizeof(logMsg),"%s (build %s)",APP_VERSION,g_build_date_time);
+    this->setWindowTitle(logMsg);
+    pui = ui;
+    qInstallMessageHandler(MainWindow::myMessageOutput);
+    getConfig();
+
+    ui->lineEdit_time_stamp->setText(QString::number(time(NULL)));
+    get_stamp2string_s(time(NULL),logMsg);
+    ui->lineEdit_time_string->setText(logMsg);
+
+    connect(ui->lineEdit_ep, SIGNAL(editingFinished()),this,SLOT(ep_slot()));
+
+    connect(ui->pushButton_newFile, SIGNAL(clicked()),this,SLOT(openNewFile_slot()));
+    connect(ui->pushButton_oldFile0,SIGNAL(clicked()),this,SLOT(openOldFile0_slot()));
+    connect(ui->pushButton_oldFile1,SIGNAL(clicked()),this,SLOT(openOldFile1_slot()));
+    connect(ui->pushButton_oldFile2,SIGNAL(clicked()),this,SLOT(openOldFile2_slot()));
+    connect(ui->pushButton_oldFile3,SIGNAL(clicked()),this,SLOT(openOldFile3_slot()));
+    connect(ui->pushButton_oldFile4,SIGNAL(clicked()),this,SLOT(openOldFile4_slot()));
+    connect(ui->pushButton_oldFile5,SIGNAL(clicked()),this,SLOT(openOldFile5_slot()));
+    connect(ui->pushButton_oldFile6,SIGNAL(clicked()),this,SLOT(openOldFile6_slot()));
+    connect(ui->pushButton_oldFile7,SIGNAL(clicked()),this,SLOT(openOldFile7_slot()));
+    connect(ui->pushButton_pkgFile, SIGNAL(clicked()),this,SLOT(openPkgFolder_slot()));
+
+
+    connect(ui->lineEdit_newFile,SIGNAL(editingFinished()),this,SLOT(editNewFile_slot()));
+    connect(ui->lineEdit_oldFile0,SIGNAL(editingFinished()),this,SLOT(editOldFile0_slot()));
+    connect(ui->lineEdit_oldFile1,SIGNAL(editingFinished()),this,SLOT(editOldFile1_slot()));
+    connect(ui->lineEdit_oldFile2,SIGNAL(editingFinished()),this,SLOT(editOldFile2_slot()));
+    connect(ui->lineEdit_oldFile3,SIGNAL(editingFinished()),this,SLOT(editOldFile3_slot()));
+    connect(ui->lineEdit_oldFile4,SIGNAL(editingFinished()),this,SLOT(editOldFile4_slot()));
+    connect(ui->lineEdit_oldFile5,SIGNAL(editingFinished()),this,SLOT(editOldFile5_slot()));
+    connect(ui->lineEdit_oldFile6,SIGNAL(editingFinished()),this,SLOT(editOldFile6_slot()));
+    connect(ui->lineEdit_oldFile7,SIGNAL(editingFinished()),this,SLOT(editOldFile7_slot()));
+    connect(ui->lineEdit_pkgFile,SIGNAL(editingFinished()),this,SLOT(editPkgFolder_slot()));
+
+    connect(ui->pushButton_pkg_create,SIGNAL(clicked()),this,SLOT(pkg_creater_slot()));
+    connect(ui->pushButton_pkg_check,SIGNAL(clicked()),this,SLOT(pkg_check_slot()));
+    connect(ui->pushButton_pkg_read,SIGNAL(clicked()),this,SLOT(pkg_read_slot()));
+    connect(ui->pushButton_clrLog,SIGNAL(clicked()),this,SLOT(bt_clrLog_solt()));
+    connect(ui->pushButton_exit,SIGNAL(clicked()),this,SLOT(close()));
+
+    connect(ui->pushButton_check_all,SIGNAL(clicked()),this,SLOT(checkBox_all_solt()));
+    connect(ui->pushButton_check_none,SIGNAL(clicked()),this,SLOT(checkBox_none_solt()));
+
+    connect(ui->checkBox_d,SIGNAL(released()),this,SLOT(checkBox_d_solt()));
+    connect(ui->checkBox_z,SIGNAL(released()),this,SLOT(checkBox_z_solt()));
+
+    connect(this,SIGNAL(process_bar_signals(int,QString)),this,SLOT(process_bar_solt(int,QString)));
+    connect(this,SIGNAL(qdebug_signals(QString)),ui->textEdit_log,SLOT(append(QString)));
+    connect(this,SIGNAL(pkg_set_path_signals(QString)),this,SLOT(pkg_set_path_solt(QString)));
+
+    connect(ui->lineEdit_time_stamp,SIGNAL(editingFinished()),this,SLOT(editTimeStamp_slot()));
+    connect(ui->lineEdit_time_string,SIGNAL(editingFinished()),this,SLOT(editTimeString_slot()));
+
+    connect(ui->pushButton_test,SIGNAL(clicked()),this,SLOT(test_solt()));
+    connect(ui->pushButton_crc32_test,SIGNAL(clicked()),this,SLOT(crc32_test_slot()));
+}
+
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+

+ 75 - 0
mainwindow.h

@@ -0,0 +1,75 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+namespace Ui { class MainWindow; }
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    MainWindow(QWidget *parent = nullptr);
+    ~MainWindow();
+    static void  myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
+private:
+    Ui::MainWindow *ui;
+    void getConfig();
+    void appendlog(QString);
+
+    // 私有槽函数
+private slots:
+    // 声明自定义槽函数
+    void ep_slot();
+    void openNewFile_slot();
+    void openOldFile0_slot();
+    void openOldFile1_slot();
+    void openOldFile2_slot();
+    void openOldFile3_slot();
+    void openOldFile4_slot();
+    void openOldFile5_slot();
+    void openOldFile6_slot();
+    void openOldFile7_slot();
+    void openPkgFolder_slot();
+
+    void editNewFile_slot();
+    void editOldFile0_slot();
+    void editOldFile1_slot();
+    void editOldFile2_slot();
+    void editOldFile3_slot();
+    void editOldFile4_slot();
+    void editOldFile5_slot();
+    void editOldFile6_slot();
+    void editOldFile7_slot();
+    void editPkgFolder_slot();
+
+    void pkg_creater_slot();
+    void pkg_check_slot();
+    void pkg_read_slot();
+    void bt_clrLog_solt();
+
+    void checkBox_all_solt();
+    void checkBox_none_solt();
+
+    void checkBox_d_solt();
+    void checkBox_z_solt();
+
+    void process_bar_solt(int p, QString msg);
+    void pkg_set_path_solt(QString msg);
+
+    void editTimeStamp_slot();
+    void editTimeString_slot();
+
+    void test_solt();
+    void crc32_test_slot();
+
+signals:
+    void process_bar_signals(int p, QString msg);
+    void qdebug_signals(QString);
+    void pkg_set_path_signals(QString msg);
+};
+
+#endif // MAINWINDOW_H

+ 691 - 0
mainwindow.ui

@@ -0,0 +1,691 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1288</width>
+    <height>790</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QGroupBox" name="groupBox">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>90</y>
+      <width>481</width>
+      <height>651</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>输入信息</string>
+    </property>
+    <widget class="QWidget" name="verticalLayoutWidget">
+     <property name="geometry">
+      <rect>
+       <x>9</x>
+       <y>139</y>
+       <width>251</width>
+       <height>451</height>
+      </rect>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile0">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile1">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile2">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile3">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile4">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile5">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile6">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_oldFile7">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="horizontalLayoutWidget">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>20</y>
+       <width>392</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>新bin文件入口地址:0x</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit_ep">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="text">
+         <string>80000000</string>
+        </property>
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>例如0x80000000</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="horizontalLayoutWidget_2">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>70</y>
+       <width>371</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QLineEdit" name="lineEdit_newFile">
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_newFile">
+        <property name="text">
+         <string>选择新bin文件</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="verticalLayoutWidget_2">
+     <property name="geometry">
+      <rect>
+       <x>269</x>
+       <y>139</y>
+       <width>171</width>
+       <height>451</height>
+      </rect>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile0">
+        <property name="text">
+         <string>第1个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile1">
+        <property name="text">
+         <string>第2个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile2">
+        <property name="text">
+         <string>第3个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile3">
+        <property name="text">
+         <string>第4个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile4">
+        <property name="text">
+         <string>第5个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile5">
+        <property name="text">
+         <string>第6个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile6">
+        <property name="text">
+         <string>第7个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_oldFile7">
+        <property name="text">
+         <string>第8个旧版本bin文件</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="horizontalLayoutWidget_3">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>589</y>
+       <width>431</width>
+       <height>51</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_3">
+      <item>
+       <widget class="QLineEdit" name="lineEdit_pkgFile">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="placeholderText">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_pkgFile">
+        <property name="text">
+         <string>打包bin文件</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="verticalLayoutWidget_3">
+     <property name="geometry">
+      <rect>
+       <x>450</x>
+       <y>130</y>
+       <width>31</width>
+       <height>461</height>
+      </rect>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <widget class="QCheckBox" name="checkBox_old0">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old1">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old2">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old3">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old4">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old5">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old6">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_old7">
+        <property name="text">
+         <string/>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="horizontalLayoutWidget_5">
+     <property name="geometry">
+      <rect>
+       <x>270</x>
+       <y>110</y>
+       <width>195</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <item>
+       <widget class="QPushButton" name="pushButton_check_none">
+        <property name="text">
+         <string>全不选</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_check_all">
+        <property name="text">
+         <string>全选</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="horizontalLayoutWidget_4">
+    <property name="geometry">
+     <rect>
+      <x>730</x>
+      <y>30</y>
+      <width>551</width>
+      <height>51</height>
+     </rect>
+    </property>
+    <layout class="QHBoxLayout" name="horizontalLayout_4">
+     <item>
+      <widget class="QPushButton" name="pushButton_pkg_create">
+       <property name="text">
+        <string>升级包生成</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_pkg_read">
+       <property name="text">
+        <string>包读取</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_pkg_check">
+       <property name="text">
+        <string>包校验</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_clrLog">
+       <property name="text">
+        <string>清除日志</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_exit">
+       <property name="text">
+        <string>退出</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </widget>
+   <widget class="QTextEdit" name="textEdit_log">
+    <property name="geometry">
+     <rect>
+      <x>520</x>
+      <y>80</y>
+      <width>761</width>
+      <height>621</height>
+     </rect>
+    </property>
+    <property name="html">
+     <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;注意事项:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;1,文件格式必须是【.bin】;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;2,文件名必须以版本号结尾例如:【XXXX_01013002.bin】;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;3,文件大小不能超过256K字节;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;4,主程序路径下会自动生成初始化文件【dfotaConfig.ini】,记录相关信息以备下次使用;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;5,输入的,无论新/旧文件,如果尾部有20个附加字节,则会被剪掉;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;6,生成的打包bin文件,与new文件同路径;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;7,在当前路径下,生成log子目录,存放日志文件;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;8,在当前路径下,生成tmp子目录,存放过程临时文件;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;9,生成包选项:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=0,z_flag=0,无差分,无压缩;只有new文件的内容,没有old文件内容&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=0,z_flag=1,无差分,有压缩;只有new文件的内容,没有old文件内容&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=1,z_flag=0,禁止选项&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	d_flag=1,z_flag=1,有差分,有压缩;有new文件的内容,有old文件内容(最多8个old)&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;	&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+    </property>
+   </widget>
+   <widget class="QProgressBar" name="progressBar">
+    <property name="geometry">
+     <rect>
+      <x>520</x>
+      <y>710</y>
+      <width>751</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="value">
+     <number>24</number>
+    </property>
+   </widget>
+   <widget class="QCheckBox" name="checkBox_d">
+    <property name="geometry">
+     <rect>
+      <x>570</x>
+      <y>40</y>
+      <width>61</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="layoutDirection">
+     <enum>Qt::RightToLeft</enum>
+    </property>
+    <property name="autoFillBackground">
+     <bool>false</bool>
+    </property>
+    <property name="text">
+     <string>差分</string>
+    </property>
+    <property name="checked">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QCheckBox" name="checkBox_z">
+    <property name="geometry">
+     <rect>
+      <x>650</x>
+      <y>40</y>
+      <width>51</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="layoutDirection">
+     <enum>Qt::RightToLeft</enum>
+    </property>
+    <property name="text">
+     <string>压缩</string>
+    </property>
+    <property name="checked">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_bar_msg">
+    <property name="geometry">
+     <rect>
+      <x>623</x>
+      <y>705</y>
+      <width>491</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>--</string>
+    </property>
+    <property name="alignment">
+     <set>Qt::AlignCenter</set>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="pushButton_test">
+    <property name="enabled">
+     <bool>false</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>1180</x>
+      <y>0</y>
+      <width>104</width>
+      <height>28</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>测试2</string>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_time_string">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>250</x>
+      <y>0</y>
+      <width>221</width>
+      <height>21</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>1900-00-00 00:00:00.000</string>
+    </property>
+    <property name="placeholderText">
+     <string/>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_time_stamp">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>120</x>
+      <y>0</y>
+      <width>111</width>
+      <height>21</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>0</string>
+    </property>
+    <property name="placeholderText">
+     <string/>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_time_stamp">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>0</y>
+      <width>91</width>
+      <height>21</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>时间戳测试:</string>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="pushButton_crc32_test">
+    <property name="geometry">
+     <rect>
+      <x>350</x>
+      <y>40</y>
+      <width>121</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>CRC32测试</string>
+    </property>
+   </widget>
+   <widget class="QLineEdit" name="lineEdit_crc32_test">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>250</x>
+      <y>40</y>
+      <width>81</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>4</string>
+    </property>
+    <property name="placeholderText">
+     <string/>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_3">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>40</y>
+      <width>231</width>
+      <height>29</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>STM32 CRC32测试:切掉尾部长度=</string>
+    </property>
+   </widget>
+   <widget class="Line" name="line">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>20</y>
+      <width>461</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="orientation">
+     <enum>Qt::Horizontal</enum>
+    </property>
+   </widget>
+   <widget class="Line" name="line_2">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>70</y>
+      <width>461</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="orientation">
+     <enum>Qt::Horizontal</enum>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1288</width>
+     <height>26</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>File</string>
+    </property>
+    <addaction name="actionOpen"/>
+   </widget>
+   <addaction name="menuFile"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionOpen">
+   <property name="text">
+    <string>Open</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 522 - 0
src/bsdiff/bsdiff.c

@@ -0,0 +1,522 @@
+/*-
+ * Copyright 2003-2005 Colin Percival
+ * Copyright 2012 Matthew Endsley
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted providing that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* 如果采用了C++,下述代码extern "C"有效,extern "C"{}中代码使用C编译器 */
+
+
+
+
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include "bsdiff.h"
+
+#include <limits.h>
+#include <string.h>
+
+#define MIN(x,y) (((x)<(y)) ? (x) : (y))
+
+// #define DEBUG
+#ifdef DEBUG
+#define debug_fln(format, ...)                     \
+    do                                         \
+    {                                          \
+        printf("%s(%d):", __func__, __LINE__); \
+        printf(format, ##__VA_ARGS__);         \
+        printf("\r\n");                        \
+    } while (0)
+#define debug(format, ...)                     \
+    do                                         \
+    {                                          \
+        printf(format, ##__VA_ARGS__);         \
+    } while (0)
+#else
+#define debug_fln(...)	
+#define debug(...)	
+#endif
+
+static void split(int64_t *I,int64_t *V,int64_t start,int64_t len,int64_t h)
+{
+	int64_t i,j,k,x,tmp,jj,kk;
+
+	if(len<16) {
+		for(k=start;k<start+len;k+=j) {
+			j=1;x=V[I[k]+h];
+			for(i=1;k+i<start+len;i++) {
+				if(V[I[k+i]+h]<x) {
+					x=V[I[k+i]+h];
+					j=0;
+				};
+				if(V[I[k+i]+h]==x) {
+					tmp=I[k+j];I[k+j]=I[k+i];I[k+i]=tmp;
+					j++;
+				};
+			};
+			for(i=0;i<j;i++) V[I[k+i]]=k+j-1;
+			if(j==1) I[k]=-1;
+		};
+		return;
+	};
+
+	x=V[I[start+len/2]+h];
+	jj=0;kk=0;
+	for(i=start;i<start+len;i++) {
+		if(V[I[i]+h]<x) jj++;
+		if(V[I[i]+h]==x) kk++;
+	};
+	jj+=start;kk+=jj;
+
+	i=start;j=0;k=0;
+	while(i<jj) {
+		if(V[I[i]+h]<x) {
+			i++;
+		} else if(V[I[i]+h]==x) {
+			tmp=I[i];I[i]=I[jj+j];I[jj+j]=tmp;
+			j++;
+		} else {
+			tmp=I[i];I[i]=I[kk+k];I[kk+k]=tmp;
+			k++;
+		};
+	};
+
+	while(jj+j<kk) {
+		if(V[I[jj+j]+h]==x) {
+			j++;
+		} else {
+			tmp=I[jj+j];I[jj+j]=I[kk+k];I[kk+k]=tmp;
+			k++;
+		};
+	};
+
+	if(jj>start) split(I,V,start,jj-start,h);
+
+	for(i=0;i<kk-jj;i++) V[I[jj+i]]=kk-1;
+	if(jj==kk-1) I[jj]=-1;
+
+	if(start+len>kk) split(I,V,kk,start+len-kk,h);
+}
+
+void print_c(uint8_t c){
+	if(isprint(c)) 
+		debug("%c",c);
+	else
+		debug("\\%02X",c);
+}
+
+
+void print_I(int64_t *I,const uint8_t *old,int64_t oldsize){
+#ifdef DEBUG
+	#define PRINT_MAX_LEN (40)	//每行如果太多,限制一下长度,否则打印内容太多,
+	#define PRINT_MAX_NUM (50)	//行数如果太多,限制一下,否则打印内容太多
+	int64_t i,j;
+
+	printf("打印字典,start...\r\n");
+
+	if(oldsize+1 < PRINT_MAX_NUM){
+		for(i=0;i<oldsize+1;i++) {
+			printf("%06llu,%06llu,",i,I[i]);
+			if (oldsize+1-I[i] < PRINT_MAX_LEN+2){
+				for(j=I[i];j<oldsize;j++)print_c(old[j]);
+			}
+			else{
+				for(j=I[i];j<I[i]+PRINT_MAX_LEN/2;j++)print_c(old[j]);
+                printf("..%llu Byte(s)..",oldsize - I[i] - PRINT_MAX_LEN);
+				for(j=oldsize - PRINT_MAX_LEN/2;j<oldsize;j++)print_c(old[j]);
+			}
+			printf("\r\n");
+		}
+	}
+	else{
+		for(i=0;i<PRINT_MAX_NUM/2;i++) {
+			printf("%06llu,%06llu,",i,I[i]);
+			if (oldsize+1-I[i] < PRINT_MAX_LEN+2){
+				for(j=I[i];j<oldsize;j++)print_c(old[j]);
+			}
+			else{
+				for(j=I[i];j<I[i]+PRINT_MAX_LEN/2;j++)print_c(old[j]);
+                printf("..%llu Byte(s)..",oldsize - I[i] - PRINT_MAX_LEN);
+				for(j=oldsize - PRINT_MAX_LEN/2;j<oldsize;j++)print_c(old[j]);
+			}
+			printf("\r\n");
+		}
+        printf("...%llu line(s)...\r\n",oldsize + 1 - PRINT_MAX_NUM);
+		
+		for(i=oldsize +1 - PRINT_MAX_NUM/2;i<oldsize +1;i++) {
+			printf("%06llu,%06llu,",i,I[i]);
+			if (oldsize+1-I[i] < PRINT_MAX_LEN+2){
+				for(j=I[i];j<oldsize;j++)print_c(old[j]);
+			}
+			else{
+				for(j=I[i];j<I[i]+PRINT_MAX_LEN/2;j++)print_c(old[j]);
+                printf("..%llu Byte(s)..",oldsize - I[i] - PRINT_MAX_LEN);
+				for(j=oldsize - PRINT_MAX_LEN/2;j<oldsize;j++)print_c(old[j]);
+			}
+			printf("\r\n");
+		}
+	}
+	printf("打印字典,end\r\n");
+#endif
+}
+static void qsufsort(int64_t *I,int64_t *V,const uint8_t *old,int64_t oldsize)
+{
+	int64_t buckets[256];
+	int64_t i,h,len,j;
+
+	for(i=0;i<256;i++) buckets[i]=0;
+	for(i=0;i<oldsize;i++) buckets[old[i]]++;
+	for(i=1;i<256;i++) buckets[i]+=buckets[i-1];
+	for(i=255;i>0;i--) buckets[i]=buckets[i-1];
+	buckets[0]=0;
+
+	for(i=0;i<oldsize;i++) I[++buckets[old[i]]]=i;
+	I[0]=oldsize;
+	for(i=0;i<oldsize;i++) V[i]=buckets[old[i]];
+	V[oldsize]=0;
+	for(i=1;i<256;i++) if(buckets[i]==buckets[i-1]+1) I[buckets[i]]=-1;
+	I[0]=-1;
+
+	for(h=1;I[0]!=-(oldsize+1);h+=h) {
+		len=0;
+		for(i=0;i<oldsize+1;) {
+			if(I[i]<0) {
+				len-=I[i];
+				i-=I[i];
+			} else {
+				if(len) I[i-len]=-len;
+				len=V[I[i]]+1-i;
+				split(I,V,i,len,h);
+				i+=len;
+				len=0;
+			};
+		};
+		if(len) I[i-len]=-len;
+	};
+
+	for(i=0;i<oldsize+1;i++) I[V[i]]=i;
+	print_I(I,old,oldsize);
+}
+
+static int64_t matchlen(const uint8_t *old,int64_t oldsize,const uint8_t *newbuf,int64_t newsize)
+{
+	int64_t i;
+
+	for(i=0;(i<oldsize)&&(i<newsize);i++)
+        if(old[i]!=newbuf[i]) break;
+
+	return i;
+}
+
+static int64_t search(const int64_t *I,const uint8_t *old,int64_t oldsize,
+        const uint8_t *newbuf,int64_t newsize,int64_t st,int64_t en,int64_t *pos)
+{
+	int64_t x,y;
+
+	if(en-st<2) {
+        x=matchlen(old+I[st],oldsize-I[st],newbuf,newsize);
+        y=matchlen(old+I[en],oldsize-I[en],newbuf,newsize);
+
+		if(x>y) {
+			*pos=I[st];
+			return x;
+		} else {
+			*pos=I[en];
+			return y;
+		}
+	};
+
+	x=st+(en-st)/2;
+    if(memcmp(old+I[x],newbuf,MIN(oldsize-I[x],newsize))<0) {
+        return search(I,old,oldsize,newbuf,newsize,x,en,pos);
+	} else {
+        return search(I,old,oldsize,newbuf,newsize,st,x,pos);
+	};
+}
+
+void offtout(int64_t x,uint8_t *buf)
+{
+	int64_t y;
+
+	if(x<0) y=-x; else y=x;
+
+	buf[0]=y%256;y-=buf[0];
+	y=y/256;buf[1]=y%256;y-=buf[1];
+	y=y/256;buf[2]=y%256;y-=buf[2];
+	y=y/256;buf[3]=y%256;y-=buf[3];
+	y=y/256;buf[4]=y%256;y-=buf[4];
+	y=y/256;buf[5]=y%256;y-=buf[5];
+	y=y/256;buf[6]=y%256;y-=buf[6];
+	y=y/256;buf[7]=y%256;
+
+	if(x<0) buf[7]|=0x80;
+}
+/*
+static int64_t writedata(struct bsdiff_stream* stream, const void* buffer, int64_t length)
+{
+	int64_t result = 0;
+
+	while (length > 0)
+	{
+		const int smallsize = (int)MIN(length, INT_MAX);
+		const int writeresult = stream->write(stream, buffer, smallsize);
+		if (writeresult == -1)
+		{
+			return -1;
+		}
+
+		result += writeresult;
+		length -= smallsize;
+		buffer = (uint8_t*)buffer + smallsize;
+	}
+
+	return result;
+}
+*/
+int stream_cpy(struct bsdiff_stream* stream,void* src,int64_t size)
+{
+    memcmp(stream->opaque,src,size);
+    stream->opaque += size;
+    stream->size += size;
+    return 0;
+}
+
+struct bsdiff_request
+{
+	const uint8_t* old;
+	int64_t oldsize;
+    const uint8_t* newbuf;
+	int64_t newsize;
+    // struct bsdiff_stream* stream;
+	int64_t *I;
+	uint8_t *buffer;
+};
+
+static int bsdiff_internal(const struct bsdiff_request req, uint8_t* diffbuff,uint64_t* diffsize)
+{
+	int64_t *I,*V;
+	int64_t scan,pos,len;
+	int64_t lastscan,lastpos,lastoffset;
+	int64_t oldscore,scsc;
+	int64_t s,Sf,lenf,Sb,lenb;
+	int64_t overlap,Ss,lens;
+	int64_t i;
+	uint8_t *buffer;
+	uint8_t buf[8 * 3];
+
+    uint8_t *rs_p = diffbuff;
+    uint64_t rs_size = 0;
+
+    int64_t x=0,y=0,z=0;
+    int64_t x_max=0,y_max=0,z_max=0;
+
+
+    if((V=malloc((req.oldsize+1)*sizeof(int64_t)))==NULL) return -1;
+	I = req.I;
+
+	qsufsort(I,V,req.old,req.oldsize);
+    free(V);
+
+	buffer = req.buffer;
+
+	/* Compute the differences, writing ctrl as we go */
+	scan=0;len=0;pos=0;
+	lastscan=0;lastpos=0;lastoffset=0;
+	while(scan<req.newsize) {
+		oldscore=0;
+
+        // 循环处理新文件数据,找到代码操作导致二进制数据相差字节多于8bytes的偏移点
+		for(scsc=scan+=len;scan<req.newsize;scan++) {
+            // 新版本文件和老版本文件都从数据开头开始,通过二分法,在整个后缀数组I中找到与新版本数据匹配最长的长度len和数组编号pos
+            // 返回的数组编号即为在老版本文件中的偏移
+            len=search(I,req.old,req.oldsize,req.newbuf+scan,req.newsize-scan,
+					0,req.oldsize,&pos);
+            //debug("len=%8lld,pos=%8lld\r\n",len,pos);
+
+            // 计算出当前偏移的old数据与new数据相同的字节个数,再与len比较
+			for(;scsc<scan+len;scsc++)
+			if((scsc+lastoffset<req.oldsize) &&
+                (req.old[scsc+lastoffset] == req.newbuf[scsc]))
+                oldscore++;
+
+            // 如果相差大于8则退出for循环,下面则对这一段数据进行处理
+			if(((len==oldscore) && (len!=0)) || 
+				(len>oldscore+8)) break;
+
+            // 如果相差小于8则继续for循环。相差小于8,可以认为插入的数据较少,没必要切换old数据的offset,每切换一次就需要进行一次diff和extra处理。
+			if((scan+lastoffset<req.oldsize) &&
+                (req.old[scan+lastoffset] == req.newbuf[scan]))
+				oldscore--;
+		};
+
+        // 对上一个位置到新位置之间的数据进行处理
+		if((len!=oldscore) || (scan==req.newsize)) {
+            // 计算diff string的长度
+			s=0;Sf=0;lenf=0;
+			for(i=0;(lastscan+i<scan)&&(lastpos+i<req.oldsize);) {
+                if(req.old[lastpos+i]==req.newbuf[lastscan+i]) s++;
+				i++;
+                // Sf*2-lenf 和 s*2-i 都是等式: a*2 - b
+                // Sf*2-lenf可以理解为 上一组s和i,s*2-i计算出的值
+                // s*2 - i, i和s的增长步长都为1,也就是i走两步,s走一步就可以维持s*2 - i结果不变
+                // 如果结果要增加,也就是s增加的频率要>50%,即后续增加的数据超过50%的数据需要是相等的
+				if(s*2-i>Sf*2-lenf) { Sf=s; lenf=i; };
+			};
+
+            // 获取与下一段数据近似相同数据的长度
+            // 上面lenf的值即为diff string的长度,
+            // 该段数据剩余部分即可认为是extra string,这样长度相减即可获得extra string的长度;
+            // 但是保存的diff string是新老数据的相差值,可以更好的被压缩,而extra string保存的就是原始数据,压缩层度不高,
+            // 为了减少extea string的长度,采取了将部分extra string与下一段数据近似相同的数据遗留下来,在下一段数据可以充当diff string。
+            // scan等于newsize,就没有下一段数据了,因此这里需要判断scan小于newsize。
+			lenb=0;
+			if(scan<req.newsize) {
+				s=0;Sb=0;
+				for(i=1;(scan>=lastscan+i)&&(pos>=i);i++) {
+                    if(req.old[pos-i]==req.newbuf[scan-i]) s++;
+					if(s*2-i>Sb*2-lenb) { Sb=s; lenb=i; };
+				};
+			};
+            // 上面两段数据可能重叠,处理重叠
+            // 如果上面两段数据存在重叠,说明不存在extra string,
+            // 重叠部分可以划分给当前diff string,也可以划分给下一段diff string,这里根据相似数据分布获取到lens值
+
+			if(lastscan+lenf>scan-lenb) {
+				overlap=(lastscan+lenf)-(scan-lenb);
+				s=0;Ss=0;lens=0;
+				for(i=0;i<overlap;i++) {
+                    if(req.newbuf[lastscan+lenf-overlap+i]==
+					   req.old[lastpos+lenf-overlap+i]) s++;
+                    if(req.newbuf[scan-lenb+i]==
+					   req.old[pos-lenb+i]) s--;
+					if(s>Ss) { Ss=s; lens=i+1; };
+				};
+
+				lenf+=lens-overlap;
+				lenb-=lens;
+			};
+
+            // lenf值即为diff string的长度;(scan-lenb)-(lastscan+lenf)即为extra string的长度
+            x = lenf;
+            y = (scan-lenb)-(lastscan+lenf);
+            z = abs((int)((pos-lenb)-(lastpos+lenf)));
+
+            x_max = (x>x_max)?x:x_max;
+            y_max = (y>y_max)?y:y_max;
+            z_max = (z>z_max)?z:z_max;
+
+
+            debug_fln("control data:x=%llu,y=%llu,z=%lld",x,y,z);
+
+			offtout(lenf,buf);							//x 保存的是diff string 的长度
+			offtout((scan-lenb)-(lastscan+lenf),buf+8);	//y 保存的是extern string 的长度
+			offtout((pos-lenb)-(lastpos+lenf),buf+16);	//z 保存的是old程序中的新偏移pos相对于上一个偏移lastpos的相差
+
+
+            /* Write control data */
+            memcpy(rs_p,buf,sizeof(buf));
+            rs_p += sizeof(buf);
+            rs_size +=  sizeof(buf);
+
+            debug_fln("control data:x=%llu,y=%llu,z=%d",lenf,(scan-lenb)-(lastscan+lenf),abs((int)((pos-lenb)-(lastpos+lenf))));
+			/* Write diff data */
+			for(i=0;i<lenf;i++){
+                buffer[i]=req.newbuf[lastscan+i]-req.old[lastpos+i];
+				}
+
+            memcpy(rs_p,buffer,lenf);
+            rs_p += lenf;
+            rs_size +=  lenf;
+
+			if(lenf>0){
+                debug_fln(" Write diff data:%llu",lenf);
+				for(i=0;i<lenf;i++)print_c(buffer[i]);
+				debug("\r\n");
+			}
+
+			/* Write extra data */
+			for(i=0;i<(scan-lenb)-(lastscan+lenf);i++){
+                buffer[i]=req.newbuf[lastscan+lenf+i];
+                }
+
+            memcpy(rs_p,buffer,((scan-lenb)-(lastscan+lenf)));
+            rs_p += ((scan-lenb)-(lastscan+lenf));
+            rs_size +=  ((scan-lenb)-(lastscan+lenf));
+
+			if((scan-lenb)-(lastscan+lenf)>0){
+                debug_fln(" Write extra data:%llu",(scan-lenb)-(lastscan+lenf));
+				for(i=0;i<(scan-lenb)-(lastscan+lenf);i++)print_c(buffer[i]);
+				debug("\r\n");
+			}
+			debug("\r\n");
+			lastscan=scan-lenb;
+			lastpos=pos-lenb;
+			lastoffset=pos-scan;
+		};
+	};
+    *diffsize = rs_size;
+
+    printf("x_max=%6llu,\ty_max=%6llu,\tz_max=%6llu\n",
+           x_max,y_max,z_max);
+
+	return 0;
+}
+
+int bsdiff(const uint8_t* oldbuf, int64_t oldsize, const uint8_t* newbuf, int64_t newsize, uint8_t* diffbuf, int64_t* diffsize)
+{
+	int result;
+//    struct bsdiff_stream stream;
+	struct bsdiff_request req;
+
+    uint64_t req_size=0;
+//    stream.opaque = diffbuf;
+//    stream.size = 0;
+
+    if((req.I=malloc((oldsize+1)*sizeof(int64_t)))==NULL)
+		return -1;
+
+    if((req.buffer=malloc(newsize+1))==NULL)
+	{
+        free(req.I);
+		return -1;
+	}
+
+    req.old = oldbuf;
+	req.oldsize = oldsize;
+    req.newbuf = newbuf;
+	req.newsize = newsize;
+//    req.stream = &stream;
+
+    result = bsdiff_internal(req,diffbuf,&req_size);
+
+    *diffsize = req_size;
+
+    free(req.buffer);
+    free(req.I);
+
+	return result;
+}
+

+ 72 - 0
src/bsdiff/bsdiff.h

@@ -0,0 +1,72 @@
+/*
+ * @Author: jindoushangfu jindoushangfu@cpyypt.cn
+ * @Date: 2023-10-21 13:53:46
+ * @LastEditors: jindoushangfu jindoushangfu@cpyypt.cn
+ * @LastEditTime: 2023-10-24 14:36:30
+ * @FilePath: \make_udiff\src\bsdiff\bsdiff.h
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+/*-
+ * Copyright 2003-2005 Colin Percival
+ * Copyright 2012 Matthew Endsley
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted providing that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef BSDIFF_H
+#define BSDIFF_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+struct bsdiff_stream
+{
+    void* opaque;
+    //void* opaque_r;
+    //void* opaque_w;
+    uint64_t size;
+
+    void* (*malloc)(size_t size);
+    void (*free)(void* ptr);
+    int (*read)(struct bsdiff_stream* stream, const void* buffer, int size);
+    int (*write)(struct bsdiff_stream* stream, const void* buffer, int size);
+    // int (*read)(void* from,void* to,int size);
+    // int (*write)(void* from,void* to,int size);
+};
+
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+void print_c(uint8_t c);
+int bsdiff(const uint8_t* oldbuf, int64_t oldsize, const uint8_t* newbuf, int64_t newsize, uint8_t* diffbuf, int64_t* diffsize);
+void offtout(int64_t x, uint8_t *buf);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#endif

+ 214 - 0
src/bsdiff/bspatch.c

@@ -0,0 +1,214 @@
+/*-
+ * Copyright 2003-2005 Colin Percival
+ * Copyright 2012 Matthew Endsley
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted providing that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <fcntl.h>
+#include "bspatch.h"
+
+static int64_t offtin(uint8_t *buf)
+{
+	int64_t y;
+
+	y=buf[7]&0x7F;
+	y=y*256;y+=buf[6];
+	y=y*256;y+=buf[5];
+	y=y*256;y+=buf[4];
+	y=y*256;y+=buf[3];
+	y=y*256;y+=buf[2];
+	y=y*256;y+=buf[1];
+	y=y*256;y+=buf[0];
+
+	if(buf[7]&0x80) y=-y;
+
+	return y;
+}
+int patch_data_read(struct bspatch_stream* stream, void* buffer, int length)
+{
+	if(stream->start + length > stream->size) return -1;
+    memcpy(buffer,stream->buffer+stream->start, length);
+	stream->start += length;
+    return 0;
+}
+int bspatch(uint8_t* oldbuf, int64_t oldsize, uint8_t* newbuf, int64_t newsize, uint8_t* diffbuf, int64_t diffsize)
+{
+	uint8_t buf[8];
+	int64_t oldpos,newpos;
+	int64_t ctrl[3];
+	int64_t i;
+
+    int64_t diffOffset = 0;
+
+//	stream->start = 0;
+//	stream->read = patch_data_read;
+
+	oldpos=0;newpos=0;
+	while(newpos<newsize) {
+		/* Read control data */
+		for(i=0;i<=2;i++) {
+//            if (stream->read(stream, buf, 8))
+//                return -1;
+            memcpy(buf,diffbuf + diffOffset,8);
+            diffOffset += 8;
+			ctrl[i]=offtin(buf);
+		};
+
+		/* Sanity-check */
+		if (ctrl[0]<0 || ctrl[0]>INT_MAX ||
+			ctrl[1]<0 || ctrl[1]>INT_MAX ||
+			newpos+ctrl[0]>newsize)
+			return -1;
+
+		/* Read diff string */
+//		if (stream->read(stream, new + newpos, ctrl[0]))
+//			return -1;
+        memcpy(newbuf + newpos,diffbuf + diffOffset,ctrl[0]);
+        diffOffset += ctrl[0];
+
+		/* Add old data to diff string */
+		for(i=0;i<ctrl[0];i++)
+			if((oldpos+i>=0) && (oldpos+i<oldsize))
+                newbuf[newpos+i]+=oldbuf[oldpos+i];
+
+		/* Adjust pointers */
+		newpos+=ctrl[0];
+		oldpos+=ctrl[0];
+
+		/* Sanity-check */
+		if(newpos+ctrl[1]>newsize)
+			return -1;
+
+		/* Read extra string */
+//		if (stream->read(stream, new + newpos, ctrl[1]))
+//			return -1;
+
+        memcpy(newbuf + newpos,diffbuf + diffOffset,ctrl[1]);
+        diffOffset += ctrl[1];
+
+		/* Adjust pointers */
+		newpos+=ctrl[1];
+		oldpos+=ctrl[2];
+	};
+
+	return 0;
+}
+
+#if defined(BSPATCH_EXECUTABLE)
+
+#include <bzlib.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <err.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+static int bz2_read(const struct bspatch_stream* stream, void* buffer, int length)
+{
+	int n;
+	int bz2err;
+	BZFILE* bz2;
+
+	bz2 = (BZFILE*)stream->opaque;
+	n = BZ2_bzRead(&bz2err, bz2, buffer, length);
+	if (n != length)
+		return -1;
+
+	return 0;
+}
+
+int main(int argc,char * argv[])
+{
+	FILE * f;
+	int fd;
+	int bz2err;
+	uint8_t header[24];
+	uint8_t *old, *new;
+	int64_t oldsize, newsize;
+	BZFILE* bz2;
+	struct bspatch_stream stream;
+	struct stat sb;
+
+	if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]);
+
+	/* Open patch file */
+	if ((f = fopen(argv[3], "r")) == NULL)
+		err(1, "fopen(%s)", argv[3]);
+
+	/* Read header */
+	if (fread(header, 1, 24, f) != 24) {
+		if (feof(f))
+			errx(1, "Corrupt patch\n");
+		err(1, "fread(%s)", argv[3]);
+	}
+
+	/* Check for appropriate magic */
+	if (memcmp(header, "ENDSLEY/BSDIFF43", 16) != 0)
+		errx(1, "Corrupt patch\n");
+
+	/* Read lengths from header */
+	newsize=offtin(header+16);
+	if(newsize<0)
+		errx(1,"Corrupt patch\n");
+
+	/* Close patch file and re-open it via libbzip2 at the right places */
+	if(((fd=open(argv[1],O_RDONLY,0))<0) ||
+		((oldsize=lseek(fd,0,SEEK_END))==-1) ||
+		((old=malloc(oldsize+1))==NULL) ||
+		(lseek(fd,0,SEEK_SET)!=0) ||
+		(read(fd,old,oldsize)!=oldsize) ||
+		(fstat(fd, &sb)) ||
+		(close(fd)==-1)) err(1,"%s",argv[1]);
+	if((new=malloc(newsize+1))==NULL) err(1,NULL);
+
+	if (NULL == (bz2 = BZ2_bzReadOpen(&bz2err, f, 0, 0, NULL, 0)))
+		errx(1, "BZ2_bzReadOpen, bz2err=%d", bz2err);
+
+	stream.read = bz2_read;
+	stream.opaque = bz2;
+	if (bspatch(old, oldsize, new, newsize, &stream))
+		errx(1, "bspatch");
+
+	/* Clean up the bzip2 reads */
+	BZ2_bzReadClose(&bz2err, bz2);
+	fclose(f);
+
+	/* Write the new file */
+	if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY,sb.st_mode))<0) ||
+		(write(fd,new,newsize)!=newsize) || (close(fd)==-1))
+		err(1,"%s",argv[2]);
+
+	free(new);
+	free(old);
+
+	return 0;
+}
+
+#endif

+ 52 - 0
src/bsdiff/bspatch.h

@@ -0,0 +1,52 @@
+/*-
+ * Copyright 2003-2005 Colin Percival
+ * Copyright 2012 Matthew Endsley
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted providing that the following conditions 
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef BSPATCH_H
+# define BSPATCH_H
+
+# include <stdint.h>
+
+struct bspatch_stream
+{
+	int start;
+	int size;
+	void* buffer;
+	void* opaque;
+	int (*read)(struct bspatch_stream* stream, void* buffer, int length);
+};
+#ifdef __cplusplus
+    extern "C" {
+#endif
+// int bspatch(const uint8_t* old, int64_t oldsize, uint8_t* new, int64_t newsize, struct bspatch_stream* stream);
+int bspatch(uint8_t* oldbuf, int64_t oldsize, uint8_t* newbuf, int64_t newsize, uint8_t* diffbuf, int64_t diffsize);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

+ 150 - 0
src/crc32.cpp

@@ -0,0 +1,150 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+
+static const uint32_t crc32tab[] = {
+    0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL,
+    0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L,
+    0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L,
+    0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 0x90bf1d91L,
+    0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
+    0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L,
+    0x136c9856L, 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL,
+    0x14015c4fL, 0x63066cd9L, 0xfa0f3d63L, 0x8d080df5L,
+    0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, 0xa2677172L,
+    0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
+    0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L,
+    0x32d86ce3L, 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L,
+    0x26d930acL, 0x51de003aL, 0xc8d75180L, 0xbfd06116L,
+    0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, 0xb8bda50fL,
+    0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
+    0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL,
+    0x76dc4190L, 0x01db7106L, 0x98d220bcL, 0xefd5102aL,
+    0x71b18589L, 0x06b6b51fL, 0x9fbfe4a5L, 0xe8b8d433L,
+    0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, 0xe10e9818L,
+    0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
+    0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL,
+    0x6c0695edL, 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L,
+    0x65b0d9c6L, 0x12b7e950L, 0x8bbeb8eaL, 0xfcb9887cL,
+    0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, 0xfbd44c65L,
+    0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
+    0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL,
+    0x4369e96aL, 0x346ed9fcL, 0xad678846L, 0xda60b8d0L,
+    0x44042d73L, 0x33031de5L, 0xaa0a4c5fL, 0xdd0d7cc9L,
+    0x5005713cL, 0x270241aaL, 0xbe0b1010L, 0xc90c2086L,
+    0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
+    0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L,
+    0x59b33d17L, 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL,
+    0xedb88320L, 0x9abfb3b6L, 0x03b6e20cL, 0x74b1d29aL,
+    0xead54739L, 0x9dd277afL, 0x04db2615L, 0x73dc1683L,
+    0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
+    0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L,
+    0xf00f9344L, 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL,
+    0xf762575dL, 0x806567cbL, 0x196c3671L, 0x6e6b06e7L,
+    0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, 0x67dd4accL,
+    0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
+    0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L,
+    0xd1bb67f1L, 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL,
+    0xd80d2bdaL, 0xaf0a1b4cL, 0x36034af6L, 0x41047a60L,
+    0xdf60efc3L, 0xa867df55L, 0x316e8eefL, 0x4669be79L,
+    0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
+    0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL,
+    0xc5ba3bbeL, 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L,
+    0xc2d7ffa7L, 0xb5d0cf31L, 0x2cd99e8bL, 0x5bdeae1dL,
+    0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, 0x026d930aL,
+    0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
+    0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L,
+    0x92d28e9bL, 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L,
+    0x86d3d2d4L, 0xf1d4e242L, 0x68ddb3f8L, 0x1fda836eL,
+    0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, 0x18b74777L,
+    0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
+    0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L,
+    0xa00ae278L, 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L,
+    0xa7672661L, 0xd06016f7L, 0x4969474dL, 0x3e6e77dbL,
+    0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, 0x37d83bf0L,
+    0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
+    0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L,
+    0xbad03605L, 0xcdd70693L, 0x54de5729L, 0x23d967bfL,
+    0xb3667a2eL, 0xc4614ab8L, 0x5d681b02L, 0x2a6f2b94L,
+    0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, 0x2d02ef8dL
+};
+
+uint32_t l1_crc32(const uint8_t *buf, uint32_t size)
+{
+    unsigned int i, crc;
+    crc = 0xFFFFFFFF;
+    for (i = 0; i < size; i++)
+    {
+        crc = crc32tab[(crc ^ buf[i]) & 0xff] ^ (crc >> 8);
+    }
+    return crc^0xFFFFFFFF;
+}
+
+
+
+//STM32 CRC32 软件模拟
+uint32_t crc32(const uint32_t *buf_32, uint32_t size_32)
+{
+    uint32_t	xbit;
+    uint32_t	data;
+    uint32_t	CRC32 = 0xFFFFFFFF;
+    uint32_t bits;
+    const uint32_t dwPolynomial = 0x04c11db7;
+    uint32_t	i;
+
+    for(i = 0;i < size_32;i ++)
+    {
+        xbit = 1 << 31;
+        data = buf_32[i];
+        for (bits = 0; bits < 32; bits++)
+        {
+            if (CRC32 & 0x80000000) {
+                CRC32 <<= 1;
+                CRC32 ^= dwPolynomial;
+            }
+            else
+                CRC32 <<= 1;
+            if (data & xbit)
+                CRC32 ^= dwPolynomial;
+
+            xbit >>= 1;
+        }
+    }
+    return CRC32;
+}
+uint32_t l3_crc32(uint32_t *pbuf, uint32_t size)
+{
+    const uint32_t st_const_value = 0x04c11db7;
+    uint32_t	crc_value = 0xffffffff;
+    uint32_t	xbit;
+    uint32_t 	bits;
+    uint32_t	i;
+
+    for(i = 0;i < size;i ++)
+    {
+        xbit = 0x80000000;
+        for (bits = 0; bits < 32; bits++)
+        {
+            if (crc_value & 0x80000000)
+            {
+                crc_value <<= 1;
+                crc_value ^= st_const_value;
+            }
+            else
+            {
+                crc_value <<= 1;
+            }
+            if (pbuf[i] & xbit)
+            {
+                crc_value ^= st_const_value;
+            }
+            xbit >>= 1;
+        }
+    }
+    return crc_value;
+}

+ 12 - 0
src/crc32.h

@@ -0,0 +1,12 @@
+#ifndef _CRC32_H_
+#define _CRC32_H_
+
+#include <stdio.h>
+#include <stdint.h>
+
+
+
+// uint32_t crc32(const uint8_t *buf, uint32_t size);
+uint32_t crc32(const uint32_t *buf_32, uint32_t size_32);
+
+#endif

+ 1835 - 0
src/dfota.cpp

@@ -0,0 +1,1835 @@
+#include "dfota.h"
+#include <stdio.h>
+#include <sys/time.h>
+#include "unistd.h"
+#include <time.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <iostream>
+
+#include <fstream>
+#include "./bsdiff/bsdiff.h"
+#include "./bsdiff/bspatch.h"
+#include "./lzma/lzma.h"
+#include "crc32.h"
+#include "QString"
+//#include <iostream>
+//#include <string.h>
+#include <QDebug>
+#include <QMessageBox>
+
+
+using namespace std;
+
+DFOTA::DFOTA(){
+}
+
+
+
+// QTextEdit* log_editText = NULL;
+
+
+int get_bin_file(bin_file_t* file){
+    char logMsg[256]="\0";
+    bool ok;
+    char *endptr;
+    uint32_t app_ver = 0;
+    uint16_t dev_type = 0;
+
+    _splitpath_s(file->path, file->drive, file->dir, file->filename, file->ext);
+
+
+
+    // 检查文件是否存在
+    if( access(file->path, F_OK) !=0){
+        qDebug("文件不存在:%s",file->path);
+        return -1;
+    };
+    // .bin 结尾
+    if(strcmp(file->ext,".bin") != 0){
+        qDebug("文件格式错误,ext:%s",file->ext);
+        return -1;
+    }
+    // 文件名=固件名
+    if(strlen(file->filename) < 8){
+        qDebug("文件名错误,正确举例: 01013002");
+        return -1;
+    }
+    // 文件名 字符串转 uint_t32
+    int len = strlen(file->filename);
+    if(len < 8){
+        qDebug("文件名小于8个字节:%d",len);
+        return -1;
+    }
+    char right_8s[9]={0};
+    for(int i=0;i<len;i++){
+        right_8s[i] = file->filename[len-8+i];
+    }
+    app_ver = (uint32_t)(strtoul(right_8s,&endptr,16) & 0xFFFFFFFF);
+    if(app_ver == 0){
+        qDebug("APP版本错误:%08X",app_ver);
+        return -1;
+    }
+    dev_type = (uint16_t)(app_ver>>16);
+    if(dev_type == 0){
+        qDebug("设备类型错误:%04X",dev_type);
+        return -1;
+    }
+    file->app_ver = app_ver;
+    file->dev_type = dev_type;
+    // 检查文件大小
+/*
+    struct stat info;
+    stat(file->path,&info);
+    int size = info.st_size;
+    if(size > MAX_BIN_SIZE){
+        std::snprintf(logMsg,sizeof(logMsg),"文件太大,%d > %d.",size,MAX_BIN_SIZE);
+        qDebug(logMsg);
+        return -1;
+    }
+*/
+    // p_bin
+    ifstream inFile(file->path,ios::in|ios::binary);
+    if(!inFile.is_open()) {
+        qDebug("打开文件失败:%s",file->path);
+        return -1;
+    }
+    char* p = (char*)file->addr;
+    int size = 0;
+    while(inFile.read(p++, sizeof(char))) {
+        size++;
+    }
+    inFile.close();
+    if(size > MAX_BIN_SIZE){
+        qDebug("文件太大,%d > %d.",size,MAX_BIN_SIZE);
+        return -1;
+    }
+    //
+    if(size%4){
+        qDebug("bin文件不是4字节对齐,%d",size);
+        return -1;
+    }
+    //如果尾部有附加20个字节,则去掉
+    p = (char*)(file->addr+size-8);
+    if(memcmp(p,"WJBW",4) == 0){        //WJBW  XXXX
+        file->size = size - 20;
+    }
+    else{
+        file->size = size;                          // 大小
+    }
+    // strncpy((char*)file->dir,file->dir,strlen(dir));  // 路径
+
+    file->crc32 = crc32((uint32_t*)file->addr,(file->size)/4);
+
+    return 0;
+}
+
+int write_bin_file(char* path, uint8_t* buff,int size){
+    char logMsg[256]="\0";
+    char logTmp[256]="\0";
+    ofstream outFile(path,ios::out|ios::binary|ios::trunc);
+    if(!outFile.is_open()) {
+        qDebug("%s func:%s():打开文件失败:%s",logTmp,__func__,path);
+        return -1;
+    }
+    outFile.write((char*)buff,size);
+    outFile.close();
+    return 0;
+}
+
+
+int DFOTA::bsdiff_task(MainWindow* ui,InputData_t* inputData){
+    bool ok;
+    char logMsg[256]="\0";
+    char logTmp[256]="\0";
+    int logLen=0;
+    int result=0;
+    int rtn=0;
+
+
+    int i=0,j=0,k=0;
+    uint32_t crc_u32 = 0;
+    int old_cont=0;
+    int size = 0;
+    char pkg_path[MAX_PATH];
+    bin_file_t s_new_bin_file;
+    bin_file_t s_old_bin_file;
+    bin_file_t s_pkg_bin_file;
+
+    uint8_t* p = nullptr;
+    uint8_t* new_bin = nullptr;
+    uint8_t* old_bin = nullptr;
+    uint8_t* diff_bin = nullptr;
+    uint8_t* lzma_bin = nullptr;
+    uint8_t* block_bin[MAX_OLDFILES_NUM]= {nullptr};
+    uint8_t* pkg_bin = nullptr;
+    int block_valid_cnt=0;
+    int block_cnt_limit=0;
+
+
+    int64_t new_size_u64=0;
+    int64_t old_size_u64=0;
+    int64_t diff_size_u64=0;
+    int32_t lzma_size_u32=0;
+    int32_t block_size_u32[MAX_OLDFILES_NUM]={0};
+    int32_t pkg_size_u32=0;
+    int32_t blk_size_u32=0;
+
+    int32_t diff_size_u32=0;
+
+    // DFOTA_pkg_t s_pkg;
+    DFOTA_pkg_header_t *s_pkg_header = nullptr;
+    // DFOTA_blk_t s_blk;
+    DFOTA_blk_header_t *s_blk_header = nullptr;
+    // DFOTA_payload_t s_payload;
+    DFOTA_bsdiff_header_t *s_bsdiff_header = nullptr;
+    DFOTA_lzma_header_t s_lzma_header;
+    // DFOTA_dev_t s_dev;
+
+    std::string p_path1 = "";
+    std::string p_path2 = "";
+    std::string str="";
+    QString qstr("");
+
+    vector <uint32_t> app_ver_v;
+    // log_editText = log;
+
+    memset(&s_new_bin_file,0,sizeof(bin_file_t));
+    memset(&s_old_bin_file,0,sizeof(bin_file_t));
+    memset(&s_pkg_bin_file,0,sizeof(bin_file_t));
+
+    qDebug("----------------------------------------------------------------");
+    // 显示当前时间
+    get_time_display_ms(logTmp);
+    qDebug("%s func:%s()",logTmp,__func__);
+
+    // 分配内存
+    new_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    old_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    diff_bin = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    lzma_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    pkg_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+
+
+    if(new_bin==NULL||old_bin==NULL||diff_bin==NULL||lzma_bin==NULL||pkg_bin==NULL){
+        qDebug("发生错误,申请内存失败...");
+        rtn = -1;
+        goto bsdiff_task_exit;
+    }
+
+
+    memset(new_bin,0,MAX_BIN_SIZE);
+    memset(old_bin,0,MAX_BIN_SIZE);
+    memset(diff_bin,0,MAX_BIN_SIZE*2);
+    memset(lzma_bin,0,MAX_BIN_SIZE);
+    memset(pkg_bin,0,MAX_BIN_SIZE);
+
+    emit ui->process_bar_signals(0,"开始...");
+
+    // 读取新版bin文件
+    qDebug("读取新版bin文件...");
+
+    s_new_bin_file.path = inputData->newFilePath;
+    s_new_bin_file.addr = new_bin;
+    result = get_bin_file(&s_new_bin_file);
+    if(result !=0){
+        // std::snprintf(logMsg,sizeof(logMsg),"检查文件失败");
+        // qDebug(logMsg);
+        rtn = -1;
+        goto bsdiff_task_exit;
+    }
+    // 备份
+    get_time_file_name_ms(logMsg);
+    snprintf(pkg_path,sizeof(pkg_path),"tmp/%s_A_bk_new_%08X.bin",
+             logMsg,
+             s_new_bin_file.app_ver);
+    result = write_bin_file(pkg_path,s_new_bin_file.addr,s_new_bin_file.size);
+
+    // 检查新文件是否已经打包
+    if(memcmp(new_bin,PACKAGE_MAGIC,strlen(PACKAGE_MAGIC))==0){
+        qDebug("检测到新bin文件已打包,为避免重复打包,程序退出。");
+        rtn = -1;
+        goto bsdiff_task_exit;
+    };
+
+
+    qDebug("new bin: app_ver:%08X,size:%d,crc32=0x%08X",
+           s_new_bin_file.app_ver,s_new_bin_file.size,s_new_bin_file.crc32);
+
+    // 仅需对 new bin处理
+    if(not inputData->check_d){
+        // 包
+        p = pkg_bin;
+        pkg_size_u32 = 0;
+        s_pkg_header = (DFOTA_pkg_header_t*)p;
+
+        p += sizeof(DFOTA_pkg_header_t);
+        pkg_size_u32 += sizeof(DFOTA_pkg_header_t);
+
+        //块
+        blk_size_u32 = 0;
+        s_blk_header = (DFOTA_blk_header_t*)p;
+        memcpy_s(s_blk_header->blk_magic,sizeof(DFOTA_blk_header_t::blk_magic),BLOCK_MAGIC,strlen(BLOCK_MAGIC));
+        s_blk_header->blk_size = 0;
+        s_blk_header->d_flag=inputData->check_d ? 1 : 0;
+        s_blk_header->z_flag=inputData->check_z ? 1 : 0;
+        s_blk_header->reserve=0;
+        s_blk_header->new_ver = s_new_bin_file.app_ver;
+        s_blk_header->new_size = s_new_bin_file.size;
+        s_blk_header->new_crc32 = s_new_bin_file.crc32;
+        s_blk_header->new_ep = inputData->ep;   // NEW_EP;
+
+
+        p += sizeof(DFOTA_blk_header_t);
+        blk_size_u32 += sizeof(DFOTA_blk_header_t);
+
+        if(inputData->check_z){
+            lzma_compress((uint8_t *)p, &lzma_size_u32, (uint8_t *)new_bin, s_new_bin_file.size, 12, 9);
+            get_time_file_name_ms(logMsg);
+            snprintf(pkg_path,sizeof(pkg_path),"tmp/%s_A_D0Z1---lzma_%08X.bin",
+                     logMsg,
+                     s_new_bin_file.app_ver);
+            result = write_bin_file(pkg_path,p,lzma_size_u32);
+
+            p += lzma_size_u32;
+            blk_size_u32 += lzma_size_u32;
+        }
+        else{
+            memcpy(p,new_bin,s_new_bin_file.size);
+            p += s_new_bin_file.size;
+            blk_size_u32 += s_new_bin_file.size;
+        }
+
+        // padding 检查是否4字节对齐
+        k = blk_size_u32 % 4;
+        if(k !=0){
+            p += (4 - k);
+            blk_size_u32 += (4 - k);
+            s_blk_header->pad_size = (4 - k);
+        }
+        else{
+            s_blk_header->pad_size = 0;
+        }
+        // size 重新计算大小,即整个块的长度,含blk_magic,crc32
+        s_blk_header->blk_size = blk_size_u32 + 4;    // 算是尾部的crc32
+
+        // crc32
+        crc_u32 = crc32((uint32_t*)s_blk_header,(s_blk_header->blk_size-4)/4);
+        *(uint32_t*)p = crc_u32;
+
+        p += 4;
+        blk_size_u32 += 4;  // 到此block结束
+
+        pkg_size_u32 += blk_size_u32;
+
+        memcpy_s(s_pkg_header->pkg_magic,sizeof(s_pkg_header->pkg_magic),PACKAGE_MAGIC,strlen(PACKAGE_MAGIC));
+        s_pkg_header->pkg_time = time(NULL);
+        s_pkg_header->pkg_size = pkg_size_u32 + 4;
+
+        crc_u32 = crc32((uint32_t*)s_pkg_header,(s_pkg_header->pkg_size -4)/4);
+        *(uint32_t*)p = crc_u32;
+
+        pkg_size_u32 += 4;
+
+        if(pkg_size_u32 > MAX_BIN_SIZE){
+            QMessageBox::warning(ui,"DFOTA","文件包过大,退出");
+            emit ui->process_bar_signals(0,"文件包过大,退出");
+            rtn = -1;
+            goto bsdiff_task_exit;
+        }
+
+
+        qDebug("装入第1个block,blk'size=%d,pkg'size=%d",s_blk_header->blk_size,s_pkg_header->pkg_size);
+        qDebug("打包完成: block(s)=%d,size=%d(Bytes),time=%d,crc32=0x%08X",1,s_pkg_header->pkg_size,s_pkg_header->pkg_time,crc_u32);
+        // 写入文件
+        goto bsdiff_task_write;
+    }
+
+
+    new_size_u64 = s_new_bin_file.size;
+    // 开始 差分+压缩
+    qDebug("开始读取旧文件->差分->压缩...\n");
+
+
+    for (i=0;i<MAX_OLDFILES_NUM ;i++ ) {
+
+        emit ui->process_bar_signals(i/MAX_OLDFILES_NUM*100,"处理进行中...");
+
+        if(strlen(inputData->oldFilePath[i]) < 8){
+            qDebug("%d read,跳过\n",i + 1);
+            continue;
+        }
+        // 读取第i个旧版本bin文件
+        qDebug("%i read...",i + 1);
+
+        s_old_bin_file.path = inputData->oldFilePath[i];
+        s_old_bin_file.addr = old_bin;
+        result = get_bin_file(&s_old_bin_file);
+        if(result !=0){
+            // std::snprintf(logMsg,sizeof(logMsg),"检查文件失败");
+            // qDebug(logMsg);
+            continue;
+        }
+        // 备份
+        get_time_file_name_ms(logMsg);
+        snprintf(pkg_path,sizeof(pkg_path),"tmp/%s_A_bk_old%d_%08X.bin",
+                 logMsg,
+                 i+1,
+                 s_old_bin_file.app_ver);
+        result = write_bin_file(pkg_path,s_old_bin_file.addr,s_old_bin_file.size);
+
+        if(s_new_bin_file.app_ver ==s_old_bin_file.app_ver){
+            qDebug("%d 旧版本与新版本相同,app_ver:%08X,跳过\n",i + 1,s_old_bin_file.app_ver);
+            continue;
+        }
+        if(s_new_bin_file.dev_type !=s_old_bin_file.dev_type){
+            qDebug("%d 设备类型不一致:new %04X != old %04X,跳过\n",i+1,s_new_bin_file.dev_type,s_old_bin_file.dev_type);
+            continue;
+        }
+
+        if (std::count(app_ver_v.begin(), app_ver_v.end(), s_old_bin_file.app_ver) > 0){
+            qDebug("旧版本重复:app_ver:%08X,跳过\n",s_old_bin_file.app_ver);
+            continue;
+        };
+        app_ver_v.push_back(s_old_bin_file.app_ver);
+
+        qDebug("%d app_ver:%08X,size:%d,crc32=0x%08X",i + 1,
+               s_old_bin_file.app_ver,s_old_bin_file.size,s_old_bin_file.crc32);
+
+        // 第i个差分
+        logLen = 0;
+        logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"%d diff,",i + 1);
+        // qDebug(logMsg);
+        old_size_u64 = (uint64_t)s_old_bin_file.size;
+        diff_size_u64 = 0;
+        result = bsdiff(old_bin,old_size_u64,new_bin,new_size_u64,diff_bin,&diff_size_u64);
+
+        if(result!=0){
+            continue;
+        }
+
+        logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"size=%d,bin: ",(int)(diff_size_u64));
+        for(j=0;j< 16;j++){
+            logLen += std::sprintf(logMsg + logLen,"%02X ",diff_bin[j]);
+        }
+        qDebug() << logMsg;
+
+        get_time_file_name_ms(logMsg);
+        snprintf(pkg_path,sizeof(pkg_path),"tmp/%s_A_D1Z1--bsdiff_%08X_%08X.bin",
+                 logMsg,
+                 s_old_bin_file.app_ver,
+                 s_new_bin_file.app_ver);
+        result = write_bin_file(pkg_path,diff_bin,(int)diff_size_u64);
+        // 第i个压缩4
+        logLen = 0;
+        logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"%d lzma,",i + 1);
+        //qDebug(logMsg);
+
+        diff_size_u32 = (int)(diff_size_u64); //
+        lzma_size_u32 = 0;
+        memset(lzma_bin,0,MAX_BIN_SIZE);
+        lzma_compress((uint8_t *)lzma_bin, &lzma_size_u32, (uint8_t *)diff_bin, diff_size_u32, 12, 9);
+
+        logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"size=%d,bin: ",lzma_size_u32);
+        for(j=0;j< 16;j++){
+            logLen += std::sprintf(logMsg + logLen,"%02X ",lzma_bin[j]);
+        }
+        qDebug() << logMsg;
+
+        get_time_file_name_ms(logMsg);
+        snprintf(pkg_path,sizeof(pkg_path),"tmp/%s_A_D1Z1---lzma_%08X_%08X.bin",
+                 logMsg,
+                 s_old_bin_file.app_ver,
+                 s_new_bin_file.app_ver);
+        result = write_bin_file(pkg_path,lzma_bin,lzma_size_u32);
+        // 开始打包 第block_index个block
+        logLen = 0;
+        logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"blk-%d,",i + 1);
+        //qDebug(logMsg);
+
+        // 为block分配空间
+        block_bin[i] = (uint8_t*)malloc(MAX_BIN_SIZE);
+        if(block_bin[i] == nullptr){
+            logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"为block_bin[%d]申请内存失败...",i + 1);
+            qDebug() << logMsg;
+            rtn = -1;
+            goto bsdiff_task_exit;
+        };
+
+        memset(block_bin[i],0,MAX_BIN_SIZE);
+        blk_size_u32 = 0;
+        p = block_bin[i];
+
+        // block 头 初始化
+        s_blk_header = (DFOTA_blk_header_t*)(block_bin[i]);
+        memcpy_s(s_blk_header->blk_magic,sizeof(DFOTA_blk_header_t::blk_magic),BLOCK_MAGIC,strlen(BLOCK_MAGIC));
+        s_blk_header->blk_size = 0;
+        s_blk_header->d_flag=1;
+        s_blk_header->z_flag=1;
+        s_blk_header->reserve=0;
+        s_blk_header->old_ver = s_old_bin_file.app_ver;
+        s_blk_header->old_size = s_old_bin_file.size;
+        s_blk_header->old_crc32 = s_old_bin_file.crc32;
+        s_blk_header->new_ver = s_new_bin_file.app_ver;
+        s_blk_header->new_size = s_new_bin_file.size;
+        s_blk_header->new_crc32 = s_new_bin_file.crc32;
+        s_blk_header->new_ep = inputData->ep;   // NEW_EP;
+
+        blk_size_u32 += sizeof(DFOTA_blk_header_t);
+        p  += sizeof(DFOTA_blk_header_t);
+
+        // 差分头
+        s_bsdiff_header = (DFOTA_bsdiff_header_t*)(p);
+        memcpy_s(s_bsdiff_header->diff_magic,sizeof(DFOTA_bsdiff_header_t::diff_magic),BSDIFF_MAGIC,strlen(BSDIFF_MAGIC));
+        s_bsdiff_header->new_size = s_new_bin_file.size;
+
+        blk_size_u32 += sizeof(DFOTA_bsdiff_header_t);
+        p  += sizeof(DFOTA_bsdiff_header_t);
+
+        // compr_header 已经含在lzma_bin里了,无需处理 lzma_bin = compr_header + data
+/*
+        *((int32_t*)p) = lzma_size_u32;     // change by scx
+
+        blk_size_u32 += sizeof(lzma_size_u32);
+        p  += sizeof(lzma_size_u32);
+*/
+        memcpy(p,lzma_bin,lzma_size_u32);
+        p += lzma_size_u32;
+        blk_size_u32  += lzma_size_u32;
+
+
+        // padding 检查是否4字节对齐
+        k = blk_size_u32 % 4;
+        if(k !=0){
+            p += (4 - k);
+            blk_size_u32 += (4 - k);
+            s_blk_header->pad_size = (4 - k);
+        }
+        else{
+            s_blk_header->pad_size = 0;
+        }
+        // size 重新计算大小,即整个块的长度,含blk_magic,crc32
+        block_size_u32[i] = blk_size_u32 + 4;
+        s_blk_header->blk_size = blk_size_u32 + 4;    // 算是尾部的crc32
+
+        // crc32
+        crc_u32= crc32((uint32_t*)block_bin[i],(s_blk_header->blk_size - 4)/4);
+        *(uint32_t*)p = crc_u32;
+
+        logLen += std::snprintf(logMsg + logLen,sizeof(logMsg),"size:%d,crc32=0x%08X,bin:",s_blk_header->blk_size,crc_u32);
+        for(j=0;j< 16;j++){
+            logLen += std::sprintf(logMsg + logLen,"%02X ",block_bin[i][j]);
+        }
+        qDebug() << logMsg << "\n";
+
+        block_valid_cnt++;
+        // block_size_u32[block_index]
+    }
+    // 打包
+    if(block_valid_cnt<1){
+
+        emit ui->process_bar_signals(0,"打包文件写入失败");
+        qDebug("未发现有效旧bin文件...");
+        QMessageBox::warning(ui,"DFOTA","未发现有效旧bin文件");
+        rtn = -1;
+        goto bsdiff_task_exit;
+
+    }
+
+    qDebug("\r\n开始打包...");
+
+    // 开始生成pkg_header
+    // qDebug("开始生成pkg_header...");
+
+    s_pkg_header = (DFOTA_pkg_header_t*)pkg_bin;
+    memcpy_s(s_pkg_header->pkg_magic,sizeof(s_pkg_header->pkg_magic),PACKAGE_MAGIC,strlen(PACKAGE_MAGIC));
+
+    pkg_size_u32 = 0;
+    p = pkg_bin;
+
+
+    p += sizeof(DFOTA_pkg_header_t);
+    pkg_size_u32  += sizeof(DFOTA_pkg_header_t);
+
+
+    // qDebug("开始装入block...");
+    block_cnt_limit = 0;
+    for(i=0;i<MAX_OLDFILES_NUM;i++){
+        if(block_size_u32[i]<40) {
+            qDebug("装入第%i个block,跳过",i + 1);
+            continue;
+        }
+        if((pkg_size_u32 + block_size_u32[i]) > MAX_BIN_SIZE){
+            QMessageBox::warning(ui,"DFOTA","文件包过大,退出");
+            emit ui->process_bar_signals(0,"文件包过大,退出");
+            rtn = -1;
+            goto bsdiff_task_exit;
+        }
+        memcpy(p,block_bin[i],block_size_u32[i]);
+        p += block_size_u32[i];
+        pkg_size_u32  += block_size_u32[i];
+        qDebug("装入第%i个block,blk'size=%d,pkg'size=%d",i + 1,block_size_u32[i],pkg_size_u32);
+        block_cnt_limit++;
+    }
+    // 重计算 包大小,含crc32,即从第0字节到最后1个字节。
+    // qDebug("重新计算包大小:%d",pkg_size_u32 + 4);
+    s_pkg_header->pkg_size = pkg_size_u32 + 4;
+
+    s_pkg_header->pkg_time = time(NULL);
+
+    // 开始生成pkg_crc32
+    //qDebug("开始生成 pkg_crc32:0x%08X");
+    crc_u32 = crc32((uint32_t*)pkg_bin,(s_pkg_header->pkg_size - 4)/4);
+    *(uint32_t*)p = crc_u32;
+    pkg_size_u32 += 4;
+    qDebug("打包完成: block(s)=%d,size=%d(Bytes),time=%d,crc32=0x%08X",block_valid_cnt,s_pkg_header->pkg_size,s_pkg_header->pkg_time,crc_u32);
+
+bsdiff_task_write:
+    // 开始保存pkg_bin文件
+    snprintf(pkg_path,sizeof(pkg_path),"%s%sDFOTA_%d_%08X.bin",s_new_bin_file.drive,s_new_bin_file.dir,s_pkg_header->pkg_time,s_new_bin_file.app_ver);
+
+    emit ui->pkg_set_path_signals(pkg_path);
+
+    qDebug("开始写入文件:%s\n",pkg_path);
+    result = write_bin_file(pkg_path,pkg_bin,s_pkg_header->pkg_size);
+    if(result!=0){
+        QMessageBox::warning(ui,"DFOTA","打包文件写入失败");
+        emit ui->process_bar_signals(0,"打包文件写入失败");
+        rtn = -1;
+        goto bsdiff_task_exit;
+    }
+
+    get_time_display_ms(logTmp);
+
+    qDebug("%s:操作已全部完成\r\n\r\n",logTmp);
+
+    // 备份
+    get_time_file_name_ms(logMsg);
+    snprintf(pkg_path,sizeof(pkg_path),"tmp/%s_A_DFOTA_%d_%08X.bin",logMsg,s_pkg_header->pkg_time,s_new_bin_file.app_ver);
+    write_bin_file(pkg_path,pkg_bin,s_pkg_header->pkg_size);
+
+    emit ui->process_bar_signals(100,"已完成");
+bsdiff_task_exit:
+    if(new_bin) free(new_bin);
+    if(old_bin) free(old_bin);
+    if(diff_bin) free(diff_bin);
+    if(lzma_bin) free(lzma_bin);
+    for (i=0;i<MAX_OLDFILES_NUM ;i++ ) {
+        if(block_bin[i]) free(block_bin[i]);
+    }
+    if(pkg_bin) free(pkg_bin);
+    return rtn;
+};
+
+
+int DFOTA::read_task(MainWindow* ui,InputData_t* inputData){
+    char logMsg[256]="\0";
+    char logTmp[256]="\0";
+    int logLen=0;
+    int result=0;
+    int rtn=0;
+
+
+    int i=0,j=0,k=0;
+    uint32_t crc_u32 = 0;
+    uint32_t t_u32 = 0;
+    int old_cont=0;
+    int size = 0;
+
+    int offset_pkg = 0;
+    int offset_blk = 0;
+    int offset_diff = 0;
+    int offset_lzma = 0;
+
+    char pkg_path[MAX_PATH];
+    bin_file_t s_new_bin_file;
+    bin_file_t s_old_bin_file;
+    bin_file_t s_pkg_bin_file;
+
+    uint8_t* p_pkg = nullptr;
+    uint8_t* p_blk = nullptr;
+    uint8_t* p_diff = nullptr;
+    uint8_t* p_lzma = nullptr;
+
+    uint8_t* new_bin = nullptr;
+    uint8_t* old_bin[MAX_OLDFILES_NUM] = {nullptr};
+    uint8_t* diff_bin = nullptr;
+    uint8_t* lzma_bin = nullptr;
+    uint8_t* block_bin[MAX_OLDFILES_NUM]= {nullptr};
+    uint8_t* pkg_bin = nullptr;
+    uint8_t* blk_rcy_bin = nullptr;     // merge 缩写 mrg
+    uint8_t* mrg_bin=nullptr;
+
+    int block_valid_cnt=0;
+
+
+    int64_t new_size_u64=0;
+    int64_t old_size_u64=0;
+    int32_t old_size_u32[MAX_OLDFILES_NUM]={0};
+    uint32_t old_app_ver[MAX_OLDFILES_NUM]={0};
+    int64_t diff_size_u64=0;
+    int32_t lzma_size_u32=0;
+    int32_t block_size_u32[MAX_OLDFILES_NUM]={0};
+    int32_t pkg_size_u32=0;
+    int32_t blk_size_u32=0;
+    int32_t mrg_size_u32=0;
+    int64_t mrg_size_u64=0;
+
+    int32_t diff_size_u32=0;
+    int32_t old_index = -1;
+
+    char w_path[MAX_PATH];
+
+    int32_t blk_rcy_size_s32;
+    uint8_t* p=nullptr;
+
+    // DFOTA_pkg_t s_pkg;
+    DFOTA_pkg_header_t *s_pkg_header = nullptr;
+    // DFOTA_blk_t s_blk;
+    DFOTA_blk_header_t *s_blk_header = nullptr;
+    // DFOTA_payload_t s_payload;
+    DFOTA_bsdiff_header_t *s_bsdiff_header = nullptr;
+    DFOTA_lzma_header_t *s_lzma_header = nullptr;
+    // DFOTA_dev_t *s_dev  = nullptr;
+
+    std::string p_path1 = "";
+    std::string p_path2 = "";
+    std::string str="";
+    QString qstr("");
+
+    vector <uint32_t> pre_app_ver_v;    // 旧bin文件列表中提取的app_ver
+    vector <uint32_t> post_app_ver_v;   // 打包后的bin文件内部提取的app_ver,理论上这2个应该一致。
+    // log_editText = log;
+
+    memset(&s_new_bin_file,0,sizeof(bin_file_t));
+    memset(&s_old_bin_file,0,sizeof(bin_file_t));
+    memset(&s_pkg_bin_file,0,sizeof(bin_file_t));
+
+
+    qDebug("----------------------------------------------------------------");
+    // 显示当前时间
+    get_time_display_ms(logTmp);
+    qDebug("%s func:%s()",logTmp,__func__);
+
+    // 分配内存
+    new_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    diff_bin = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    lzma_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    pkg_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    blk_rcy_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    mrg_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+
+
+    if(new_bin==NULL||diff_bin==NULL||lzma_bin==NULL||pkg_bin==NULL||blk_rcy_bin==NULL||mrg_bin==NULL){
+        qDebug("发生错误,申请内存失败...");
+        rtn = -1;
+        goto read_task_exit;
+    }
+
+
+    memset(new_bin,0,MAX_BIN_SIZE);
+    memset(diff_bin,0,MAX_BIN_SIZE*2);
+    memset(lzma_bin,0,MAX_BIN_SIZE);
+    memset(pkg_bin,0,MAX_BIN_SIZE);
+    memset(blk_rcy_bin,0,MAX_BIN_SIZE);
+    memset(mrg_bin,0,MAX_BIN_SIZE);
+
+    emit ui->process_bar_signals(0,"开始...");
+
+    // 读取打包bin文件
+    qDebug("读取打包bin文件:%s\n",inputData->pkgFilePath);
+
+    s_pkg_bin_file.path = inputData->pkgFilePath;
+    s_pkg_bin_file.addr = pkg_bin;
+    result = get_bin_file(&s_pkg_bin_file);
+    if(result !=0){
+        qDebug("读取文件失败:%s",s_pkg_bin_file.path);
+        rtn = -1;
+        goto read_task_exit;
+    }
+
+    // 检查新文件是否已经打包
+    if(memcmp(pkg_bin,PACKAGE_MAGIC,strlen(PACKAGE_MAGIC))!=0){
+        qDebug("未检测到打包标记,退出!");
+        rtn = -1;
+        goto read_task_exit;
+    };
+    for(i=0;i<MAX_OLDFILES_NUM;i++){
+
+    }
+    s_pkg_header = (DFOTA_pkg_header_t*)pkg_bin;
+    offset_pkg = 0;
+    p_pkg = pkg_bin;
+
+    // pkg_magic
+    memset(logMsg,0,sizeof (logMsg));
+    memcpy_s(logMsg,sizeof(logMsg),s_pkg_header,sizeof(DFOTA_pkg_header_t::pkg_magic));
+    qDebug("pkg_magic\t=%s",logMsg);
+
+    // pkg_time
+    get_stamp2string_s(s_pkg_header->pkg_time,logMsg);
+    qDebug("pkg_time\t=%d,=%s",s_pkg_header->pkg_time,logMsg);
+
+    // pkg_size
+    if(s_pkg_header->pkg_size != s_pkg_bin_file.size){
+        qDebug("打包文件,大小错误:pkg size=%d,calc size=%d",s_pkg_header->pkg_size,s_pkg_bin_file.size);
+        rtn = -1;
+        goto read_task_exit;
+
+    }
+    qDebug("pkg_size\t=%d",s_pkg_header->pkg_size);
+
+    // pkg_crc32
+    crc_u32 = crc32((uint32_t*)pkg_bin,(s_pkg_header->pkg_size-4)/4);
+    t_u32 = *(uint32_t*)(p_pkg + s_pkg_header->pkg_size-4);
+    if (t_u32!= crc_u32){
+        qDebug("打包文件,crc32错误:pkg crc32=0x%08X,calc size0x%08X",t_u32,crc_u32);
+        rtn = -1;
+        goto read_task_exit;
+    }
+    qDebug("pkg_crc32\t=0x%08X\n",t_u32);
+
+    offset_pkg +=sizeof(DFOTA_pkg_header_t);
+    p_pkg += sizeof(DFOTA_pkg_header_t);
+
+    offset_blk = 0;
+    p_blk = p_pkg;
+
+    for(i=0;i<MAX_OLDFILES_NUM;i++){
+        if((offset_pkg + offset_blk + 4 + sizeof(DFOTA_blk_header_t)) >= s_pkg_header->pkg_size){
+            break;
+
+        }
+// block
+        s_blk_header = (DFOTA_blk_header_t*)(p_blk);
+        if(memcmp(p_blk,BLOCK_MAGIC,strlen(BLOCK_MAGIC))!=0){
+            qDebug("未检测到 块 标记,退出!");
+            rtn = -1;
+            goto read_task_exit;
+        };
+
+        // blk_header.blk__magic
+        memset(logMsg,0,sizeof (logMsg));
+        memcpy_s(logMsg,sizeof(logMsg),s_blk_header,sizeof(DFOTA_blk_header_t::blk_magic));
+        qDebug("%d blk_magic\t=%s",i + 1,logMsg);
+
+        crc_u32 = crc32((uint32_t*)p_blk,(s_blk_header->blk_size-4)/4);
+        t_u32 = *(uint32_t*)(p_blk + s_blk_header->blk_size-4);
+        if (t_u32!= crc_u32){
+            qDebug("%d crc32错误:blk crc32=0x%08X,calc size0x%08X",i + 1,t_u32,crc_u32);
+            rtn = -1;
+            goto read_task_exit;
+        }
+
+        // blk_header.blk_size
+        qDebug("%d blk_size\t=%d",i + 1,s_blk_header->blk_size);
+
+        // blk_header.crc32
+        qDebug("%d blk crc32\t=0x%08X",i + 1,crc_u32);
+
+        // blk_header.d_flag
+        qDebug("%d d_flag\t\t=%d",i + 1,s_blk_header->d_flag);
+
+        // blk_header.z_flag
+        qDebug("%d z_flag\t\t=%d",i + 1,s_blk_header->z_flag);
+
+        if (s_blk_header->d_flag > 0){
+
+            // blk_header.old_ver
+            qDebug("%d old_ver\t\t=%08X",i + 1,s_blk_header->old_ver);
+
+            // blk_header.old_size
+            qDebug("%d old_size\t=%d",i + 1,s_blk_header->old_size);
+
+            // blk_header.old_crc32
+            qDebug("%d old_crc32\t=0x%08X",i + 1,s_blk_header->old_crc32);
+
+            // blk_header.new_ver
+            qDebug("%d new_ver\t\t=%08X",i + 1,s_blk_header->new_ver);
+
+            // blk_header.new_size
+            qDebug("%d new_size\t=%d",i + 1,s_blk_header->new_size);
+
+            // blk_header.new_crc32
+            qDebug("%d new_crc32\t=0x%08X",i + 1,s_blk_header->new_crc32);
+
+            // blk_header.new_ep
+            qDebug("%d new_ep\t\t=0x%08X",i + 1,s_blk_header->new_ep);
+
+            // blk_header.pad_size
+            qDebug("%d pad_size\t=%d",i + 1,s_blk_header->pad_size);
+
+            p_diff = p_blk + sizeof(DFOTA_blk_header_t);
+            s_bsdiff_header = (DFOTA_bsdiff_header_t*)(p_diff);
+
+            if(memcmp(p_diff,BSDIFF_MAGIC,strlen(BSDIFF_MAGIC))!=0){
+                qDebug("未检测到 差分 标记,退出!");
+                rtn = -1;
+                goto read_task_exit;
+            };
+
+            if(s_blk_header->z_flag > 0){
+                // D1Z1,有差分,有压缩
+                p_lzma = p_blk + sizeof(DFOTA_blk_header_t) + sizeof(DFOTA_bsdiff_header_t);
+                s_lzma_header = (DFOTA_lzma_header_t*)(p_lzma);
+
+                // lzma_header.props
+                qDebug("%d lzma props\t=0x%02X",i + 1,s_lzma_header->props);
+
+                // lzma_header.dic
+                qDebug("%d lzma dic\t=%d",i + 1,s_lzma_header->dic);
+
+                // lzma_header.raw_size
+                qDebug("%d lzma raw_size\t=%d",i + 1,(int)(s_lzma_header->raw_size));
+
+
+            }
+            else{
+                // D1Z0,有差分,无压缩
+                // do nothing
+            }
+        }else{
+            if(s_blk_header->z_flag > 0){
+                // D0Z1,无差分,有压缩,package里只包含1个new bin的压缩
+
+                // blk_header.new_ver
+                qDebug("%d new_ver\t\t=%08X",i + 1,s_blk_header->new_ver);
+
+                // blk_header.new_size
+                qDebug("%d new_size\t=%d",i + 1,s_blk_header->new_size);
+
+                // blk_header.new_crc32
+                qDebug("%d new_crc32\t=0x%08X",i + 1,s_blk_header->new_crc32);
+
+                // blk_header.new_ep
+                qDebug("%d new_ep\t\t=0x%08X",i + 1,s_blk_header->new_ep);
+
+                // blk_header.pad_size
+                qDebug("%d pad_size\t=%d",i + 1,s_blk_header->pad_size);
+
+                p_lzma = p_blk + sizeof(DFOTA_blk_header_t);
+                s_lzma_header = (DFOTA_lzma_header_t*)(p_lzma);
+
+                // lzma_header.props
+                qDebug("%d lzma props\t=0x%02X",i + 1,s_lzma_header->props);
+
+                // lzma_header.dic
+                qDebug("%d lzma dic\t=%d",i + 1,s_lzma_header->dic);
+
+                // lzma_header.raw_size
+                qDebug("%d lzma raw_size\t=%d",i + 1,(int)(s_lzma_header->raw_size));
+
+
+            }
+            else{
+                // D0Z0,无差分,无压缩,package里只包含1个new bin的压缩
+
+                // blk_header.new_ver
+                qDebug("%d new_ver\t\t=%08X",i + 1,s_blk_header->new_ver);
+
+                // blk_header.new_size
+                qDebug("%d new_size\t=%d",i + 1,s_blk_header->new_size);
+
+                // blk_header.new_crc32
+                qDebug("%d new_crc32\t=0x%08X",i + 1,s_blk_header->new_crc32);
+
+                // blk_header.new_ep
+                qDebug("%d new_ep\t\t=0x%08X",i + 1,s_blk_header->new_ep);
+
+                // blk_header.pad_size
+                qDebug("%d pad_size\t=%d",i + 1,s_blk_header->pad_size);
+
+            }
+        }
+
+
+        // TODO长度校验
+
+        offset_blk += s_blk_header->blk_size;
+        p_blk += s_blk_header->blk_size;
+
+        block_valid_cnt++;
+
+
+        qDebug("");
+        // 就
+
+    }
+
+    get_time_display_ms(logTmp);
+
+    qDebug("%s:操作已全部完成\r\n\r\n",logTmp);
+
+
+    emit ui->process_bar_signals(100,"已完成");
+read_task_exit:
+    if(new_bin)     free(new_bin);
+    if(diff_bin)    free(diff_bin);
+    if(lzma_bin)    free(lzma_bin);
+    if(pkg_bin)     free(pkg_bin);
+    if(blk_rcy_bin) free(blk_rcy_bin);
+    if(mrg_bin)     free(mrg_bin);
+
+    for (i=0;i<MAX_OLDFILES_NUM ;i++ ) {
+        if(old_bin[i])      free(old_bin[i]);
+        if(block_bin[i])    free(block_bin[i]);
+    }
+    return rtn;
+}
+
+
+int DFOTA::check_task(MainWindow* ui,InputData_t* inputData){
+    char logMsg[256]="\0";
+    char logTmp[256]="\0";
+    int logLen=0;
+    int result=0;
+    int rtn=0;
+
+
+    int i=0,j=0,k=0;
+    uint32_t crc_u32 = 0;
+    uint32_t t_u32 = 0;
+    int old_cont=0;
+    int size = 0;
+
+    int offset_pkg = 0;
+    int offset_blk = 0;
+    int offset_diff = 0;
+    int offset_lzma = 0;
+
+    char pkg_path[MAX_PATH];
+    bin_file_t s_new_bin_file;
+    bin_file_t s_old_bin_file;
+    bin_file_t s_pkg_bin_file;
+
+    uint8_t* p_pkg = nullptr;
+    uint8_t* p_blk = nullptr;
+    uint8_t* p_diff = nullptr;
+    uint8_t* p_lzma = nullptr;
+
+    uint8_t* new_bin = nullptr;
+    uint8_t* old_bin[MAX_OLDFILES_NUM] = {nullptr};
+    uint8_t* diff_bin = nullptr;
+    uint8_t* lzma_bin = nullptr;
+    uint8_t* block_bin[MAX_OLDFILES_NUM]= {nullptr};
+    uint8_t* pkg_bin = nullptr;
+    uint8_t* blk_rcy_bin = nullptr;     // merge 缩写 mrg
+    uint8_t* mrg_bin=nullptr;
+
+    int block_valid_cnt=0;
+
+
+    int64_t new_size_u64=0;
+    int64_t old_size_u64=0;
+    int32_t old_size_u32[MAX_OLDFILES_NUM]={0};
+    uint32_t old_app_ver[MAX_OLDFILES_NUM]={0};
+    int64_t diff_size_u64=0;
+    int32_t lzma_size_u32=0;
+    int32_t block_size_u32[MAX_OLDFILES_NUM]={0};
+    int32_t pkg_size_u32=0;
+    int32_t blk_size_u32=0;
+    int32_t mrg_size_u32=0;
+    int64_t mrg_size_u64=0;
+
+    int32_t diff_size_u32=0;
+    int32_t old_index = -1;
+
+    char w_path[MAX_PATH];
+
+    int32_t blk_rcy_size_s32;
+    uint8_t* p=nullptr;
+
+    // DFOTA_pkg_t s_pkg;
+    DFOTA_pkg_header_t *s_pkg_header = nullptr;
+    // DFOTA_blk_t s_blk;
+    DFOTA_blk_header_t *s_blk_header = nullptr;
+    // DFOTA_payload_t s_payload;
+    DFOTA_bsdiff_header_t *s_bsdiff_header = nullptr;
+    DFOTA_lzma_header_t *s_lzma_header = nullptr;
+    // DFOTA_dev_t *s_dev  = nullptr;
+
+    std::string p_path1 = "";
+    std::string p_path2 = "";
+    std::string str="";
+    QString qstr("");
+
+    vector <uint32_t> pre_app_ver_v;    // 旧bin文件列表中提取的app_ver
+    vector <uint32_t> post_app_ver_v;   // 打包后的bin文件内部提取的app_ver,理论上这2个应该一致。
+    // log_editText = log;
+
+    memset(&s_new_bin_file,0,sizeof(bin_file_t));
+    memset(&s_old_bin_file,0,sizeof(bin_file_t));
+    memset(&s_pkg_bin_file,0,sizeof(bin_file_t));
+
+
+    qDebug("----------------------------------------------------------------");
+    // 显示当前时间
+    get_time_display_ms(logTmp);
+    qDebug("%s func:%s()",logTmp,__func__);
+
+    // 分配内存
+    new_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    diff_bin = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    lzma_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    pkg_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    blk_rcy_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    mrg_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+
+
+    if(new_bin==NULL||diff_bin==NULL||lzma_bin==NULL||pkg_bin==NULL||blk_rcy_bin==NULL||mrg_bin==NULL){
+        qDebug("发生错误,申请内存失败...");
+        rtn = -1;
+        goto check_task_exit;
+    }
+
+
+    memset(new_bin,0,MAX_BIN_SIZE);
+    memset(diff_bin,0,MAX_BIN_SIZE*2);
+    memset(lzma_bin,0,MAX_BIN_SIZE);
+    memset(pkg_bin,0,MAX_BIN_SIZE);
+    memset(blk_rcy_bin,0,MAX_BIN_SIZE);
+    memset(mrg_bin,0,MAX_BIN_SIZE);
+
+    emit ui->process_bar_signals(0,"开始...");
+
+//读取各种bin文件//////////////////////////////////////////////////////////
+    // 读取新版bin文件
+    qDebug("读取新版bin文件...");
+
+    s_new_bin_file.path = inputData->newFilePath;
+    s_new_bin_file.addr = new_bin;
+    result = get_bin_file(&s_new_bin_file);
+    if(result !=0){
+        qDebug("读取文件失败:%s",s_new_bin_file.path);
+        rtn = -1;
+        goto check_task_exit;
+    }
+
+
+    qDebug("new bin: app_ver:%08X,size:%d,full-crc32=0x%08X",
+           s_new_bin_file.app_ver,s_new_bin_file.size,s_new_bin_file.crc32);
+
+    // 读取旧版bin文件
+    qDebug("读取旧版bin文件...");
+    for (i=0;i<MAX_OLDFILES_NUM ;i++ ) {
+
+        old_bin[i] = (uint8_t*)malloc(MAX_BIN_SIZE);
+        if(old_bin[i] == nullptr){
+            qDebug("发生错误,申请内存失败...");
+            rtn = -1;
+            goto check_task_exit;
+        }
+        memset(old_bin[i],0,MAX_BIN_SIZE);
+
+        s_old_bin_file.path = inputData->oldFilePath[i];
+        s_old_bin_file.addr = old_bin[i];
+        result = get_bin_file(&s_old_bin_file);
+        if(result !=0){
+            continue;
+        }
+        // TODO app_ver 重复性判断
+
+        old_size_u32[i] = s_old_bin_file.size;
+        old_app_ver[i] = s_old_bin_file.app_ver;
+
+        pre_app_ver_v.push_back(s_old_bin_file.app_ver);
+    }
+    // 排序
+    // sort(pre_app_ver_v.begin(),pre_app_ver_v.end());
+
+    // 读取打包bin文件
+    qDebug("读取打包bin文件:%s\n",inputData->pkgFilePath);
+
+    s_pkg_bin_file.path = inputData->pkgFilePath;
+    s_pkg_bin_file.addr = pkg_bin;
+    result = get_bin_file(&s_pkg_bin_file);
+    if(result !=0){
+        qDebug("读取文件失败:%s",s_pkg_bin_file.path);
+        rtn = -1;
+        goto check_task_exit;
+    }
+
+    // 检查新文件是否已经打包
+    if(memcmp(pkg_bin,PACKAGE_MAGIC,strlen(PACKAGE_MAGIC))!=0){
+        qDebug("未检测到打包标记,退出!");
+        rtn = -1;
+        goto check_task_exit;
+    };
+    for(i=0;i<MAX_OLDFILES_NUM;i++){
+
+    }
+    s_pkg_header = (DFOTA_pkg_header_t*)pkg_bin;
+    offset_pkg = 0;
+    p_pkg = pkg_bin;
+
+    // pkg_magic
+    memset(logMsg,0,sizeof (logMsg));
+    memcpy_s(logMsg,sizeof(logMsg),s_pkg_header,sizeof(DFOTA_pkg_header_t::pkg_magic));
+    qDebug("pkg_magic\t=%s",logMsg);
+
+    // pkg_time
+    get_stamp2string_s(s_pkg_header->pkg_time,logMsg);
+    qDebug("pkg_time\t=%d,=%s",s_pkg_header->pkg_time,logMsg);
+
+    // pkg_size
+    if(s_pkg_header->pkg_size != s_pkg_bin_file.size){
+        qDebug("打包文件,大小错误:pkg size=%d,calc size=%d",s_pkg_header->pkg_size,s_pkg_bin_file.size);
+        rtn = -1;
+        goto check_task_exit;
+
+    }
+    qDebug("pkg_size\t=%d",s_pkg_header->pkg_size);
+
+    // pkg_crc32
+    crc_u32 = crc32((uint32_t*)pkg_bin,(s_pkg_header->pkg_size-4)/4);
+    t_u32 = *(uint32_t*)(p_pkg + s_pkg_header->pkg_size-4);
+    if (t_u32!= crc_u32){
+        qDebug("打包文件,crc32错误:pkg crc32=0x%08X,calc size0x%08X",t_u32,crc_u32);
+        rtn = -1;
+        goto check_task_exit;
+    }
+    qDebug("pkg_crc32\t=0x%08X\n",t_u32);
+
+    offset_pkg +=sizeof(DFOTA_pkg_header_t);
+    p_pkg += sizeof(DFOTA_pkg_header_t);
+
+    offset_blk = 0;
+    p_blk = p_pkg;
+
+    for(i=0;i<MAX_OLDFILES_NUM;i++){
+        if((offset_pkg + offset_blk + 4 + sizeof(DFOTA_blk_header_t)) >= s_pkg_header->pkg_size){
+            break;
+
+        }
+// block
+        s_blk_header = (DFOTA_blk_header_t*)(p_blk);
+        if(memcmp(p_blk,BLOCK_MAGIC,strlen(BLOCK_MAGIC))!=0){
+            qDebug("未检测到 块 标记,退出!");
+            rtn = -1;
+            goto check_task_exit;
+        };
+
+        // blk_header.blk__magic
+        memset(logMsg,0,sizeof (logMsg));
+        memcpy_s(logMsg,sizeof(logMsg),s_blk_header,sizeof(DFOTA_blk_header_t::blk_magic));
+        qDebug("%d blk_magic\t=%s",i + 1,logMsg);
+
+        crc_u32 = crc32((uint32_t*)p_blk,(s_blk_header->blk_size-4)/4);
+        t_u32 = *(uint32_t*)(p_blk + s_blk_header->blk_size-4);
+        if (t_u32!= crc_u32){
+            qDebug("%d crc32错误:blk crc32=0x%08X,calc size0x%08X",i + 1,t_u32,crc_u32);
+            rtn = -1;
+            goto check_task_exit;
+        }
+        // blk_header.blk_size
+        qDebug("%d blk_size\t=%d",i + 1,s_blk_header->blk_size);
+
+        // blk_header.crc32
+        qDebug("%d blk crc32\t=0x%08X",i + 1,crc_u32);
+
+        // blk_header.d_flag
+        qDebug("%d d_flag\t\t=%d",i + 1,s_blk_header->d_flag);
+
+        // blk_header.z_flag
+        qDebug("%d z_flag\t\t=%d",i + 1,s_blk_header->z_flag);
+
+        if (s_blk_header->d_flag > 0){
+
+
+            // blk_header.old_ver
+            qDebug("%d old_ver\t\t=%08X",i + 1,s_blk_header->old_ver);
+
+            // blk_header.old_size
+            qDebug("%d old_size\t=%d",i + 1,s_blk_header->old_size);
+
+            // blk_header.old_crc32
+            qDebug("%d old_crc32\t=0x%08X",i + 1,s_blk_header->old_crc32);
+
+            // blk_header.new_ver
+            qDebug("%d new_ver\t\t=%08X",i + 1,s_blk_header->new_ver);
+
+            // blk_header.new_size
+            qDebug("%d new_size\t=%d",i + 1,s_blk_header->new_size);
+
+            // blk_header.new_crc32
+            qDebug("%d new_crc32\t=0x%08X",i + 1,s_blk_header->new_crc32);
+
+            // blk_header.new_ep
+            qDebug("%d new_ep\t\t=0x%08X",i + 1,s_blk_header->new_ep);
+
+            // blk_header.pad_size
+            qDebug("%d pad_size\t=%d",i + 1,s_blk_header->pad_size);
+
+            p_diff = p_blk + sizeof(DFOTA_blk_header_t);
+            s_bsdiff_header = (DFOTA_bsdiff_header_t*)(p_diff);
+
+            if(memcmp(p_diff,BSDIFF_MAGIC,strlen(BSDIFF_MAGIC))!=0){
+                qDebug("未检测到 差分 标记,退出!");
+                rtn = -1;
+                goto check_task_exit;
+            };
+
+            memset(logMsg,0,sizeof (logMsg));
+            memcpy_s(logMsg,sizeof(logMsg),s_bsdiff_header,sizeof(DFOTA_bsdiff_header_t::diff_magic));
+            qDebug("%d bsdiff_magic\t=%s",i + 1,logMsg);
+
+            if(s_blk_header->z_flag > 0){
+                // D1Z1,有差分,有压缩
+                p_lzma = p_blk + sizeof(DFOTA_blk_header_t) + sizeof(DFOTA_bsdiff_header_t);
+                s_lzma_header = (DFOTA_lzma_header_t*)(p_lzma);
+
+                // 去掉blk.header,bsdiff.header,blk.crc32,已解决但任然可能含有填充字节。
+                lzma_size_u32 = s_blk_header->blk_size - sizeof(DFOTA_blk_header_t) - sizeof(DFOTA_bsdiff_header_t) - s_blk_header->pad_size - 4;
+                // qDebug("%d lzma_size\t=%d",i + 1,lzma_size_u32);
+
+
+                memcpy(lzma_bin,p_lzma,lzma_size_u32);
+
+
+                // 写 lzma
+                get_time_file_name_ms(logMsg);
+                snprintf(w_path,sizeof(w_path),"tmp/%s_B_D1Z1---lzma_%08X_%08X.bin",
+                         logMsg,
+                         s_blk_header->old_ver,
+                         s_blk_header->new_ver);
+                result = write_bin_file(w_path,lzma_bin,lzma_size_u32);
+                qDebug("%d lzma:size\t=%6d,patch=\n%s",i + 1,lzma_size_u32,w_path);
+
+
+                // 解压缩,得到差分文件
+                // diff_size_u32 = (int)s_lzma_header->raw_size;
+                memset(diff_bin,0,MAX_BIN_SIZE*2);
+                result = lzma_bin_decompress(diff_bin,&diff_size_u32,lzma_bin,lzma_size_u32);
+                if(result != 0){
+                    qDebug("error:lzma_bin_decompress =%d",result);
+                    rtn = -1;
+                    goto check_task_exit;
+                }
+
+                // 写 bsdiff
+                get_time_file_name_ms(logMsg);
+                snprintf(w_path,sizeof(w_path),"tmp/%s_B_D1Z1--bsdiff_%08X_%08X.bin",
+                         logMsg,
+                         s_blk_header->old_ver,
+                         s_blk_header->new_ver);
+                result = write_bin_file(w_path,diff_bin,(int)s_lzma_header->raw_size);
+                qDebug("%d bsdiff:size\t=%6d,patch=\n%s",i + 1,(int)s_lzma_header->raw_size,w_path);
+
+                // 索引到对应的old bin,old size,
+                for(j=0;j<MAX_OLDFILES_NUM;j++){
+                    if(s_blk_header->old_ver == old_app_ver[j]){
+                        old_index = j;
+                        break;
+                    }
+                }
+                if(old_index<0){
+                    qDebug("未索引导对应的old bin");
+                    break;
+                }
+
+                if(old_size_u32[old_index] !=s_blk_header->old_size){
+                    qDebug("size 不相等");
+                    break;
+                }
+                // qDebug("%d old_index=%d",i + 1,old_index);
+
+                old_size_u64 = (int64_t)s_blk_header->old_size;
+                mrg_size_u64 = (int64_t)s_blk_header->new_size;
+                diff_size_u64 = s_lzma_header->raw_size;
+                memset(mrg_bin,0,MAX_BIN_SIZE);
+                bspatch((uint8_t*)old_bin[old_index],(int64_t)old_size_u64,(uint8_t*)mrg_bin,(int64_t)mrg_size_u64,(uint8_t*)diff_bin,(int64_t)diff_size_u64);
+
+                get_time_file_name_ms(logMsg);
+                snprintf(w_path,sizeof(w_path),"tmp/%s_B_D1Z1-merge_%08X_%08X.bin",
+                         logMsg,
+                         s_blk_header->old_ver,
+                         s_blk_header->new_ver);
+
+                result = write_bin_file(w_path,mrg_bin,(int)mrg_size_u64);
+                qDebug("%d merge:size\t=%6d,patch=\n%s",i + 1,(int)mrg_size_u64,w_path);
+
+                if(memcmp(new_bin,mrg_bin,s_blk_header->new_size) ==0){
+                    qDebug("%d 比较,新bin文件与合并bin文件,相等.",i + 1);
+                }
+                else{
+                    qDebug("%d 比较,新bin文件与合并bin文件,不相等.",i + 1);
+                }
+            }
+            else{
+                // D1Z0,有差分,无压缩
+                // do nothing
+            }
+        }else{
+            if(s_blk_header->z_flag > 0){
+                // D0Z1,无差分,有压缩,package里只包含1个new bin的压缩
+
+                // blk_header.pad_size
+                qDebug("%d pad_size\t=%d",i + 1,s_blk_header->pad_size);
+
+                p_lzma = p_blk + sizeof(DFOTA_blk_header_t);
+                s_lzma_header = (DFOTA_lzma_header_t*)(p_lzma);
+
+                // 去掉blk.header,blk.crc32,已解决但任然可能含有填充字节。
+                lzma_size_u32 = s_blk_header->blk_size - sizeof(DFOTA_blk_header_t) - s_blk_header->pad_size - 4;
+
+                // 截取lzma 写入文件
+                get_time_file_name_ms(logMsg);
+                snprintf(w_path,sizeof(w_path),"tmp/%s_B_D0Z1_lzma_%08X.bin",
+                         logMsg,
+                         s_blk_header->new_ver);
+                result = write_bin_file(w_path,p_lzma,lzma_size_u32);
+                qDebug("%d lzma:size\t=%6d,patch=\n%s",i + 1,lzma_size_u32,w_path);
+
+                memset(mrg_bin,0,MAX_BIN_SIZE);
+                // mrg_size_u32 = s_blk_header->new_size;
+
+                // 解压缩,得到文件
+                lzma_bin_decompress(mrg_bin,&mrg_size_u32,p_lzma,lzma_size_u32);
+                get_time_file_name_ms(logMsg);
+                snprintf(w_path,sizeof(w_path),"tmp/%s_B_D0Z1_merge_%08X.bin",
+                         logMsg,
+                         s_blk_header->new_ver);
+                result = write_bin_file(w_path,mrg_bin,s_blk_header->new_size);
+                qDebug("%d merge:size\t=%6d,patch=\n%s",i + 1,lzma_size_u32,w_path);
+
+                if(memcmp(new_bin,mrg_bin,s_blk_header->new_size) ==0){
+                    qDebug("%d 比较,新bin文件与合并bin文件,相等.",i + 1);
+                }
+                else{
+                    qDebug("%d 比较,新bin文件与合并bin文件,不相等.",i + 1);
+                }
+            }
+            else{
+                // D0Z0,无差分,无压缩,package里只包含1个new bin的压缩
+
+                // blk_header.new_ver
+                qDebug("%d new_ver\t\t=%08X",i + 1,s_blk_header->new_ver);
+
+                // blk_header.new_size
+                qDebug("%d new_size\t=%d",i + 1,s_blk_header->new_size);
+
+                // blk_header.new_crc32
+                qDebug("%d new_crc32\t=0x%08X",i + 1,s_blk_header->new_crc32);
+
+                // blk_header.new_ep
+                qDebug("%d new_ep\t\t=0x%08X",i + 1,s_blk_header->new_ep);
+
+                // blk_header.pad_size
+                qDebug("%d pad_size\t=%d",i + 1,s_blk_header->pad_size);
+
+                p = p_blk + sizeof(DFOTA_blk_header_t);
+
+                // 去掉blk.header,blk.crc32。
+                mrg_size_u32 = s_blk_header->blk_size - sizeof(DFOTA_blk_header_t) - s_blk_header->pad_size - 4;
+                memcpy(mrg_bin,p,mrg_size_u32);
+                get_time_file_name_ms(logMsg);
+                snprintf(w_path,sizeof(w_path),"tmp/%s_B_D0Z0_merge_%08X.bin",
+                         logMsg,
+                         s_blk_header->new_ver);
+                result = write_bin_file(w_path,mrg_bin,mrg_size_u32);
+                //
+
+                if(memcmp(new_bin,mrg_bin,s_blk_header->new_size) ==0){
+                    qDebug("%d 比较,新bin文件与合并bin文件,相等.",i + 1);
+                }
+                else{
+                    qDebug("%d 比较,新bin文件与合并bin文件,不相等.",i + 1);
+                }
+            }
+        }
+
+
+        // TODO长度校验
+
+        offset_blk += s_blk_header->blk_size;
+        p_blk += s_blk_header->blk_size;
+
+        block_valid_cnt++;
+
+
+        qDebug("");
+        // 就
+
+    }
+
+    get_time_display_ms(logTmp);
+
+    qDebug("%s:操作已全部完成\r\n\r\n",logTmp);
+
+
+    emit ui->process_bar_signals(100,"已完成");
+check_task_exit:
+    if(new_bin)     free(new_bin);
+    if(diff_bin)    free(diff_bin);
+    if(lzma_bin)    free(lzma_bin);
+    if(pkg_bin)     free(pkg_bin);
+    if(blk_rcy_bin) free(blk_rcy_bin);
+    if(mrg_bin)     free(mrg_bin);
+
+    for (i=0;i<MAX_OLDFILES_NUM ;i++ ) {
+        if(old_bin[i])      free(old_bin[i]);
+        if(block_bin[i])    free(block_bin[i]);
+    }
+    return rtn;
+};
+
+
+int DFOTA::bspatch_task(MainWindow* ui,InputData_t* inputData){
+    qDebug("bspatch_task\r\n");
+    return 0;
+};
+DFOTA::~DFOTA(){
+
+}
+
+
+// 显示时间的格式,到秒 2020-01-01 00:00:00
+void get_time_display_s(char *str_time) {
+    struct tm *tm_t;
+    struct timeval time;
+
+    gettimeofday(&time,NULL);
+    tm_t = localtime(&time.tv_sec);
+    if(NULL != tm_t) {
+        sprintf(str_time,"%04d-%02d-%02d %02d:%02d:%02d",
+            tm_t->tm_year+1900,
+            tm_t->tm_mon+1,
+            tm_t->tm_mday,
+            tm_t->tm_hour,
+            tm_t->tm_min,
+            tm_t->tm_sec);
+    }
+    return;
+}
+
+// 显示时间的格式,到毫秒 2020-01-01 00:00:00.000
+void get_time_display_ms(char *str_time) {
+    struct tm *tm_t;
+    struct timeval time;
+
+    gettimeofday(&time,NULL);
+    tm_t = localtime(&time.tv_sec);
+    if(NULL != tm_t) {
+        sprintf(str_time,"%04d-%02d-%02d %02d:%02d:%02d.%03d",
+            tm_t->tm_year+1900,
+            tm_t->tm_mon+1,
+            tm_t->tm_mday,
+            tm_t->tm_hour,
+            tm_t->tm_min,
+            tm_t->tm_sec,
+            time.tv_usec/1000);
+    }
+
+    return;
+}
+
+// 由时间戳转字符串,到秒 2020-01-01 00:00:00
+void get_stamp2string_s(time_t stamp,char* str_time){
+    struct tm *tm_t;
+
+    tm_t = localtime(&stamp);
+    if(NULL != tm_t) {
+        sprintf(str_time,"%04d-%02d-%02d %02d:%02d:%02d",
+            tm_t->tm_year+1900,
+            tm_t->tm_mon+1,
+            tm_t->tm_mday,
+            tm_t->tm_hour,
+            tm_t->tm_min,
+            tm_t->tm_sec);
+    }
+    return;
+}
+
+// 生成文件名格式,到秒 20200101-000000
+void get_time_file_name_s(char *str_time) {
+    struct tm *tm_t;
+    struct timeval time;
+
+    gettimeofday(&time,NULL);
+    tm_t = localtime(&time.tv_sec);
+    if(NULL != tm_t) {
+        sprintf(str_time,"%04d%02d%02d-%02d%02d%02d",
+            tm_t->tm_year+1900,
+            tm_t->tm_mon+1,
+            tm_t->tm_mday,
+            tm_t->tm_hour,
+            tm_t->tm_min,
+            tm_t->tm_sec);
+    }
+
+    return;
+}
+// 生成文件名格式,到毫秒 20200101-000000-000
+void get_time_file_name_ms(char *str_time) {
+    struct tm *tm_t;
+    struct timeval time;
+
+    gettimeofday(&time,NULL);
+    tm_t = localtime(&time.tv_sec);
+    if(NULL != tm_t) {
+        sprintf(str_time,"%04d%02d%02d-%02d%02d%02d-%03d",
+            tm_t->tm_year+1900,
+            tm_t->tm_mon+1,
+            tm_t->tm_mday,
+            tm_t->tm_hour,
+            tm_t->tm_min,
+            tm_t->tm_sec,
+            time.tv_usec/1000);
+    }
+
+    return;
+}
+
+
+int fr(char* path,uint8_t* buff,int *size){
+    ifstream inFile(path,ios::in|ios::binary);
+    if(!inFile.is_open()) {
+        qDebug("打开文件失败:%s",path);
+        return -1;
+    }
+    char* p = (char*)buff;
+    int l = 0;
+    while(inFile.read(p++, sizeof(char))) {
+        l++;
+    }
+    inFile.close();
+    *size = l;
+    return l;
+}
+int my_fr(const char* path,uint8_t* buff,int *size){
+    ifstream inFile(path,ios::in|ios::binary);
+    if(!inFile.is_open()) {
+        qDebug("打开文件失败:%s",path);
+        return -1;
+    }
+    char* p = (char*)buff;
+    int l = 0;
+    while(inFile.read(p++, sizeof(char))) {
+        l++;
+    }
+    inFile.close();
+    *size = l;
+    return l;
+}
+
+void dfota_test1(void){
+    qDebug() << "dfota_test\n";
+    int i=0,j=0,k=0;
+
+    char        new_path[MAX_PATH]      = "01013017.bin";
+    uint8_t*    new_bin                 = nullptr;
+    int32_t     new_size_i32            = 0;
+    int64_t     new_size_i64            = 0;
+
+    char        old_path[MAX_PATH]      =  "01013016.bin";
+    uint8_t*    old_bin                 = nullptr;
+    int32_t     old_size_i32            = 0;
+    int64_t     old_size_i64            = 0;
+
+    char        bsdiff_path_w[MAX_PATH] = "bsdiff_w_01013016_01013017.bin";
+    uint8_t*    bsdiff_bin_w            = nullptr;
+    int32_t     bsdiff_size_w_i32       = 0;
+    int64_t     bsdiff_size_w_i64       = 0;
+
+    char        bsdiff_path_r[MAX_PATH] = "bsdiff_r_01013016_01013017.bin";
+    uint8_t*    bsdiff_bin_r            = nullptr;
+    int32_t     bsdiff_size_r_i32       = 0;
+    int64_t     bsdiff_size_r_i64       = 0;
+
+    char        lzma_path_w[MAX_PATH]   = "lzma_01013016_01013017.bin";
+    uint8_t*    lzma_bin_w              = nullptr;
+    int32_t     lzma_size_w_i32         = 0;
+    // int64_t     lzma_size_w_i64         = 0;
+
+    char        lzma_path_r[MAX_PATH]   = "lzma_01013016_01013017.bin";
+    uint8_t*    lzma_bin_r              = nullptr;
+    int32_t     lzma_size_r_i32         = 0;
+    int64_t     lzma_size_r_i64         = 0;
+
+
+
+    new_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    old_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    bsdiff_bin_w = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    bsdiff_bin_r = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    lzma_bin_w = (uint8_t*)malloc(MAX_BIN_SIZE);
+    lzma_bin_r = (uint8_t*)malloc(MAX_BIN_SIZE);
+
+    memset(new_bin,0,MAX_BIN_SIZE);
+    memset(old_bin,0,MAX_BIN_SIZE);
+    memset(bsdiff_bin_w,0,MAX_BIN_SIZE*2);
+    memset(bsdiff_bin_r,0,MAX_BIN_SIZE*2);
+    memset(lzma_bin_w,0,MAX_BIN_SIZE);
+    memset(lzma_bin_r,0,MAX_BIN_SIZE);
+
+    if(new_bin==NULL||old_bin==NULL||bsdiff_bin_w==NULL||bsdiff_bin_r==NULL||lzma_bin_w==NULL||lzma_bin_r==NULL){
+        qDebug("发生错误,申请内存失败...");
+        return;
+    }
+
+//----------------------------------------------------------------------------
+    fr(new_path,new_bin,&new_size_i32);
+    qDebug("%s:%d:%s,%d",__func__,__LINE__,new_path,new_size_i32);
+
+    fr(old_path,old_bin,&old_size_i32);
+    qDebug("%s:%d:%s,%d",__func__,__LINE__,old_path,old_size_i32);
+
+//----------------------------------------------------------------------------
+    new_size_i64 = (int64_t)new_size_i32;
+    old_size_i64 = (int64_t)old_size_i32;
+    bsdiff(old_bin,old_size_i64,new_bin,new_size_i64,bsdiff_bin_w,&bsdiff_size_w_i64);
+    qDebug("%s:%d:bsdiff_size_w_i64 = %lld",__func__,__LINE__,bsdiff_size_w_i64);
+
+    write_bin_file(bsdiff_path_w,bsdiff_bin_w,(int)bsdiff_size_w_i64);
+    qDebug("%s:%d:write_bin_file finished:%s",__func__,__LINE__,bsdiff_path_w);
+//----------------------------------------------------------------------------
+    lzma_compress((uint8_t *)lzma_bin_w, &lzma_size_w_i32, (uint8_t *)bsdiff_bin_w, (int32_t)bsdiff_size_w_i64, 12, 9);
+    qDebug("%s:%d:lzma_size_w_i32=%d",__func__,__LINE__,lzma_size_w_i32);
+
+    write_bin_file(lzma_path_w,lzma_bin_w,lzma_size_w_i32);
+    qDebug("%s:%d:write_bin_file finished:%s",__func__,__LINE__,lzma_path_w);
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+    fr(lzma_path_r,lzma_bin_r,&lzma_size_r_i32);
+    qDebug("%s:%d:read lzma,lzma_size_r_i32 = %d",__func__,__LINE__,lzma_size_r_i32);
+
+
+    lzma_bin_decompress(bsdiff_bin_r,&bsdiff_size_r_i32, lzma_bin_r,0);
+    qDebug("%s:%d:lzma_bin_decompress,bsdiff_size_r_i32  = %d",__func__,__LINE__,bsdiff_size_r_i32);
+
+    write_bin_file(bsdiff_path_r,bsdiff_bin_r,bsdiff_size_r_i32);
+    qDebug("%s:%d:write_bin_file finished:%s",__func__,__LINE__,bsdiff_path_r);
+/*
+    // int bspatch(uint8_t* oldbuf, int64_t oldsize, uint8_t* newbuf, int64_t newsize, uint8_t* diffbuf, int64_t diffsize)
+    old_size_i64 = (int64_t)old_size_i32;
+    new_size_i64 = (int64_t)old_size_i32;
+    bsdiff_size_r_i64 = (int64_t)old_size_i32;
+    bspatch(old_bin,old_size_i64,new_bin,new_size_i64,bsdiff_bin_r,bsdiff_size_r_i64);
+
+
+    write_bin_file(lzma_path_w,lzma_bin_w,lzma_size_w_i32);
+    qDebug("%s:%d:write_bin_file finished:%s",__func__,__LINE__,lzma_path_w);
+*/
+
+
+
+    if(new_bin)         free(new_bin);
+    if(old_bin)         free(old_bin);
+    if(bsdiff_bin_w)    free(bsdiff_bin_w);
+    if(bsdiff_bin_r)    free(bsdiff_bin_r);
+    if(lzma_bin_w)      free(lzma_bin_w);
+    if(lzma_bin_r)      free(lzma_bin_r);
+
+
+    return;
+}
+
+void dfota_test(void){
+    qDebug() << "dfota_test\n";
+    int i=0,j=0,k=0;
+
+    char        new_path[MAX_PATH]      = "01013017.bin";        //  new.txt  "01013017.bin"
+    uint8_t*    new_bin                 = nullptr;
+    int32_t     new_size_i32            = 0;
+    int64_t     new_size_i64            = 0;
+
+    char        old_path[MAX_PATH]      =  "01013016.bin";       //  old.txt  "01013016.bin"
+    uint8_t*    old_bin                 = nullptr;
+    int32_t     old_size_i32            = 0;
+    int64_t     old_size_i64            = 0;
+
+    char        bsdiff_path_w[MAX_PATH] = "bsdiff_01013016_01013017.bin";
+    uint8_t*    bsdiff_bin_w            = nullptr;
+    int32_t     bsdiff_size_w_i32       = 0;
+    int64_t     bsdiff_size_w_i64       = 0;
+
+    char        bsdiff_path_r[MAX_PATH] = "bsdiff_01013016_01013017.bin";
+    uint8_t*    bsdiff_bin_r            = nullptr;
+    int32_t     bsdiff_size_r_i32       = 0;
+    int64_t     bsdiff_size_r_i64       = 0;
+
+    char        lzma_path_w[MAX_PATH]   = "lzma_01013016_01013017.bin";
+    uint8_t*    lzma_bin_w              = nullptr;
+    int32_t     lzma_size_w_i32         = 0;
+    // int64_t     lzma_size_w_i64         = 0;
+
+    char        lzma_path_r[MAX_PATH]   = "lzma_01013016_01013017.bin";
+    uint8_t*    lzma_bin_r              = nullptr;
+    int32_t     lzma_size_r_i32         = 0;
+    int64_t     lzma_size_r_i64         = 0;
+
+    char        merge_path[MAX_PATH]   = "merge_01013017.bin";
+    uint8_t*    merge_bin              = nullptr;
+    int32_t     merge_size_i32         = 0;
+    int64_t     merge_size_i64         = 0;
+
+
+
+    std::printf("dfota_test start...\n");
+
+    new_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    old_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+    bsdiff_bin_w = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    bsdiff_bin_r = (uint8_t*)malloc(MAX_BIN_SIZE*2);
+    lzma_bin_w = (uint8_t*)malloc(MAX_BIN_SIZE);
+    lzma_bin_r = (uint8_t*)malloc(MAX_BIN_SIZE);
+    merge_bin = (uint8_t*)malloc(MAX_BIN_SIZE);
+
+    memset(new_bin,0,MAX_BIN_SIZE);
+    memset(old_bin,0,MAX_BIN_SIZE);
+    memset(bsdiff_bin_w,0,MAX_BIN_SIZE*2);
+    memset(bsdiff_bin_r,0,MAX_BIN_SIZE*2);
+    memset(lzma_bin_w,0,MAX_BIN_SIZE);
+    memset(lzma_bin_r,0,MAX_BIN_SIZE);
+    memset(merge_bin,0,MAX_BIN_SIZE);
+
+    if(new_bin==NULL||old_bin==NULL||bsdiff_bin_w==NULL||bsdiff_bin_r==NULL||lzma_bin_w==NULL||lzma_bin_r==NULL||merge_bin==NULL){
+        qDebug("发生错误,申请内存失败...");
+        return;
+    }
+
+//----------------------------------------------------------------------------
+    fr(new_path,new_bin,&new_size_i32);
+    qDebug("%s:%d:read_bin_file:\t%s,size=%d",__func__,__LINE__,new_path,new_size_i32);
+
+    fr(old_path,old_bin,&old_size_i32);
+    qDebug("%s:%d:read_bin_file:\t%s,size=%d",__func__,__LINE__,old_path,old_size_i32);
+
+//----------------------------------------------------------------------------
+    old_size_i64 = (int64_t)old_size_i32;
+    new_size_i64 = (int64_t)new_size_i32;
+    bsdiff(old_bin,old_size_i64,new_bin,new_size_i64,bsdiff_bin_w,&bsdiff_size_w_i64);
+    qDebug("%s:%d:bsdiff:\t\tbsdiff_size_w_i64 = %lld",__func__,__LINE__,bsdiff_size_w_i64);
+
+    write_bin_file(bsdiff_path_w,bsdiff_bin_w,(int)bsdiff_size_w_i64);
+    qDebug("%s:%d:write_bin_file:\t%s,size=%d",__func__,__LINE__,bsdiff_path_w,(int)bsdiff_size_w_i64);
+
+//----------------------------------------------------------------------------
+    fr(bsdiff_path_r,bsdiff_bin_r,&bsdiff_size_r_i32);
+    qDebug("%s:%d:read_bin_file:\t%s,size=%d",__func__,__LINE__,bsdiff_path_r,bsdiff_size_r_i32);
+
+    old_size_i64 = (int64_t)old_size_i32;
+    new_size_i64 = (int64_t)new_size_i32;
+    bsdiff_size_r_i64 = bsdiff_size_w_i64;
+    memset(new_bin,0,MAX_BIN_SIZE);
+    bspatch(old_bin,old_size_i64,new_bin,new_size_i64,bsdiff_bin_r,bsdiff_size_r_i64);
+
+
+    write_bin_file(merge_path,new_bin,new_size_i32);
+    qDebug("%s:%d:write_bin_file:\t%s,size=%d",__func__,__LINE__,merge_path,new_size_i32);
+
+    std::printf("dfota_test end...\n");
+
+    if(new_bin)         free(new_bin);
+    if(old_bin)         free(old_bin);
+    if(bsdiff_bin_w)    free(bsdiff_bin_w);
+    if(bsdiff_bin_r)    free(bsdiff_bin_r);
+    if(lzma_bin_w)      free(lzma_bin_w);
+    if(lzma_bin_r)      free(lzma_bin_r);
+    if(merge_bin)       free(merge_bin);
+
+
+    return;
+}
+
+

+ 165 - 0
src/dfota.h

@@ -0,0 +1,165 @@
+#ifndef _DFOTA_H
+#define _DFOTA_H
+
+#include <minwindef.h>
+#include <qtextedit.h>
+#include "mainwindow.h"
+
+// #define MAX_BIN_SIZE        (256*1024)      //单个bin文件最大值;
+#define MAX_BIN_SIZE        (4*1024*1024)      //单个bin文件最大值;
+#define MAX_OLDFILES_NUM    8	            //旧bin文件的个数的最大值;
+#define BLOCK_MAX           8	            //块数量的最大值;
+#define NEW_EP              (0X80000000)	//入口地址;
+
+#define PACKAGE_MAGIC       "DFOTA_PK_V002"
+#define BLOCK_MAGIC         "BLOK"
+#define BSDIFF_MAGIC        "ENDSLEY/BSDIFF43"
+
+typedef struct InputData{
+    uint32_t ep=NEW_EP;
+    char newFilePath[MAX_PATH];
+    char oldFilePath[MAX_OLDFILES_NUM][MAX_PATH];
+    bool oldCheck[MAX_OLDFILES_NUM];
+    char pkgFilePath[MAX_PATH];
+    bool check_d;
+    bool check_z;
+}InputData_t;
+
+class DFOTA{
+public:
+    DFOTA();
+    ~DFOTA();
+public:
+    int bsdiff_task(MainWindow* ui,InputData_t* inputData);
+    int check_task(MainWindow* ui,InputData_t* inputData);
+    int read_task(MainWindow* ui,InputData_t* inputData);
+    int bspatch_task(MainWindow* ui,InputData_t* inputData);
+};
+
+/**************************** 以下为结构体定义*****************************/
+typedef struct{
+    bool ok;
+    char* path;
+    char drive[MAX_PATH];
+    char dir[MAX_PATH];
+    char filename[MAX_PATH];
+    char ext[MAX_PATH];
+    uint8_t* addr;
+    uint32_t size;
+    uint32_t app_ver;
+    uint16_t dev_type;
+    uint32_t crc32;
+}bin_file_t;
+
+
+#pragma pack(1)                     // 1字节对齐
+// 下载包,结构体
+typedef struct{
+    uint8_t* pkg_addr;              // 下载包的首地址;
+
+    uint32_t pkg_size;              // 下载包的大小,完整的;从数据包里解析出来的原始字段值
+    uint32_t pkg_crc32;             // 下载包的crc32;从数据包里解析出来的原始字段值
+    uint32_t calc_pkg_size;             // 下载包的大小,完整的;经过计算的值 calc_size == pkg_size
+    uint32_t calc_pkg_crc32;            // 下载包的crc32;经过计算的值 calc_crc32 = crc32(pkg_addr,calc_size - 4)
+}DFOTA_pkg_t;
+
+// 下载包,头,结构体,
+// header_size = sizeof(DFOTA_pkg_header_t)
+typedef struct{
+    uint8_t  pkg_magic[16];         // ="DFOTA_PK_V002"; 魔数,差分升级标记,整个下载包的起始标记
+    uint32_t pkg_time;              // 打包的时间戳;
+    uint32_t pkg_size;              // 从数据包里解析出来的原始字段值
+}DFOTA_pkg_header_t;
+
+// 块,结构体
+// DFOTA_blk_t block[BLOCK_MAX]     // 数组定义
+typedef struct{
+    uint8_t* blk_addr;              // 第n个块的首地址;
+
+    uint32_t blk_size;              // 第n个块的大小,完整的;从数据包里解析出来的原始字段值
+    uint32_t blk_crc32;             // 第n个块的crc32;从数据包里解析出来的原始字段值
+
+    uint32_t calc_blk_size;             // 第n个块的大小,完整的;经过计算的值 calc_size == blk_size
+    uint32_t calc_blk_crc32;            // 第n个块的crc32;经过计算的值 calc_crc32 = crc32(blk_addr,calc_size - 4)
+
+    uint8_t* payload_addr;          // 载荷的首地址;
+    uint32_t payload_size;          // 载荷的大小,完整的
+
+}DFOTA_blk_t;
+
+//块,头,结构体,header_size = sizeof(DFOTA_pkg_header_t)
+typedef struct{
+    uint8_t  blk_magic[4];          // ="BLOK"//魔数,块标记
+    uint32_t blk_size;              // 此字段之后crc32之前的字节数
+    uint8_t  d_flag;                // 差分算法标记
+    uint8_t  z_flag;                // 压缩算法标记
+    uint16_t reserve;               // 预留
+    uint32_t old_ver;               // 旧固件[old.bin]的版本号
+    uint32_t old_size;              // 旧固件[old.bin]的字节数
+    uint32_t old_crc32;             // 旧固件[old.bin]的crc32
+    uint32_t new_ver;               // 新固件[new.bin]的版本号
+    uint32_t new_size;              // 新固件[new.bin]的字节数
+    uint32_t new_crc32;             // 新固件[new.bin]的crc32
+    uint32_t new_ep;                // 新固件[new.bin]的入口地址
+    uint32_t pad_size;              // 为了4字节对齐,而在block尾部填充的字节数,0-3。利用此字段可以精确计算压缩后字节数
+    // uint32_t lamz_size;             // 压缩后字节数
+}DFOTA_blk_header_t;
+
+// 载荷,结构体
+typedef struct{
+    uint8_t* diff_header_addr;      // 差分头首地址
+    uint8_t* compr_header_addr;     // 压缩头首地址
+
+    uint8_t* data_addr;             // data首地址
+    uint32_t data_size;             // data的大小;
+}DFOTA_payload_t;
+
+// 差分,头,结构体,header_size = sizeof(DFOTA_bsdiff_header_t)
+typedef struct{
+    uint8_t  diff_magic[16];        // ="ENDSLEY/BSDIFF43"
+    uint32_t new_size;              // new file size in Byte(s)(new.bin的字节数)
+}DFOTA_bsdiff_header_t;
+
+// 压缩,头,结构体,header_size = sizeof(DFOTA_lzma_header_t)
+typedef struct{
+    //int32_t lzma_size;              // 压缩后的字节数,可能不是4字节对齐
+    uint8_t  props;                 // Special LZMA properties (lc,lp, pb in encoded form)
+    uint32_t dic;                   // Dictionary size (little endian)
+    uint64_t raw_size;              // 没压缩时的字节数diff_raw.bin的字节数
+}DFOTA_lzma_header_t;
+
+// DFOTA设备相关参数结构体定义
+typedef struct{
+    uint32_t current_ver;           // 当前版本
+    uint32_t current_size;          // 当前版本
+    uint32_t current_crc32;         // 当前版本
+
+    uint32_t blk_sum;               // 实际解析到的块的个数
+    uint32_t blk_match_index;       // 索引到的匹配的块下标
+
+    //.....
+}DFOTA_dev_t;
+
+
+#pragma pack()                      // 取消1字节对齐,恢复为默认4字节对齐
+
+// 显示时间的格式,到秒 2020-01-01 00:00:00
+void get_time_display_s(char* str_time);
+
+// 显示时间的格式,到毫秒 2020-01-01 00:00:00.000
+void get_time_display_ms(char* str_time);
+
+// 由时间戳转字符串,到秒 2020-01-01 00:00:00
+void get_stamp2string_s(time_t stamp,char* str_time);
+
+// 生成文件名格式,到秒 20200101-000000
+void get_time_file_name_s(char* str_time);
+
+// 生成文件名格式,到毫秒 20200101-000000-000
+void get_time_file_name_ms(char* str_time);
+
+void dfota_test(void);
+
+int my_fr(const char* path,uint8_t* buff,int *size);
+
+#endif // MAINWINDOW_H

+ 83 - 0
src/lzma/inc/7zFile.h

@@ -0,0 +1,83 @@
+/* 7zFile.h -- File IO
+2017-04-03 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_FILE_H
+#define __7Z_FILE_H
+
+#ifdef _WIN32
+//#define USE_WINDOWS_FILE
+#endif
+
+#ifdef USE_WINDOWS_FILE
+#include <windows.h>
+#else
+#include <stdio.h>
+#endif
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+/* ---------- File ---------- */
+
+typedef struct
+{
+  #ifdef USE_WINDOWS_FILE
+  HANDLE handle;
+  #else
+  FILE *file;
+  #endif
+} CSzFile;
+
+void File_Construct(CSzFile *p);
+#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE)
+WRes InFile_Open(CSzFile *p, const char *name);
+WRes OutFile_Open(CSzFile *p, const char *name);
+#endif
+#ifdef USE_WINDOWS_FILE
+WRes InFile_OpenW(CSzFile *p, const WCHAR *name);
+WRes OutFile_OpenW(CSzFile *p, const WCHAR *name);
+#endif
+WRes File_Close(CSzFile *p);
+
+/* reads max(*size, remain file's size) bytes */
+WRes File_Read(CSzFile *p, void *data, size_t *size);
+
+/* writes *size bytes */
+WRes File_Write(CSzFile *p, const void *data, size_t *size);
+
+WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin);
+WRes File_GetLength(CSzFile *p, UInt64 *length);
+
+
+/* ---------- FileInStream ---------- */
+
+typedef struct
+{
+  ISeqInStream vt;
+  CSzFile file;
+} CFileSeqInStream;
+
+void FileSeqInStream_CreateVTable(CFileSeqInStream *p);
+
+
+typedef struct
+{
+  ISeekInStream vt;
+  CSzFile file;
+} CFileInStream;
+
+void FileInStream_CreateVTable(CFileInStream *p);
+
+
+typedef struct
+{
+  ISeqOutStream vt;
+  CSzFile file;
+} CFileOutStream;
+
+void FileOutStream_CreateVTable(CFileOutStream *p);
+
+EXTERN_C_END
+
+#endif

+ 375 - 0
src/lzma/inc/7zTypes.h

@@ -0,0 +1,375 @@
+/* 7zTypes.h -- Basic types
+2018-08-04 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_TYPES_H
+#define __7Z_TYPES_H
+
+#ifdef _WIN32
+/* #include <windows.h> */
+#endif
+
+#include <stddef.h>
+
+#ifndef EXTERN_C_BEGIN
+#ifdef __cplusplus
+#define EXTERN_C_BEGIN extern "C" {
+#define EXTERN_C_END }
+#else
+#define EXTERN_C_BEGIN
+#define EXTERN_C_END
+#endif
+#endif
+
+EXTERN_C_BEGIN
+
+#define SZ_OK 0
+
+#define SZ_ERROR_DATA 1
+#define SZ_ERROR_MEM 2
+#define SZ_ERROR_CRC 3
+#define SZ_ERROR_UNSUPPORTED 4
+#define SZ_ERROR_PARAM 5
+#define SZ_ERROR_INPUT_EOF 6
+#define SZ_ERROR_OUTPUT_EOF 7
+#define SZ_ERROR_READ 8
+#define SZ_ERROR_WRITE 9
+#define SZ_ERROR_PROGRESS 10
+#define SZ_ERROR_FAIL 11
+#define SZ_ERROR_THREAD 12
+
+#define SZ_ERROR_ARCHIVE 16
+#define SZ_ERROR_NO_ARCHIVE 17
+
+typedef int SRes;
+
+
+#ifdef _WIN32
+
+/* typedef DWORD WRes; */
+typedef unsigned WRes;
+#define MY_SRes_HRESULT_FROM_WRes(x) HRESULT_FROM_WIN32(x)
+
+#else
+
+typedef int WRes;
+#define MY__FACILITY_WIN32 7
+#define MY__FACILITY__WRes MY__FACILITY_WIN32
+#define MY_SRes_HRESULT_FROM_WRes(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (MY__FACILITY__WRes << 16) | 0x80000000)))
+
+#endif
+
+
+#ifndef RINOK
+#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
+#endif
+
+typedef unsigned char Byte;
+typedef short Int16;
+typedef unsigned short UInt16;
+
+#ifdef _LZMA_UINT32_IS_ULONG
+typedef long Int32;
+typedef unsigned long UInt32;
+#else
+typedef int Int32;
+typedef unsigned int UInt32;
+#endif
+
+#ifdef _SZ_NO_INT_64
+
+/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
+   NOTES: Some code will work incorrectly in that case! */
+
+typedef long Int64;
+typedef unsigned long UInt64;
+
+#else
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef __int64 Int64;
+typedef unsigned __int64 UInt64;
+#define UINT64_CONST(n) n
+#else
+typedef long long int Int64;
+typedef unsigned long long int UInt64;
+#define UINT64_CONST(n) n ## ULL
+#endif
+
+#endif
+
+#ifdef _LZMA_NO_SYSTEM_SIZE_T
+typedef UInt32 SizeT;
+#else
+typedef size_t SizeT;
+#endif
+
+typedef int BoolInt;
+/* typedef BoolInt Bool; */
+#define True 1
+#define False 0
+
+
+#ifdef _WIN32
+#define MY_STD_CALL __stdcall
+#else
+#define MY_STD_CALL
+#endif
+
+#ifdef _MSC_VER
+
+#if _MSC_VER >= 1300
+#define MY_NO_INLINE __declspec(noinline)
+#else
+#define MY_NO_INLINE
+#endif
+
+#define MY_FORCE_INLINE __forceinline
+
+#define MY_CDECL __cdecl
+#define MY_FAST_CALL __fastcall
+
+#else
+
+#define MY_NO_INLINE
+#define MY_FORCE_INLINE
+#define MY_CDECL
+#define MY_FAST_CALL
+
+/* inline keyword : for C++ / C99 */
+
+/* GCC, clang: */
+/*
+#if defined (__GNUC__) && (__GNUC__ >= 4)
+#define MY_FORCE_INLINE __attribute__((always_inline))
+#define MY_NO_INLINE __attribute__((noinline))
+#endif
+*/
+
+#endif
+
+
+/* The following interfaces use first parameter as pointer to structure */
+
+typedef struct IByteIn IByteIn;
+struct IByteIn
+{
+  Byte (*Read)(const IByteIn *p); /* reads one byte, returns 0 in case of EOF or error */
+};
+#define IByteIn_Read(p) (p)->Read(p)
+
+
+typedef struct IByteOut IByteOut;
+struct IByteOut
+{
+  void (*Write)(const IByteOut *p, Byte b);
+};
+#define IByteOut_Write(p, b) (p)->Write(p, b)
+
+
+typedef struct ISeqInStream ISeqInStream;
+struct ISeqInStream
+{
+  SRes (*Read)(const ISeqInStream *p, void *buf, size_t *size);
+    /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
+       (output(*size) < input(*size)) is allowed */
+};
+#define ISeqInStream_Read(p, buf, size) (p)->Read(p, buf, size)
+
+/* it can return SZ_ERROR_INPUT_EOF */
+SRes SeqInStream_Read(const ISeqInStream *stream, void *buf, size_t size);
+SRes SeqInStream_Read2(const ISeqInStream *stream, void *buf, size_t size, SRes errorType);
+SRes SeqInStream_ReadByte(const ISeqInStream *stream, Byte *buf);
+
+
+typedef struct ISeqOutStream ISeqOutStream;
+struct ISeqOutStream
+{
+  size_t (*Write)(const ISeqOutStream *p, const void *buf, size_t size);
+    /* Returns: result - the number of actually written bytes.
+       (result < size) means error */
+};
+#define ISeqOutStream_Write(p, buf, size) (p)->Write(p, buf, size)
+
+typedef enum
+{
+  SZ_SEEK_SET = 0,
+  SZ_SEEK_CUR = 1,
+  SZ_SEEK_END = 2
+} ESzSeek;
+
+
+typedef struct ISeekInStream ISeekInStream;
+struct ISeekInStream
+{
+  SRes (*Read)(const ISeekInStream *p, void *buf, size_t *size);  /* same as ISeqInStream::Read */
+  SRes (*Seek)(const ISeekInStream *p, Int64 *pos, ESzSeek origin);
+};
+#define ISeekInStream_Read(p, buf, size)   (p)->Read(p, buf, size)
+#define ISeekInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin)
+
+
+typedef struct ILookInStream ILookInStream;
+struct ILookInStream
+{
+  SRes (*Look)(const ILookInStream *p, const void **buf, size_t *size);
+    /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
+       (output(*size) > input(*size)) is not allowed
+       (output(*size) < input(*size)) is allowed */
+  SRes (*Skip)(const ILookInStream *p, size_t offset);
+    /* offset must be <= output(*size) of Look */
+
+  SRes (*Read)(const ILookInStream *p, void *buf, size_t *size);
+    /* reads directly (without buffer). It's same as ISeqInStream::Read */
+  SRes (*Seek)(const ILookInStream *p, Int64 *pos, ESzSeek origin);
+};
+
+#define ILookInStream_Look(p, buf, size)   (p)->Look(p, buf, size)
+#define ILookInStream_Skip(p, offset)      (p)->Skip(p, offset)
+#define ILookInStream_Read(p, buf, size)   (p)->Read(p, buf, size)
+#define ILookInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin)
+
+
+SRes LookInStream_LookRead(const ILookInStream *stream, void *buf, size_t *size);
+SRes LookInStream_SeekTo(const ILookInStream *stream, UInt64 offset);
+
+/* reads via ILookInStream::Read */
+SRes LookInStream_Read2(const ILookInStream *stream, void *buf, size_t size, SRes errorType);
+SRes LookInStream_Read(const ILookInStream *stream, void *buf, size_t size);
+
+
+
+typedef struct
+{
+  ILookInStream vt;
+  const ISeekInStream *realStream;
+ 
+  size_t pos;
+  size_t size; /* it's data size */
+  
+  /* the following variables must be set outside */
+  Byte *buf;
+  size_t bufSize;
+} CLookToRead2;
+
+void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead);
+
+#define LookToRead2_Init(p) { (p)->pos = (p)->size = 0; }
+
+
+typedef struct
+{
+  ISeqInStream vt;
+  const ILookInStream *realStream;
+} CSecToLook;
+
+void SecToLook_CreateVTable(CSecToLook *p);
+
+
+
+typedef struct
+{
+  ISeqInStream vt;
+  const ILookInStream *realStream;
+} CSecToRead;
+
+void SecToRead_CreateVTable(CSecToRead *p);
+
+
+typedef struct ICompressProgress ICompressProgress;
+
+struct ICompressProgress
+{
+  SRes (*Progress)(const ICompressProgress *p, UInt64 inSize, UInt64 outSize);
+    /* Returns: result. (result != SZ_OK) means break.
+       Value (UInt64)(Int64)-1 for size means unknown value. */
+};
+#define ICompressProgress_Progress(p, inSize, outSize) (p)->Progress(p, inSize, outSize)
+
+
+
+typedef struct ISzAlloc ISzAlloc;
+typedef const ISzAlloc * ISzAllocPtr;
+
+struct ISzAlloc
+{
+  void *(*Alloc)(ISzAllocPtr p, size_t size);
+  void (*Free)(ISzAllocPtr p, void *address); /* address can be 0 */
+};
+
+#define ISzAlloc_Alloc(p, size) (p)->Alloc(p, size)
+#define ISzAlloc_Free(p, a) (p)->Free(p, a)
+
+/* deprecated */
+#define IAlloc_Alloc(p, size) ISzAlloc_Alloc(p, size)
+#define IAlloc_Free(p, a) ISzAlloc_Free(p, a)
+
+
+
+
+
+#ifndef MY_offsetof
+  #ifdef offsetof
+    #define MY_offsetof(type, m) offsetof(type, m)
+    /*
+    #define MY_offsetof(type, m) FIELD_OFFSET(type, m)
+    */
+  #else
+    #define MY_offsetof(type, m) ((size_t)&(((type *)0)->m))
+  #endif
+#endif
+
+
+
+#ifndef MY_container_of
+
+/*
+#define MY_container_of(ptr, type, m) container_of(ptr, type, m)
+#define MY_container_of(ptr, type, m) CONTAINING_RECORD(ptr, type, m)
+#define MY_container_of(ptr, type, m) ((type *)((char *)(ptr) - offsetof(type, m)))
+#define MY_container_of(ptr, type, m) (&((type *)0)->m == (ptr), ((type *)(((char *)(ptr)) - MY_offsetof(type, m))))
+*/
+
+/*
+  GCC shows warning: "perhaps the 'offsetof' macro was used incorrectly"
+    GCC 3.4.4 : classes with constructor
+    GCC 4.8.1 : classes with non-public variable members"
+*/
+
+#define MY_container_of(ptr, type, m) ((type *)((char *)(1 ? (ptr) : &((type *)0)->m) - MY_offsetof(type, m)))
+
+
+#endif
+
+#define CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m) ((type *)(ptr))
+
+/*
+#define CONTAINER_FROM_VTBL(ptr, type, m) CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m)
+*/
+#define CONTAINER_FROM_VTBL(ptr, type, m) MY_container_of(ptr, type, m)
+
+#define CONTAINER_FROM_VTBL_CLS(ptr, type, m) CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m)
+/*
+#define CONTAINER_FROM_VTBL_CLS(ptr, type, m) CONTAINER_FROM_VTBL(ptr, type, m)
+*/
+
+
+
+#ifdef _WIN32
+
+#define CHAR_PATH_SEPARATOR '\\'
+#define WCHAR_PATH_SEPARATOR L'\\'
+#define STRING_PATH_SEPARATOR "\\"
+#define WSTRING_PATH_SEPARATOR L"\\"
+
+#else
+
+#define CHAR_PATH_SEPARATOR '/'
+#define WCHAR_PATH_SEPARATOR L'/'
+#define STRING_PATH_SEPARATOR "/"
+#define WSTRING_PATH_SEPARATOR L"/"
+
+#endif
+
+EXTERN_C_END
+
+#endif

+ 33 - 0
src/lzma/inc/Compiler.h

@@ -0,0 +1,33 @@
+/* Compiler.h
+2017-04-03 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_COMPILER_H
+#define __7Z_COMPILER_H
+
+#ifdef _MSC_VER
+
+  #ifdef UNDER_CE
+    #define RPC_NO_WINDOWS_H
+    /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */
+    #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
+    #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int
+  #endif
+
+  #if _MSC_VER >= 1300
+    #pragma warning(disable : 4996) // This function or variable may be unsafe
+  #else
+    #pragma warning(disable : 4511) // copy constructor could not be generated
+    #pragma warning(disable : 4512) // assignment operator could not be generated
+    #pragma warning(disable : 4514) // unreferenced inline function has been removed
+    #pragma warning(disable : 4702) // unreachable code
+    #pragma warning(disable : 4710) // not inlined
+    #pragma warning(disable : 4714) // function marked as __forceinline not inlined
+    #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information
+  #endif
+
+#endif
+
+#define UNUSED_VAR(x) (void)x;
+/* #define UNUSED_VAR(x) x=x; */
+
+#endif

+ 121 - 0
src/lzma/inc/LzFind.h

@@ -0,0 +1,121 @@
+/* LzFind.h -- Match finder for LZ algorithms
+2017-06-10 : Igor Pavlov : Public domain */
+
+#ifndef __LZ_FIND_H
+#define __LZ_FIND_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+typedef UInt32 CLzRef;
+
+typedef struct _CMatchFinder
+{
+  Byte *buffer;
+  UInt32 pos;
+  UInt32 posLimit;
+  UInt32 streamPos;
+  UInt32 lenLimit;
+
+  UInt32 cyclicBufferPos;
+  UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
+
+  Byte streamEndWasReached;
+  Byte btMode;
+  Byte bigHash;
+  Byte directInput;
+
+  UInt32 matchMaxLen;
+  CLzRef *hash;
+  CLzRef *son;
+  UInt32 hashMask;
+  UInt32 cutValue;
+
+  Byte *bufferBase;
+  ISeqInStream *stream;
+  
+  UInt32 blockSize;
+  UInt32 keepSizeBefore;
+  UInt32 keepSizeAfter;
+
+  UInt32 numHashBytes;
+  size_t directInputRem;
+  UInt32 historySize;
+  UInt32 fixedHashSize;
+  UInt32 hashSizeSum;
+  SRes result;
+  UInt32 crc[256];
+  size_t numRefs;
+
+  UInt64 expectedDataSize;
+} CMatchFinder;
+
+#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
+
+#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
+
+#define Inline_MatchFinder_IsFinishedOK(p) \
+    ((p)->streamEndWasReached \
+        && (p)->streamPos == (p)->pos \
+        && (!(p)->directInput || (p)->directInputRem == 0))
+      
+int MatchFinder_NeedMove(CMatchFinder *p);
+Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
+void MatchFinder_MoveBlock(CMatchFinder *p);
+void MatchFinder_ReadIfRequired(CMatchFinder *p);
+
+void MatchFinder_Construct(CMatchFinder *p);
+
+/* Conditions:
+     historySize <= 3 GB
+     keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB
+*/
+int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
+    UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
+    ISzAllocPtr alloc);
+void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc);
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems);
+void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
+
+UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
+    UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
+    UInt32 *distances, UInt32 maxLen);
+
+/*
+Conditions:
+  Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func.
+  Mf_GetPointerToCurrentPos_Func's result must be used only before any other function
+*/
+
+typedef void (*Mf_Init_Func)(void *object);
+typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
+typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
+typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
+typedef void (*Mf_Skip_Func)(void *object, UInt32);
+
+typedef struct _IMatchFinder
+{
+  Mf_Init_Func Init;
+  Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
+  Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
+  Mf_GetMatches_Func GetMatches;
+  Mf_Skip_Func Skip;
+} IMatchFinder;
+
+void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
+
+void MatchFinder_Init_LowHash(CMatchFinder *p);
+void MatchFinder_Init_HighHash(CMatchFinder *p);
+void MatchFinder_Init_3(CMatchFinder *p, int readData);
+void MatchFinder_Init(CMatchFinder *p);
+
+UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
+UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
+
+void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
+void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
+
+EXTERN_C_END
+
+#endif

+ 57 - 0
src/lzma/inc/LzHash.h

@@ -0,0 +1,57 @@
+/* LzHash.h -- HASH functions for LZ algorithms
+2015-04-12 : Igor Pavlov : Public domain */
+
+#ifndef __LZ_HASH_H
+#define __LZ_HASH_H
+
+#define kHash2Size (1 << 10)
+#define kHash3Size (1 << 16)
+#define kHash4Size (1 << 20)
+
+#define kFix3HashSize (kHash2Size)
+#define kFix4HashSize (kHash2Size + kHash3Size)
+#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)
+
+#define HASH2_CALC hv = cur[0] | ((UInt32)cur[1] << 8);
+
+#define HASH3_CALC { \
+  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
+  h2 = temp & (kHash2Size - 1); \
+  hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }
+
+#define HASH4_CALC { \
+  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
+  h2 = temp & (kHash2Size - 1); \
+  temp ^= ((UInt32)cur[2] << 8); \
+  h3 = temp & (kHash3Size - 1); \
+  hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
+
+#define HASH5_CALC { \
+  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
+  h2 = temp & (kHash2Size - 1); \
+  temp ^= ((UInt32)cur[2] << 8); \
+  h3 = temp & (kHash3Size - 1); \
+  temp ^= (p->crc[cur[3]] << 5); \
+  h4 = temp & (kHash4Size - 1); \
+  hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; }
+
+/* #define HASH_ZIP_CALC hv = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */
+#define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
+
+
+#define MT_HASH2_CALC \
+  h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
+
+#define MT_HASH3_CALC { \
+  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
+  h2 = temp & (kHash2Size - 1); \
+  h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
+
+#define MT_HASH4_CALC { \
+  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
+  h2 = temp & (kHash2Size - 1); \
+  temp ^= ((UInt32)cur[2] << 8); \
+  h3 = temp & (kHash3Size - 1); \
+  h4 = (temp ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
+
+#endif

+ 234 - 0
src/lzma/inc/LzmaDec.h

@@ -0,0 +1,234 @@
+/* LzmaDec.h -- LZMA Decoder
+2018-04-21 : Igor Pavlov : Public domain */
+
+#ifndef __LZMA_DEC_H
+#define __LZMA_DEC_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+/* #define _LZMA_PROB32 */
+/* _LZMA_PROB32 can increase the speed on some CPUs,
+   but memory usage for CLzmaDec::probs will be doubled in that case */
+
+typedef
+#ifdef _LZMA_PROB32
+  UInt32
+#else
+  UInt16
+#endif
+  CLzmaProb;
+
+
+/* ---------- LZMA Properties ---------- */
+
+#define LZMA_PROPS_SIZE 5
+
+typedef struct _CLzmaProps
+{
+  Byte lc;
+  Byte lp;
+  Byte pb;
+  Byte _pad_;
+  UInt32 dicSize;
+} CLzmaProps;
+
+/* LzmaProps_Decode - decodes properties
+Returns:
+  SZ_OK
+  SZ_ERROR_UNSUPPORTED - Unsupported properties
+*/
+
+SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
+
+
+/* ---------- LZMA Decoder state ---------- */
+
+/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
+   Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
+
+#define LZMA_REQUIRED_INPUT_MAX 20
+
+typedef struct
+{
+  /* Don't change this structure. ASM code can use it. */
+  CLzmaProps prop;
+  CLzmaProb *probs;
+  CLzmaProb *probs_1664;
+  Byte *dic;
+  SizeT dicBufSize;
+  SizeT dicPos;
+  const Byte *buf;
+  UInt32 range;
+  UInt32 code;
+  UInt32 processedPos;
+  UInt32 checkDicSize;
+  UInt32 reps[4];
+  UInt32 state;
+  UInt32 remainLen;
+
+  UInt32 numProbs;
+  unsigned tempBufSize;
+  Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
+} CLzmaDec;
+
+#define LzmaDec_Construct(p) { (p)->dic = NULL; (p)->probs = NULL; }
+
+void LzmaDec_Init(CLzmaDec *p);
+
+/* There are two types of LZMA streams:
+     - Stream with end mark. That end mark adds about 6 bytes to compressed size.
+     - Stream without end mark. You must know exact uncompressed size to decompress such stream. */
+
+typedef enum
+{
+  LZMA_FINISH_ANY,   /* finish at any point */
+  LZMA_FINISH_END    /* block must be finished at the end */
+} ELzmaFinishMode;
+
+/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
+
+   You must use LZMA_FINISH_END, when you know that current output buffer
+   covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
+
+   If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
+   and output value of destLen will be less than output buffer size limit.
+   You can check status result also.
+
+   You can use multiple checks to test data integrity after full decompression:
+     1) Check Result and "status" variable.
+     2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
+     3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
+        You must use correct finish mode in that case. */
+
+typedef enum
+{
+  LZMA_STATUS_NOT_SPECIFIED,               /* use main error code instead */
+  LZMA_STATUS_FINISHED_WITH_MARK,          /* stream was finished with end mark. */
+  LZMA_STATUS_NOT_FINISHED,                /* stream was not finished */
+  LZMA_STATUS_NEEDS_MORE_INPUT,            /* you must provide more input bytes */
+  LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK  /* there is probability that stream was finished without end mark */
+} ELzmaStatus;
+
+/* ELzmaStatus is used only as output value for function call */
+
+
+/* ---------- Interfaces ---------- */
+
+/* There are 3 levels of interfaces:
+     1) Dictionary Interface
+     2) Buffer Interface
+     3) One Call Interface
+   You can select any of these interfaces, but don't mix functions from different
+   groups for same object. */
+
+
+/* There are two variants to allocate state for Dictionary Interface:
+     1) LzmaDec_Allocate / LzmaDec_Free
+     2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
+   You can use variant 2, if you set dictionary buffer manually.
+   For Buffer Interface you must always use variant 1.
+
+LzmaDec_Allocate* can return:
+  SZ_OK
+  SZ_ERROR_MEM         - Memory allocation error
+  SZ_ERROR_UNSUPPORTED - Unsupported properties
+*/
+   
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc);
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc);
+
+SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc);
+void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc);
+
+/* ---------- Dictionary Interface ---------- */
+
+/* You can use it, if you want to eliminate the overhead for data copying from
+   dictionary to some other external buffer.
+   You must work with CLzmaDec variables directly in this interface.
+
+   STEPS:
+     LzmaDec_Construct()
+     LzmaDec_Allocate()
+     for (each new stream)
+     {
+       LzmaDec_Init()
+       while (it needs more decompression)
+       {
+         LzmaDec_DecodeToDic()
+         use data from CLzmaDec::dic and update CLzmaDec::dicPos
+       }
+     }
+     LzmaDec_Free()
+*/
+
+/* LzmaDec_DecodeToDic
+   
+   The decoding to internal dictionary buffer (CLzmaDec::dic).
+   You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
+
+finishMode:
+  It has meaning only if the decoding reaches output limit (dicLimit).
+  LZMA_FINISH_ANY - Decode just dicLimit bytes.
+  LZMA_FINISH_END - Stream must be finished after dicLimit.
+
+Returns:
+  SZ_OK
+    status:
+      LZMA_STATUS_FINISHED_WITH_MARK
+      LZMA_STATUS_NOT_FINISHED
+      LZMA_STATUS_NEEDS_MORE_INPUT
+      LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
+  SZ_ERROR_DATA - Data error
+*/
+
+SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
+    const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
+
+
+/* ---------- Buffer Interface ---------- */
+
+/* It's zlib-like interface.
+   See LzmaDec_DecodeToDic description for information about STEPS and return results,
+   but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
+   to work with CLzmaDec variables manually.
+
+finishMode:
+  It has meaning only if the decoding reaches output limit (*destLen).
+  LZMA_FINISH_ANY - Decode just destLen bytes.
+  LZMA_FINISH_END - Stream must be finished after (*destLen).
+*/
+
+SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
+    const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
+
+
+/* ---------- One Call Interface ---------- */
+
+/* LzmaDecode
+
+finishMode:
+  It has meaning only if the decoding reaches output limit (*destLen).
+  LZMA_FINISH_ANY - Decode just destLen bytes.
+  LZMA_FINISH_END - Stream must be finished after (*destLen).
+
+Returns:
+  SZ_OK
+    status:
+      LZMA_STATUS_FINISHED_WITH_MARK
+      LZMA_STATUS_NOT_FINISHED
+      LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
+  SZ_ERROR_DATA - Data error
+  SZ_ERROR_MEM  - Memory allocation error
+  SZ_ERROR_UNSUPPORTED - Unsupported properties
+  SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
+*/
+
+SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+    const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
+    ELzmaStatus *status, ISzAllocPtr alloc);
+
+EXTERN_C_END
+
+#endif

+ 76 - 0
src/lzma/inc/LzmaEnc.h

@@ -0,0 +1,76 @@
+/*  LzmaEnc.h -- LZMA Encoder
+2017-07-27 : Igor Pavlov : Public domain */
+
+#ifndef __LZMA_ENC_H
+#define __LZMA_ENC_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+#define LZMA_PROPS_SIZE 5
+
+typedef struct _CLzmaEncProps
+{
+  int level;       /* 0 <= level <= 9 */
+  UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version
+                      (1 << 12) <= dictSize <= (3 << 29) for 64-bit version
+                      default = (1 << 24) */
+  int lc;          /* 0 <= lc <= 8, default = 3 */
+  int lp;          /* 0 <= lp <= 4, default = 0 */
+  int pb;          /* 0 <= pb <= 4, default = 2 */
+  int algo;        /* 0 - fast, 1 - normal, default = 1 */
+  int fb;          /* 5 <= fb <= 273, default = 32 */
+  int btMode;      /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */
+  int numHashBytes; /* 2, 3 or 4, default = 4 */
+  UInt32 mc;       /* 1 <= mc <= (1 << 30), default = 32 */
+  unsigned writeEndMark;  /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */
+  int numThreads;  /* 1 or 2, default = 2 */
+
+  UInt64 reduceSize; /* estimated size of data that will be compressed. default = (UInt64)(Int64)-1.
+                        Encoder uses this value to reduce dictionary size */
+} CLzmaEncProps;
+
+void LzmaEncProps_Init(CLzmaEncProps *p);
+void LzmaEncProps_Normalize(CLzmaEncProps *p);
+UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2);
+
+
+/* ---------- CLzmaEncHandle Interface ---------- */
+
+/* LzmaEnc* functions can return the following exit codes:
+SRes:
+  SZ_OK           - OK
+  SZ_ERROR_MEM    - Memory allocation error
+  SZ_ERROR_PARAM  - Incorrect paramater in props
+  SZ_ERROR_WRITE  - ISeqOutStream write callback error
+  SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output
+  SZ_ERROR_PROGRESS - some break from progress callback
+  SZ_ERROR_THREAD - error in multithreading functions (only for Mt version)
+*/
+
+typedef void * CLzmaEncHandle;
+
+CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc);
+void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig);
+
+SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
+void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize);
+SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size);
+unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p);
+
+SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream,
+    ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig);
+SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+    int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig);
+
+
+/* ---------- One Call Interface ---------- */
+
+SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+    const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
+    ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig);
+
+EXTERN_C_END
+
+#endif

+ 11 - 0
src/lzma/inc/Precomp.h

@@ -0,0 +1,11 @@
+/* Precomp.h -- StdAfx
+2013-11-12 : Igor Pavlov : Public domain */
+
+#ifndef __7Z_PRECOMP_H
+#define __7Z_PRECOMP_H
+
+#define _7ZIP_ST
+#include "Compiler.h"
+/* #include "7zTypes.h" */
+
+#endif

+ 427 - 0
src/lzma/lzma.c

@@ -0,0 +1,427 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "./inc/LzmaDec.h"
+#include "./inc/LzmaEnc.h"
+#include "./inc/7zFile.h"
+
+static void help(void)
+{
+    printf("Usage:\n");
+    printf("lzma -c [file] [cmprs_file]          -compress \"file\" to \"cmprs_file\" \n");
+    printf("lzma -d [cmprs_file] [dcmprs_file]   -dcompress \"cmprs_file\" to \"dcmprs_file\" \n\n");
+    
+    printf("lzmainfo [cmprs_file]                -show compress file infomation\n\n");
+}
+
+static int ram_used_size = 0;
+static int ram_used_max = 0;
+
+static void *lzma_alloc(ISzAllocPtr p, size_t size)
+{
+    if(size == 0)
+    {
+        return NULL;
+    }
+
+    ram_used_size += size;
+    if (ram_used_max < ram_used_size)ram_used_max = ram_used_size;
+    printf("ram used: now / max = %d / %d\n", ram_used_size, ram_used_max);
+
+    return malloc(size);
+}
+
+static void lzma_free(ISzAllocPtr p, void *address)
+{
+    if(address != NULL)
+    {
+        ram_used_size -= _msize(address);
+        printf("ram used: now / max = %d / %d\n", ram_used_size, ram_used_max);
+
+        free(address);
+    }
+}
+
+ISzAlloc allocator = {lzma_alloc, lzma_free};
+//ISzAlloc allocator_c = {lzma_alloc, lzma_free};
+
+//dictSize:[12~30],设置字典大小
+// 12,解码占用20352 = 16256 + 4096字节内存,2E12,已经是最低了
+// 13,解码占用24448 = 16256 + 8192字节内存,2E13
+// 16,解码占用81792 = 16256 + 65536字节内存,2E16
+//level:压缩等级[0~9]
+int lzma_compress(uint8_t *dest, int *destLen, const uint8_t *src, int srcLen, int dictSize, int level)
+{
+    CLzmaEncHandle enc;
+    CLzmaEncProps props;
+    SRes res;
+    SizeT len;
+    uint64_t srclen_u64= 0;
+
+    enc = LzmaEnc_Create(&allocator);
+    if (enc == 0)
+    {
+        return SZ_ERROR_MEM;
+    }
+
+    LzmaEncProps_Init(&props);
+
+    if (level > 9)level = 9;
+    props.level = level;
+
+    if (dictSize < 12)dictSize = 12;
+    else if (dictSize > 30)dictSize = 30;
+    props.dictSize = 1 << dictSize;
+
+    props.writeEndMark = 1;
+    res = LzmaEnc_SetProps(enc, &props);
+
+    if (res == SZ_OK)
+    {
+        uint8_t header[LZMA_PROPS_SIZE + 8];
+        size_t headerSize = LZMA_PROPS_SIZE;
+
+        LzmaEnc_WriteProperties(enc, header, &headerSize);
+        srclen_u64 = (uint64_t)srcLen;
+        for (int i = 0; i < 8; i++)
+        {
+            header[headerSize++] = (uint8_t)(srclen_u64 >> (8 * i));
+        }
+
+        memcpy(dest, header, headerSize);
+        len = *destLen - headerSize;
+        res = LzmaEnc_MemEncode(enc, dest + headerSize, &len, src, srcLen, 0, NULL, &allocator, &allocator);
+        *destLen = len + headerSize;
+    }
+
+    LzmaEnc_Destroy(enc, &allocator, &allocator);
+    return res;
+}
+
+// static int lzma_bin_decompress(ISeqOutStream *outStream, ISeqInStream *inStream)
+int lzma_bin_decompress(uint8_t *outData, int *outLen, uint8_t *inData,int inLen)
+{
+    CLzmaDec state;
+    UInt64 unpack_size;
+    Byte header[LZMA_PROPS_SIZE + 8];
+    size_t headerSize = sizeof(header);
+    Byte inBuf[4096];
+    Byte outBuf[4096];
+    size_t inPos = 0, inSize = 0, outPos = 0;
+    SRes res;
+    uint32_t inOffset=0;
+    uint32_t outOffset=0;
+
+    // inStream->Read(inStream, header, &headerSize);
+    memcpy(header,inData + inOffset,sizeof(header));
+    inOffset +=sizeof(header);
+/*
+    for(int i = 0; i < 8; i++)
+    {
+        unpack_size += (UInt64)(header[LZMA_PROPS_SIZE + i] << (i * 8));
+    }
+*/
+    unpack_size = (UInt64)(*(int*)(&header[LZMA_PROPS_SIZE]));
+    *outLen = *(int*)(&header[LZMA_PROPS_SIZE]);
+
+
+    LzmaDec_Construct(&state);
+    LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &allocator);
+    LzmaDec_Init(&state);
+
+    while(1)
+    {
+        if(inPos == inSize)
+        {
+            inSize = 4096;
+            inPos = 0;
+            // inStream->Read(inStream, inBuf, &inSize);
+            memcpy(inBuf,inData + inOffset,inSize);
+            inOffset +=inSize;
+        }
+        {
+            SizeT inProcessed = inSize - inPos;
+            SizeT outProcessed = 4096 - outPos;
+            ELzmaFinishMode finishMode = LZMA_FINISH_ANY;
+            ELzmaStatus status;
+
+            if (outProcessed > unpack_size)
+            {
+                outProcessed = (SizeT)unpack_size;
+                finishMode = LZMA_FINISH_END;
+            }
+
+            res = LzmaDec_DecodeToBuf(&state, outBuf + outPos, &outProcessed,
+                                      inBuf + inPos, &inProcessed, finishMode, &status);
+            inPos += inProcessed;
+            outPos += outProcessed;
+            unpack_size -= outProcessed;
+/*
+            if (outStream)
+            {
+                if (outStream->Write(outStream, outBuf, outPos) != outPos)
+                {
+                    return SZ_ERROR_WRITE;
+                }
+            }
+*/
+            memcpy(outData + outOffset,outBuf,outPos);
+            outOffset += outPos;
+            if(outOffset >= *outLen) return SZ_OK;
+
+            outPos = 0;
+
+            if (res != SZ_OK)
+            {
+                return res;
+            }
+
+            if (inProcessed == 0 && outProcessed == 0)
+            {
+                if(status != LZMA_STATUS_FINISHED_WITH_MARK)
+                {
+                    return SZ_ERROR_DATA;
+                }
+                return res;
+            }
+        }
+    }
+
+    LzmaDec_Free(&state, &allocator);
+    return res;
+}
+static int lzma_decompress(ISeqOutStream *outStream, ISeqInStream *inStream)
+{
+    CLzmaDec state;
+    UInt64 unpack_size;
+    Byte header[LZMA_PROPS_SIZE + 8];
+    size_t headerSize = sizeof(header);
+    Byte inBuf[4096];
+    Byte outBuf[4096];
+    size_t inPos = 0, inSize = 0, outPos = 0;
+    SRes res;
+
+    inStream->Read(inStream, header, &headerSize);
+
+    for(int i = 0; i < 8; i++)
+    {
+        unpack_size += (UInt64)(header[LZMA_PROPS_SIZE + i] << (i * 8));
+    }
+
+    LzmaDec_Construct(&state);
+    LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &allocator);
+    LzmaDec_Init(&state);
+
+    while(1)
+    {
+        if(inPos == inSize)
+        {
+            inSize = 4096;
+            inPos = 0;
+            inStream->Read(inStream, inBuf, &inSize);
+        }
+        {
+            SizeT inProcessed = inSize - inPos;
+            SizeT outProcessed = 4096 - outPos;
+            ELzmaFinishMode finishMode = LZMA_FINISH_ANY;
+            ELzmaStatus status;
+
+            if (outProcessed > unpack_size)
+            {
+                outProcessed = (SizeT)unpack_size;
+                finishMode = LZMA_FINISH_END;
+            }
+
+            res = LzmaDec_DecodeToBuf(&state, outBuf + outPos, &outProcessed,
+                                      inBuf + inPos, &inProcessed, finishMode, &status);
+            inPos += inProcessed;
+            outPos += outProcessed;
+            unpack_size -= outProcessed;
+
+            if (outStream)
+            {
+                if (outStream->Write(outStream, outBuf, outPos) != outPos)
+                {
+                    return SZ_ERROR_WRITE;
+                }
+            }
+            outPos = 0;
+
+            if (res != SZ_OK)
+            {
+                return res;
+            }
+
+            if (inProcessed == 0 && outProcessed == 0)
+            {
+                if(status != LZMA_STATUS_FINISHED_WITH_MARK)
+                {
+                    return SZ_ERROR_DATA;
+                }
+                return res;
+            }
+        }
+    }
+
+    LzmaDec_Free(&state, &allocator);
+    return res;
+}
+
+int lzma_file_info(const char* file_in)
+{
+    CLzmaProps props;
+    UInt32 dic_size;
+    Byte props_buff[LZMA_PROPS_SIZE + sizeof(UInt64)];
+    SizeT dcmprs_size = 0;
+    Byte d;
+    int fd_in = -1;
+    int ret = 0;
+
+    fd_in = open(file_in, O_RDONLY, 0);
+    if (fd_in < 0)
+    {
+        printf("open the lzma file: %s erroe\n", file_in);
+        ret = -1;
+        goto _exit;
+    }
+
+    read(fd_in, props_buff, LZMA_PROPS_SIZE + sizeof(UInt64));
+
+    for (int i = 0; i < 8; i++)
+        dcmprs_size += (UInt64)props_buff[LZMA_PROPS_SIZE + i] << (i * 8);
+
+    dic_size = props_buff[1] | ((UInt32)props_buff[2] << 8) |
+        ((UInt32)props_buff[3] << 16) | ((UInt32)props_buff[4] << 24);
+
+    if (dic_size < (1 << 12))
+    {
+        dic_size = (1 << 12);
+    }
+
+    props.dicSize = dic_size;
+
+    d = props_buff[0];
+
+    if (d >= (9 * 5 * 5))
+    {
+        printf("lzmainfo: %s: Not a lzma file\n", file_in);
+        goto _exit;
+    }
+
+    props.lc = (Byte)(d % 9);
+    d /= 9;
+    props.pb = (Byte)(d / 5);
+    props.lp = (Byte)(d % 5);
+
+    printf("\n%s\n", file_in);
+    printf("Uncompressed size:              %d MB (%d bytes)\n", (UInt32)(dcmprs_size / 1024 / 1024), dcmprs_size);
+    printf("Dictionary size:                %d MB (%d bytes)\n", (UInt32)(props.dicSize / 1024 / 1024), props.dicSize);
+    printf("Literal context bits (lc):      %d\n", props.lc);
+    printf("Literal pos bits (lp):          %d\n", props.lp);
+    printf("Number of pos bits (pb):        %d\n\n", props.pb);
+
+_exit:
+    if (fd_in >= 0)
+    {
+        close(fd_in);
+    }
+    return ret;
+}
+
+int lzma_file_compress(const char* file_in, const char* file_out, int dictSize, int level)
+{
+/*
+    CFileSeqInStream inStream;
+    CFileOutStream outStream;
+    int ret = 0;
+    UInt64 in_fileSize;
+
+    FileSeqInStream_CreateVTable(&inStream);
+    File_Construct(&inStream.file);
+
+    FileOutStream_CreateVTable(&outStream);
+    File_Construct(&outStream.file);
+
+    if (InFile_Open(&inStream.file, file_in) != 0)
+    {
+        printf("open the input file: %s error\n", file_in);
+        ret = -1;
+        goto _err1;
+    }
+
+    if (OutFile_Open(&outStream.file, file_out) != 0)
+    {
+        printf("open the output file: %s error\n", file_out);
+        ret = -1;
+        goto _err2;
+    }
+
+    File_GetLength(&inStream.file, &in_fileSize);
+    if (lzma_compress(&outStream.vt, &inStream.vt, in_fileSize, dictSize, level) != SZ_OK)
+    {
+        printf("lzma compress file error!\n");
+        goto _err3;
+    }
+    printf("lzma compress file success!\n");
+
+_err3:
+    File_Close(&outStream.file);
+
+_err2:
+    File_Close(&inStream.file);
+
+_err1:
+    return ret;
+*/
+}
+
+int lzma_file_decompress(const char* file_in, const char* file_out)
+{
+    CFileSeqInStream inStream;
+    CFileOutStream outStream;
+    int ret = 0;
+
+    FileSeqInStream_CreateVTable(&inStream);
+    File_Construct(&inStream.file);
+
+    FileOutStream_CreateVTable(&outStream);
+    File_Construct(&outStream.file);
+
+    if (InFile_Open(&inStream.file, file_in) != 0)
+    {
+        printf("open the input file: %s erroe\n", file_in);
+        ret = -1;
+        goto _err1;
+    }
+
+    if (OutFile_Open(&outStream.file, file_out) != 0)
+    {
+        printf("open the output file: %s erroe\n", file_out);
+        ret = -1;
+        goto _err2;
+    }
+
+    if (lzma_decompress(&outStream.vt, &inStream.vt) != SZ_OK)
+    {
+        printf("lzma decompress file error!\n");
+        goto _err3;
+    }
+    printf("lzma decompress file success!\n");
+
+_err3:
+    File_Close(&outStream.file);
+
+_err2:
+    File_Close(&inStream.file);
+
+_err1:
+    return ret;
+}
+
+
+

+ 22 - 0
src/lzma/lzma.h

@@ -0,0 +1,22 @@
+#ifndef __LZMA_SAMPLE_H__
+#define __LZMA_SAMPLE_H__
+
+#include <stdint.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int lzma_file_info(const char* file_in);
+int lzma_file_compress(const char* file_in, const char* file_out, int dictSize, int level);
+int lzma_file_decompress(const char* file_in, const char* file_out);
+
+int lzma_compress(uint8_t *dest, int *destLen, const uint8_t *src, int srcLen, int dictSize, int level);
+int lzma_bin_decompress(uint8_t *outData, int *outLen, uint8_t *inData,int inLen);
+//int lzma_bin_decompress(uint8_t *outData, int *outLen, uint8_t *inData);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 3 - 0
src/lzma/src/1111-CMakeLists.txt

@@ -0,0 +1,3 @@
+#子目录下的源文件,取名为HELLO_SRC,让父级目录可见
+aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} LZMA_SRC)
+set(LZMA_SRC ${LZMA_SRC} PARENT_SCOPE)

+ 286 - 0
src/lzma/src/7zFile.c

@@ -0,0 +1,286 @@
+/* 7zFile.c -- File IO
+2017-04-03 : Igor Pavlov : Public domain */
+
+#include "../inc/Precomp.h"
+
+#include "../inc/7zFile.h"
+
+#ifndef USE_WINDOWS_FILE
+
+#ifndef UNDER_CE
+#include <errno.h>
+#endif
+
+#else
+
+/*
+   ReadFile and WriteFile functions in Windows have BUG:
+   If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1)
+   from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES
+   (Insufficient system resources exist to complete the requested service).
+   Probably in some version of Windows there are problems with other sizes:
+   for 32 MB (maybe also for 16 MB).
+   And message can be "Network connection was lost"
+*/
+
+#define kChunkSizeMax (1 << 22)
+
+#endif
+
+void File_Construct(CSzFile *p)
+{
+  #ifdef USE_WINDOWS_FILE
+  p->handle = INVALID_HANDLE_VALUE;
+  #else
+  p->file = NULL;
+  #endif
+}
+
+#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE)
+static WRes File_Open(CSzFile *p, const char *name, int writeMode)
+{
+  #ifdef USE_WINDOWS_FILE
+  p->handle = CreateFileA(name,
+      writeMode ? GENERIC_WRITE : GENERIC_READ,
+      FILE_SHARE_READ, NULL,
+      writeMode ? CREATE_ALWAYS : OPEN_EXISTING,
+      FILE_ATTRIBUTE_NORMAL, NULL);
+  return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError();
+  #else
+  p->file = fopen(name, writeMode ? "wb+" : "rb");
+  return (p->file != 0) ? 0 :
+    #ifdef UNDER_CE
+    2; /* ENOENT */
+    #else
+    errno;
+    #endif
+  #endif
+}
+
+WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); }
+WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); }
+#endif
+
+#ifdef USE_WINDOWS_FILE
+static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode)
+{
+  p->handle = CreateFileW(name,
+      writeMode ? GENERIC_WRITE : GENERIC_READ,
+      FILE_SHARE_READ, NULL,
+      writeMode ? CREATE_ALWAYS : OPEN_EXISTING,
+      FILE_ATTRIBUTE_NORMAL, NULL);
+  return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError();
+}
+WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); }
+WRes OutFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 1); }
+#endif
+
+WRes File_Close(CSzFile *p)
+{
+  #ifdef USE_WINDOWS_FILE
+  if (p->handle != INVALID_HANDLE_VALUE)
+  {
+    if (!CloseHandle(p->handle))
+      return GetLastError();
+    p->handle = INVALID_HANDLE_VALUE;
+  }
+  #else
+  if (p->file != NULL)
+  {
+    int res = fclose(p->file);
+    if (res != 0)
+      return res;
+    p->file = NULL;
+  }
+  #endif
+  return 0;
+}
+
+WRes File_Read(CSzFile *p, void *data, size_t *size)
+{
+  size_t originalSize = *size;
+  if (originalSize == 0)
+    return 0;
+
+  #ifdef USE_WINDOWS_FILE
+
+  *size = 0;
+  do
+  {
+    DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize;
+    DWORD processed = 0;
+    BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL);
+    data = (void *)((Byte *)data + processed);
+    originalSize -= processed;
+    *size += processed;
+    if (!res)
+      return GetLastError();
+    if (processed == 0)
+      break;
+  }
+  while (originalSize > 0);
+  return 0;
+
+  #else
+  
+  *size = fread(data, 1, originalSize, p->file);
+  if (*size == originalSize)
+    return 0;
+  return ferror(p->file);
+  
+  #endif
+}
+
+WRes File_Write(CSzFile *p, const void *data, size_t *size)
+{
+  size_t originalSize = *size;
+  if (originalSize == 0)
+    return 0;
+  
+  #ifdef USE_WINDOWS_FILE
+
+  *size = 0;
+  do
+  {
+    DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize;
+    DWORD processed = 0;
+    BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL);
+    data = (void *)((Byte *)data + processed);
+    originalSize -= processed;
+    *size += processed;
+    if (!res)
+      return GetLastError();
+    if (processed == 0)
+      break;
+  }
+  while (originalSize > 0);
+  return 0;
+
+  #else
+
+  *size = fwrite(data, 1, originalSize, p->file);
+  if (*size == originalSize)
+    return 0;
+  return ferror(p->file);
+  
+  #endif
+}
+
+WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin)
+{
+  #ifdef USE_WINDOWS_FILE
+
+  LARGE_INTEGER value;
+  DWORD moveMethod;
+  value.LowPart = (DWORD)*pos;
+  value.HighPart = (LONG)((UInt64)*pos >> 16 >> 16); /* for case when UInt64 is 32-bit only */
+  switch (origin)
+  {
+    case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break;
+    case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break;
+    case SZ_SEEK_END: moveMethod = FILE_END; break;
+    default: return ERROR_INVALID_PARAMETER;
+  }
+  value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod);
+  if (value.LowPart == 0xFFFFFFFF)
+  {
+    WRes res = GetLastError();
+    if (res != NO_ERROR)
+      return res;
+  }
+  *pos = ((Int64)value.HighPart << 32) | value.LowPart;
+  return 0;
+
+  #else
+  
+  int moveMethod;
+  int res;
+  switch (origin)
+  {
+    case SZ_SEEK_SET: moveMethod = SEEK_SET; break;
+    case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break;
+    case SZ_SEEK_END: moveMethod = SEEK_END; break;
+    default: return 1;
+  }
+  res = fseek(p->file, (long)*pos, moveMethod);
+  *pos = ftell(p->file);
+  return res;
+  
+  #endif
+}
+
+WRes File_GetLength(CSzFile *p, UInt64 *length)
+{
+  #ifdef USE_WINDOWS_FILE
+  
+  DWORD sizeHigh;
+  DWORD sizeLow = GetFileSize(p->handle, &sizeHigh);
+  if (sizeLow == 0xFFFFFFFF)
+  {
+    DWORD res = GetLastError();
+    if (res != NO_ERROR)
+      return res;
+  }
+  *length = (((UInt64)sizeHigh) << 32) + sizeLow;
+  return 0;
+  
+  #else
+  
+  long pos = ftell(p->file);
+  int res = fseek(p->file, 0, SEEK_END);
+  *length = ftell(p->file);
+  fseek(p->file, pos, SEEK_SET);
+  return res;
+  
+  #endif
+}
+
+
+/* ---------- FileSeqInStream ---------- */
+
+static SRes FileSeqInStream_Read(const ISeqInStream *pp, void *buf, size_t *size)
+{
+  CFileSeqInStream *p = CONTAINER_FROM_VTBL(pp, CFileSeqInStream, vt);
+  return File_Read(&p->file, buf, size) == 0 ? SZ_OK : SZ_ERROR_READ;
+}
+
+void FileSeqInStream_CreateVTable(CFileSeqInStream *p)
+{
+  p->vt.Read = FileSeqInStream_Read;
+}
+
+
+/* ---------- FileInStream ---------- */
+
+static SRes FileInStream_Read(const ISeekInStream *pp, void *buf, size_t *size)
+{
+  CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt);
+  return (File_Read(&p->file, buf, size) == 0) ? SZ_OK : SZ_ERROR_READ;
+}
+
+static SRes FileInStream_Seek(const ISeekInStream *pp, Int64 *pos, ESzSeek origin)
+{
+  CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt);
+  return File_Seek(&p->file, pos, origin);
+}
+
+void FileInStream_CreateVTable(CFileInStream *p)
+{
+  p->vt.Read = FileInStream_Read;
+  p->vt.Seek = FileInStream_Seek;
+}
+
+
+/* ---------- FileOutStream ---------- */
+
+static size_t FileOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size)
+{
+  CFileOutStream *p = CONTAINER_FROM_VTBL(pp, CFileOutStream, vt);
+  File_Write(&p->file, data, &size);
+  return size;
+}
+
+void FileOutStream_CreateVTable(CFileOutStream *p)
+{
+  p->vt.Write = FileOutStream_Write;
+}

+ 1128 - 0
src/lzma/src/LzFind.c

@@ -0,0 +1,1128 @@
+/* LzFind.c -- Match finder for LZ algorithms
+2018-07-08 : Igor Pavlov : Public domain */
+
+#include "../inc/Precomp.h"
+
+#include <string.h>
+
+#include "../inc/LzFind.h"
+#include "../inc/LzHash.h"
+
+#define kEmptyHashValue 0
+#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
+#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
+#define kNormalizeMask (~(UInt32)(kNormalizeStepMin - 1))
+#define kMaxHistorySize ((UInt32)7 << 29)
+
+#define kStartMaxLen 3
+
+static void LzInWindow_Free(CMatchFinder *p, ISzAllocPtr alloc)
+{
+    if (!p->directInput)
+    {
+        ISzAlloc_Free(alloc, p->bufferBase);
+        p->bufferBase = NULL;
+    }
+}
+
+/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */
+
+static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAllocPtr alloc)
+{
+    UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
+    if (p->directInput)
+    {
+        p->blockSize = blockSize;
+        return 1;
+    }
+    if (!p->bufferBase || p->blockSize != blockSize)
+    {
+        LzInWindow_Free(p, alloc);
+        p->blockSize = blockSize;
+        p->bufferBase = (Byte *) ISzAlloc_Alloc(alloc, (size_t) blockSize);
+    }
+    return (p->bufferBase != NULL);
+}
+
+Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p)
+{
+    return p->buffer;
+}
+
+UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p)
+{
+    return p->streamPos - p->pos;
+}
+
+void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
+{
+    p->posLimit -= subValue;
+    p->pos -= subValue;
+    p->streamPos -= subValue;
+}
+
+static void MatchFinder_ReadBlock(CMatchFinder *p)
+{
+    if (p->streamEndWasReached || p->result != SZ_OK)
+        return;
+
+    /* We use (p->streamPos - p->pos) value. (p->streamPos < p->pos) is allowed. */
+
+    if (p->directInput)
+    {
+        UInt32 curSize = 0xFFFFFFFF - (p->streamPos - p->pos);
+        if (curSize > p->directInputRem)
+            curSize = (UInt32) p->directInputRem;
+        p->directInputRem -= curSize;
+        p->streamPos += curSize;
+        if (p->directInputRem == 0)
+            p->streamEndWasReached = 1;
+        return;
+    }
+
+    for (;;)
+    {
+        Byte *dest = p->buffer + (p->streamPos - p->pos);
+        size_t size = (p->bufferBase + p->blockSize - dest);
+        if (size == 0)
+            return;
+
+        p->result = ISeqInStream_Read(p->stream, dest, &size);
+        if (p->result != SZ_OK)
+            return;
+        if (size == 0)
+        {
+            p->streamEndWasReached = 1;
+            return;
+        }
+        p->streamPos += (UInt32) size;
+        if (p->streamPos - p->pos > p->keepSizeAfter)
+            return;
+    }
+}
+
+void MatchFinder_MoveBlock(CMatchFinder *p)
+{
+    memmove(p->bufferBase,
+            p->buffer - p->keepSizeBefore,
+            (size_t) (p->streamPos - p->pos) + p->keepSizeBefore);
+    p->buffer = p->bufferBase + p->keepSizeBefore;
+}
+
+int MatchFinder_NeedMove(CMatchFinder *p)
+{
+    if (p->directInput)
+        return 0;
+    /* if (p->streamEndWasReached) return 0; */
+    return ((size_t) (p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
+}
+
+void MatchFinder_ReadIfRequired(CMatchFinder *p)
+{
+    if (p->streamEndWasReached)
+        return;
+    if (p->keepSizeAfter >= p->streamPos - p->pos)
+        MatchFinder_ReadBlock(p);
+}
+
+static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
+{
+    if (MatchFinder_NeedMove(p))
+        MatchFinder_MoveBlock(p);
+    MatchFinder_ReadBlock(p);
+}
+
+static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
+{
+    p->cutValue = 32;
+    p->btMode = 1;
+    p->numHashBytes = 4;
+    p->bigHash = 0;
+}
+
+#define kCrcPoly 0xEDB88320
+
+void MatchFinder_Construct(CMatchFinder *p)
+{
+    unsigned i;
+    p->bufferBase = NULL;
+    p->directInput = 0;
+    p->hash = NULL;
+    p->expectedDataSize = (UInt64) (Int64) - 1;
+    MatchFinder_SetDefaultSettings(p);
+
+    for (i = 0; i < 256; i++)
+    {
+        UInt32 r = (UInt32) i;
+        unsigned j;
+        for (j = 0; j < 8; j++)
+            r = (r >> 1) ^ (kCrcPoly & ((UInt32) 0 - (r & 1)));
+        p->crc[i] = r;
+    }
+}
+
+static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAllocPtr alloc)
+{
+    ISzAlloc_Free(alloc, p->hash);
+    p->hash = NULL;
+}
+
+void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc)
+{
+    MatchFinder_FreeThisClassMemory(p, alloc);
+    LzInWindow_Free(p, alloc);
+}
+
+static CLzRef* AllocRefs(size_t num, ISzAllocPtr alloc)
+{
+    size_t sizeInBytes = (size_t) num * sizeof (CLzRef);
+    if (sizeInBytes / sizeof (CLzRef) != num)
+        return NULL;
+    return (CLzRef *) ISzAlloc_Alloc(alloc, sizeInBytes);
+}
+
+int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
+                       UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
+                       ISzAllocPtr alloc)
+{
+    UInt32 sizeReserv;
+
+    if (historySize > kMaxHistorySize)
+    {
+        MatchFinder_Free(p, alloc);
+        return 0;
+    }
+
+    sizeReserv = historySize >> 1;
+    if (historySize >= ((UInt32) 3 << 30)) sizeReserv = historySize >> 3;
+    else if (historySize >= ((UInt32) 2 << 30)) sizeReserv = historySize >> 2;
+
+    sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
+
+    p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
+    p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
+
+    /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
+
+    if (LzInWindow_Create(p, sizeReserv, alloc))
+    {
+        UInt32 newCyclicBufferSize = historySize + 1;
+        UInt32 hs;
+        p->matchMaxLen = matchMaxLen;
+        {
+            p->fixedHashSize = 0;
+            if (p->numHashBytes == 2)
+                hs = (1 << 16) - 1;
+            else
+            {
+                hs = historySize;
+                if (hs > p->expectedDataSize)
+                    hs = (UInt32) p->expectedDataSize;
+                if (hs != 0)
+                    hs--;
+                hs |= (hs >> 1);
+                hs |= (hs >> 2);
+                hs |= (hs >> 4);
+                hs |= (hs >> 8);
+                hs >>= 1;
+                hs |= 0xFFFF; /* don't change it! It's required for Deflate */
+                if (hs > (1 << 24))
+                {
+                    if (p->numHashBytes == 3)
+                        hs = (1 << 24) - 1;
+                    else
+                        hs >>= 1;
+                    /* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */
+                }
+            }
+            p->hashMask = hs;
+            hs++;
+            if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size;
+            if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size;
+            if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size;
+            hs += p->fixedHashSize;
+        }
+
+        {
+            size_t newSize;
+            size_t numSons;
+            p->historySize = historySize;
+            p->hashSizeSum = hs;
+            p->cyclicBufferSize = newCyclicBufferSize;
+
+            numSons = newCyclicBufferSize;
+            if (p->btMode)
+                numSons <<= 1;
+            newSize = hs + numSons;
+
+            if (p->hash && p->numRefs == newSize)
+                return 1;
+
+            MatchFinder_FreeThisClassMemory(p, alloc);
+            p->numRefs = newSize;
+            p->hash = AllocRefs(newSize, alloc);
+
+            if (p->hash)
+            {
+                p->son = p->hash + p->hashSizeSum;
+                return 1;
+            }
+        }
+    }
+
+    MatchFinder_Free(p, alloc);
+    return 0;
+}
+
+static void MatchFinder_SetLimits(CMatchFinder *p)
+{
+    UInt32 limit = kMaxValForNormalize - p->pos;
+    UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
+
+    if (limit2 < limit)
+        limit = limit2;
+    limit2 = p->streamPos - p->pos;
+
+    if (limit2 <= p->keepSizeAfter)
+    {
+        if (limit2 > 0)
+            limit2 = 1;
+    }
+    else
+        limit2 -= p->keepSizeAfter;
+
+    if (limit2 < limit)
+        limit = limit2;
+
+    {
+        UInt32 lenLimit = p->streamPos - p->pos;
+        if (lenLimit > p->matchMaxLen)
+            lenLimit = p->matchMaxLen;
+        p->lenLimit = lenLimit;
+    }
+    p->posLimit = p->pos + limit;
+}
+
+void MatchFinder_Init_LowHash(CMatchFinder *p)
+{
+    size_t i;
+    CLzRef *items = p->hash;
+    size_t numItems = p->fixedHashSize;
+    for (i = 0; i < numItems; i++)
+        items[i] = kEmptyHashValue;
+}
+
+void MatchFinder_Init_HighHash(CMatchFinder *p)
+{
+    size_t i;
+    CLzRef *items = p->hash + p->fixedHashSize;
+    size_t numItems = (size_t) p->hashMask + 1;
+    for (i = 0; i < numItems; i++)
+        items[i] = kEmptyHashValue;
+}
+
+void MatchFinder_Init_3(CMatchFinder *p, int readData)
+{
+    p->cyclicBufferPos = 0;
+    p->buffer = p->bufferBase;
+    p->pos =
+            p->streamPos = p->cyclicBufferSize;
+    p->result = SZ_OK;
+    p->streamEndWasReached = 0;
+
+    if (readData)
+        MatchFinder_ReadBlock(p);
+
+    MatchFinder_SetLimits(p);
+}
+
+void MatchFinder_Init(CMatchFinder *p)
+{
+    MatchFinder_Init_HighHash(p);
+    MatchFinder_Init_LowHash(p);
+    MatchFinder_Init_3(p, True);
+}
+
+static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
+{
+    return (p->pos - p->historySize - 1) & kNormalizeMask;
+}
+
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems)
+{
+    size_t i;
+    for (i = 0; i < numItems; i++)
+    {
+        UInt32 value = items[i];
+        if (value <= subValue)
+            value = kEmptyHashValue;
+        else
+            value -= subValue;
+        items[i] = value;
+    }
+}
+
+static void MatchFinder_Normalize(CMatchFinder *p)
+{
+    UInt32 subValue = MatchFinder_GetSubValue(p);
+    MatchFinder_Normalize3(subValue, p->hash, p->numRefs);
+    MatchFinder_ReduceOffsets(p, subValue);
+}
+
+MY_NO_INLINE
+static void MatchFinder_CheckLimits(CMatchFinder *p)
+{
+    if (p->pos == kMaxValForNormalize)
+        MatchFinder_Normalize(p);
+    if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos)
+        MatchFinder_CheckAndMoveAndRead(p);
+    if (p->cyclicBufferPos == p->cyclicBufferSize)
+        p->cyclicBufferPos = 0;
+    MatchFinder_SetLimits(p);
+}
+
+/*
+  (lenLimit > maxLen)
+ */
+MY_FORCE_INLINE
+static UInt32 * Hc_GetMatchesSpec(unsigned lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+                                  UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
+                                  UInt32 *distances, unsigned maxLen)
+{
+    /*
+    son[_cyclicBufferPos] = curMatch;
+    for (;;)
+    {
+      UInt32 delta = pos - curMatch;
+      if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+        return distances;
+      {
+        const Byte *pb = cur - delta;
+        curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
+        if (pb[maxLen] == cur[maxLen] && *pb == *cur)
+        {
+          UInt32 len = 0;
+          while (++len != lenLimit)
+            if (pb[len] != cur[len])
+              break;
+          if (maxLen < len)
+          {
+            maxLen = len;
+     *distances++ = len;
+     *distances++ = delta - 1;
+            if (len == lenLimit)
+              return distances;
+          }
+        }
+      }
+    }
+     */
+
+    const Byte *lim = cur + lenLimit;
+    son[_cyclicBufferPos] = curMatch;
+    do
+    {
+        UInt32 delta = pos - curMatch;
+        if (delta >= _cyclicBufferSize)
+            break;
+        {
+            ptrdiff_t diff;
+            curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
+            diff = (ptrdiff_t) 0 - delta;
+            if (cur[maxLen] == cur[maxLen + diff])
+            {
+                const Byte *c = cur;
+                while (*c == c[diff])
+                {
+                    if (++c == lim)
+                    {
+                        distances[0] = (UInt32) (lim - cur);
+                        distances[1] = delta - 1;
+                        return distances + 2;
+                    }
+                }
+                {
+                    unsigned len = (unsigned) (c - cur);
+                    if (maxLen < len)
+                    {
+                        maxLen = len;
+                        distances[0] = (UInt32) len;
+                        distances[1] = delta - 1;
+                        distances += 2;
+                    }
+                }
+            }
+        }
+    }
+    while (--cutValue);
+
+    return distances;
+}
+
+MY_FORCE_INLINE
+UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+                         UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
+                         UInt32 *distances, UInt32 maxLen)
+{
+    CLzRef *ptr0 = son + ((size_t) _cyclicBufferPos << 1) + 1;
+    CLzRef *ptr1 = son + ((size_t) _cyclicBufferPos << 1);
+    unsigned len0 = 0, len1 = 0;
+    for (;;)
+    {
+        UInt32 delta = pos - curMatch;
+        if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+        {
+            *ptr0 = *ptr1 = kEmptyHashValue;
+            return distances;
+        }
+        {
+            CLzRef *pair = son + ((size_t) (_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+            const Byte *pb = cur - delta;
+            unsigned len = (len0 < len1 ? len0 : len1);
+            UInt32 pair0 = pair[0];
+            if (pb[len] == cur[len])
+            {
+                if (++len != lenLimit && pb[len] == cur[len])
+                    while (++len != lenLimit)
+                        if (pb[len] != cur[len])
+                            break;
+                if (maxLen < len)
+                {
+                    maxLen = (UInt32) len;
+                    *distances++ = (UInt32) len;
+                    *distances++ = delta - 1;
+                    if (len == lenLimit)
+                    {
+                        *ptr1 = pair0;
+                        *ptr0 = pair[1];
+                        return distances;
+                    }
+                }
+            }
+            if (pb[len] < cur[len])
+            {
+                *ptr1 = curMatch;
+                ptr1 = pair + 1;
+                curMatch = *ptr1;
+                len1 = len;
+            }
+            else
+            {
+                *ptr0 = curMatch;
+                ptr0 = pair;
+                curMatch = *ptr0;
+                len0 = len;
+            }
+        }
+    }
+}
+
+static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+                            UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)
+{
+    CLzRef *ptr0 = son + ((size_t) _cyclicBufferPos << 1) + 1;
+    CLzRef *ptr1 = son + ((size_t) _cyclicBufferPos << 1);
+    unsigned len0 = 0, len1 = 0;
+    for (;;)
+    {
+        UInt32 delta = pos - curMatch;
+        if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+        {
+            *ptr0 = *ptr1 = kEmptyHashValue;
+            return;
+        }
+        {
+            CLzRef *pair = son + ((size_t) (_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+            const Byte *pb = cur - delta;
+            unsigned len = (len0 < len1 ? len0 : len1);
+            if (pb[len] == cur[len])
+            {
+                while (++len != lenLimit)
+                    if (pb[len] != cur[len])
+                        break;
+                {
+                    if (len == lenLimit)
+                    {
+                        *ptr1 = pair[0];
+                        *ptr0 = pair[1];
+                        return;
+                    }
+                }
+            }
+            if (pb[len] < cur[len])
+            {
+                *ptr1 = curMatch;
+                ptr1 = pair + 1;
+                curMatch = *ptr1;
+                len1 = len;
+            }
+            else
+            {
+                *ptr0 = curMatch;
+                ptr0 = pair;
+                curMatch = *ptr0;
+                len0 = len;
+            }
+        }
+    }
+}
+
+#define MOVE_POS \
+  ++p->cyclicBufferPos; \
+  p->buffer++; \
+  if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
+
+#define MOVE_POS_RET MOVE_POS return (UInt32)offset;
+
+static void MatchFinder_MovePos(CMatchFinder *p)
+{
+    MOVE_POS;
+}
+
+#define GET_MATCHES_HEADER2(minLen, ret_op) \
+  unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \
+  lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
+  cur = p->buffer;
+
+#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)
+#define SKIP_HEADER(minLen)        GET_MATCHES_HEADER2(minLen, continue)
+
+#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
+
+#define GET_MATCHES_FOOTER(offset, maxLen) \
+  offset = (unsigned)(GetMatchesSpec1((UInt32)lenLimit, curMatch, MF_PARAMS(p), \
+  distances + offset, (UInt32)maxLen) - distances); MOVE_POS_RET;
+
+#define SKIP_FOOTER \
+  SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
+
+#define UPDATE_maxLen { \
+    ptrdiff_t diff = (ptrdiff_t)0 - d2; \
+    const Byte *c = cur + maxLen; \
+    const Byte *lim = cur + lenLimit; \
+    for (; c != lim; c++) if (*(c + diff) != *c) break; \
+    maxLen = (unsigned)(c - cur); }
+
+static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+    unsigned offset;
+    GET_MATCHES_HEADER(2)
+    HASH2_CALC;
+    curMatch = p->hash[hv];
+    p->hash[hv] = p->pos;
+    offset = 0;
+    GET_MATCHES_FOOTER(offset, 1)
+}
+
+UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+    unsigned offset;
+    GET_MATCHES_HEADER(3)
+    HASH_ZIP_CALC;
+    curMatch = p->hash[hv];
+    p->hash[hv] = p->pos;
+    offset = 0;
+    GET_MATCHES_FOOTER(offset, 2)
+}
+
+static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+    UInt32 h2, d2, pos;
+    unsigned maxLen, offset;
+    UInt32 *hash;
+    GET_MATCHES_HEADER(3)
+
+    HASH3_CALC;
+
+    hash = p->hash;
+    pos = p->pos;
+
+    d2 = pos - hash[h2];
+
+    curMatch = (hash + kFix3HashSize)[hv];
+
+    hash[h2] = pos;
+    (hash + kFix3HashSize)[hv] = pos;
+
+    maxLen = 2;
+    offset = 0;
+
+    if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+    {
+        UPDATE_maxLen
+        distances[0] = (UInt32) maxLen;
+        distances[1] = d2 - 1;
+        offset = 2;
+        if (maxLen == lenLimit)
+        {
+            SkipMatchesSpec((UInt32) lenLimit, curMatch, MF_PARAMS(p));
+            MOVE_POS_RET;
+        }
+    }
+
+    GET_MATCHES_FOOTER(offset, maxLen)
+}
+
+static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+    UInt32 h2, h3, d2, d3, pos;
+    unsigned maxLen, offset;
+    UInt32 *hash;
+    GET_MATCHES_HEADER(4)
+
+    HASH4_CALC;
+
+    hash = p->hash;
+    pos = p->pos;
+
+    d2 = pos - hash [h2];
+    d3 = pos - (hash + kFix3HashSize)[h3];
+
+    curMatch = (hash + kFix4HashSize)[hv];
+
+    hash [h2] = pos;
+    (hash + kFix3HashSize)[h3] = pos;
+    (hash + kFix4HashSize)[hv] = pos;
+
+    maxLen = 0;
+    offset = 0;
+
+    if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+    {
+        maxLen = 2;
+        distances[0] = 2;
+        distances[1] = d2 - 1;
+        offset = 2;
+    }
+
+    if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+    {
+        maxLen = 3;
+        distances[(size_t) offset + 1] = d3 - 1;
+        offset += 2;
+        d2 = d3;
+    }
+
+    if (offset != 0)
+    {
+        UPDATE_maxLen
+        distances[(size_t) offset - 2] = (UInt32) maxLen;
+        if (maxLen == lenLimit)
+        {
+            SkipMatchesSpec((UInt32) lenLimit, curMatch, MF_PARAMS(p));
+            MOVE_POS_RET;
+        }
+    }
+
+    if (maxLen < 3)
+        maxLen = 3;
+
+    GET_MATCHES_FOOTER(offset, maxLen)
+}
+
+/*
+static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+  UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos;
+  UInt32 *hash;
+  GET_MATCHES_HEADER(5)
+
+  HASH5_CALC;
+
+  hash = p->hash;
+  pos = p->pos;
+
+  d2 = pos - hash                  [h2];
+  d3 = pos - (hash + kFix3HashSize)[h3];
+  d4 = pos - (hash + kFix4HashSize)[h4];
+
+  curMatch = (hash + kFix5HashSize)[hv];
+
+  hash                  [h2] = pos;
+  (hash + kFix3HashSize)[h3] = pos;
+  (hash + kFix4HashSize)[h4] = pos;
+  (hash + kFix5HashSize)[hv] = pos;
+
+  maxLen = 0;
+  offset = 0;
+
+  if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+  {
+    distances[0] = maxLen = 2;
+    distances[1] = d2 - 1;
+    offset = 2;
+    if (*(cur - d2 + 2) == cur[2])
+      distances[0] = maxLen = 3;
+    else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+    {
+      distances[2] = maxLen = 3;
+      distances[3] = d3 - 1;
+      offset = 4;
+      d2 = d3;
+    }
+  }
+  else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+  {
+    distances[0] = maxLen = 3;
+    distances[1] = d3 - 1;
+    offset = 2;
+    d2 = d3;
+  }
+  
+  if (d2 != d4 && d4 < p->cyclicBufferSize
+      && *(cur - d4) == *cur
+      && *(cur - d4 + 3) == *(cur + 3))
+  {
+    maxLen = 4;
+    distances[(size_t)offset + 1] = d4 - 1;
+    offset += 2;
+    d2 = d4;
+  }
+  
+  if (offset != 0)
+  {
+    UPDATE_maxLen
+    distances[(size_t)offset - 2] = maxLen;
+    if (maxLen == lenLimit)
+    {
+      SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
+      MOVE_POS_RET;
+    }
+  }
+
+  if (maxLen < 4)
+    maxLen = 4;
+  
+  GET_MATCHES_FOOTER(offset, maxLen)
+}
+ */
+
+static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+    UInt32 h2, h3, d2, d3, pos;
+    unsigned maxLen, offset;
+    UInt32 *hash;
+    GET_MATCHES_HEADER(4)
+
+    HASH4_CALC;
+
+    hash = p->hash;
+    pos = p->pos;
+
+    d2 = pos - hash [h2];
+    d3 = pos - (hash + kFix3HashSize)[h3];
+    curMatch = (hash + kFix4HashSize)[hv];
+
+    hash [h2] = pos;
+    (hash + kFix3HashSize)[h3] = pos;
+    (hash + kFix4HashSize)[hv] = pos;
+
+    maxLen = 0;
+    offset = 0;
+
+    if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+    {
+        maxLen = 2;
+        distances[0] = 2;
+        distances[1] = d2 - 1;
+        offset = 2;
+    }
+
+    if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+    {
+        maxLen = 3;
+        distances[(size_t) offset + 1] = d3 - 1;
+        offset += 2;
+        d2 = d3;
+    }
+
+    if (offset != 0)
+    {
+        UPDATE_maxLen
+        distances[(size_t) offset - 2] = (UInt32) maxLen;
+        if (maxLen == lenLimit)
+        {
+            p->son[p->cyclicBufferPos] = curMatch;
+            MOVE_POS_RET;
+        }
+    }
+
+    if (maxLen < 3)
+        maxLen = 3;
+
+    offset = (unsigned) (Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+                                           distances + offset, maxLen) - (distances));
+    MOVE_POS_RET
+}
+
+/*
+static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+  UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos
+  UInt32 *hash;
+  GET_MATCHES_HEADER(5)
+
+  HASH5_CALC;
+
+  hash = p->hash;
+  pos = p->pos;
+  
+  d2 = pos - hash                  [h2];
+  d3 = pos - (hash + kFix3HashSize)[h3];
+  d4 = pos - (hash + kFix4HashSize)[h4];
+
+  curMatch = (hash + kFix5HashSize)[hv];
+
+  hash                  [h2] = pos;
+  (hash + kFix3HashSize)[h3] = pos;
+  (hash + kFix4HashSize)[h4] = pos;
+  (hash + kFix5HashSize)[hv] = pos;
+
+  maxLen = 0;
+  offset = 0;
+
+  if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
+  {
+    distances[0] = maxLen = 2;
+    distances[1] = d2 - 1;
+    offset = 2;
+    if (*(cur - d2 + 2) == cur[2])
+      distances[0] = maxLen = 3;
+    else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+    {
+      distances[2] = maxLen = 3;
+      distances[3] = d3 - 1;
+      offset = 4;
+      d2 = d3;
+    }
+  }
+  else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
+  {
+    distances[0] = maxLen = 3;
+    distances[1] = d3 - 1;
+    offset = 2;
+    d2 = d3;
+  }
+  
+  if (d2 != d4 && d4 < p->cyclicBufferSize
+      && *(cur - d4) == *cur
+      && *(cur - d4 + 3) == *(cur + 3))
+  {
+    maxLen = 4;
+    distances[(size_t)offset + 1] = d4 - 1;
+    offset += 2;
+    d2 = d4;
+  }
+  
+  if (offset != 0)
+  {
+    UPDATE_maxLen
+    distances[(size_t)offset - 2] = maxLen;
+    if (maxLen == lenLimit)
+    {
+      p->son[p->cyclicBufferPos] = curMatch;
+      MOVE_POS_RET;
+    }
+  }
+  
+  if (maxLen < 4)
+    maxLen = 4;
+
+  offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+      distances + offset, maxLen) - (distances));
+  MOVE_POS_RET
+}
+ */
+
+UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+    unsigned offset;
+    GET_MATCHES_HEADER(3)
+    HASH_ZIP_CALC;
+    curMatch = p->hash[hv];
+    p->hash[hv] = p->pos;
+    offset = (unsigned) (Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+                                           distances, 2) - (distances));
+    MOVE_POS_RET
+}
+
+static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+    do
+    {
+        SKIP_HEADER(2)
+        HASH2_CALC;
+        curMatch = p->hash[hv];
+        p->hash[hv] = p->pos;
+        SKIP_FOOTER
+    }
+    while (--num != 0);
+}
+
+void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+    do
+    {
+        SKIP_HEADER(3)
+        HASH_ZIP_CALC;
+        curMatch = p->hash[hv];
+        p->hash[hv] = p->pos;
+        SKIP_FOOTER
+    }
+    while (--num != 0);
+}
+
+static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+    do
+    {
+        UInt32 h2;
+        UInt32 *hash;
+        SKIP_HEADER(3)
+        HASH3_CALC;
+        hash = p->hash;
+        curMatch = (hash + kFix3HashSize)[hv];
+        hash[h2] =
+                (hash + kFix3HashSize)[hv] = p->pos;
+        SKIP_FOOTER
+    }
+    while (--num != 0);
+}
+
+static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+    do
+    {
+        UInt32 h2, h3;
+        UInt32 *hash;
+        SKIP_HEADER(4)
+        HASH4_CALC;
+        hash = p->hash;
+        curMatch = (hash + kFix4HashSize)[hv];
+        hash [h2] =
+                (hash + kFix3HashSize)[h3] =
+                (hash + kFix4HashSize)[hv] = p->pos;
+        SKIP_FOOTER
+    }
+    while (--num != 0);
+}
+
+/*
+static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+  do
+  {
+    UInt32 h2, h3, h4;
+    UInt32 *hash;
+    SKIP_HEADER(5)
+    HASH5_CALC;
+    hash = p->hash;
+    curMatch = (hash + kFix5HashSize)[hv];
+    hash                  [h2] =
+    (hash + kFix3HashSize)[h3] =
+    (hash + kFix4HashSize)[h4] =
+    (hash + kFix5HashSize)[hv] = p->pos;
+    SKIP_FOOTER
+  }
+  while (--num != 0);
+}
+ */
+
+static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+    do
+    {
+        UInt32 h2, h3;
+        UInt32 *hash;
+        SKIP_HEADER(4)
+        HASH4_CALC;
+        hash = p->hash;
+        curMatch = (hash + kFix4HashSize)[hv];
+        hash [h2] =
+                (hash + kFix3HashSize)[h3] =
+                (hash + kFix4HashSize)[hv] = p->pos;
+        p->son[p->cyclicBufferPos] = curMatch;
+        MOVE_POS
+    }
+    while (--num != 0);
+}
+
+/*
+static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+  do
+  {
+    UInt32 h2, h3, h4;
+    UInt32 *hash;
+    SKIP_HEADER(5)
+    HASH5_CALC;
+    hash = p->hash;
+    curMatch = hash + kFix5HashSize)[hv];
+    hash                  [h2] =
+    (hash + kFix3HashSize)[h3] =
+    (hash + kFix4HashSize)[h4] =
+    (hash + kFix5HashSize)[hv] = p->pos;
+    p->son[p->cyclicBufferPos] = curMatch;
+    MOVE_POS
+  }
+  while (--num != 0);
+}
+ */
+
+void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+    do
+    {
+        SKIP_HEADER(3)
+        HASH_ZIP_CALC;
+        curMatch = p->hash[hv];
+        p->hash[hv] = p->pos;
+        p->son[p->cyclicBufferPos] = curMatch;
+        MOVE_POS
+    }
+    while (--num != 0);
+}
+
+void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
+{
+    vTable->Init = (Mf_Init_Func) MatchFinder_Init;
+    vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func) MatchFinder_GetNumAvailableBytes;
+    vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func) MatchFinder_GetPointerToCurrentPos;
+    if (!p->btMode)
+    {
+        /* if (p->numHashBytes <= 4) */
+        {
+            vTable->GetMatches = (Mf_GetMatches_Func) Hc4_MatchFinder_GetMatches;
+            vTable->Skip = (Mf_Skip_Func) Hc4_MatchFinder_Skip;
+        }
+        /*
+        else
+        {
+          vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches;
+          vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip;
+        }
+         */
+    }
+    else if (p->numHashBytes == 2)
+    {
+        vTable->GetMatches = (Mf_GetMatches_Func) Bt2_MatchFinder_GetMatches;
+        vTable->Skip = (Mf_Skip_Func) Bt2_MatchFinder_Skip;
+    }
+    else if (p->numHashBytes == 3)
+    {
+        vTable->GetMatches = (Mf_GetMatches_Func) Bt3_MatchFinder_GetMatches;
+        vTable->Skip = (Mf_Skip_Func) Bt3_MatchFinder_Skip;
+    }
+    else /* if (p->numHashBytes == 4) */
+    {
+        vTable->GetMatches = (Mf_GetMatches_Func) Bt4_MatchFinder_GetMatches;
+        vTable->Skip = (Mf_Skip_Func) Bt4_MatchFinder_Skip;
+    }
+    /*
+    else
+    {
+      vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches;
+      vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip;
+    }
+     */
+}

+ 1209 - 0
src/lzma/src/LzmaDec.c

@@ -0,0 +1,1209 @@
+/* LzmaDec.c -- LZMA Decoder
+2018-07-04 : Igor Pavlov : Public domain */
+
+#include "../inc/Precomp.h"
+
+#include <string.h>
+
+/* #include "CpuArch.h" */
+#include "../inc/LzmaDec.h"
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+
+#define RC_INIT_SIZE 5
+
+#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
+
+#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)
+#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
+#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
+#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
+  { UPDATE_0(p); i = (i + i); A0; } else \
+  { UPDATE_1(p); i = (i + i) + 1; A1; }
+
+#define TREE_GET_BIT(probs, i) { GET_BIT2(probs + i, i, ;, ;); }
+
+#define REV_BIT(p, i, A0, A1) IF_BIT_0(p + i) \
+  { UPDATE_0(p + i); A0; } else \
+  { UPDATE_1(p + i); A1; }
+#define REV_BIT_VAR(  p, i, m) REV_BIT(p, i, i += m; m += m, m += m; i += m; )
+#define REV_BIT_CONST(p, i, m) REV_BIT(p, i, i += m;       , i += m * 2; )
+#define REV_BIT_LAST( p, i, m) REV_BIT(p, i, i -= m        , ; )
+
+#define TREE_DECODE(probs, limit, i) \
+  { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
+
+/* #define _LZMA_SIZE_OPT */
+
+#ifdef _LZMA_SIZE_OPT
+#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i)
+#else
+#define TREE_6_DECODE(probs, i) \
+  { i = 1; \
+  TREE_GET_BIT(probs, i); \
+  TREE_GET_BIT(probs, i); \
+  TREE_GET_BIT(probs, i); \
+  TREE_GET_BIT(probs, i); \
+  TREE_GET_BIT(probs, i); \
+  TREE_GET_BIT(probs, i); \
+  i -= 0x40; }
+#endif
+
+#define NORMAL_LITER_DEC TREE_GET_BIT(prob, symbol)
+#define MATCHED_LITER_DEC \
+  matchByte += matchByte; \
+  bit = offs; \
+  offs &= matchByte; \
+  probLit = prob + (offs + bit + symbol); \
+  GET_BIT2(probLit, symbol, offs ^= bit; , ;)
+
+
+
+#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
+
+#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)
+#define UPDATE_0_CHECK range = bound;
+#define UPDATE_1_CHECK range -= bound; code -= bound;
+#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
+  { UPDATE_0_CHECK; i = (i + i); A0; } else \
+  { UPDATE_1_CHECK; i = (i + i) + 1; A1; }
+#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
+#define TREE_DECODE_CHECK(probs, limit, i) \
+  { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
+
+
+#define REV_BIT_CHECK(p, i, m) IF_BIT_0_CHECK(p + i) \
+  { UPDATE_0_CHECK; i += m; m += m; } else \
+  { UPDATE_1_CHECK; m += m; i += m; }
+
+
+#define kNumPosBitsMax 4
+#define kNumPosStatesMax (1 << kNumPosBitsMax)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define LenLow 0
+#define LenHigh (LenLow + 2 * (kNumPosStatesMax << kLenNumLowBits))
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+
+#define LenChoice LenLow
+#define LenChoice2 (LenLow + (1 << kLenNumLowBits))
+
+#define kNumStates 12
+#define kNumStates2 16
+#define kNumLitStates 7
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+#define kNumPosSlotBits 6
+#define kNumLenToPosStates 4
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+
+#define kMatchMinLen 2
+#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols * 2 + kLenNumHighSymbols)
+
+/* External ASM code needs same CLzmaProb array layout. So don't change it. */
+
+/* (probs_1664) is faster and better for code size at some platforms */
+/*
+#ifdef MY_CPU_X86_OR_AMD64
+ */
+#define kStartOffset 1664
+#define GET_PROBS p->probs_1664
+/*
+#define GET_PROBS p->probs + kStartOffset
+#else
+#define kStartOffset 0
+#define GET_PROBS p->probs
+#endif
+ */
+
+#define SpecPos (-kStartOffset)
+#define IsRep0Long (SpecPos + kNumFullDistances)
+#define RepLenCoder (IsRep0Long + (kNumStates2 << kNumPosBitsMax))
+#define LenCoder (RepLenCoder + kNumLenProbs)
+#define IsMatch (LenCoder + kNumLenProbs)
+#define Align (IsMatch + (kNumStates2 << kNumPosBitsMax))
+#define IsRep (Align + kAlignTableSize)
+#define IsRepG0 (IsRep + kNumStates)
+#define IsRepG1 (IsRepG0 + kNumStates)
+#define IsRepG2 (IsRepG1 + kNumStates)
+#define PosSlot (IsRepG2 + kNumStates)
+#define Literal (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
+#define NUM_BASE_PROBS (Literal + kStartOffset)
+
+#if Align != 0 && kStartOffset != 0
+#error Stop_Compiling_Bad_LZMA_kAlign
+#endif
+
+#if NUM_BASE_PROBS != 1984
+#error Stop_Compiling_Bad_LZMA_PROBS
+#endif
+
+
+#define LZMA_LIT_SIZE 0x300
+
+#define LzmaProps_GetNumProbs(p) (NUM_BASE_PROBS + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
+
+
+#define CALC_POS_STATE(processedPos, pbMask) (((processedPos) & (pbMask)) << 4)
+#define COMBINED_PS_STATE (posState + state)
+#define GET_LEN_STATE (posState)
+
+#define LZMA_DIC_MIN (1 << 12)
+
+/*
+p->remainLen : shows status of LZMA decoder:
+    < kMatchSpecLenStart : normal remain
+    = kMatchSpecLenStart : finished
+    = kMatchSpecLenStart + 1 : need init range coder
+    = kMatchSpecLenStart + 2 : need init range coder and state
+ */
+
+/* ---------- LZMA_DECODE_REAL ---------- */
+/*
+LzmaDec_DecodeReal_3() can be implemented in external ASM file.
+3 - is the code compatibility version of that function for check at link time.
+ */
+
+#define LZMA_DECODE_REAL LzmaDec_DecodeReal_3
+
+/*
+LZMA_DECODE_REAL()
+In:
+  RangeCoder is normalized
+  if (p->dicPos == limit)
+  {
+    LzmaDec_TryDummy() was called before to exclude LITERAL and MATCH-REP cases.
+    So first symbol can be only MATCH-NON-REP. And if that MATCH-NON-REP symbol
+    is not END_OF_PAYALOAD_MARKER, then function returns error code.
+  }
+
+Processing:
+  first LZMA symbol will be decoded in any case
+  All checks for limits are at the end of main loop,
+  It will decode new LZMA-symbols while (p->buf < bufLimit && dicPos < limit),
+  RangeCoder is still without last normalization when (p->buf < bufLimit) is being checked.
+
+Out:
+  RangeCoder is normalized
+  Result:
+    SZ_OK - OK
+    SZ_ERROR_DATA - Error
+  p->remainLen:
+    < kMatchSpecLenStart : normal remain
+    = kMatchSpecLenStart : finished
+ */
+
+
+#ifdef _LZMA_DEC_OPT
+
+int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit);
+
+#else
+
+static
+int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
+{
+    CLzmaProb *probs = GET_PROBS;
+    unsigned state = (unsigned) p->state;
+    UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3];
+    unsigned pbMask = ((unsigned) 1 << (p->prop.pb)) - 1;
+    unsigned lc = p->prop.lc;
+    unsigned lpMask = ((unsigned) 0x100 << p->prop.lp) - ((unsigned) 0x100 >> lc);
+
+    Byte *dic = p->dic;
+    SizeT dicBufSize = p->dicBufSize;
+    SizeT dicPos = p->dicPos;
+
+    UInt32 processedPos = p->processedPos;
+    UInt32 checkDicSize = p->checkDicSize;
+    unsigned len = 0;
+
+    const Byte *buf = p->buf;
+    UInt32 range = p->range;
+    UInt32 code = p->code;
+
+    do
+    {
+        CLzmaProb *prob;
+        UInt32 bound;
+        unsigned ttt;
+        unsigned posState = CALC_POS_STATE(processedPos, pbMask);
+
+        prob = probs + IsMatch + COMBINED_PS_STATE;
+
+        IF_BIT_0(prob)
+        {
+            unsigned symbol;
+            UPDATE_0(prob);
+            prob = probs + Literal;
+            if (processedPos != 0 || checkDicSize != 0)
+                prob += (UInt32) 3 * ((((processedPos << 8) + dic[(dicPos == 0 ? dicBufSize : dicPos) - 1]) & lpMask) << lc);
+            processedPos++;
+
+            if (state < kNumLitStates)
+            {
+                state -= (state < 4) ? state : 3;
+                symbol = 1;
+#ifdef _LZMA_SIZE_OPT
+                do
+                {
+                    NORMAL_LITER_DEC
+                }
+                while (symbol < 0x100);
+#else
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+                NORMAL_LITER_DEC
+#endif
+            }
+            else
+            {
+                unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
+                unsigned offs = 0x100;
+                state -= (state < 10) ? 3 : 6;
+                symbol = 1;
+#ifdef _LZMA_SIZE_OPT
+                do
+                {
+                    unsigned bit;
+                    CLzmaProb *probLit;
+                    MATCHED_LITER_DEC
+                }
+                while (symbol < 0x100);
+#else
+                {
+                    unsigned bit;
+                    CLzmaProb *probLit;
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                    MATCHED_LITER_DEC
+                }
+#endif
+            }
+
+            dic[dicPos++] = (Byte) symbol;
+            continue;
+        }
+
+        {
+            UPDATE_1(prob);
+            prob = probs + IsRep + state;
+
+            IF_BIT_0(prob)
+            {
+                UPDATE_0(prob);
+                state += kNumStates;
+                prob = probs + LenCoder;
+            }
+            else
+            {
+                UPDATE_1(prob);
+                /*
+                // that case was checked before with kBadRepCode
+                if (checkDicSize == 0 && processedPos == 0)
+                  return SZ_ERROR_DATA;
+                 */
+                prob = probs + IsRepG0 + state;
+
+                IF_BIT_0(prob)
+                {
+                    UPDATE_0(prob);
+                    prob = probs + IsRep0Long + COMBINED_PS_STATE;
+
+                    IF_BIT_0(prob)
+                    {
+                        UPDATE_0(prob);
+                        dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
+                        dicPos++;
+                        processedPos++;
+                        state = state < kNumLitStates ? 9 : 11;
+                        continue;
+                    }
+                    UPDATE_1(prob);
+                }
+                else
+                {
+                    UInt32 distance;
+                    UPDATE_1(prob);
+                    prob = probs + IsRepG1 + state;
+
+                    IF_BIT_0(prob)
+                    {
+                        UPDATE_0(prob);
+                        distance = rep1;
+                    }
+                    else
+                    {
+                        UPDATE_1(prob);
+                        prob = probs + IsRepG2 + state;
+
+                        IF_BIT_0(prob)
+                        {
+                            UPDATE_0(prob);
+                            distance = rep2;
+                        }
+                        else
+                        {
+                            UPDATE_1(prob);
+                            distance = rep3;
+                            rep3 = rep2;
+                        }
+                        rep2 = rep1;
+                    }
+                    rep1 = rep0;
+                    rep0 = distance;
+                }
+                state = state < kNumLitStates ? 8 : 11;
+                prob = probs + RepLenCoder;
+            }
+
+#ifdef _LZMA_SIZE_OPT
+            {
+                unsigned lim, offset;
+                CLzmaProb *probLen = prob + LenChoice;
+
+                IF_BIT_0(probLen)
+                {
+                    UPDATE_0(probLen);
+                    probLen = prob + LenLow + GET_LEN_STATE;
+                    offset = 0;
+                    lim = (1 << kLenNumLowBits);
+                }
+                else
+                {
+                    UPDATE_1(probLen);
+                    probLen = prob + LenChoice2;
+
+                    IF_BIT_0(probLen)
+                    {
+                        UPDATE_0(probLen);
+                        probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
+                        offset = kLenNumLowSymbols;
+                        lim = (1 << kLenNumLowBits);
+                    }
+                    else
+                    {
+                        UPDATE_1(probLen);
+                        probLen = prob + LenHigh;
+                        offset = kLenNumLowSymbols * 2;
+                        lim = (1 << kLenNumHighBits);
+                    }
+                }
+                TREE_DECODE(probLen, lim, len);
+                len += offset;
+            }
+#else
+            {
+                CLzmaProb *probLen = prob + LenChoice;
+
+                IF_BIT_0(probLen)
+                {
+                    UPDATE_0(probLen);
+                    probLen = prob + LenLow + GET_LEN_STATE;
+                    len = 1;
+                    TREE_GET_BIT(probLen, len);
+                    TREE_GET_BIT(probLen, len);
+                    TREE_GET_BIT(probLen, len);
+                    len -= 8;
+                }
+                else
+                {
+                    UPDATE_1(probLen);
+                    probLen = prob + LenChoice2;
+
+                    IF_BIT_0(probLen)
+                    {
+                        UPDATE_0(probLen);
+                        probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
+                        len = 1;
+                        TREE_GET_BIT(probLen, len);
+                        TREE_GET_BIT(probLen, len);
+                        TREE_GET_BIT(probLen, len);
+                    }
+                    else
+                    {
+                        UPDATE_1(probLen);
+                        probLen = prob + LenHigh;
+                        TREE_DECODE(probLen, (1 << kLenNumHighBits), len);
+                        len += kLenNumLowSymbols * 2;
+                    }
+                }
+            }
+#endif
+
+            if (state >= kNumStates)
+            {
+                UInt32 distance;
+                prob = probs + PosSlot +
+                        ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
+                TREE_6_DECODE(prob, distance);
+                if (distance >= kStartPosModelIndex)
+                {
+                    unsigned posSlot = (unsigned) distance;
+                    unsigned numDirectBits = (unsigned) (((distance >> 1) - 1));
+                    distance = (2 | (distance & 1));
+                    if (posSlot < kEndPosModelIndex)
+                    {
+                        distance <<= numDirectBits;
+                        prob = probs + SpecPos;
+                        {
+                            UInt32 m = 1;
+                            distance++;
+                            do
+                            {
+                                REV_BIT_VAR(prob, distance, m);
+                            }
+                            while (--numDirectBits);
+                            distance -= m;
+                        }
+                    }
+                    else
+                    {
+                        numDirectBits -= kNumAlignBits;
+                        do
+                        {
+                            NORMALIZE
+                            range >>= 1;
+
+                            {
+                                UInt32 t;
+                                code -= range;
+                                t = (0 - ((UInt32) code >> 31)); /* (UInt32)((Int32)code >> 31) */
+                                distance = (distance << 1) + (t + 1);
+                                code += range & t;
+                            }
+                            /*
+                            distance <<= 1;
+                            if (code >= range)
+                            {
+                              code -= range;
+                              distance |= 1;
+                            }
+                             */
+                        }
+                        while (--numDirectBits);
+                        prob = probs + Align;
+                        distance <<= kNumAlignBits;
+                        {
+                            unsigned i = 1;
+                            REV_BIT_CONST(prob, i, 1);
+                            REV_BIT_CONST(prob, i, 2);
+                            REV_BIT_CONST(prob, i, 4);
+                            REV_BIT_LAST(prob, i, 8);
+                            distance |= i;
+                        }
+                        if (distance == (UInt32) 0xFFFFFFFF)
+                        {
+                            len = kMatchSpecLenStart;
+                            state -= kNumStates;
+                            break;
+                        }
+                    }
+                }
+
+                rep3 = rep2;
+                rep2 = rep1;
+                rep1 = rep0;
+                rep0 = distance + 1;
+                state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
+                if (distance >= (checkDicSize == 0 ? processedPos : checkDicSize))
+                {
+                    p->dicPos = dicPos;
+                    return SZ_ERROR_DATA;
+                }
+            }
+
+            len += kMatchMinLen;
+
+            {
+                SizeT rem;
+                unsigned curLen;
+                SizeT pos;
+
+                if ((rem = limit - dicPos) == 0)
+                {
+                    p->dicPos = dicPos;
+                    return SZ_ERROR_DATA;
+                }
+
+                curLen = ((rem < len) ? (unsigned) rem : len);
+                pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);
+
+                processedPos += (UInt32) curLen;
+
+                len -= curLen;
+                if (curLen <= dicBufSize - pos)
+                {
+                    Byte *dest = dic + dicPos;
+                    ptrdiff_t src = (ptrdiff_t) pos - (ptrdiff_t) dicPos;
+                    const Byte *lim = dest + curLen;
+                    dicPos += (SizeT) curLen;
+                    do
+                        *(dest) = (Byte)*(dest + src);
+                    while (++dest != lim);
+                }
+                else
+                {
+                    do
+                    {
+                        dic[dicPos++] = dic[pos];
+                        if (++pos == dicBufSize)
+                            pos = 0;
+                    }
+                    while (--curLen != 0);
+                }
+            }
+        }
+    }
+    while (dicPos < limit && buf < bufLimit);
+
+    NORMALIZE;
+
+    p->buf = buf;
+    p->range = range;
+    p->code = code;
+    p->remainLen = (UInt32) len;
+    p->dicPos = dicPos;
+    p->processedPos = processedPos;
+    p->reps[0] = rep0;
+    p->reps[1] = rep1;
+    p->reps[2] = rep2;
+    p->reps[3] = rep3;
+    p->state = (UInt32) state;
+
+    return SZ_OK;
+}
+#endif
+
+static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
+{
+    if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart)
+    {
+        Byte *dic = p->dic;
+        SizeT dicPos = p->dicPos;
+        SizeT dicBufSize = p->dicBufSize;
+        unsigned len = (unsigned) p->remainLen;
+        SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */
+        SizeT rem = limit - dicPos;
+        if (rem < len)
+            len = (unsigned) (rem);
+
+        if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
+            p->checkDicSize = p->prop.dicSize;
+
+        p->processedPos += (UInt32) len;
+        p->remainLen -= (UInt32) len;
+        while (len != 0)
+        {
+            len--;
+            dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
+            dicPos++;
+        }
+        p->dicPos = dicPos;
+    }
+}
+
+
+#define kRange0 0xFFFFFFFF
+#define kBound0 ((kRange0 >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1))
+#define kBadRepCode (kBound0 + (((kRange0 - kBound0) >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1)))
+#if kBadRepCode != (0xC0000000 - 0x400)
+#error Stop_Compiling_Bad_LZMA_Check
+#endif
+
+static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
+{
+    do
+    {
+        SizeT limit2 = limit;
+        if (p->checkDicSize == 0)
+        {
+            UInt32 rem = p->prop.dicSize - p->processedPos;
+            if (limit - p->dicPos > rem)
+                limit2 = p->dicPos + rem;
+
+            if (p->processedPos == 0)
+                if (p->code >= kBadRepCode)
+                    return SZ_ERROR_DATA;
+        }
+
+        RINOK(LZMA_DECODE_REAL(p, limit2, bufLimit));
+
+        if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize)
+            p->checkDicSize = p->prop.dicSize;
+
+        LzmaDec_WriteRem(p, limit);
+    }
+    while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
+
+    return 0;
+}
+
+typedef enum
+{
+    DUMMY_ERROR, /* unexpected end of input stream */
+    DUMMY_LIT,
+    DUMMY_MATCH,
+    DUMMY_REP
+} ELzmaDummy;
+
+static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize)
+{
+    UInt32 range = p->range;
+    UInt32 code = p->code;
+    const Byte *bufLimit = buf + inSize;
+    const CLzmaProb *probs = GET_PROBS;
+    unsigned state = (unsigned) p->state;
+    ELzmaDummy res;
+
+    {
+        const CLzmaProb *prob;
+        UInt32 bound;
+        unsigned ttt;
+        unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1);
+
+        prob = probs + IsMatch + COMBINED_PS_STATE;
+
+        IF_BIT_0_CHECK(prob)
+        {
+            UPDATE_0_CHECK
+
+            /* if (bufLimit - buf >= 7) return DUMMY_LIT; */
+
+            prob = probs + Literal;
+            if (p->checkDicSize != 0 || p->processedPos != 0)
+                prob += ((UInt32) LZMA_LIT_SIZE *
+                    ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
+                    (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
+
+            if (state < kNumLitStates)
+            {
+                unsigned symbol = 1;
+                do
+                {
+                    GET_BIT_CHECK(prob + symbol, symbol)
+                }
+                while (symbol < 0x100);
+            }
+            else
+            {
+                unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
+                        (p->dicPos < p->reps[0] ? p->dicBufSize : 0)];
+                unsigned offs = 0x100;
+                unsigned symbol = 1;
+                do
+                {
+                    unsigned bit;
+                    const CLzmaProb *probLit;
+                    matchByte += matchByte;
+                    bit = offs;
+                    offs &= matchByte;
+                    probLit = prob + (offs + bit + symbol);
+                    GET_BIT2_CHECK(probLit, symbol, offs ^= bit;,;)
+                }
+                while (symbol < 0x100);
+            }
+            res = DUMMY_LIT;
+        }
+        else
+        {
+            unsigned len;
+            UPDATE_1_CHECK;
+
+            prob = probs + IsRep + state;
+
+            IF_BIT_0_CHECK(prob)
+            {
+                UPDATE_0_CHECK;
+                state = 0;
+                prob = probs + LenCoder;
+                res = DUMMY_MATCH;
+            }
+            else
+            {
+                UPDATE_1_CHECK;
+                res = DUMMY_REP;
+                prob = probs + IsRepG0 + state;
+
+                IF_BIT_0_CHECK(prob)
+                {
+                    UPDATE_0_CHECK;
+                    prob = probs + IsRep0Long + COMBINED_PS_STATE;
+
+                    IF_BIT_0_CHECK(prob)
+                    {
+                        UPDATE_0_CHECK;
+                        NORMALIZE_CHECK;
+                        return DUMMY_REP;
+                    }
+                    else
+                    {
+                        UPDATE_1_CHECK;
+                    }
+                }
+                else
+                {
+                    UPDATE_1_CHECK;
+                    prob = probs + IsRepG1 + state;
+
+                    IF_BIT_0_CHECK(prob)
+                    {
+                        UPDATE_0_CHECK;
+                    }
+                    else
+                    {
+                        UPDATE_1_CHECK;
+                        prob = probs + IsRepG2 + state;
+
+                        IF_BIT_0_CHECK(prob)
+                        {
+                            UPDATE_0_CHECK;
+                        }
+                        else
+                        {
+                            UPDATE_1_CHECK;
+                        }
+                    }
+                }
+                state = kNumStates;
+                prob = probs + RepLenCoder;
+            }
+            {
+                unsigned limit, offset;
+                const CLzmaProb *probLen = prob + LenChoice;
+
+                IF_BIT_0_CHECK(probLen)
+                {
+                    UPDATE_0_CHECK;
+                    probLen = prob + LenLow + GET_LEN_STATE;
+                    offset = 0;
+                    limit = 1 << kLenNumLowBits;
+                }
+                else
+                {
+                    UPDATE_1_CHECK;
+                    probLen = prob + LenChoice2;
+
+                    IF_BIT_0_CHECK(probLen)
+                    {
+                        UPDATE_0_CHECK;
+                        probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
+                        offset = kLenNumLowSymbols;
+                        limit = 1 << kLenNumLowBits;
+                    }
+                    else
+                    {
+                        UPDATE_1_CHECK;
+                        probLen = prob + LenHigh;
+                        offset = kLenNumLowSymbols * 2;
+                        limit = 1 << kLenNumHighBits;
+                    }
+                }
+                TREE_DECODE_CHECK(probLen, limit, len);
+                len += offset;
+            }
+
+            if (state < 4)
+            {
+                unsigned posSlot;
+                prob = probs + PosSlot +
+                        ((len < kNumLenToPosStates - 1 ? len : kNumLenToPosStates - 1) <<
+                        kNumPosSlotBits);
+                TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
+                if (posSlot >= kStartPosModelIndex)
+                {
+                    unsigned numDirectBits = ((posSlot >> 1) - 1);
+
+                    /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
+
+                    if (posSlot < kEndPosModelIndex)
+                    {
+                        prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits);
+                    }
+                    else
+                    {
+                        numDirectBits -= kNumAlignBits;
+                        do
+                        {
+                            NORMALIZE_CHECK
+                            range >>= 1;
+                            code -= range & (((code - range) >> 31) - 1);
+                            /* if (code >= range) code -= range; */
+                        }
+                        while (--numDirectBits);
+                        prob = probs + Align;
+                        numDirectBits = kNumAlignBits;
+                    }
+                    {
+                        unsigned i = 1;
+                        unsigned m = 1;
+                        do
+                        {
+                            REV_BIT_CHECK(prob, i, m);
+                        }
+                        while (--numDirectBits);
+                    }
+                }
+            }
+        }
+    }
+    NORMALIZE_CHECK;
+    return res;
+}
+
+void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState)
+{
+    p->remainLen = kMatchSpecLenStart + 1;
+    p->tempBufSize = 0;
+
+    if (initDic)
+    {
+        p->processedPos = 0;
+        p->checkDicSize = 0;
+        p->remainLen = kMatchSpecLenStart + 2;
+    }
+    if (initState)
+        p->remainLen = kMatchSpecLenStart + 2;
+}
+
+void LzmaDec_Init(CLzmaDec *p)
+{
+    p->dicPos = 0;
+    LzmaDec_InitDicAndState(p, True, True);
+}
+
+SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
+                         ELzmaFinishMode finishMode, ELzmaStatus *status)
+{
+    SizeT inSize = *srcLen;
+    (*srcLen) = 0;
+
+    *status = LZMA_STATUS_NOT_SPECIFIED;
+
+    if (p->remainLen > kMatchSpecLenStart)
+    {
+        for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
+            p->tempBuf[p->tempBufSize++] = *src++;
+        if (p->tempBufSize != 0 && p->tempBuf[0] != 0)
+            return SZ_ERROR_DATA;
+        if (p->tempBufSize < RC_INIT_SIZE)
+        {
+            *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+            return SZ_OK;
+        }
+        p->code =
+                ((UInt32) p->tempBuf[1] << 24)
+                | ((UInt32) p->tempBuf[2] << 16)
+                | ((UInt32) p->tempBuf[3] << 8)
+                | ((UInt32) p->tempBuf[4]);
+        p->range = 0xFFFFFFFF;
+        p->tempBufSize = 0;
+
+        if (p->remainLen > kMatchSpecLenStart + 1)
+        {
+            SizeT numProbs = LzmaProps_GetNumProbs(&p->prop);
+            SizeT i;
+            CLzmaProb *probs = p->probs;
+            for (i = 0; i < numProbs; i++)
+                probs[i] = kBitModelTotal >> 1;
+            p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1;
+            p->state = 0;
+        }
+
+        p->remainLen = 0;
+    }
+
+    LzmaDec_WriteRem(p, dicLimit);
+
+    while (p->remainLen != kMatchSpecLenStart)
+    {
+        int checkEndMarkNow = 0;
+
+        if (p->dicPos >= dicLimit)
+        {
+            if (p->remainLen == 0 && p->code == 0)
+            {
+                *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK;
+                return SZ_OK;
+            }
+            if (finishMode == LZMA_FINISH_ANY)
+            {
+                *status = LZMA_STATUS_NOT_FINISHED;
+                return SZ_OK;
+            }
+            if (p->remainLen != 0)
+            {
+                *status = LZMA_STATUS_NOT_FINISHED;
+                return SZ_ERROR_DATA;
+            }
+            checkEndMarkNow = 1;
+        }
+
+        if (p->tempBufSize == 0)
+        {
+            SizeT processed;
+            const Byte *bufLimit;
+            if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
+            {
+                int dummyRes = LzmaDec_TryDummy(p, src, inSize);
+                if (dummyRes == DUMMY_ERROR)
+                {
+                    memcpy(p->tempBuf, src, inSize);
+                    p->tempBufSize = (unsigned) inSize;
+                    (*srcLen) += inSize;
+                    *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+                    return SZ_OK;
+                }
+                if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
+                {
+                    *status = LZMA_STATUS_NOT_FINISHED;
+                    return SZ_ERROR_DATA;
+                }
+                bufLimit = src;
+            }
+            else
+                bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX;
+            p->buf = src;
+            if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0)
+                return SZ_ERROR_DATA;
+            processed = (SizeT) (p->buf - src);
+            (*srcLen) += processed;
+            src += processed;
+            inSize -= processed;
+        }
+        else
+        {
+            unsigned rem = p->tempBufSize, lookAhead = 0;
+            while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize)
+                p->tempBuf[rem++] = src[lookAhead++];
+            p->tempBufSize = rem;
+            if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
+            {
+                int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, (SizeT) rem);
+                if (dummyRes == DUMMY_ERROR)
+                {
+                    (*srcLen) += (SizeT) lookAhead;
+                    *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+                    return SZ_OK;
+                }
+                if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
+                {
+                    *status = LZMA_STATUS_NOT_FINISHED;
+                    return SZ_ERROR_DATA;
+                }
+            }
+            p->buf = p->tempBuf;
+            if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
+                return SZ_ERROR_DATA;
+
+            {
+                unsigned kkk = (unsigned) (p->buf - p->tempBuf);
+                if (rem < kkk)
+                    return SZ_ERROR_FAIL; /* some internal error */
+                rem -= kkk;
+                if (lookAhead < rem)
+                    return SZ_ERROR_FAIL; /* some internal error */
+                lookAhead -= rem;
+            }
+            (*srcLen) += (SizeT) lookAhead;
+            src += lookAhead;
+            inSize -= (SizeT) lookAhead;
+            p->tempBufSize = 0;
+        }
+    }
+
+    if (p->code != 0)
+        return SZ_ERROR_DATA;
+    *status = LZMA_STATUS_FINISHED_WITH_MARK;
+    return SZ_OK;
+}
+
+SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
+{
+    SizeT outSize = *destLen;
+    SizeT inSize = *srcLen;
+    *srcLen = *destLen = 0;
+    for (;;)
+    {
+        SizeT inSizeCur = inSize, outSizeCur, dicPos;
+        ELzmaFinishMode curFinishMode;
+        SRes res;
+        if (p->dicPos == p->dicBufSize)
+            p->dicPos = 0;
+        dicPos = p->dicPos;
+        if (outSize > p->dicBufSize - dicPos)
+        {
+            outSizeCur = p->dicBufSize;
+            curFinishMode = LZMA_FINISH_ANY;
+        }
+        else
+        {
+            outSizeCur = dicPos + outSize;
+            curFinishMode = finishMode;
+        }
+
+        res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
+        src += inSizeCur;
+        inSize -= inSizeCur;
+        *srcLen += inSizeCur;
+        outSizeCur = p->dicPos - dicPos;
+        memcpy(dest, p->dic + dicPos, outSizeCur);
+        dest += outSizeCur;
+        outSize -= outSizeCur;
+        *destLen += outSizeCur;
+        if (res != 0)
+            return res;
+        if (outSizeCur == 0 || outSize == 0)
+            return SZ_OK;
+    }
+}
+
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc)
+{
+    ISzAlloc_Free(alloc, p->probs);
+    p->probs = NULL;
+}
+
+static void LzmaDec_FreeDict(CLzmaDec *p, ISzAllocPtr alloc)
+{
+    ISzAlloc_Free(alloc, p->dic);
+    p->dic = NULL;
+}
+
+void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc)
+{
+    LzmaDec_FreeProbs(p, alloc);
+    LzmaDec_FreeDict(p, alloc);
+}
+
+SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
+{
+    UInt32 dicSize;
+    Byte d;
+
+    if (size < LZMA_PROPS_SIZE)
+        return SZ_ERROR_UNSUPPORTED;
+    else
+        dicSize = data[1] | ((UInt32) data[2] << 8) | ((UInt32) data[3] << 16) | ((UInt32) data[4] << 24);
+
+    if (dicSize < LZMA_DIC_MIN)
+        dicSize = LZMA_DIC_MIN;
+    p->dicSize = dicSize;
+
+    d = data[0];
+    if (d >= (9 * 5 * 5))
+        return SZ_ERROR_UNSUPPORTED;
+
+    p->lc = (Byte) (d % 9);
+    d /= 9;
+    p->pb = (Byte) (d / 5);
+    p->lp = (Byte) (d % 5);
+
+    return SZ_OK;
+}
+
+static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAllocPtr alloc)
+{
+    UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
+    if (!p->probs || numProbs != p->numProbs)
+    {
+        LzmaDec_FreeProbs(p, alloc);
+        p->probs = (CLzmaProb *) ISzAlloc_Alloc(alloc, numProbs * sizeof (CLzmaProb));
+        if (!p->probs)
+            return SZ_ERROR_MEM;
+        p->probs_1664 = p->probs + 1664;
+        p->numProbs = numProbs;
+    }
+    return SZ_OK;
+}
+
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc)
+{
+    CLzmaProps propNew;
+    RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+    RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+    p->prop = propNew;
+    return SZ_OK;
+}
+
+SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc)
+{
+    CLzmaProps propNew;
+    SizeT dicBufSize;
+    RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+    RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+
+    {
+        UInt32 dictSize = propNew.dicSize;
+        SizeT mask = ((UInt32) 1 << 12) - 1;
+        if (dictSize >= ((UInt32) 1 << 30)) mask = ((UInt32) 1 << 22) - 1;
+        else if (dictSize >= ((UInt32) 1 << 22)) mask = ((UInt32) 1 << 20) - 1;
+        ;
+        dicBufSize = ((SizeT) dictSize + mask) & ~mask;
+        if (dicBufSize < dictSize)
+            dicBufSize = dictSize;
+    }
+
+    if (!p->dic || dicBufSize != p->dicBufSize)
+    {
+        LzmaDec_FreeDict(p, alloc);
+        p->dic = (Byte *) ISzAlloc_Alloc(alloc, dicBufSize);
+        if (!p->dic)
+        {
+            LzmaDec_FreeProbs(p, alloc);
+            return SZ_ERROR_MEM;
+        }
+    }
+    p->dicBufSize = dicBufSize;
+    p->prop = propNew;
+    return SZ_OK;
+}
+
+SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+                const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
+                ELzmaStatus *status, ISzAllocPtr alloc)
+{
+    CLzmaDec p;
+    SRes res;
+    SizeT outSize = *destLen, inSize = *srcLen;
+    *destLen = *srcLen = 0;
+    *status = LZMA_STATUS_NOT_SPECIFIED;
+    if (inSize < RC_INIT_SIZE)
+        return SZ_ERROR_INPUT_EOF;
+    LzmaDec_Construct(&p);
+    RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc));
+    p.dic = dest;
+    p.dicBufSize = outSize;
+    LzmaDec_Init(&p);
+    *srcLen = inSize;
+    res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
+    *destLen = p.dicPos;
+    if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
+        res = SZ_ERROR_INPUT_EOF;
+    LzmaDec_FreeProbs(&p, alloc);
+    return res;
+}

+ 2991 - 0
src/lzma/src/LzmaEnc.c

@@ -0,0 +1,2991 @@
+/* LzmaEnc.c -- LZMA Encoder
+2019-01-10: Igor Pavlov : Public domain */
+
+#include "../inc/Precomp.h"
+
+#include <string.h>
+
+/* #define SHOW_STAT */
+/* #define SHOW_STAT2 */
+
+#if defined(SHOW_STAT) || defined(SHOW_STAT2)
+#include <stdio.h>
+#endif
+
+#include "../inc/LzmaEnc.h"
+
+#include "../inc/LzFind.h"
+#ifndef _7ZIP_ST
+#include "../inc/LzFindMt.h"
+#endif
+
+#ifdef SHOW_STAT
+static unsigned g_STAT_OFFSET = 0;
+#endif
+
+#define kLzmaMaxHistorySize ((UInt32)3 << 29)
+/* #define kLzmaMaxHistorySize ((UInt32)7 << 29) */
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+#define kProbInitValue (kBitModelTotal >> 1)
+
+#define kNumMoveReducingBits 4
+#define kNumBitPriceShiftBits 4
+#define kBitPrice (1 << kNumBitPriceShiftBits)
+
+#define REP_LEN_COUNT 64
+
+void LzmaEncProps_Init(CLzmaEncProps *p)
+{
+    p->level = 5;
+    p->dictSize = p->mc = 0;
+    p->reduceSize = (UInt64) (Int64) - 1;
+    p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1;
+    p->writeEndMark = 0;
+}
+
+void LzmaEncProps_Normalize(CLzmaEncProps *p)
+{
+    int level = p->level;
+    if (level < 0) level = 5;
+    p->level = level;
+
+    if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level <= 7 ? (1 << 25) : (1 << 26)));
+    if (p->dictSize > p->reduceSize)
+    {
+        unsigned i;
+        UInt32 reduceSize = (UInt32) p->reduceSize;
+        for (i = 11; i <= 30; i++)
+        {
+            if (reduceSize <= ((UInt32) 2 << i))
+            {
+                p->dictSize = ((UInt32) 2 << i);
+                break;
+            }
+            if (reduceSize <= ((UInt32) 3 << i))
+            {
+                p->dictSize = ((UInt32) 3 << i);
+                break;
+            }
+        }
+    }
+
+    if (p->lc < 0) p->lc = 3;
+    if (p->lp < 0) p->lp = 0;
+    if (p->pb < 0) p->pb = 2;
+
+    if (p->algo < 0) p->algo = (level < 5 ? 0 : 1);
+    if (p->fb < 0) p->fb = (level < 7 ? 32 : 64);
+    if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1);
+    if (p->numHashBytes < 0) p->numHashBytes = 4;
+    if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1);
+
+    if (p->numThreads < 0)
+        p->numThreads =
+#ifndef _7ZIP_ST
+            ((p->btMode && p->algo) ? 2 : 1);
+#else
+            1;
+#endif
+}
+
+UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
+{
+    CLzmaEncProps props = *props2;
+    LzmaEncProps_Normalize(&props);
+    return props.dictSize;
+}
+
+#if (_MSC_VER >= 1400)
+/* BSR code is fast for some new CPUs */
+/* #define LZMA_LOG_BSR */
+#endif
+
+#ifdef LZMA_LOG_BSR
+
+#define kDicLogSizeMaxCompress 32
+
+#define BSR2_RET(pos, res) { unsigned long zz; _BitScanReverse(&zz, (pos)); res = (zz + zz) + ((pos >> (zz - 1)) & 1); }
+
+static unsigned GetPosSlot1(UInt32 pos)
+{
+    unsigned res;
+    BSR2_RET(pos, res);
+    return res;
+}
+#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
+#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); }
+
+#else
+
+#define kNumLogBits (9 + sizeof(size_t) / 2)
+/* #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) */
+
+#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
+
+static void LzmaEnc_FastPosInit(Byte *g_FastPos)
+{
+    unsigned slot;
+    g_FastPos[0] = 0;
+    g_FastPos[1] = 1;
+    g_FastPos += 2;
+
+    for (slot = 2; slot < kNumLogBits * 2; slot++)
+    {
+        size_t k = ((size_t) 1 << ((slot >> 1) - 1));
+        size_t j;
+        for (j = 0; j < k; j++)
+            g_FastPos[j] = (Byte) slot;
+        g_FastPos += k;
+    }
+}
+
+/* we can use ((limit - pos) >> 31) only if (pos < ((UInt32)1 << 31)) */
+/*
+#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \
+  (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \
+  res = p->g_FastPos[pos >> zz] + (zz * 2); }
+ */
+
+/*
+#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \
+  (0 - (((((UInt32)1 << (kNumLogBits)) - 1) - (pos >> 6)) >> 31))); \
+  res = p->g_FastPos[pos >> zz] + (zz * 2); }
+ */
+
+#define BSR2_RET(pos, res) { unsigned zz = (pos < (1 << (kNumLogBits + 6))) ? 6 : 6 + kNumLogBits - 1; \
+  res = p->g_FastPos[pos >> zz] + (zz * 2); }
+
+/*
+#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \
+  p->g_FastPos[pos >> 6] + 12 : \
+  p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; }
+ */
+
+#define GetPosSlot1(pos) p->g_FastPos[pos]
+#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
+#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos & (kNumFullDistances - 1)]; else BSR2_RET(pos, res); }
+
+#endif
+
+
+#define LZMA_NUM_REPS 4
+
+typedef UInt16 CState;
+typedef UInt16 CExtra;
+
+typedef struct
+{
+    UInt32 price;
+    CState state;
+    CExtra extra;
+    // 0   : normal
+    // 1   : LIT : MATCH
+    // > 1 : MATCH (extra-1) : LIT : REP0 (len)
+    UInt32 len;
+    UInt32 dist;
+    UInt32 reps[LZMA_NUM_REPS];
+} COptimal;
+
+
+// 18.06
+#define kNumOpts (1 << 11)
+#define kPackReserve (kNumOpts * 8)
+// #define kNumOpts (1 << 12)
+// #define kPackReserve (1 + kNumOpts * 2)
+
+#define kNumLenToPosStates 4
+#define kNumPosSlotBits 6
+#define kDicLogSizeMin 0
+#define kDicLogSizeMax 32
+#define kDistTableSizeMax (kDicLogSizeMax * 2)
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+#define kAlignMask (kAlignTableSize - 1)
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+typedef
+#ifdef _LZMA_PROB32
+UInt32
+#else
+UInt16
+#endif
+CLzmaProb;
+
+#define LZMA_PB_MAX 4
+#define LZMA_LC_MAX 8
+#define LZMA_LP_MAX 4
+
+#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+#define kLenNumSymbolsTotal (kLenNumLowSymbols * 2 + kLenNumHighSymbols)
+
+#define LZMA_MATCH_LEN_MIN 2
+#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1)
+
+#define kNumStates 12
+
+typedef struct
+{
+    CLzmaProb low[LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)];
+    CLzmaProb high[kLenNumHighSymbols];
+} CLenEnc;
+
+typedef struct
+{
+    unsigned tableSize;
+    UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
+    // UInt32 prices1[LZMA_NUM_PB_STATES_MAX][kLenNumLowSymbols * 2];
+    // UInt32 prices2[kLenNumSymbolsTotal];
+} CLenPriceEnc;
+
+#define GET_PRICE_LEN(p, posState, len) \
+    ((p)->prices[posState][(size_t)(len) - LZMA_MATCH_LEN_MIN])
+
+/*
+#define GET_PRICE_LEN(p, posState, len) \
+    ((p)->prices2[(size_t)(len) - 2] + ((p)->prices1[posState][((len) - 2) & (kLenNumLowSymbols * 2 - 1)] & (((len) - 2 - kLenNumLowSymbols * 2) >> 9)))
+ */
+
+typedef struct
+{
+    UInt32 range;
+    unsigned cache;
+    UInt64 low;
+    UInt64 cacheSize;
+    Byte *buf;
+    Byte *bufLim;
+    Byte *bufBase;
+    ISeqOutStream *outStream;
+    UInt64 processed;
+    SRes res;
+} CRangeEnc;
+
+typedef struct
+{
+    CLzmaProb *litProbs;
+
+    unsigned state;
+    UInt32 reps[LZMA_NUM_REPS];
+
+    CLzmaProb posAlignEncoder[1 << kNumAlignBits];
+    CLzmaProb isRep[kNumStates];
+    CLzmaProb isRepG0[kNumStates];
+    CLzmaProb isRepG1[kNumStates];
+    CLzmaProb isRepG2[kNumStates];
+    CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
+    CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX];
+
+    CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
+    CLzmaProb posEncoders[kNumFullDistances];
+
+    CLenEnc lenProbs;
+    CLenEnc repLenProbs;
+
+} CSaveState;
+
+
+typedef UInt32 CProbPrice;
+
+typedef struct
+{
+    void *matchFinderObj;
+    IMatchFinder matchFinder;
+
+    unsigned optCur;
+    unsigned optEnd;
+
+    unsigned longestMatchLen;
+    unsigned numPairs;
+    UInt32 numAvail;
+
+    unsigned state;
+    unsigned numFastBytes;
+    unsigned additionalOffset;
+    UInt32 reps[LZMA_NUM_REPS];
+    unsigned lpMask, pbMask;
+    CLzmaProb *litProbs;
+    CRangeEnc rc;
+
+    UInt32 backRes;
+
+    unsigned lc, lp, pb;
+    unsigned lclp;
+
+    BoolInt fastMode;
+    BoolInt writeEndMark;
+    BoolInt finished;
+    BoolInt multiThread;
+    BoolInt needInit;
+    // BoolInt _maxMode;
+
+    UInt64 nowPos64;
+
+    unsigned matchPriceCount;
+    // unsigned alignPriceCount;
+    int repLenEncCounter;
+
+    unsigned distTableSize;
+
+    UInt32 dictSize;
+    SRes result;
+
+#ifndef _7ZIP_ST
+    BoolInt mtMode;
+    // begin of CMatchFinderMt is used in LZ thread
+    CMatchFinderMt matchFinderMt;
+    // end of CMatchFinderMt is used in BT and HASH threads
+#endif
+
+    CMatchFinder matchFinderBase;
+
+#ifndef _7ZIP_ST
+    Byte pad[128];
+#endif
+
+    // LZ thread
+    CProbPrice ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
+
+    UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
+
+    UInt32 alignPrices[kAlignTableSize];
+    UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
+    UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
+
+    CLzmaProb posAlignEncoder[1 << kNumAlignBits];
+    CLzmaProb isRep[kNumStates];
+    CLzmaProb isRepG0[kNumStates];
+    CLzmaProb isRepG1[kNumStates];
+    CLzmaProb isRepG2[kNumStates];
+    CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
+    CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX];
+    CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
+    CLzmaProb posEncoders[kNumFullDistances];
+
+    CLenEnc lenProbs;
+    CLenEnc repLenProbs;
+
+#ifndef LZMA_LOG_BSR
+    Byte g_FastPos[1 << kNumLogBits];
+#endif
+
+    CLenPriceEnc lenEnc;
+    CLenPriceEnc repLenEnc;
+
+    COptimal opt[kNumOpts];
+
+    CSaveState saveState;
+
+#ifndef _7ZIP_ST
+    Byte pad2[128];
+#endif
+} CLzmaEnc;
+
+
+
+#define COPY_ARR(dest, src, arr) memcpy(dest->arr, src->arr, sizeof(src->arr));
+
+void LzmaEnc_SaveState(CLzmaEncHandle pp)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    CSaveState *dest = &p->saveState;
+
+    dest->state = p->state;
+
+    dest->lenProbs = p->lenProbs;
+    dest->repLenProbs = p->repLenProbs;
+
+    COPY_ARR(dest, p, reps);
+
+    COPY_ARR(dest, p, posAlignEncoder);
+    COPY_ARR(dest, p, isRep);
+    COPY_ARR(dest, p, isRepG0);
+    COPY_ARR(dest, p, isRepG1);
+    COPY_ARR(dest, p, isRepG2);
+    COPY_ARR(dest, p, isMatch);
+    COPY_ARR(dest, p, isRep0Long);
+    COPY_ARR(dest, p, posSlotEncoder);
+    COPY_ARR(dest, p, posEncoders);
+
+    memcpy(dest->litProbs, p->litProbs, ((UInt32) 0x300 << p->lclp) * sizeof (CLzmaProb));
+}
+
+void LzmaEnc_RestoreState(CLzmaEncHandle pp)
+{
+    CLzmaEnc *dest = (CLzmaEnc *) pp;
+    const CSaveState *p = &dest->saveState;
+
+    dest->state = p->state;
+
+    dest->lenProbs = p->lenProbs;
+    dest->repLenProbs = p->repLenProbs;
+
+    COPY_ARR(dest, p, reps);
+
+    COPY_ARR(dest, p, posAlignEncoder);
+    COPY_ARR(dest, p, isRep);
+    COPY_ARR(dest, p, isRepG0);
+    COPY_ARR(dest, p, isRepG1);
+    COPY_ARR(dest, p, isRepG2);
+    COPY_ARR(dest, p, isMatch);
+    COPY_ARR(dest, p, isRep0Long);
+    COPY_ARR(dest, p, posSlotEncoder);
+    COPY_ARR(dest, p, posEncoders);
+
+    memcpy(dest->litProbs, p->litProbs, ((UInt32) 0x300 << dest->lclp) * sizeof (CLzmaProb));
+}
+
+SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    CLzmaEncProps props = *props2;
+    LzmaEncProps_Normalize(&props);
+
+    if (props.lc > LZMA_LC_MAX
+            || props.lp > LZMA_LP_MAX
+            || props.pb > LZMA_PB_MAX
+            || props.dictSize > ((UInt64) 1 << kDicLogSizeMaxCompress)
+            || props.dictSize > kLzmaMaxHistorySize)
+        return SZ_ERROR_PARAM;
+
+    p->dictSize = props.dictSize;
+    {
+        unsigned fb = props.fb;
+        if (fb < 5)
+            fb = 5;
+        if (fb > LZMA_MATCH_LEN_MAX)
+            fb = LZMA_MATCH_LEN_MAX;
+        p->numFastBytes = fb;
+    }
+    p->lc = props.lc;
+    p->lp = props.lp;
+    p->pb = props.pb;
+    p->fastMode = (props.algo == 0);
+    // p->_maxMode = True;
+    p->matchFinderBase.btMode = (Byte) (props.btMode ? 1 : 0);
+    {
+        unsigned numHashBytes = 4;
+        if (props.btMode)
+        {
+            if (props.numHashBytes < 2)
+                numHashBytes = 2;
+            else if (props.numHashBytes < 4)
+                numHashBytes = props.numHashBytes;
+        }
+        p->matchFinderBase.numHashBytes = numHashBytes;
+    }
+
+    p->matchFinderBase.cutValue = props.mc;
+
+    p->writeEndMark = props.writeEndMark;
+
+#ifndef _7ZIP_ST
+    /*
+    if (newMultiThread != _multiThread)
+    {
+      ReleaseMatchFinder();
+      _multiThread = newMultiThread;
+    }
+     */
+    p->multiThread = (props.numThreads > 1);
+#endif
+
+    return SZ_OK;
+}
+
+void LzmaEnc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    p->matchFinderBase.expectedDataSize = expectedDataSiize;
+}
+
+
+#define kState_Start 0
+#define kState_LitAfterMatch 4
+#define kState_LitAfterRep   5
+#define kState_MatchAfterLit 7
+#define kState_RepAfterLit   8
+
+static const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
+static const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
+static const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
+static const Byte kShortRepNextStates[kNumStates] = {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
+
+#define IsLitState(s) ((s) < 7)
+#define GetLenToPosState2(len) (((len) < kNumLenToPosStates - 1) ? (len) : kNumLenToPosStates - 1)
+#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1)
+
+#define kInfinityPrice (1 << 30)
+
+static void RangeEnc_Construct(CRangeEnc *p)
+{
+    p->outStream = NULL;
+    p->bufBase = NULL;
+}
+
+#define RangeEnc_GetProcessed(p)       ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize)
+#define RangeEnc_GetProcessed_sizet(p) ((size_t)(p)->processed + ((p)->buf - (p)->bufBase) + (size_t)(p)->cacheSize)
+
+#define RC_BUF_SIZE (1 << 16)
+
+static int RangeEnc_Alloc(CRangeEnc *p, ISzAllocPtr alloc)
+{
+    if (!p->bufBase)
+    {
+        p->bufBase = (Byte *) ISzAlloc_Alloc(alloc, RC_BUF_SIZE);
+        if (!p->bufBase)
+            return 0;
+        p->bufLim = p->bufBase + RC_BUF_SIZE;
+    }
+    return 1;
+}
+
+static void RangeEnc_Free(CRangeEnc *p, ISzAllocPtr alloc)
+{
+    ISzAlloc_Free(alloc, p->bufBase);
+    p->bufBase = 0;
+}
+
+static void RangeEnc_Init(CRangeEnc *p)
+{
+    /* Stream.Init(); */
+    p->range = 0xFFFFFFFF;
+    p->cache = 0;
+    p->low = 0;
+    p->cacheSize = 0;
+
+    p->buf = p->bufBase;
+
+    p->processed = 0;
+    p->res = SZ_OK;
+}
+
+MY_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p)
+{
+    size_t num;
+    if (p->res != SZ_OK)
+        return;
+    num = p->buf - p->bufBase;
+    if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num))
+        p->res = SZ_ERROR_WRITE;
+    p->processed += num;
+    p->buf = p->bufBase;
+}
+
+MY_NO_INLINE static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p)
+{
+    UInt32 low = (UInt32) p->low;
+    unsigned high = (unsigned) (p->low >> 32);
+    p->low = (UInt32) (low << 8);
+    if (low < (UInt32) 0xFF000000 || high != 0)
+    {
+        {
+            Byte *buf = p->buf;
+            *buf++ = (Byte) (p->cache + high);
+            p->cache = (unsigned) (low >> 24);
+            p->buf = buf;
+            if (buf == p->bufLim)
+                RangeEnc_FlushStream(p);
+            if (p->cacheSize == 0)
+                return;
+        }
+        high += 0xFF;
+        for (;;)
+        {
+            Byte *buf = p->buf;
+            *buf++ = (Byte) (high);
+            p->buf = buf;
+            if (buf == p->bufLim)
+                RangeEnc_FlushStream(p);
+            if (--p->cacheSize == 0)
+                return;
+        }
+    }
+    p->cacheSize++;
+}
+
+static void RangeEnc_FlushData(CRangeEnc *p)
+{
+    int i;
+    for (i = 0; i < 5; i++)
+        RangeEnc_ShiftLow(p);
+}
+
+#define RC_NORM(p) if (range < kTopValue) { range <<= 8; RangeEnc_ShiftLow(p); }
+
+#define RC_BIT_PRE(p, prob) \
+  ttt = *(prob); \
+  newBound = (range >> kNumBitModelTotalBits) * ttt;
+
+// #define _LZMA_ENC_USE_BRANCH
+
+#ifdef _LZMA_ENC_USE_BRANCH
+
+#define RC_BIT(p, prob, bit) { \
+  RC_BIT_PRE(p, prob) \
+  if (bit == 0) { range = newBound; ttt += (kBitModelTotal - ttt) >> kNumMoveBits; } \
+  else { (p)->low += newBound; range -= newBound; ttt -= ttt >> kNumMoveBits; } \
+  *(prob) = (CLzmaProb)ttt; \
+  RC_NORM(p) \
+  }
+
+#else
+
+#define RC_BIT(p, prob, bit) { \
+  UInt32 mask; \
+  RC_BIT_PRE(p, prob) \
+  mask = 0 - (UInt32)bit; \
+  range &= mask; \
+  mask &= newBound; \
+  range -= mask; \
+  (p)->low += mask; \
+  mask = (UInt32)bit - 1; \
+  range += newBound & mask; \
+  mask &= (kBitModelTotal - ((1 << kNumMoveBits) - 1)); \
+  mask += ((1 << kNumMoveBits) - 1); \
+  ttt += (Int32)(mask - ttt) >> kNumMoveBits; \
+  *(prob) = (CLzmaProb)ttt; \
+  RC_NORM(p) \
+  }
+
+#endif
+
+
+
+
+#define RC_BIT_0_BASE(p, prob) \
+  range = newBound; *(prob) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
+
+#define RC_BIT_1_BASE(p, prob) \
+  range -= newBound; (p)->low += newBound; *(prob) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); \
+
+#define RC_BIT_0(p, prob) \
+  RC_BIT_0_BASE(p, prob) \
+  RC_NORM(p)
+
+#define RC_BIT_1(p, prob) \
+  RC_BIT_1_BASE(p, prob) \
+  RC_NORM(p)
+
+static void RangeEnc_EncodeBit_0(CRangeEnc *p, CLzmaProb *prob)
+{
+    UInt32 range, ttt, newBound;
+    range = p->range;
+    RC_BIT_PRE(p, prob)
+    RC_BIT_0(p, prob)
+    p->range = range;
+}
+
+static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym)
+{
+    UInt32 range = p->range;
+    sym |= 0x100;
+    do
+    {
+        UInt32 ttt, newBound;
+        // RangeEnc_EncodeBit(p, probs + (sym >> 8), (sym >> 7) & 1);
+        CLzmaProb *prob = probs + (sym >> 8);
+        UInt32 bit = (sym >> 7) & 1;
+        sym <<= 1;
+        RC_BIT(p, prob, bit);
+    }
+    while (sym < 0x10000);
+    p->range = range;
+}
+
+static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte)
+{
+    UInt32 range = p->range;
+    UInt32 offs = 0x100;
+    sym |= 0x100;
+    do
+    {
+        UInt32 ttt, newBound;
+        CLzmaProb *prob;
+        UInt32 bit;
+        matchByte <<= 1;
+        // RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (sym >> 8)), (sym >> 7) & 1);
+        prob = probs + (offs + (matchByte & offs) + (sym >> 8));
+        bit = (sym >> 7) & 1;
+        sym <<= 1;
+        offs &= ~(matchByte ^ sym);
+        RC_BIT(p, prob, bit);
+    }
+    while (sym < 0x10000);
+    p->range = range;
+}
+
+static void LzmaEnc_InitPriceTables(CProbPrice *ProbPrices)
+{
+    UInt32 i;
+    for (i = 0; i < (kBitModelTotal >> kNumMoveReducingBits); i++)
+    {
+        const unsigned kCyclesBits = kNumBitPriceShiftBits;
+        UInt32 w = (i << kNumMoveReducingBits) + (1 << (kNumMoveReducingBits - 1));
+        unsigned bitCount = 0;
+        unsigned j;
+        for (j = 0; j < kCyclesBits; j++)
+        {
+            w = w * w;
+            bitCount <<= 1;
+            while (w >= ((UInt32) 1 << 16))
+            {
+                w >>= 1;
+                bitCount++;
+            }
+        }
+        ProbPrices[i] = (CProbPrice) ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount);
+        // printf("\n%3d: %5d", i, ProbPrices[i]);
+    }
+}
+
+
+#define GET_PRICE(prob, bit) \
+  p->ProbPrices[((prob) ^ (unsigned)(((-(int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
+
+#define GET_PRICEa(prob, bit) \
+     ProbPrices[((prob) ^ (unsigned)((-((int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
+
+#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits]
+#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
+
+#define GET_PRICEa_0(prob) ProbPrices[(prob) >> kNumMoveReducingBits]
+#define GET_PRICEa_1(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
+
+static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices)
+{
+    UInt32 price = 0;
+    sym |= 0x100;
+    do
+    {
+        unsigned bit = sym & 1;
+        sym >>= 1;
+        price += GET_PRICEa(probs[sym], bit);
+    }
+    while (sym >= 2);
+    return price;
+}
+
+static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const CProbPrice *ProbPrices)
+{
+    UInt32 price = 0;
+    UInt32 offs = 0x100;
+    sym |= 0x100;
+    do
+    {
+        matchByte <<= 1;
+        price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1);
+        sym <<= 1;
+        offs &= ~(matchByte ^ sym);
+    }
+    while (sym < 0x10000);
+    return price;
+}
+
+static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym)
+{
+    UInt32 range = rc->range;
+    unsigned m = 1;
+    do
+    {
+        UInt32 ttt, newBound;
+        unsigned bit = sym & 1;
+        // RangeEnc_EncodeBit(rc, probs + m, bit);
+        sym >>= 1;
+        RC_BIT(rc, probs + m, bit);
+        m = (m << 1) | bit;
+    }
+    while (--numBits);
+    rc->range = range;
+}
+
+static void LenEnc_Init(CLenEnc *p)
+{
+    unsigned i;
+    for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)); i++)
+        p->low[i] = kProbInitValue;
+    for (i = 0; i < kLenNumHighSymbols; i++)
+        p->high[i] = kProbInitValue;
+}
+
+static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posState)
+{
+    UInt32 range, ttt, newBound;
+    CLzmaProb *probs = p->low;
+    range = rc->range;
+    RC_BIT_PRE(rc, probs);
+    if (sym >= kLenNumLowSymbols)
+    {
+        RC_BIT_1(rc, probs);
+        probs += kLenNumLowSymbols;
+        RC_BIT_PRE(rc, probs);
+        if (sym >= kLenNumLowSymbols * 2)
+        {
+            RC_BIT_1(rc, probs);
+            rc->range = range;
+            // RcTree_Encode(rc, p->high, kLenNumHighBits, sym - kLenNumLowSymbols * 2);
+            LitEnc_Encode(rc, p->high, sym - kLenNumLowSymbols * 2);
+            return;
+        }
+        sym -= kLenNumLowSymbols;
+    }
+
+    // RcTree_Encode(rc, probs + (posState << kLenNumLowBits), kLenNumLowBits, sym);
+    {
+        unsigned m;
+        unsigned bit;
+        RC_BIT_0(rc, probs);
+        probs += (posState << (1 + kLenNumLowBits));
+        bit = (sym >> 2);
+        RC_BIT(rc, probs + 1, bit);
+        m = (1 << 1) + bit;
+        bit = (sym >> 1) & 1;
+        RC_BIT(rc, probs + m, bit);
+        m = (m << 1) + bit;
+        bit = sym & 1;
+        RC_BIT(rc, probs + m, bit);
+        rc->range = range;
+    }
+}
+
+static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *prices, const CProbPrice *ProbPrices)
+{
+    unsigned i;
+    for (i = 0; i < 8; i += 2)
+    {
+        UInt32 price = startPrice;
+        UInt32 prob;
+        price += GET_PRICEa(probs[1 ], (i >> 2));
+        price += GET_PRICEa(probs[2 + (i >> 2)], (i >> 1) & 1);
+        prob = probs[4 + (i >> 1)];
+        prices[i ] = price + GET_PRICEa_0(prob);
+        prices[i + 1] = price + GET_PRICEa_1(prob);
+    }
+}
+
+MY_NO_INLINE static void MY_FAST_CALL LenPriceEnc_UpdateTables(
+                                                               CLenPriceEnc *p,
+                                                               unsigned numPosStates,
+                                                               const CLenEnc *enc,
+                                                               const CProbPrice *ProbPrices)
+{
+    UInt32 b;
+
+    {
+        unsigned prob = enc->low[0];
+        UInt32 a, c;
+        unsigned posState;
+        b = GET_PRICEa_1(prob);
+        a = GET_PRICEa_0(prob);
+        c = b + GET_PRICEa_0(enc->low[kLenNumLowSymbols]);
+        for (posState = 0; posState < numPosStates; posState++)
+        {
+            UInt32 *prices = p->prices[posState];
+            const CLzmaProb *probs = enc->low + (posState << (1 + kLenNumLowBits));
+            SetPrices_3(probs, a, prices, ProbPrices);
+            SetPrices_3(probs + kLenNumLowSymbols, c, prices + kLenNumLowSymbols, ProbPrices);
+        }
+    }
+
+    /*
+    {
+      unsigned i;
+      UInt32 b;
+      a = GET_PRICEa_0(enc->low[0]);
+      for (i = 0; i < kLenNumLowSymbols; i++)
+        p->prices2[i] = a;
+      a = GET_PRICEa_1(enc->low[0]);
+      b = a + GET_PRICEa_0(enc->low[kLenNumLowSymbols]);
+      for (i = kLenNumLowSymbols; i < kLenNumLowSymbols * 2; i++)
+        p->prices2[i] = b;
+      a += GET_PRICEa_1(enc->low[kLenNumLowSymbols]);
+    }
+     */
+
+    // p->counter = numSymbols;
+    // p->counter = 64;
+
+    {
+        unsigned i = p->tableSize;
+
+        if (i > kLenNumLowSymbols * 2)
+        {
+            const CLzmaProb *probs = enc->high;
+            UInt32 *prices = p->prices[0] + kLenNumLowSymbols * 2;
+            i -= kLenNumLowSymbols * 2 - 1;
+            i >>= 1;
+            b += GET_PRICEa_1(enc->low[kLenNumLowSymbols]);
+            do
+            {
+                /*
+                p->prices2[i] = a +
+                // RcTree_GetPrice(enc->high, kLenNumHighBits, i - kLenNumLowSymbols * 2, ProbPrices);
+                LitEnc_GetPrice(probs, i - kLenNumLowSymbols * 2, ProbPrices);
+                 */
+                // UInt32 price = a + RcTree_GetPrice(probs, kLenNumHighBits - 1, sym, ProbPrices);
+                unsigned sym = --i + (1 << (kLenNumHighBits - 1));
+                UInt32 price = b;
+                do
+                {
+                    unsigned bit = sym & 1;
+                    sym >>= 1;
+                    price += GET_PRICEa(probs[sym], bit);
+                }
+                while (sym >= 2);
+
+                {
+                    unsigned prob = probs[(size_t) i + (1 << (kLenNumHighBits - 1))];
+                    prices[(size_t) i * 2 ] = price + GET_PRICEa_0(prob);
+                    prices[(size_t) i * 2 + 1] = price + GET_PRICEa_1(prob);
+                }
+            }
+            while (i);
+
+            {
+                unsigned posState;
+                size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof (p->prices[0][0]);
+                for (posState = 1; posState < numPosStates; posState++)
+                    memcpy(p->prices[posState] + kLenNumLowSymbols * 2, p->prices[0] + kLenNumLowSymbols * 2, num);
+            }
+        }
+    }
+}
+
+/*
+  #ifdef SHOW_STAT
+  g_STAT_OFFSET += num;
+  printf("\n MovePos %u", num);
+  #endif
+ */
+
+#define MOVE_POS(p, num) { \
+    p->additionalOffset += (num); \
+    p->matchFinder.Skip(p->matchFinderObj, (UInt32)(num)); }
+
+static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes)
+{
+    unsigned numPairs;
+
+    p->additionalOffset++;
+    p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+    numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches);
+    *numPairsRes = numPairs;
+
+#ifdef SHOW_STAT
+    printf("\n i = %u numPairs = %u    ", g_STAT_OFFSET, numPairs / 2);
+    g_STAT_OFFSET++;
+    {
+        unsigned i;
+        for (i = 0; i < numPairs; i += 2)
+            printf("%2u %6u   | ", p->matches[i], p->matches[i + 1]);
+    }
+#endif
+
+    if (numPairs == 0)
+        return 0;
+    {
+        unsigned len = p->matches[(size_t) numPairs - 2];
+        if (len != p->numFastBytes)
+            return len;
+        {
+            UInt32 numAvail = p->numAvail;
+            if (numAvail > LZMA_MATCH_LEN_MAX)
+                numAvail = LZMA_MATCH_LEN_MAX;
+            {
+                const Byte *p1 = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+                const Byte *p2 = p1 + len;
+                ptrdiff_t dif = (ptrdiff_t) - 1 - p->matches[(size_t) numPairs - 1];
+                const Byte *lim = p1 + numAvail;
+                for (; p2 != lim && *p2 == p2[dif]; p2++)
+                {
+                }
+                return (unsigned) (p2 - p1);
+            }
+        }
+    }
+}
+
+#define MARK_LIT ((UInt32)(Int32)-1)
+
+#define MakeAs_Lit(p)       { (p)->dist = MARK_LIT; (p)->extra = 0; }
+#define MakeAs_ShortRep(p)  { (p)->dist = 0; (p)->extra = 0; }
+#define IsShortRep(p)       ((p)->dist == 0)
+
+
+#define GetPrice_ShortRep(p, state, posState) \
+  ( GET_PRICE_0(p->isRepG0[state]) + GET_PRICE_0(p->isRep0Long[state][posState]))
+
+#define GetPrice_Rep_0(p, state, posState) ( \
+    GET_PRICE_1(p->isMatch[state][posState]) \
+  + GET_PRICE_1(p->isRep0Long[state][posState])) \
+  + GET_PRICE_1(p->isRep[state]) \
+  + GET_PRICE_0(p->isRepG0[state])
+
+MY_FORCE_INLINE
+static UInt32 GetPrice_PureRep(const CLzmaEnc *p, unsigned repIndex, size_t state, size_t posState)
+{
+    UInt32 price;
+    UInt32 prob = p->isRepG0[state];
+    if (repIndex == 0)
+    {
+        price = GET_PRICE_0(prob);
+        price += GET_PRICE_1(p->isRep0Long[state][posState]);
+    }
+    else
+    {
+        price = GET_PRICE_1(prob);
+        prob = p->isRepG1[state];
+        if (repIndex == 1)
+            price += GET_PRICE_0(prob);
+        else
+        {
+            price += GET_PRICE_1(prob);
+            price += GET_PRICE(p->isRepG2[state], repIndex - 2);
+        }
+    }
+    return price;
+}
+
+static unsigned Backward(CLzmaEnc *p, unsigned cur)
+{
+    unsigned wr = cur + 1;
+    p->optEnd = wr;
+
+    for (;;)
+    {
+        UInt32 dist = p->opt[cur].dist;
+        unsigned len = (unsigned) p->opt[cur].len;
+        unsigned extra = (unsigned) p->opt[cur].extra;
+        cur -= len;
+
+        if (extra)
+        {
+            wr--;
+            p->opt[wr].len = (UInt32) len;
+            cur -= extra;
+            len = extra;
+            if (extra == 1)
+            {
+                p->opt[wr].dist = dist;
+                dist = MARK_LIT;
+            }
+            else
+            {
+                p->opt[wr].dist = 0;
+                len--;
+                wr--;
+                p->opt[wr].dist = MARK_LIT;
+                p->opt[wr].len = 1;
+            }
+        }
+
+        if (cur == 0)
+        {
+            p->backRes = dist;
+            p->optCur = wr;
+            return len;
+        }
+
+        wr--;
+        p->opt[wr].dist = dist;
+        p->opt[wr].len = (UInt32) len;
+    }
+}
+
+
+
+#define LIT_PROBS(pos, prevByte) \
+  (p->litProbs + (UInt32)3 * (((((pos) << 8) + (prevByte)) & p->lpMask) << p->lc))
+
+static unsigned GetOptimum(CLzmaEnc *p, UInt32 position)
+{
+    unsigned last, cur;
+    UInt32 reps[LZMA_NUM_REPS];
+    unsigned repLens[LZMA_NUM_REPS];
+    UInt32 *matches;
+
+    {
+        UInt32 numAvail;
+        unsigned numPairs, mainLen, repMaxIndex, i, posState;
+        UInt32 matchPrice, repMatchPrice;
+        const Byte *data;
+        Byte curByte, matchByte;
+
+        p->optCur = p->optEnd = 0;
+
+        if (p->additionalOffset == 0)
+            mainLen = ReadMatchDistances(p, &numPairs);
+        else
+        {
+            mainLen = p->longestMatchLen;
+            numPairs = p->numPairs;
+        }
+
+        numAvail = p->numAvail;
+        if (numAvail < 2)
+        {
+            p->backRes = MARK_LIT;
+            return 1;
+        }
+        if (numAvail > LZMA_MATCH_LEN_MAX)
+            numAvail = LZMA_MATCH_LEN_MAX;
+
+        data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+        repMaxIndex = 0;
+
+        for (i = 0; i < LZMA_NUM_REPS; i++)
+        {
+            unsigned len;
+            const Byte *data2;
+            reps[i] = p->reps[i];
+            data2 = data - reps[i];
+            if (data[0] != data2[0] || data[1] != data2[1])
+            {
+                repLens[i] = 0;
+                continue;
+            }
+            for (len = 2; len < numAvail && data[len] == data2[len]; len++)
+            {
+            }
+            repLens[i] = len;
+            if (len > repLens[repMaxIndex])
+                repMaxIndex = i;
+        }
+
+        if (repLens[repMaxIndex] >= p->numFastBytes)
+        {
+            unsigned len;
+            p->backRes = (UInt32) repMaxIndex;
+            len = repLens[repMaxIndex];
+            MOVE_POS(p, len - 1)
+            return len;
+        }
+
+        matches = p->matches;
+
+        if (mainLen >= p->numFastBytes)
+        {
+            p->backRes = matches[(size_t) numPairs - 1] + LZMA_NUM_REPS;
+            MOVE_POS(p, mainLen - 1)
+            return mainLen;
+        }
+
+        curByte = *data;
+        matchByte = *(data - reps[0]);
+
+        last = repLens[repMaxIndex];
+        if (last <= mainLen)
+            last = mainLen;
+
+        if (last < 2 && curByte != matchByte)
+        {
+            p->backRes = MARK_LIT;
+            return 1;
+        }
+
+        p->opt[0].state = (CState) p->state;
+
+        posState = (position & p->pbMask);
+
+        {
+            const CLzmaProb *probs = LIT_PROBS(position, *(data - 1));
+            p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) +
+                    (!IsLitState(p->state) ?
+                    LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) :
+                    LitEnc_GetPrice(probs, curByte, p->ProbPrices));
+        }
+
+        MakeAs_Lit(&p->opt[1]);
+
+        matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]);
+        repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]);
+
+        // 18.06
+        if (matchByte == curByte && repLens[0] == 0)
+        {
+            UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, p->state, posState);
+            if (shortRepPrice < p->opt[1].price)
+            {
+                p->opt[1].price = shortRepPrice;
+                MakeAs_ShortRep(&p->opt[1]);
+            }
+            if (last < 2)
+            {
+                p->backRes = p->opt[1].dist;
+                return 1;
+            }
+        }
+
+        p->opt[1].len = 1;
+
+        p->opt[0].reps[0] = reps[0];
+        p->opt[0].reps[1] = reps[1];
+        p->opt[0].reps[2] = reps[2];
+        p->opt[0].reps[3] = reps[3];
+
+        // ---------- REP ----------
+
+        for (i = 0; i < LZMA_NUM_REPS; i++)
+        {
+            unsigned repLen = repLens[i];
+            UInt32 price;
+            if (repLen < 2)
+                continue;
+            price = repMatchPrice + GetPrice_PureRep(p, i, p->state, posState);
+            do
+            {
+                UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, repLen);
+                COptimal *opt = &p->opt[repLen];
+                if (price2 < opt->price)
+                {
+                    opt->price = price2;
+                    opt->len = (UInt32) repLen;
+                    opt->dist = (UInt32) i;
+                    opt->extra = 0;
+                }
+            }
+            while (--repLen >= 2);
+        }
+
+
+        // ---------- MATCH ----------
+        {
+            unsigned len = repLens[0] + 1;
+            if (len <= mainLen)
+            {
+                unsigned offs = 0;
+                UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]);
+
+                if (len < 2)
+                    len = 2;
+                else
+                    while (len > matches[offs])
+                        offs += 2;
+
+                for (;; len++)
+                {
+                    COptimal *opt;
+                    UInt32 dist = matches[(size_t) offs + 1];
+                    UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len);
+                    unsigned lenToPosState = GetLenToPosState(len);
+
+                    if (dist < kNumFullDistances)
+                        price += p->distancesPrices[lenToPosState][dist & (kNumFullDistances - 1)];
+                    else
+                    {
+                        unsigned slot;
+                        GetPosSlot2(dist, slot);
+                        price += p->alignPrices[dist & kAlignMask];
+                        price += p->posSlotPrices[lenToPosState][slot];
+                    }
+
+                    opt = &p->opt[len];
+
+                    if (price < opt->price)
+                    {
+                        opt->price = price;
+                        opt->len = (UInt32) len;
+                        opt->dist = dist + LZMA_NUM_REPS;
+                        opt->extra = 0;
+                    }
+
+                    if (len == matches[offs])
+                    {
+                        offs += 2;
+                        if (offs == numPairs)
+                            break;
+                    }
+                }
+            }
+        }
+
+
+        cur = 0;
+
+#ifdef SHOW_STAT2
+        /* if (position >= 0) */
+        {
+            unsigned i;
+            printf("\n pos = %4X", position);
+            for (i = cur; i <= last; i++)
+                printf("\nprice[%4X] = %u", position - cur + i, p->opt[i].price);
+        }
+#endif
+    }
+
+
+
+    // ---------- Optimal Parsing ----------
+
+    for (;;)
+    {
+        unsigned numAvail;
+        UInt32 numAvailFull;
+        unsigned newLen, numPairs, prev, state, posState, startLen;
+        UInt32 litPrice, matchPrice, repMatchPrice;
+        BoolInt nextIsLit;
+        Byte curByte, matchByte;
+        const Byte *data;
+        COptimal *curOpt, *nextOpt;
+
+        if (++cur == last)
+            break;
+
+        // 18.06
+        if (cur >= kNumOpts - 64)
+        {
+            unsigned j, best;
+            UInt32 price = p->opt[cur].price;
+            best = cur;
+            for (j = cur + 1; j <= last; j++)
+            {
+                UInt32 price2 = p->opt[j].price;
+                if (price >= price2)
+                {
+                    price = price2;
+                    best = j;
+                }
+            }
+            {
+                unsigned delta = best - cur;
+                if (delta != 0)
+                {
+                    MOVE_POS(p, delta);
+                }
+            }
+            cur = best;
+            break;
+        }
+
+        newLen = ReadMatchDistances(p, &numPairs);
+
+        if (newLen >= p->numFastBytes)
+        {
+            p->numPairs = numPairs;
+            p->longestMatchLen = newLen;
+            break;
+        }
+
+        curOpt = &p->opt[cur];
+
+        position++;
+
+        // we need that check here, if skip_items in p->opt are possible
+        /*
+        if (curOpt->price >= kInfinityPrice)
+          continue;
+         */
+
+        prev = cur - curOpt->len;
+
+        if (curOpt->len == 1)
+        {
+            state = (unsigned) p->opt[prev].state;
+            if (IsShortRep(curOpt))
+                state = kShortRepNextStates[state];
+            else
+                state = kLiteralNextStates[state];
+        }
+        else
+        {
+            const COptimal *prevOpt;
+            UInt32 b0;
+            UInt32 dist = curOpt->dist;
+
+            if (curOpt->extra)
+            {
+                prev -= (unsigned) curOpt->extra;
+                state = kState_RepAfterLit;
+                if (curOpt->extra == 1)
+                    state = (dist < LZMA_NUM_REPS ? kState_RepAfterLit : kState_MatchAfterLit);
+            }
+            else
+            {
+                state = (unsigned) p->opt[prev].state;
+                if (dist < LZMA_NUM_REPS)
+                    state = kRepNextStates[state];
+                else
+                    state = kMatchNextStates[state];
+            }
+
+            prevOpt = &p->opt[prev];
+            b0 = prevOpt->reps[0];
+
+            if (dist < LZMA_NUM_REPS)
+            {
+                if (dist == 0)
+                {
+                    reps[0] = b0;
+                    reps[1] = prevOpt->reps[1];
+                    reps[2] = prevOpt->reps[2];
+                    reps[3] = prevOpt->reps[3];
+                }
+                else
+                {
+                    reps[1] = b0;
+                    b0 = prevOpt->reps[1];
+                    if (dist == 1)
+                    {
+                        reps[0] = b0;
+                        reps[2] = prevOpt->reps[2];
+                        reps[3] = prevOpt->reps[3];
+                    }
+                    else
+                    {
+                        reps[2] = b0;
+                        reps[0] = prevOpt->reps[dist];
+                        reps[3] = prevOpt->reps[dist ^ 1];
+                    }
+                }
+            }
+            else
+            {
+                reps[0] = (dist - LZMA_NUM_REPS + 1);
+                reps[1] = b0;
+                reps[2] = prevOpt->reps[1];
+                reps[3] = prevOpt->reps[2];
+            }
+        }
+
+        curOpt->state = (CState) state;
+        curOpt->reps[0] = reps[0];
+        curOpt->reps[1] = reps[1];
+        curOpt->reps[2] = reps[2];
+        curOpt->reps[3] = reps[3];
+
+        data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+        curByte = *data;
+        matchByte = *(data - reps[0]);
+
+        posState = (position & p->pbMask);
+
+        /*
+        The order of Price checks:
+           <  LIT
+           <= SHORT_REP
+           <  LIT : REP_0
+           <  REP    [ : LIT : REP_0 ]
+           <  MATCH  [ : LIT : REP_0 ]
+         */
+
+        {
+            UInt32 curPrice = curOpt->price;
+            unsigned prob = p->isMatch[state][posState];
+            matchPrice = curPrice + GET_PRICE_1(prob);
+            litPrice = curPrice + GET_PRICE_0(prob);
+        }
+
+        nextOpt = &p->opt[(size_t) cur + 1];
+        nextIsLit = False;
+
+        // here we can allow skip_items in p->opt, if we don't check (nextOpt->price < kInfinityPrice)
+        // 18.new.06
+        if ((nextOpt->price < kInfinityPrice
+                // && !IsLitState(state)
+                && matchByte == curByte)
+                || litPrice > nextOpt->price
+                )
+            litPrice = 0;
+        else
+        {
+            const CLzmaProb *probs = LIT_PROBS(position, *(data - 1));
+            litPrice += (!IsLitState(state) ?
+                    LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) :
+                    LitEnc_GetPrice(probs, curByte, p->ProbPrices));
+
+            if (litPrice < nextOpt->price)
+            {
+                nextOpt->price = litPrice;
+                nextOpt->len = 1;
+                MakeAs_Lit(nextOpt);
+                nextIsLit = True;
+            }
+        }
+
+        repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]);
+
+        numAvailFull = p->numAvail;
+        {
+            unsigned temp = kNumOpts - 1 - cur;
+            if (numAvailFull > temp)
+                numAvailFull = (UInt32) temp;
+        }
+
+        // 18.06
+        // ---------- SHORT_REP ----------
+        if (IsLitState(state)) // 18.new
+            if (matchByte == curByte)
+                if (repMatchPrice < nextOpt->price) // 18.new
+                    // if (numAvailFull < 2 || data[1] != *(data - reps[0] + 1))
+                    if (
+                            // nextOpt->price >= kInfinityPrice ||
+                            nextOpt->len < 2 // we can check nextOpt->len, if skip items are not allowed in p->opt
+                            || (nextOpt->dist != 0
+                            // && nextOpt->extra <= 1 // 17.old
+                            )
+                            )
+                    {
+                        UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, state, posState);
+                        // if (shortRepPrice <= nextOpt->price) // 17.old
+                        if (shortRepPrice < nextOpt->price) // 18.new
+                        {
+                            nextOpt->price = shortRepPrice;
+                            nextOpt->len = 1;
+                            MakeAs_ShortRep(nextOpt);
+                            nextIsLit = False;
+                        }
+                    }
+
+        if (numAvailFull < 2)
+            continue;
+        numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes);
+
+        // numAvail <= p->numFastBytes
+
+        // ---------- LIT : REP_0 ----------
+
+        if (!nextIsLit
+                && litPrice != 0 // 18.new
+                && matchByte != curByte
+                && numAvailFull > 2)
+        {
+            const Byte *data2 = data - reps[0];
+            if (data[1] == data2[1] && data[2] == data2[2])
+            {
+                unsigned len;
+                unsigned limit = p->numFastBytes + 1;
+                if (limit > numAvailFull)
+                    limit = numAvailFull;
+                for (len = 3; len < limit && data[len] == data2[len]; len++)
+                {
+                }
+
+                {
+                    unsigned state2 = kLiteralNextStates[state];
+                    unsigned posState2 = (position + 1) & p->pbMask;
+                    UInt32 price = litPrice + GetPrice_Rep_0(p, state2, posState2);
+                    {
+                        unsigned offset = cur + len;
+
+                        if (last < offset)
+                            last = offset;
+
+                        // do
+                        {
+                            UInt32 price2;
+                            COptimal *opt;
+                            len--;
+                            // price2 = price + GetPrice_Len_Rep_0(p, len, state2, posState2);
+                            price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len);
+
+                            opt = &p->opt[offset];
+                            // offset--;
+                            if (price2 < opt->price)
+                            {
+                                opt->price = price2;
+                                opt->len = (UInt32) len;
+                                opt->dist = 0;
+                                opt->extra = 1;
+                            }
+                        }
+                        // while (len >= 3);
+                    }
+                }
+            }
+        }
+
+        startLen = 2; /* speed optimization */
+
+        {
+            // ---------- REP ----------
+            unsigned repIndex = 0; // 17.old
+            // unsigned repIndex = IsLitState(state) ? 0 : 1; // 18.notused
+            for (; repIndex < LZMA_NUM_REPS; repIndex++)
+            {
+                unsigned len;
+                UInt32 price;
+                const Byte *data2 = data - reps[repIndex];
+                if (data[0] != data2[0] || data[1] != data2[1])
+                    continue;
+
+                for (len = 2; len < numAvail && data[len] == data2[len]; len++)
+                {
+                }
+
+                // if (len < startLen) continue; // 18.new: speed optimization
+
+                {
+                    unsigned offset = cur + len;
+                    if (last < offset)
+                        last = offset;
+                }
+                {
+                    unsigned len2 = len;
+                    price = repMatchPrice + GetPrice_PureRep(p, repIndex, state, posState);
+                    do
+                    {
+                        UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, len2);
+                        COptimal *opt = &p->opt[cur + len2];
+                        if (price2 < opt->price)
+                        {
+                            opt->price = price2;
+                            opt->len = (UInt32) len2;
+                            opt->dist = (UInt32) repIndex;
+                            opt->extra = 0;
+                        }
+                    }
+                    while (--len2 >= 2);
+                }
+
+                if (repIndex == 0) startLen = len + 1; // 17.old
+                // startLen = len + 1; // 18.new
+
+                /* if (_maxMode) */
+                {
+                    // ---------- REP : LIT : REP_0 ----------
+                    // numFastBytes + 1 + numFastBytes
+
+                    unsigned len2 = len + 1;
+                    unsigned limit = len2 + p->numFastBytes;
+                    if (limit > numAvailFull)
+                        limit = numAvailFull;
+
+                    len2 += 2;
+                    if (len2 <= limit)
+                        if (data[len2 - 2] == data2[len2 - 2])
+                            if (data[len2 - 1] == data2[len2 - 1])
+                            {
+                                unsigned state2 = kRepNextStates[state];
+                                unsigned posState2 = (position + len) & p->pbMask;
+                                price += GET_PRICE_LEN(&p->repLenEnc, posState, len)
+                                        + GET_PRICE_0(p->isMatch[state2][posState2])
+                                        + LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t) len - 1]),
+                                                                  data[len], data2[len], p->ProbPrices);
+
+                                // state2 = kLiteralNextStates[state2];
+                                state2 = kState_LitAfterRep;
+                                posState2 = (posState2 + 1) & p->pbMask;
+
+
+                                price += GetPrice_Rep_0(p, state2, posState2);
+
+                                for (; len2 < limit && data[len2] == data2[len2]; len2++)
+                                {
+                                }
+
+                                len2 -= len;
+                                // if (len2 >= 3)
+                                {
+                                    {
+                                        unsigned offset = cur + len + len2;
+
+                                        if (last < offset)
+                                            last = offset;
+                                        // do
+                                        {
+                                            UInt32 price2;
+                                            COptimal *opt;
+                                            len2--;
+                                            // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2);
+                                            price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2);
+
+                                            opt = &p->opt[offset];
+                                            // offset--;
+                                            if (price2 < opt->price)
+                                            {
+                                                opt->price = price2;
+                                                opt->len = (UInt32) len2;
+                                                opt->extra = (CExtra) (len + 1);
+                                                opt->dist = (UInt32) repIndex;
+                                            }
+                                        }
+                                        // while (len2 >= 3);
+                                    }
+                                }
+                            }
+                }
+            }
+        }
+
+
+        // ---------- MATCH ----------
+        /* for (unsigned len = 2; len <= newLen; len++) */
+        if (newLen > numAvail)
+        {
+            newLen = numAvail;
+            for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2);
+            matches[numPairs] = (UInt32) newLen;
+            numPairs += 2;
+        }
+
+        // startLen = 2; /* speed optimization */
+
+        if (newLen >= startLen)
+        {
+            UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]);
+            UInt32 dist;
+            unsigned offs, posSlot, len;
+
+            {
+                unsigned offset = cur + newLen;
+                if (last < offset)
+                    last = offset;
+            }
+
+            offs = 0;
+            while (startLen > matches[offs])
+                offs += 2;
+            dist = matches[(size_t) offs + 1];
+
+            // if (dist >= kNumFullDistances)
+            GetPosSlot2(dist, posSlot);
+
+            for (len = /*2*/ startLen;; len++)
+            {
+                UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len);
+                {
+                    COptimal *opt;
+                    unsigned lenNorm = len - 2;
+                    lenNorm = GetLenToPosState2(lenNorm);
+                    if (dist < kNumFullDistances)
+                        price += p->distancesPrices[lenNorm][dist & (kNumFullDistances - 1)];
+                    else
+                        price += p->posSlotPrices[lenNorm][posSlot] + p->alignPrices[dist & kAlignMask];
+
+                    opt = &p->opt[cur + len];
+                    if (price < opt->price)
+                    {
+                        opt->price = price;
+                        opt->len = (UInt32) len;
+                        opt->dist = dist + LZMA_NUM_REPS;
+                        opt->extra = 0;
+                    }
+                }
+
+                if (len == matches[offs])
+                {
+                    // if (p->_maxMode) {
+                    // MATCH : LIT : REP_0
+
+                    const Byte *data2 = data - dist - 1;
+                    unsigned len2 = len + 1;
+                    unsigned limit = len2 + p->numFastBytes;
+                    if (limit > numAvailFull)
+                        limit = numAvailFull;
+
+                    len2 += 2;
+                    if (len2 <= limit)
+                        if (data[len2 - 2] == data2[len2 - 2])
+                            if (data[len2 - 1] == data2[len2 - 1])
+                            {
+                                for (; len2 < limit && data[len2] == data2[len2]; len2++)
+                                {
+                                }
+
+                                len2 -= len;
+
+                                // if (len2 >= 3)
+                                {
+                                    unsigned state2 = kMatchNextStates[state];
+                                    unsigned posState2 = (position + len) & p->pbMask;
+                                    unsigned offset;
+                                    price += GET_PRICE_0(p->isMatch[state2][posState2]);
+                                    price += LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t) len - 1]),
+                                                                     data[len], data2[len], p->ProbPrices);
+
+                                    // state2 = kLiteralNextStates[state2];
+                                    state2 = kState_LitAfterMatch;
+
+                                    posState2 = (posState2 + 1) & p->pbMask;
+                                    price += GetPrice_Rep_0(p, state2, posState2);
+
+                                    offset = cur + len + len2;
+
+                                    if (last < offset)
+                                        last = offset;
+                                    // do
+                                    {
+                                        UInt32 price2;
+                                        COptimal *opt;
+                                        len2--;
+                                        // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2);
+                                        price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2);
+                                        opt = &p->opt[offset];
+                                        // offset--;
+                                        if (price2 < opt->price)
+                                        {
+                                            opt->price = price2;
+                                            opt->len = (UInt32) len2;
+                                            opt->extra = (CExtra) (len + 1);
+                                            opt->dist = dist + LZMA_NUM_REPS;
+                                        }
+                                    }
+                                    // while (len2 >= 3);
+                                }
+
+                            }
+
+                    offs += 2;
+                    if (offs == numPairs)
+                        break;
+                    dist = matches[(size_t) offs + 1];
+                    // if (dist >= kNumFullDistances)
+                    GetPosSlot2(dist, posSlot);
+                }
+            }
+        }
+    }
+
+    do
+        p->opt[last].price = kInfinityPrice;
+    while (--last);
+
+    return Backward(p, cur);
+}
+
+
+
+#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist))
+
+static unsigned GetOptimumFast(CLzmaEnc *p)
+{
+    UInt32 numAvail, mainDist;
+    unsigned mainLen, numPairs, repIndex, repLen, i;
+    const Byte *data;
+
+    if (p->additionalOffset == 0)
+        mainLen = ReadMatchDistances(p, &numPairs);
+    else
+    {
+        mainLen = p->longestMatchLen;
+        numPairs = p->numPairs;
+    }
+
+    numAvail = p->numAvail;
+    p->backRes = MARK_LIT;
+    if (numAvail < 2)
+        return 1;
+    // if (mainLen < 2 && p->state == 0) return 1; // 18.06.notused
+    if (numAvail > LZMA_MATCH_LEN_MAX)
+        numAvail = LZMA_MATCH_LEN_MAX;
+    data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+    repLen = repIndex = 0;
+
+    for (i = 0; i < LZMA_NUM_REPS; i++)
+    {
+        unsigned len;
+        const Byte *data2 = data - p->reps[i];
+        if (data[0] != data2[0] || data[1] != data2[1])
+            continue;
+        for (len = 2; len < numAvail && data[len] == data2[len]; len++)
+        {
+        }
+        if (len >= p->numFastBytes)
+        {
+            p->backRes = (UInt32) i;
+            MOVE_POS(p, len - 1)
+            return len;
+        }
+        if (len > repLen)
+        {
+            repIndex = i;
+            repLen = len;
+        }
+    }
+
+    if (mainLen >= p->numFastBytes)
+    {
+        p->backRes = p->matches[(size_t) numPairs - 1] + LZMA_NUM_REPS;
+        MOVE_POS(p, mainLen - 1)
+        return mainLen;
+    }
+
+    mainDist = 0; /* for GCC */
+
+    if (mainLen >= 2)
+    {
+        mainDist = p->matches[(size_t) numPairs - 1];
+        while (numPairs > 2)
+        {
+            UInt32 dist2;
+            if (mainLen != p->matches[(size_t) numPairs - 4] + 1)
+                break;
+            dist2 = p->matches[(size_t) numPairs - 3];
+            if (!ChangePair(dist2, mainDist))
+                break;
+            numPairs -= 2;
+            mainLen--;
+            mainDist = dist2;
+        }
+        if (mainLen == 2 && mainDist >= 0x80)
+            mainLen = 1;
+    }
+
+    if (repLen >= 2)
+        if (repLen + 1 >= mainLen
+                || (repLen + 2 >= mainLen && mainDist >= (1 << 9))
+                || (repLen + 3 >= mainLen && mainDist >= (1 << 15)))
+        {
+            p->backRes = (UInt32) repIndex;
+            MOVE_POS(p, repLen - 1)
+            return repLen;
+        }
+
+    if (mainLen < 2 || numAvail <= 2)
+        return 1;
+
+    {
+        unsigned len1 = ReadMatchDistances(p, &p->numPairs);
+        p->longestMatchLen = len1;
+
+        if (len1 >= 2)
+        {
+            UInt32 newDist = p->matches[(size_t) p->numPairs - 1];
+            if ((len1 >= mainLen && newDist < mainDist)
+                    || (len1 == mainLen + 1 && !ChangePair(mainDist, newDist))
+                    || (len1 > mainLen + 1)
+                    || (len1 + 1 >= mainLen && mainLen >= 3 && ChangePair(newDist, mainDist)))
+                return 1;
+        }
+    }
+
+    data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+
+    for (i = 0; i < LZMA_NUM_REPS; i++)
+    {
+        unsigned len, limit;
+        const Byte *data2 = data - p->reps[i];
+        if (data[0] != data2[0] || data[1] != data2[1])
+            continue;
+        limit = mainLen - 1;
+        for (len = 2;; len++)
+        {
+            if (len >= limit)
+                return 1;
+            if (data[len] != data2[len])
+                break;
+        }
+    }
+
+    p->backRes = mainDist + LZMA_NUM_REPS;
+    if (mainLen != 2)
+    {
+        MOVE_POS(p, mainLen - 2)
+    }
+    return mainLen;
+}
+
+static void WriteEndMarker(CLzmaEnc *p, unsigned posState)
+{
+    UInt32 range;
+    range = p->rc.range;
+    {
+        UInt32 ttt, newBound;
+        CLzmaProb *prob = &p->isMatch[p->state][posState];
+        RC_BIT_PRE(&p->rc, prob)
+        RC_BIT_1(&p->rc, prob)
+        prob = &p->isRep[p->state];
+        RC_BIT_PRE(&p->rc, prob)
+        RC_BIT_0(&p->rc, prob)
+    }
+    p->state = kMatchNextStates[p->state];
+
+    p->rc.range = range;
+    LenEnc_Encode(&p->lenProbs, &p->rc, 0, posState);
+    range = p->rc.range;
+
+    {
+        // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[0], (1 << kNumPosSlotBits) - 1);
+        CLzmaProb *probs = p->posSlotEncoder[0];
+        unsigned m = 1;
+        do
+        {
+            UInt32 ttt, newBound;
+            RC_BIT_PRE(p, probs + m)
+            RC_BIT_1(&p->rc, probs + m);
+            m = (m << 1) + 1;
+        }
+        while (m < (1 << kNumPosSlotBits));
+    }
+    {
+        // RangeEnc_EncodeDirectBits(&p->rc, ((UInt32)1 << (30 - kNumAlignBits)) - 1, 30 - kNumAlignBits);    UInt32 range = p->range;
+        unsigned numBits = 30 - kNumAlignBits;
+        do
+        {
+            range >>= 1;
+            p->rc.low += range;
+            RC_NORM(&p->rc)
+        }
+        while (--numBits);
+    }
+
+    {
+        // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask);
+        CLzmaProb *probs = p->posAlignEncoder;
+        unsigned m = 1;
+        do
+        {
+            UInt32 ttt, newBound;
+            RC_BIT_PRE(p, probs + m)
+            RC_BIT_1(&p->rc, probs + m);
+            m = (m << 1) + 1;
+        }
+        while (m < kAlignTableSize);
+    }
+    p->rc.range = range;
+}
+
+static SRes CheckErrors(CLzmaEnc *p)
+{
+    if (p->result != SZ_OK)
+        return p->result;
+    if (p->rc.res != SZ_OK)
+        p->result = SZ_ERROR_WRITE;
+    if (p->matchFinderBase.result != SZ_OK)
+        p->result = SZ_ERROR_READ;
+    if (p->result != SZ_OK)
+        p->finished = True;
+    return p->result;
+}
+
+MY_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
+{
+    /* ReleaseMFStream(); */
+    p->finished = True;
+    if (p->writeEndMark)
+        WriteEndMarker(p, nowPos & p->pbMask);
+    RangeEnc_FlushData(&p->rc);
+    RangeEnc_FlushStream(&p->rc);
+    return CheckErrors(p);
+}
+
+MY_NO_INLINE static void FillAlignPrices(CLzmaEnc *p)
+{
+    unsigned i;
+    const CProbPrice *ProbPrices = p->ProbPrices;
+    const CLzmaProb *probs = p->posAlignEncoder;
+    // p->alignPriceCount = 0;
+    for (i = 0; i < kAlignTableSize / 2; i++)
+    {
+        UInt32 price = 0;
+        unsigned sym = i;
+        unsigned m = 1;
+        unsigned bit;
+        UInt32 prob;
+        bit = sym & 1;
+        sym >>= 1;
+        price += GET_PRICEa(probs[m], bit);
+        m = (m << 1) + bit;
+        bit = sym & 1;
+        sym >>= 1;
+        price += GET_PRICEa(probs[m], bit);
+        m = (m << 1) + bit;
+        bit = sym & 1;
+        sym >>= 1;
+        price += GET_PRICEa(probs[m], bit);
+        m = (m << 1) + bit;
+        prob = probs[m];
+        p->alignPrices[i ] = price + GET_PRICEa_0(prob);
+        p->alignPrices[i + 8] = price + GET_PRICEa_1(prob);
+        // p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices);
+    }
+}
+
+MY_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p)
+{
+    // int y; for (y = 0; y < 100; y++) {
+
+    UInt32 tempPrices[kNumFullDistances];
+    unsigned i, lps;
+
+    const CProbPrice *ProbPrices = p->ProbPrices;
+    p->matchPriceCount = 0;
+
+    for (i = kStartPosModelIndex / 2; i < kNumFullDistances / 2; i++)
+    {
+        unsigned posSlot = GetPosSlot1(i);
+        unsigned footerBits = (posSlot >> 1) - 1;
+        unsigned base = ((2 | (posSlot & 1)) << footerBits);
+        const CLzmaProb *probs = p->posEncoders + (size_t) base * 2;
+        // tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base, footerBits, i - base, p->ProbPrices);
+        UInt32 price = 0;
+        unsigned m = 1;
+        unsigned sym = i;
+        unsigned offset = (unsigned) 1 << footerBits;
+        base += i;
+
+        if (footerBits)
+            do
+            {
+                unsigned bit = sym & 1;
+                sym >>= 1;
+                price += GET_PRICEa(probs[m], bit);
+                m = (m << 1) + bit;
+            }
+            while (--footerBits);
+
+        {
+            unsigned prob = probs[m];
+            tempPrices[base ] = price + GET_PRICEa_0(prob);
+            tempPrices[base + offset] = price + GET_PRICEa_1(prob);
+        }
+    }
+
+    for (lps = 0; lps < kNumLenToPosStates; lps++)
+    {
+        unsigned slot;
+        unsigned distTableSize2 = (p->distTableSize + 1) >> 1;
+        UInt32 *posSlotPrices = p->posSlotPrices[lps];
+        const CLzmaProb *probs = p->posSlotEncoder[lps];
+
+        for (slot = 0; slot < distTableSize2; slot++)
+        {
+            // posSlotPrices[slot] = RcTree_GetPrice(encoder, kNumPosSlotBits, slot, p->ProbPrices);
+            UInt32 price;
+            unsigned bit;
+            unsigned sym = slot + (1 << (kNumPosSlotBits - 1));
+            unsigned prob;
+            bit = sym & 1;
+            sym >>= 1;
+            price = GET_PRICEa(probs[sym], bit);
+            bit = sym & 1;
+            sym >>= 1;
+            price += GET_PRICEa(probs[sym], bit);
+            bit = sym & 1;
+            sym >>= 1;
+            price += GET_PRICEa(probs[sym], bit);
+            bit = sym & 1;
+            sym >>= 1;
+            price += GET_PRICEa(probs[sym], bit);
+            bit = sym & 1;
+            sym >>= 1;
+            price += GET_PRICEa(probs[sym], bit);
+            prob = probs[(size_t) slot + (1 << (kNumPosSlotBits - 1))];
+            posSlotPrices[(size_t) slot * 2 ] = price + GET_PRICEa_0(prob);
+            posSlotPrices[(size_t) slot * 2 + 1] = price + GET_PRICEa_1(prob);
+        }
+
+        {
+            UInt32 delta = ((UInt32) ((kEndPosModelIndex / 2 - 1) - kNumAlignBits) << kNumBitPriceShiftBits);
+            for (slot = kEndPosModelIndex / 2; slot < distTableSize2; slot++)
+            {
+                posSlotPrices[(size_t) slot * 2 ] += delta;
+                posSlotPrices[(size_t) slot * 2 + 1] += delta;
+                delta += ((UInt32) 1 << kNumBitPriceShiftBits);
+            }
+        }
+
+        {
+            UInt32 *dp = p->distancesPrices[lps];
+
+            dp[0] = posSlotPrices[0];
+            dp[1] = posSlotPrices[1];
+            dp[2] = posSlotPrices[2];
+            dp[3] = posSlotPrices[3];
+
+            for (i = 4; i < kNumFullDistances; i += 2)
+            {
+                UInt32 slotPrice = posSlotPrices[GetPosSlot1(i)];
+                dp[i ] = slotPrice + tempPrices[i];
+                dp[i + 1] = slotPrice + tempPrices[i + 1];
+            }
+        }
+    }
+    // }
+}
+
+void LzmaEnc_Construct(CLzmaEnc *p)
+{
+    RangeEnc_Construct(&p->rc);
+    MatchFinder_Construct(&p->matchFinderBase);
+
+#ifndef _7ZIP_ST
+    MatchFinderMt_Construct(&p->matchFinderMt);
+    p->matchFinderMt.MatchFinder = &p->matchFinderBase;
+#endif
+
+    {
+        CLzmaEncProps props;
+        LzmaEncProps_Init(&props);
+        LzmaEnc_SetProps(p, &props);
+    }
+
+#ifndef LZMA_LOG_BSR
+    LzmaEnc_FastPosInit(p->g_FastPos);
+#endif
+
+    LzmaEnc_InitPriceTables(p->ProbPrices);
+    p->litProbs = NULL;
+    p->saveState.litProbs = NULL;
+
+}
+
+CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc)
+{
+    void *p;
+    p = ISzAlloc_Alloc(alloc, sizeof (CLzmaEnc));
+    if (p)
+        LzmaEnc_Construct((CLzmaEnc *) p);
+    return p;
+}
+
+void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc)
+{
+    ISzAlloc_Free(alloc, p->litProbs);
+    ISzAlloc_Free(alloc, p->saveState.litProbs);
+    p->litProbs = NULL;
+    p->saveState.litProbs = NULL;
+}
+
+void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+#ifndef _7ZIP_ST
+    MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
+#endif
+
+    MatchFinder_Free(&p->matchFinderBase, allocBig);
+    LzmaEnc_FreeLits(p, alloc);
+    RangeEnc_Free(&p->rc, alloc);
+}
+
+void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    LzmaEnc_Destruct((CLzmaEnc *) p, alloc, allocBig);
+    ISzAlloc_Free(alloc, p);
+}
+
+static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpackSize)
+{
+    UInt32 nowPos32, startPos32;
+    if (p->needInit)
+    {
+        p->matchFinder.Init(p->matchFinderObj);
+        p->needInit = 0;
+    }
+
+    if (p->finished)
+        return p->result;
+    RINOK(CheckErrors(p));
+
+    nowPos32 = (UInt32) p->nowPos64;
+    startPos32 = nowPos32;
+
+    if (p->nowPos64 == 0)
+    {
+        unsigned numPairs;
+        Byte curByte;
+        if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0)
+            return Flush(p, nowPos32);
+        ReadMatchDistances(p, &numPairs);
+        RangeEnc_EncodeBit_0(&p->rc, &p->isMatch[kState_Start][0]);
+        // p->state = kLiteralNextStates[p->state];
+        curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset);
+        LitEnc_Encode(&p->rc, p->litProbs, curByte);
+        p->additionalOffset--;
+        nowPos32++;
+    }
+
+    if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0)
+
+        for (;;)
+        {
+            UInt32 dist;
+            unsigned len, posState;
+            UInt32 range, ttt, newBound;
+            CLzmaProb *probs;
+
+            if (p->fastMode)
+                len = GetOptimumFast(p);
+            else
+            {
+                unsigned oci = p->optCur;
+                if (p->optEnd == oci)
+                    len = GetOptimum(p, nowPos32);
+                else
+                {
+                    const COptimal *opt = &p->opt[oci];
+                    len = opt->len;
+                    p->backRes = opt->dist;
+                    p->optCur = oci + 1;
+                }
+            }
+
+            posState = (unsigned) nowPos32 & p->pbMask;
+            range = p->rc.range;
+            probs = &p->isMatch[p->state][posState];
+
+            RC_BIT_PRE(&p->rc, probs)
+
+            dist = p->backRes;
+
+#ifdef SHOW_STAT2
+            printf("\n pos = %6X, len = %3u  pos = %6u", nowPos32, len, dist);
+#endif
+
+            if (dist == MARK_LIT)
+            {
+                Byte curByte;
+                const Byte *data;
+                unsigned state;
+
+                RC_BIT_0(&p->rc, probs);
+                p->rc.range = range;
+                data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
+                probs = LIT_PROBS(nowPos32, *(data - 1));
+                curByte = *data;
+                state = p->state;
+                p->state = kLiteralNextStates[state];
+                if (IsLitState(state))
+                    LitEnc_Encode(&p->rc, probs, curByte);
+                else
+                    LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0]));
+            }
+            else
+            {
+                RC_BIT_1(&p->rc, probs);
+                probs = &p->isRep[p->state];
+                RC_BIT_PRE(&p->rc, probs)
+
+                if (dist < LZMA_NUM_REPS)
+                {
+                    RC_BIT_1(&p->rc, probs);
+                    probs = &p->isRepG0[p->state];
+                    RC_BIT_PRE(&p->rc, probs)
+                    if (dist == 0)
+                    {
+                        RC_BIT_0(&p->rc, probs);
+                        probs = &p->isRep0Long[p->state][posState];
+                        RC_BIT_PRE(&p->rc, probs)
+                        if (len != 1)
+                        {
+                            RC_BIT_1_BASE(&p->rc, probs);
+                        }
+                        else
+                        {
+                            RC_BIT_0_BASE(&p->rc, probs);
+                            p->state = kShortRepNextStates[p->state];
+                        }
+                    }
+                    else
+                    {
+                        RC_BIT_1(&p->rc, probs);
+                        probs = &p->isRepG1[p->state];
+                        RC_BIT_PRE(&p->rc, probs)
+                        if (dist == 1)
+                        {
+                            RC_BIT_0_BASE(&p->rc, probs);
+                            dist = p->reps[1];
+                        }
+                        else
+                        {
+                            RC_BIT_1(&p->rc, probs);
+                            probs = &p->isRepG2[p->state];
+                            RC_BIT_PRE(&p->rc, probs)
+                            if (dist == 2)
+                            {
+                                RC_BIT_0_BASE(&p->rc, probs);
+                                dist = p->reps[2];
+                            }
+                            else
+                            {
+                                RC_BIT_1_BASE(&p->rc, probs);
+                                dist = p->reps[3];
+                                p->reps[3] = p->reps[2];
+                            }
+                            p->reps[2] = p->reps[1];
+                        }
+                        p->reps[1] = p->reps[0];
+                        p->reps[0] = dist;
+                    }
+
+                    RC_NORM(&p->rc)
+
+                    p->rc.range = range;
+
+                    if (len != 1)
+                    {
+                        LenEnc_Encode(&p->repLenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState);
+                        --p->repLenEncCounter;
+                        p->state = kRepNextStates[p->state];
+                    }
+                }
+                else
+                {
+                    unsigned posSlot;
+                    RC_BIT_0(&p->rc, probs);
+                    p->rc.range = range;
+                    p->state = kMatchNextStates[p->state];
+
+                    LenEnc_Encode(&p->lenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState);
+                    // --p->lenEnc.counter;
+
+                    dist -= LZMA_NUM_REPS;
+                    p->reps[3] = p->reps[2];
+                    p->reps[2] = p->reps[1];
+                    p->reps[1] = p->reps[0];
+                    p->reps[0] = dist + 1;
+
+                    p->matchPriceCount++;
+                    GetPosSlot(dist, posSlot);
+                    // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], posSlot);
+                    {
+                        UInt32 sym = (UInt32) posSlot + (1 << kNumPosSlotBits);
+                        range = p->rc.range;
+                        probs = p->posSlotEncoder[GetLenToPosState(len)];
+                        do
+                        {
+                            CLzmaProb *prob = probs + (sym >> kNumPosSlotBits);
+                            UInt32 bit = (sym >> (kNumPosSlotBits - 1)) & 1;
+                            sym <<= 1;
+                            RC_BIT(&p->rc, prob, bit);
+                        }
+                        while (sym < (1 << kNumPosSlotBits * 2));
+                        p->rc.range = range;
+                    }
+
+                    if (dist >= kStartPosModelIndex)
+                    {
+                        unsigned footerBits = ((posSlot >> 1) - 1);
+
+                        if (dist < kNumFullDistances)
+                        {
+                            unsigned base = ((2 | (posSlot & 1)) << footerBits);
+                            RcTree_ReverseEncode(&p->rc, p->posEncoders + base, footerBits, (unsigned) (dist /* - base */));
+                        }
+                        else
+                        {
+                            UInt32 pos2 = (dist | 0xF) << (32 - footerBits);
+                            range = p->rc.range;
+                            // RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
+                            /*
+                            do
+                            {
+                              range >>= 1;
+                              p->rc.low += range & (0 - ((dist >> --footerBits) & 1));
+                              RC_NORM(&p->rc)
+                            }
+                            while (footerBits > kNumAlignBits);
+                             */
+                            do
+                            {
+                                range >>= 1;
+                                p->rc.low += range & (0 - (pos2 >> 31));
+                                pos2 += pos2;
+                                RC_NORM(&p->rc)
+                            }
+                            while (pos2 != 0xF0000000);
+
+
+                            // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask);
+
+                            {
+                                unsigned m = 1;
+                                unsigned bit;
+                                bit = dist & 1;
+                                dist >>= 1;
+                                RC_BIT(&p->rc, p->posAlignEncoder + m, bit);
+                                m = (m << 1) + bit;
+                                bit = dist & 1;
+                                dist >>= 1;
+                                RC_BIT(&p->rc, p->posAlignEncoder + m, bit);
+                                m = (m << 1) + bit;
+                                bit = dist & 1;
+                                dist >>= 1;
+                                RC_BIT(&p->rc, p->posAlignEncoder + m, bit);
+                                m = (m << 1) + bit;
+                                bit = dist & 1;
+                                RC_BIT(&p->rc, p->posAlignEncoder + m, bit);
+                                p->rc.range = range;
+                                // p->alignPriceCount++;
+                            }
+                        }
+                    }
+                }
+            }
+
+            nowPos32 += (UInt32) len;
+            p->additionalOffset -= len;
+
+            if (p->additionalOffset == 0)
+            {
+                UInt32 processed;
+
+                if (!p->fastMode)
+                {
+                    /*
+                    if (p->alignPriceCount >= 16) // kAlignTableSize
+                      FillAlignPrices(p);
+                    if (p->matchPriceCount >= 128)
+                      FillDistancesPrices(p);
+                    if (p->lenEnc.counter <= 0)
+                      LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices);
+                     */
+                    if (p->matchPriceCount >= 64)
+                    {
+                        FillAlignPrices(p);
+                        // { int y; for (y = 0; y < 100; y++) {
+                        FillDistancesPrices(p);
+                        // }}
+                        LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices);
+                    }
+                    if (p->repLenEncCounter <= 0)
+                    {
+                        p->repLenEncCounter = REP_LEN_COUNT;
+                        LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices);
+                    }
+                }
+
+                if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0)
+                    break;
+                processed = nowPos32 - startPos32;
+
+                if (maxPackSize)
+                {
+                    if (processed + kNumOpts + 300 >= maxUnpackSize
+                            || RangeEnc_GetProcessed_sizet(&p->rc) + kPackReserve >= maxPackSize)
+                        break;
+                }
+                else if (processed >= (1 << 17))
+                {
+                    p->nowPos64 += nowPos32 - startPos32;
+                    return CheckErrors(p);
+                }
+            }
+        }
+
+    p->nowPos64 += nowPos32 - startPos32;
+    return Flush(p, nowPos32);
+}
+
+
+
+#define kBigHashDicLimit ((UInt32)1 << 24)
+
+static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    UInt32 beforeSize = kNumOpts;
+    if (!RangeEnc_Alloc(&p->rc, alloc))
+        return SZ_ERROR_MEM;
+
+#ifndef _7ZIP_ST
+    p->mtMode = (p->multiThread && !p->fastMode && (p->matchFinderBase.btMode != 0));
+#endif
+
+    {
+        unsigned lclp = p->lc + p->lp;
+        if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp)
+        {
+            LzmaEnc_FreeLits(p, alloc);
+            p->litProbs = (CLzmaProb *) ISzAlloc_Alloc(alloc, ((UInt32) 0x300 << lclp) * sizeof (CLzmaProb));
+            p->saveState.litProbs = (CLzmaProb *) ISzAlloc_Alloc(alloc, ((UInt32) 0x300 << lclp) * sizeof (CLzmaProb));
+            if (!p->litProbs || !p->saveState.litProbs)
+            {
+                LzmaEnc_FreeLits(p, alloc);
+                return SZ_ERROR_MEM;
+            }
+            p->lclp = lclp;
+        }
+    }
+
+    p->matchFinderBase.bigHash = (Byte) (p->dictSize > kBigHashDicLimit ? 1 : 0);
+
+    if (beforeSize + p->dictSize < keepWindowSize)
+        beforeSize = keepWindowSize - p->dictSize;
+
+#ifndef _7ZIP_ST
+    if (p->mtMode)
+    {
+        RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes,
+                                   LZMA_MATCH_LEN_MAX
+                                   + 1 /* 18.04 */
+                                   , allocBig));
+        p->matchFinderObj = &p->matchFinderMt;
+        p->matchFinderBase.bigHash = (Byte) (
+                (p->dictSize > kBigHashDicLimit && p->matchFinderBase.hashMask >= 0xFFFFFF) ? 1 : 0);
+        MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder);
+    }
+    else
+#endif
+    {
+        if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig))
+            return SZ_ERROR_MEM;
+        p->matchFinderObj = &p->matchFinderBase;
+        MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder);
+    }
+
+    return SZ_OK;
+}
+
+void LzmaEnc_Init(CLzmaEnc *p)
+{
+    unsigned i;
+    p->state = 0;
+    p->reps[0] =
+            p->reps[1] =
+            p->reps[2] =
+            p->reps[3] = 1;
+
+    RangeEnc_Init(&p->rc);
+
+    for (i = 0; i < (1 << kNumAlignBits); i++)
+        p->posAlignEncoder[i] = kProbInitValue;
+
+    for (i = 0; i < kNumStates; i++)
+    {
+        unsigned j;
+        for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++)
+        {
+            p->isMatch[i][j] = kProbInitValue;
+            p->isRep0Long[i][j] = kProbInitValue;
+        }
+        p->isRep[i] = kProbInitValue;
+        p->isRepG0[i] = kProbInitValue;
+        p->isRepG1[i] = kProbInitValue;
+        p->isRepG2[i] = kProbInitValue;
+    }
+
+    {
+        for (i = 0; i < kNumLenToPosStates; i++)
+        {
+            CLzmaProb *probs = p->posSlotEncoder[i];
+            unsigned j;
+            for (j = 0; j < (1 << kNumPosSlotBits); j++)
+                probs[j] = kProbInitValue;
+        }
+    }
+    {
+        for (i = 0; i < kNumFullDistances; i++)
+            p->posEncoders[i] = kProbInitValue;
+    }
+
+    {
+        UInt32 num = (UInt32) 0x300 << (p->lp + p->lc);
+        UInt32 k;
+        CLzmaProb *probs = p->litProbs;
+        for (k = 0; k < num; k++)
+            probs[k] = kProbInitValue;
+    }
+
+
+    LenEnc_Init(&p->lenProbs);
+    LenEnc_Init(&p->repLenProbs);
+
+    p->optEnd = 0;
+    p->optCur = 0;
+
+    {
+        for (i = 0; i < kNumOpts; i++)
+            p->opt[i].price = kInfinityPrice;
+    }
+
+    p->additionalOffset = 0;
+
+    p->pbMask = (1 << p->pb) - 1;
+    p->lpMask = ((UInt32) 0x100 << p->lp) - ((unsigned) 0x100 >> p->lc);
+}
+
+void LzmaEnc_InitPrices(CLzmaEnc *p)
+{
+    if (!p->fastMode)
+    {
+        FillDistancesPrices(p);
+        FillAlignPrices(p);
+    }
+
+    p->lenEnc.tableSize =
+            p->repLenEnc.tableSize =
+            p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN;
+
+    p->repLenEncCounter = REP_LEN_COUNT;
+
+    LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices);
+    LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices);
+}
+
+static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    unsigned i;
+    for (i = kEndPosModelIndex / 2; i < kDicLogSizeMax; i++)
+        if (p->dictSize <= ((UInt32) 1 << i))
+            break;
+    p->distTableSize = i * 2;
+
+    p->finished = False;
+    p->result = SZ_OK;
+    RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig));
+    LzmaEnc_Init(p);
+    LzmaEnc_InitPrices(p);
+    p->nowPos64 = 0;
+    return SZ_OK;
+}
+
+static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream,
+                            ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    p->matchFinderBase.stream = inStream;
+    p->needInit = 1;
+    p->rc.outStream = outStream;
+    return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig);
+}
+
+SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
+                             ISeqInStream *inStream, UInt32 keepWindowSize,
+                             ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    p->matchFinderBase.stream = inStream;
+    p->needInit = 1;
+    return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
+}
+
+static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
+{
+    p->matchFinderBase.directInput = 1;
+    p->matchFinderBase.bufferBase = (Byte *) src;
+    p->matchFinderBase.directInputRem = srcLen;
+}
+
+SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
+                        UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    LzmaEnc_SetInputBuf(p, src, srcLen);
+    p->needInit = 1;
+
+    LzmaEnc_SetDataSize(pp, srcLen);
+    return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
+}
+
+void LzmaEnc_Finish(CLzmaEncHandle pp)
+{
+#ifndef _7ZIP_ST
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    if (p->mtMode)
+        MatchFinderMt_ReleaseStream(&p->matchFinderMt);
+#else
+    UNUSED_VAR(pp);
+#endif
+}
+
+typedef struct
+{
+    ISeqOutStream vt;
+    Byte *data;
+    SizeT rem;
+    BoolInt overflow;
+} CLzmaEnc_SeqOutStreamBuf;
+
+static size_t SeqOutStreamBuf_Write(const ISeqOutStream *pp, const void *data, size_t size)
+{
+    CLzmaEnc_SeqOutStreamBuf *p = CONTAINER_FROM_VTBL(pp, CLzmaEnc_SeqOutStreamBuf, vt);
+    if (p->rem < size)
+    {
+        size = p->rem;
+        p->overflow = True;
+    }
+    memcpy(p->data, data, size);
+    p->rem -= size;
+    p->data += size;
+    return size;
+}
+
+UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
+{
+    const CLzmaEnc *p = (CLzmaEnc *) pp;
+    return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+}
+
+const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
+{
+    const CLzmaEnc *p = (CLzmaEnc *) pp;
+    return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
+}
+
+SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
+                             Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    UInt64 nowPos64;
+    SRes res;
+    CLzmaEnc_SeqOutStreamBuf outStream;
+
+    outStream.vt.Write = SeqOutStreamBuf_Write;
+    outStream.data = dest;
+    outStream.rem = *destLen;
+    outStream.overflow = False;
+
+    p->writeEndMark = False;
+    p->finished = False;
+    p->result = SZ_OK;
+
+    if (reInit)
+        LzmaEnc_Init(p);
+    LzmaEnc_InitPrices(p);
+
+    nowPos64 = p->nowPos64;
+    RangeEnc_Init(&p->rc);
+    p->rc.outStream = &outStream.vt;
+
+    if (desiredPackSize == 0)
+        return SZ_ERROR_OUTPUT_EOF;
+
+    res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
+
+    *unpackSize = (UInt32) (p->nowPos64 - nowPos64);
+    *destLen -= outStream.rem;
+    if (outStream.overflow)
+        return SZ_ERROR_OUTPUT_EOF;
+
+    return res;
+}
+
+static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
+{
+    SRes res = SZ_OK;
+
+#ifndef _7ZIP_ST
+    Byte allocaDummy[0x300];
+    allocaDummy[0] = 0;
+    allocaDummy[1] = allocaDummy[0];
+#endif
+
+    for (;;)
+    {
+        res = LzmaEnc_CodeOneBlock(p, 0, 0);
+        if (res != SZ_OK || p->finished)
+            break;
+        if (progress)
+        {
+            res = ICompressProgress_Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc));
+            if (res != SZ_OK)
+            {
+                res = SZ_ERROR_PROGRESS;
+                break;
+            }
+        }
+    }
+
+    LzmaEnc_Finish(p);
+
+    /*
+    if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&p->matchFinderBase))
+      res = SZ_ERROR_FAIL;
+    }
+     */
+
+    return res;
+}
+
+SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress,
+                    ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig));
+    return LzmaEnc_Encode2((CLzmaEnc *) pp, progress);
+}
+
+SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
+{
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+    unsigned i;
+    UInt32 dictSize = p->dictSize;
+    if (*size < LZMA_PROPS_SIZE)
+        return SZ_ERROR_PARAM;
+    *size = LZMA_PROPS_SIZE;
+    props[0] = (Byte) ((p->pb * 5 + p->lp) * 9 + p->lc);
+
+    if (dictSize >= ((UInt32) 1 << 22))
+    {
+        UInt32 kDictMask = ((UInt32) 1 << 20) - 1;
+        if (dictSize < (UInt32) 0xFFFFFFFF - kDictMask)
+            dictSize = (dictSize + kDictMask) & ~kDictMask;
+    }
+    else for (i = 11; i <= 30; i++)
+        {
+            if (dictSize <= ((UInt32) 2 << i))
+            {
+                dictSize = (2 << i);
+                break;
+            }
+            if (dictSize <= ((UInt32) 3 << i))
+            {
+                dictSize = (3 << i);
+                break;
+            }
+        }
+
+    for (i = 0; i < 4; i++)
+        props[1 + i] = (Byte) (dictSize >> (8 * i));
+    return SZ_OK;
+}
+
+unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle pp)
+{
+    return ((CLzmaEnc *) pp)->writeEndMark;
+}
+
+SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+                       int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    SRes res;
+    CLzmaEnc *p = (CLzmaEnc *) pp;
+
+    CLzmaEnc_SeqOutStreamBuf outStream;
+
+    outStream.vt.Write = SeqOutStreamBuf_Write;
+    outStream.data = dest;
+    outStream.rem = *destLen;
+    outStream.overflow = False;
+
+    p->writeEndMark = writeEndMark;
+    p->rc.outStream = &outStream.vt;
+
+    res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig);
+
+    if (res == SZ_OK)
+    {
+        res = LzmaEnc_Encode2(p, progress);
+        if (res == SZ_OK && p->nowPos64 != srcLen)
+            res = SZ_ERROR_FAIL;
+    }
+
+    *destLen -= outStream.rem;
+    if (outStream.overflow)
+        return SZ_ERROR_OUTPUT_EOF;
+    return res;
+}
+
+SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+                const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
+                ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig)
+{
+    CLzmaEnc *p = (CLzmaEnc *) LzmaEnc_Create(alloc);
+    SRes res;
+    if (!p)
+        return SZ_ERROR_MEM;
+
+    res = LzmaEnc_SetProps(p, props);
+    if (res == SZ_OK)
+    {
+        res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize);
+        if (res == SZ_OK)
+            res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen,
+                                    writeEndMark, progress, alloc, allocBig);
+    }
+
+    LzmaEnc_Destroy(p, alloc, allocBig);
+    return res;
+}

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů