Closed Filoppi closed 1 year ago
@Filoppi, sorry for leaving this PR stale for so long, and thanks for reporting your issues with getting the libheif dependency to work.
I don't think your PR actually fixes the issue. What it is doing is linking to the nuget.org package vcpkg-export-20210804-195144 which from inspection appears to be a Linux compilation of the Armadillo linear algebra library. Hence any attempt to compile the project will complain that libheif.h doesn't exist.
This is an unfortunate result of me being lazy and using the default timestamp filename that vcpkg chose when I used it to build the custom libheif Nuget package. You can see a bunch of others did the same thing as me when they uploaded packages to Nuget: https://www.nuget.org/packages?q=vcpkg-export. (Note that I have no plans to upload my libheif package to nuget.org)
I will rename the nuget package filename to reduce the likelihood of this confusion. More importantly, let's try to figure out why the Nuget package manager isn't correctly including the local package on your system.
Here are screenshots from VS2022 on my system - can you confirm whether you see the same? I am able to successfully clone and re-setup this repo on a brand new, clean system around once per month, so I know the steps do work.
This is what I was seeing:
Adding the
libheif-vcpkg
as source did allow the nuget packages to update correctly and the project to build without errors.
I am not familiar with nuget, but I suppose it feels weird to have to add a new source, within the directory of the project, just to build a project; but if that's what it takes, then it should definately be added to the ReadMe :). Thanks, I can finally view all the screenshots I've been taking in the last years XD.
@Filoppi FYI I've updated the main project readme with better instructions (this used to be in the vcpkg subdirectory which is obviously not discoverable).
nuget would refuse to download any missing packages as it couldn't find vcpkg-export-20210528-221932. I had to manually edit all the project files with the most recent version I could find to be able to even start a build. The DX package is likely unnecessary, but I just updated everything. You can reproduce the issue by just starting from a clean repository downloaded from github. I used VS2022 but it shouldn't make a difference.
Now I have another problem... I'm really not the most experienced with nuget packages and using vcpkg or linked git repositories. I've followed the instructions at https://github.com/13thsymphony/HDRImageViewer/blob/csappv2/libheif-vcpkg/readme.md but they don't seem to work, like, it seems some steps after that are missing? like manually asking vcpkg to download and build the heif repository? Because if I do try to start a build, this is the error I get:
Cannot open include file: 'libheif/heif.h': No such file or directory
(from pch.h in both DXRenderer and HeifUtil).My objective was to fix some jxr files (Windows Gaming Bar HDR screenshots) that fail to open, while other work, for what seem like no reason. So I wanted to try and find the failure point and possibly fix it.