开发者

Py2Exe + FTDI driver

开发者 https://www.devze.com 2023-01-20 06:24 出处:网络
Is开发者_StackOverflow中文版 it at all possible to somehow include the FTDI driver in a py2exe installer? If not, are there any ways to combine the two together in one easy installer?Include the FTDI

Is开发者_StackOverflow中文版 it at all possible to somehow include the FTDI driver in a py2exe installer? If not, are there any ways to combine the two together in one easy installer?


Include the FTDI driver folders in your distribution using py2exe's data_files option.

You can run code like this to make the drivers visible to your application even if they aren't installed in system32:

os.environ['PATH'] = '%s;%s' % (os.environ['PATH'], os.path.abspath('./driver/i386'))
os.environ['PATH'] = '%s;%s' % (os.environ['PATH'], os.path.abspath('./driver/amd64'))

Of course, once a device is plugged in, Windows will ask for a driver. At least you can point it to where your app is installed to find it.

0

精彩评论

暂无评论...
验证码 换一张
取 消