#dll #windows #deployment #applications #binaries #command-line #directory

app shared_lib_deployer

为您的可执行文件部署 dll,适用于将应用程序作为二进制文件重新分发

7 个稳定版本

1.5.1 2024年4月29日
1.4.0 2024年4月7日
1.3.0 2024年4月7日
1.2.2 2024年4月1日
1.1.0 2024年3月11日

命令行工具 中排名 #282

Download history 24/week @ 2024-04-11 243/week @ 2024-04-25 27/week @ 2024-05-02

每月下载量 396

GPL-3.0-only

93KB
450

SharedLib Deployer

为您的可执行文件部署 dll,适用于将应用程序作为二进制文件重新分发。

用法

CMake 包装器

file(DOWNLOAD https://github.com/SlopeCraft/SharedLibDeployer/releases/latest/download/DLLDeployer.cmake
    ${CMAKE_BINARY_DIR}/DLLDeployer.cmake)
include(DLLDeployer.cmake)

add_executable(your_exe <your/source/files>)
# Deploy dlls at current binary dir
DLLD_add_deploy(your_exe BUILD_MODE
    VERBOSE # Show detailed information
)

install(TARGETS your_exe RUNTIME DESTINATION bin)
# Deploy dlls at installation dir, useful when distributing binaries
DLLD_add_deploy(your_exe INSTALL_MODE
    INSTALL_DESTINATION bin # Where you install the exe
    COPY_VC_REDIST # Copy Microsoft Visual C++ redistributable binaries, By default it is turned off
)

详细信息示例在此处 这里

命令行可执行文件

deploy-dll.exe C:/path/to/your/executable.exe
deploy-dll.exe C:/path/to/your/shared/lib.dll
Usage: deploy-dll.exe [OPTIONS] <BINARY_FILE>

Arguments:
  <BINARY_FILE>
          The target file to deploy dll for. This can be an exe or dll

Options:
      --skip-env-path
          No not search in system variable PATH

      --copy-vc-redist
          Copy Microsoft Visual C/C++ redistributable dlls

      --verbose
          Show verbose information during execution

      --shallow-search-dir <SHALLOW_SEARCH_DIR>
          Search for dll in those dirs

      --no-shallow-search
          Disable shallow search

      --deep-search-dir <DEEP_SEARCH_DIR>
          Search for dll recursively in those dirs

      --no-deep-search
          Disable recursive search

      --cmake-prefix-path <CMAKE_PREFIX_PATH>
          CMAKE_PREFIX_PATH for cmake to search for packages

      --ignore <IGNORE>
          Dll files that won't be deployed

      --objdump-file <OBJDUMP_FILE>
          Location of dumpbin file

          [default: [builtin]]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

依赖

~1.3–8.5MB
~72K SLoC