wkhtmltox
wkhtmltox copied to clipboard
Windows builds
Can you put this together for me please @weltling ?
I don't know much, because windows ... I do know that binary releases from wkhtmltopdf.org come with headers and lib by default, but may be having the wrong runtime technically (not really sure how that works), not sure if we need to distribute the upstream dll with releases like we do for pthreads ...
@remicollet is on board with pecl, so should be a release available shortly to play with #2
@krakjoe we can do the builds, but it looks like for PECL it's a dead end. libwkhtmltox is LGPLv3 which is to my knowledge not accepted on PECL. I guess one can distribute through AppVeyor artifacts. Would you register the ext with AppVeyor please?
Note also, that QT itself is huge, the installation package for Windows shows 2.2G. Probably users will have to itstall QT on their own, while we can deliver the lib with the package.
Thanks.
Ah, and Qt itself is LGPLv3, too. That's why there are no bindings to it on PECL. Whereby there are so many tasty options to implement :)
Thanks.
@weltling isn't GPL which is not acceptable ? (while LGPL is)
Hm, according to https://pecl.php.net/account-request.php:
Note: wrappers for GPL (all versions) or LGPLv3 libraries will not be accepted. Wrappers for libraries licensed under LGPLv2 are however allowed while being discouraged.
what a stupid pain in the ass ... I have no idea what to do about that, open to any suggestions ?
@weltling thanks for help :) ... registered with av ... do I need to do anything else, or all you ?
I had someone do a test build on windows, they didn't mention installing qt ... think windows distribution is statically linked to qt
Yeah, it was LGPLv2 that could be accepted, though very unwillingly.
@krakjoe i just went to build locally using builds provided here https://wkhtmltopdf.org/downloads.html. On x64 all tests pass at the first attempt, great work! And good news is also - the lib is built the way no Qt is required. It's also built with vc14, so it'll be compatible with PHP 7.0 - 7.2 at least.
I'm going to put some AppVeyor script now, that will fetch the lib from the site and produce an artifact. You can then download any artifacts from AppVeyor job and attach to any release tag, etc. Perhaps that's what should work.
Thanks.
@weltling thanks muchly ... I guess I should delete the pecl package ?
@krakjoe yep. License issues can't be debugged :)
Thanks.
looks like I need someone else to drop from db, doesn't look like I can delete it from the web interface ?
I wonder why LGPLv3 is forbidden, but LGPLv2 is allowed for PECL exts. Perhaps this decision should be reassessed?
@krakjoe i just was checking and don't see an option to delete a project as well. Probably only by admin :/
Anyway, i think the build scripts are now ok. There's one test fail tests\pdf\007.phpt
which doesn't happen for me locally, so i guess it's an env issue on the build host. Need to observer the build scripts yet, as somehow it misses to catch the exit status after the test fail. Artifacts can be fetched from appveyor - click on the corresponding job and then choose the artifacts tab. So the most work on this done.
Thanks.
@cmb69 it's a lawer question which i'm not anyway, but i don't think something has changed significantly since then. To my current knowledge, LGPLv3 changes several points in the previous versions, so then any program linking with such a library is enforced to take the same license. PHP strives to be an opposite, whereby the license is not recognized as GPL compatible by FSF :)
Thanks.
Thanks weltling, super appreciated ...
I'll find someone who is admin I guess ...
The license is imposed at the point of linking, so technically we could do source releases for non-windows through pecl because it's just source code, licensed as PHP v3.01 ... but what a headache that would be ...
I hate legal stuff ...
@weltling IANAL, either, so I let it go at that. :)
Okay good, we have a working windows build ... @weltling can you tell me exactly how to attach a build to a release. Alternatively, if it involves windows stuff that I likely won't remember 10 minutes after you told me, would it be acceptable/possible for you to attach the correct build to releases when they are tagged on github ?
@krakjoe there are two steps repeated by number of builds
- an artifact is located under links like for every job https://ci.appveyor.com/project/krakjoe/wkhtmltox/build/master.build.21/job/gnwwh3i6g2yg9fp4/artifacts
- on Github, for a desired release one goes to that page and clicks "edit release", then it land on the edit page like here https://github.com/krakjoe/wkhtmltox/releases/edit/v0.3.1
So merely what is needed is to download all the artifacts needed and then to attach them on that GitHub page. Alternatively one can add links to the artifacts or to the job list, so users would fetch from AppVeyor themselves. Or ever giving just one link to the job list like https://ci.appveyor.com/project/krakjoe/wkhtmltox/build/master.build.21. Depending on what you decide best. So that's no specific Windows stuff, just get zips and upload or even link to them if lazy :)
Thanks.