在 NSIS 安装程序运行期间下载文件在“连接"时冻结 [英] Download of file during NSIS installer run freezes at "connecting"

查看:39
本文介绍了在 NSIS 安装程序运行期间下载文件在“连接"时冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 NSIS 通过 conda 为自定义 python 包创建一个安装程序.已经有一些宏可以帮助创建这样的安装程序:https://github.com/faph/NSIS-Conda-宏

I want to create an installer for a custom python package over conda using NSIS. There are already some macros that help to create such an installer: https://github.com/faph/NSIS-Conda-Macros

他们基本上会尝试找到 conda 和计算机,如果未安装,则为用户下载.

They basically try to find conda und the computer and if it is not installed, download it for the user.

我的问题来了.当安装程序运行并尝试下载文件时,它停留在正在连接"阶段并且从不下载任何内容.

And here comes my problem. When the installer runs and tries to download the file, it stucks at the phase "connecting" and never downloads anything.

我查看了 NSIS-COnda-Macros 的源代码,他们使用:

I have looked in the source code of NSIS-COnda-Macros, and they use:

!define CONDA_URL https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe

NSISdl::download /TIMEOUT=1800000 ${CONDA_URL} conda_setup.exe

下载 conda_setup.exe.此外,如果我尝试单独运行此程序,则下载将不起作用.NSISdl::download 是不是基本坏了,还是这里用错了?

to download the conda_setup.exe. Also if I try to run this isolated, the download doesn't work. Is NSISdl::download basically broken, or is it used in a wrong way here?

推荐答案

NSISdl 不支持 HTTPS 协议.改用 INetC,它使用与 Internet Explorer 相同的网络 API.

NSISdl does not support the HTTPS protocol. Use INetC instead, it uses the same network API as Internet Explorer.

这篇关于在 NSIS 安装程序运行期间下载文件在“连接"时冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆