dannyedel / dspdfviewer

Dual-Screen PDF Viewer for latex-beamer
http://dspdfviewer.danny-edel.de
GNU General Public License v2.0
218 stars 27 forks source link

Integrate windows build into CI? #142

Closed dannyedel closed 8 years ago

dannyedel commented 8 years ago

@projekter, do you know any free-for-open-source service that would, similar to how Travis-CI does it with Linux/gcc+clang and MacOS/clang, build each revision / each pullrequest against a Windows/MSVC installation?

That way we could catch fails-to-build errors automatically.

projekter commented 8 years ago

I do not have any experience with those systems and before compiling dspdfviewer, I never used MSVC or worked seriously with C++, so I'm sorry I don't.

dannyedel commented 8 years ago

Okay, no problem. I just would prefer if I could get an automated check for build-issues like #143 at the pull-request stage, like I get with Travis for Linux and OSX.

I checked https://github.com/integrations/feature/code and the first one that lists "Windows" support is called AppVeyor. It does say free for open source, so I'd give that one a try. The configuration seems really similar to Travis: add a file named appveyor.yml to the repository and write the build commands in there.

I expect that the main problem will be the dependencies, unless a dependency manager that knows about poppler and its deps has appeared in the meantime.

From what I understand of the Windows Platform, the different MSVC releases are generally not binary compatible, but within one release they happily load the .lib file created on another computer.

Since you already have compiled the entire dependency chain, I think it could work to pack all the .libs from the dependency list and the poppler includes into a zip archive, post that somewhere to a github release and then, before the build, download and extract to the exact same path on the filesystem, as long as the same MSVC version that you compiled those libraries with is used in the build.

Do you think that could work? If yes, would it be possible for you to make such a package?

projekter commented 8 years ago

I think it will work, as long as you can tell the system to use Visual Studio 2013 (Community). I published a release containing all dependencies. I did not include the Microsoft SDK dependencies, as I don't think license allows me to do so. But those should be shipped with recent versions of Windows or can be downloaded via Windows SDK.

dannyedel commented 8 years ago

Thanks, this is pretty cool! I'll try and see if it works as intendend; I'll report back if there are any missing files or changes to cmake required.

dannyedel commented 8 years ago

All right, I set it up but it fails to build : (

I made it download the zip and extract it as C:\dspdf\poppler so it can use the hardcoded filesystem paths in external_libraries. Is it possible you forgot to include pathnames when creating the zip? They all got dumped directly into the directory, without sub-dirs created.

Also, it seems the dependency archive is missing the include headers, especially poppler-qt5.h but I guess it will also fail on whatever poppler-qt5.h includes.

There's also good news: Qt5 and Boost are already on appveyor, complete with compiled .lib files for msvc2013, and it seems™ they get detected correctly.

I can't tell yet whether it's missing the Microsoft SDK, but I guess that's already included. Appveyor really has a lot of dependencies installed out of the box.

Thanks again for helping me do this, I really think that once setup correctly it will make maintaining the windows version so much more painless, since I can set Appveyor to "require" just like I can with travis, so no more merging of Pullrequests that don't work on one System : )

projekter commented 8 years ago

Ok, then I did "too much" by putting all those libraries in one directory. I updated the release. Now it contains the original directory structure, only that I have removed all debug versions of the libraries, which would blow up the archive very much (but I can include them if you wish), and I removed Qt5 and Boost, as you said they were detected. So now the content should be extracted to C:\dspdf\poppler, as you did.