fukuchi / libqrencode

A fast and compact QR Code encoding library
https://fukuchi.org/works/qrencode/
GNU Lesser General Public License v2.1
2.57k stars 599 forks source link

libqrencode on Perl and on Windows #219

Open PhilterPaper opened 7 months ago

PhilterPaper commented 7 months ago

I am considering adding QR Code capability to PDF::Builder (a PDF-producing package written in Perl). Unfortunately, libqrencode does not come preinstalled on Windows, or even on Strawberry Perl (for Windows). I would need to have users manually install libqrencode on their Perl installations, and I'm especially concerned about Windows users, who are generally not happy about being asked to do any fiddling deep in the bowels of their machines (such as manually building libqrencode). I really don't want to rewrite libqrencode in Perl, if I can reasonably easily get your library to build and install for a naive user.

What has been people's experience in getting libqrencode to build and install on Windows (especially), without requiring advanced system maintenance skills (which most Windows users lack)? It needs to be available to Perl installations, such as Strawberry Perl, so it (a .DLL?) can't be thrown into any old place!

The CPAN library installation command (comes with Strawberry) has the capability to run C and C++ compile and links, and can use the "Alien" package interface to build system libraries (such as libqrencode), though I have no personal experience with setting up Alien for building a library. I'm hoping that someone here has knowledge of such things and could tell whether an Alien build is feasible.

The alternative is to roll my own purely Perl package to produce QR Code from published algorithms, but that will be time-consuming and I'd rather use something "off the shelf". I'm looking for something either for "Alien" to build, or directly build the C/C++ code (I think I would have to package the source code with my package, which may lead to copyright issues).