How to package files can be run directly on the bare metal on win10

Because when the laboratory conducting the total project delivery through code compilation, I feel too much trouble. Then the Internet for a few posts, according to which way the executable file and its dependent dynamic libraries are packed out, and then you can run directly on the bare metal.
Description: not packaged into the installer, so the Path environment variable or third-party libraries to configure their own, but compared to compile from source has been too easy.

Reference blog:

  1. View vs exe files rely on dll file
  2. qt package appear not found Qt platform plugin "windows" of the problem

Here is the process of packing:

1, view-dependent dll file

Exe first to the directory where the files, and enter "dumpbin / dependents xxx.exe> dependendents.txt" in "vs2015 x64 native command Tools", in the directory will generate dependents.txt, which lists the exe file dependent dll file.
(I am more simple and crude, the third-party libraries dll file used by all copies of, for example, uses Opencv, put all the dll files are copied to a file folder opencv)

2, find the appropriate dll file

The first step is to find some of the major system-level and compiler-dependent dll file exe file, for example vcruntime.dll, and then use the "everything", enter the name of the dll file, locate the dll file is located, and then copied to exe files in the same directory.

I finally packed up directory is probably as follows:
![1]
content exe is as follows:
Here Insert Picture Description

3, packing test

In the path of a third-party library is located on the bare metal configure the Path environment variable, and then click on the exe file to run.

Published 47 original articles · won praise 23 · views 80000 +

Guess you like

Origin blog.csdn.net/llfjcmx/article/details/104007889