Python-UIAutomation-for-Windows
Python-UIAutomation-for-Windows copied to clipboard
pyinstaller打包后不能执行,pyinstaller日志信息异常
uiautomation version==1.1.5, python version==3.7.5, windows 10
日志信息如下: 64782 WARNING: library UIAutomationClient_VC100_X64.dll required via ctypes not found 64782 WARNING: library UIAutomationClient_VC90_X64.dll required via ctypes not found 64782 WARNING: library UIAutomationClient_VC140_X86.dll required via ctypes not found 64782 WARNING: library UIAutomationClient_VC90_X86.dll required via ctypes not found 64798 WARNING: library UIAutomationClient_VC100_X86.dll required via ctypes not found 64798 WARNING: library UIAutomationClient_VC140_X64.dll required via ctypes not found
- 这个库是否需要安装VC++才能使用
- 日志提示的文件就是bin文件夹的文件,将Bin这个目录加到环境变量就好了,但问题是,一般pip安装后,应该就立即会用pyinstaller打包,加环境变量这一步感觉很奇怪,请问是不是我哪里操作不对,或者有更好的方式?
可以在打包的同时把这几个文件也打包进去
能详细说一下吗,把文件打包进去这个我没明白什么意思,邮件里还提到一个问题,是否要安装VC++这个库才可以使用
------------------ 原始邮件 ------------------ 发件人: "yinkaisheng/Python-UIAutomation-for-Windows" @.>; 发送时间: 2023年2月2日(星期四) 下午2:32 @.>; @.@.>; 主题: Re: [yinkaisheng/Python-UIAutomation-for-Windows] pyinstaller打包后不能执行,pyinstaller日志信息异常 (Issue #232)
可以在打包的同时把这几个文件也打包进去
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
使用 pyinstaller的打包参数, --add-data ,可以添加自定义的dll; 另外使用这个库不需要安装VC++库也可以用,如果是XP SP3的话需要打UIA补丁
感谢回复,我用--add-data打包后没问题了,但pyinstaller的日志还是提示之前warning, 有办法消除这个warning吗?
------------------ 原始邮件 ------------------ 发件人: "yinkaisheng/Python-UIAutomation-for-Windows" @.>; 发送时间: 2023年2月2日(星期四) 下午4:47 @.>; @.@.>; 主题: Re: [yinkaisheng/Python-UIAutomation-for-Windows] pyinstaller打包后不能执行,pyinstaller日志信息异常 (Issue #232)
使用 pyinstaller的打包参数, --add-data ,可以添加自定义的dll; 另外使用这个库不需要安装VC++库也可以用,如果是XP SP3的话需要打UIA补丁
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
--add-data 其实是手动做了pyinstaller应该hook的事情,如果要消除打包时警告,可以在pyinstaller打包的时候,把你的dll也添加到打包时的hook路径里面,至于怎么hook可以看pyinstaller的文档,写的很详细
感谢回复
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年2月7日(星期二) 中午12:14 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [yinkaisheng/Python-UIAutomation-for-Windows] pyinstaller打包后不能执行,pyinstaller日志信息异常 (Issue #232)
--add-data 其实是手动做了pyinstaller应该hook的事情,如果要消除打包时警告,可以在pyinstaller打包的时候,把你的dll也添加到打包时的hook路径里面,至于怎么hook可以看pyinstaller的文档,写的很详细
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>