lavovalampa / pyft4222 Goto Github PK
View Code? Open in Web Editor NEWA python wrapper for libft4222 library
License: MIT License
A python wrapper for libft4222 library
License: MIT License
If you have an app with pyft4222
as a dependency and distribute it using PyInstaller, the necessary DLL files are not included.
One way to fix this is to include the binaries manually. Run this to check the extra arguments to use:
import os
import site
from pathlib import Path
# Find site-packages (where the lib is installed)
sitepackages = Path(site.getsitepackages()[-1]).resolve()
# Relative location on the lib
bin_ft4222 = Path('pyft4222', 'wrapper', 'dll')
# Show the arguments
print('--add-binary', f'{sitepackages / bin_ft4222}{os.pathsep}{bin_ft4222}')
I can confirm this works on Windows too.
Note this includes all the binaries on all the OS/architecture combination. Including only the necessary binaries is left as an exercise to the reader, since it's only about 1MB for everything I did not bother.
It should be possible to define a PyInstaller hook so that it automatically can include the binaries without manual intervention.
See PyInstaller documentation:
https://pyinstaller.org/en/stable/hooks.html#providing-pyinstaller-hooks-with-your-package
There is an issue loading libft4222.dll: I get an error unable to load shared library!
I am using windows 11.
Tried updating lib-ft4222.dll manually by downloading latest dll from ftdi page. It seems that there were some changes since the latest update in changelog was in march 2024.
I could try updating the.dll myself (and create a PR to this repo), but I am afraid it would break anything.
How this issue could be resolved?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.