开发者

Py2Exe + FTDI driver

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜