{"id":21683402,"url":"https://github.com/stonestepsinc/exiv2-nuget","last_synced_at":"2026-01-23T19:32:06.350Z","repository":{"id":134152254,"uuid":"559380292","full_name":"StoneStepsInc/exiv2-nuget","owner":"StoneStepsInc","description":"This project builds an Exiv2 Nuget package with static libraries and header files for the x64 platform and Debug/Release configurations.","archived":false,"fork":false,"pushed_at":"2024-09-29T14:53:21.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-30T13:47:37.109Z","etag":null,"topics":["exif","exiv2","library","native","nuget"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StoneStepsInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-29T23:39:02.000Z","updated_at":"2024-09-29T14:53:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c3554a6-902f-4fbe-b496-b9c0f49c4f78","html_url":"https://github.com/StoneStepsInc/exiv2-nuget","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/StoneStepsInc/exiv2-nuget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneStepsInc%2Fexiv2-nuget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneStepsInc%2Fexiv2-nuget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneStepsInc%2Fexiv2-nuget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneStepsInc%2Fexiv2-nuget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StoneStepsInc","download_url":"https://codeload.github.com/StoneStepsInc/exiv2-nuget/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StoneStepsInc%2Fexiv2-nuget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28698860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exif","exiv2","library","native","nuget"],"created_at":"2024-11-25T16:11:47.848Z","updated_at":"2026-01-23T19:32:06.335Z","avatar_url":"https://github.com/StoneStepsInc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Exiv2 Nuget Package\r\n\r\nThis project builds an Exiv2 Nuget package with static Exiv2\r\nlibraries and header files  for the `x64` platform.\r\n\r\nVisit Exiv2 website for additional information about the Exiv2\r\nproject and library documentation:\r\n\r\nhttps://github.com/Exiv2/exiv2\r\n\r\n## Package Configuration\r\n\r\nThe Exiv2 static libraries from this package will appear within\r\nthe installation target project after the package is installed.\r\nThe solution may need to be reloaded to make libraries visible.\r\nBoth, debug and release libraries will be listed in the project,\r\nbut only the one appropriate for the currently selected\r\nconfiguration will be included in the build. These libraries\r\nmay be moved into solution folders after the installation (e.g.\r\n`lib/Debug` and `lib/Release`).\r\n\r\nNote that the Exiv2 library path in this package will be selected\r\nas `Debug` or `Release` based on whether the selected configuration\r\nis designated as a development or as a release configuration via\r\nthe standard Visual Studio property called `UseDebugLibraries`.\r\nAdditional configurations copied from the standard ones will\r\ninherit this property. \r\n\r\nDo not install this package if your projects use debug configurations\r\nwithout `UseDebugLibraries`. Note that CMake-generated Visual Studio\r\nprojects will not emit this property before CMake v3.30.0.\r\n\r\nCMake is configured to build Exiv2 with the following feature\r\noptions:\r\n\r\n  * `BUILD_SHARED_LIBS=OFF`\r\n  * `EXIV2_ENABLE_WEBREADY=OFF`\r\n  * `EXIV2_ENABLE_CURL=OFF`\r\n  * `EXIV2_ENABLE_BROTLI=OFF`\r\n  * `EXIV2_ENABLE_INIH=OFF`\r\n  * `EXIV2_ENABLE_VIDEO=ON`\r\n  * `EXIV2_ENABLE_XMP=ON`\r\n  * `EXIV2_ENABLE_SSH=OFF`\r\n  * `EXIV2_BUILD_SAMPLES=OFF`\r\n  * `EXIV2_BUILD_EXIV2_COMMAND=OFF`\r\n  * `EXIV2_BUILD_UNIT_TESTS=OFF`\r\n  * `EXIV2_BUILD_FUZZ_TESTS=OFF`\r\n  * `EXIV2_ENABLE_PNG=ON`\r\n  * `EXIV2_ENABLE_FILESYSTEM_ACCESS`\r\n\r\n## Exiv2 Changes\r\n\r\nExiv2 source that was used to create this package contains a few\r\nchanges applied in patches described in this section against the\r\nExiv2 release indicated in the package version.\r\n\r\n### `01-wide-char-paths.patch`\r\n\r\nExiv2 dropped support for wide-character paths in v0.28.0 and\r\ndid not provide any alternative ways to open file paths with\r\ncharacters outside of the currently selected Windows character\r\nset, such as Win-1252. Their intent appears to rely on Windows\r\nreplacing various code pages with the UTF-8 code page, but\r\nsupport for this solution in Windows is limited at this point.\r\n\r\nThe Exiv2 source in this package is patched to restore limited\r\nfile-only support for opening images with names comprised of\r\nvalid Unicode characters.\r\n\r\nUse methods that take `std::filesystem:path` to open images\r\nvia wide-character path methods. The original methods should\r\nwork as before, and will open file paths with characters in\r\nsome code pages, but will not be able to open a file name like\r\nthis - `\"hello-\\U0001F30E.jpg\"`.\r\n\r\nNote that `std::filesystem:path` requires C\\+\\+17 and will\r\nnot compile in previous versions of C\\+\\+.\r\n\r\nSee more details in the patch header and in the accompanying\r\nDGML file (requires DGML viewer, which may be installed in\r\nVisual Studio).\r\n\r\n### `02-cmake-lists.patch`\r\n\r\nThis patch adds a definition `SUPPRESS_WARNINGS` to disable\r\nExiv2 warnings reported to one of the standard streams while\r\nreading EXIF.\r\n\r\nAll optimizations in debug builds have been disabled (Exiv2\r\nenables `/Ox` and `/Zo`).\r\n\r\nExiv2 forces statically linked MSVC CRT (`/MTd`) for static\r\nlibrary builds. This is changed to use dynamic MSVC CRT at\r\nall times to make sure memory managers are never mixed up\r\nin applications built against Exiv2 static libraries.\r\n\r\nExiv2 disables all forms of inlining by removing `/Ob2` and\r\n`/Ob1` from CMake-generated projects. This behavior is\r\ndisabled because inlining provides good performance benefits\r\nand does not cause problems when includes and libraries are\r\nproperly set up.\r\n\r\nRelease configurations have been changed to generate PDB files\r\nto aid debugging of released builds (e.g. crash dumps).\r\n\r\n### `03-cmake-find-zlib-expat.patch`\r\n\r\nThis patch disables CMake's `find_package` calls looking for\r\nzLib and Expat on the build machine, so these dependencies can\r\nbe injected as Nuget packages during the build process.\r\n\r\nCurrent version of Nuget does not provide support for updating\r\n`.vcxproj` files via command line tools, which limits CMake in\r\nbeing able to handle Nuget packages gracefully.\r\n\r\n## Migrating from 0.27.6\r\n\r\nThere are many breaking changes in Exiv2 v0.28.0, compared to\r\nv0.27.6. Some of the most notable ones are listed below.\r\n\r\n  * `Exiv2::Image::AutoPtr` has been replaced with\r\n    `Exiv2::Image::UniquePtr`.\r\n  * The ubiquitous `toLong()` methods has been replaced with\r\n    `toInt64()` for signed integers and with `toUint32()` for\r\n    unsigned integers.\r\n  * `Exiv2::AnyError` has been removed.\r\n  * `Exiv2::IfdId` was changed to a scoped `enum` and will\r\n    not compare against integer values.\r\n  * Native support for wide-character paths has been removed.\r\n    The patch `01-wide-char-paths.patch` described above\r\n    restores limited support for wide-character paths, but\r\n    requires C\\+\\+17.\r\n\r\n### Nuget dependencies patches\r\n\r\nNuget lacks the capability to install packages and update\r\n`.vcxproj` files via command line tools, which makes it\r\nimpossible for CMake to integrate Nuget packages into Visual\r\nStudio projects generated by CMake. Patches with the pattern\r\n`2x-vs-nuget-*.patch` are used as a work-around to inject\r\nNuget dependencies into `.vcxproj` files.\r\n\r\nThese patches are extremely fragile and may not work when the\r\nnext version of Nuget or CMake is installed on build machines\r\nor when Visual Studio changes the format of `.vcxproj`. If no\r\nalternative for supplying Nuget dependencies is found when\r\npatching stops working, this package will be updated to remove\r\ndependencies from Exiv2, which will disable XMP and PNG support.\r\n\r\nThe rest of this section describes how to create these patches,\r\nwith the assumption that source code patches have already been\r\napplied.\r\n\r\nAdd `goto :EOF` in `make-package.bat` after CMake generates\r\nVisual Studio projects. Run this batch file from the project\r\nroot to generate Visual Studio projects.\r\n\r\nCopy the generated `exiv2-0.28.0` directory as the base\r\ninstallation to run `diff` against later (e.g. `exiv2-0.28.0_base`).\r\n\r\nChange to the Exiv2 source directory and run this command to\r\nstart VS2022 with the generated `exiv2.sln` file.\r\n\r\n    devenv /Command View.PackageManagerConsole build\\exiv2.sln\r\n\r\nRun these commands to install dependencies into the first\r\nproject.\r\n\r\n    Install-Package StoneSteps.zLib.VS2022.Static -ProjectName exiv2lib\r\n    Install-Package StoneSteps.Expat.VS2022.Static -ProjectName exiv2lib\r\n\r\nThere is another bug in Nuget that prevents installing packages\r\ninto projects located in the same directory. In order to work\r\naround that bug, rename `build\\src\\packages.config` to\r\n`packages.exiv2lib.config`. Run this command to install the\r\nremaining dependencies.\r\n\r\n    Install-Package StoneSteps.zLib.VS2022.Static -ProjectName exiv2lib_int\r\n    Install-Package StoneSteps.Expat.VS2022.Static -ProjectName exiv2-xmp\r\n\r\nFor consistency, rename the newly-created `packages.config` to\r\n`packages.exiv2lib_int.config`. The one in the `xmpsdk` directory\r\nis created for a single project and can remain as `package.config`.\r\n\r\nThese commands modify `.vcxproj` files to add build instructions\r\nfrom installed packages, as well as include `packages*.config` files\r\ninto the projects.\r\n\r\nOpen `exiv2lib.vcxproj`, `exiv2lib_int.vcxproj` and `exiv2-xmp.vcxproj`\r\nin a text editor and delete the entire line with `package.config` in\r\neach file that looks like this:\r\n\r\n    \u003cNone Include=\"packages.config\" /\u003e\r\n\r\nWithout this step, the patch for `exiv2-xmp.vcxproj` picks up\r\nunrelated absolute file paths generated by CMake above it, which\r\nwill cause conflicts when this patch is applied in another build\r\nenvironment.\r\n\r\nIf your CMake veersion is lower than 3.30.0, open `build\\exiv2.sln`\r\nand change _Use Debug Libraries_ in _Advanced_ configuration settings\r\nfor the `Debug` configuration of all three projects patched above.\r\nNote that Visual Studio project patches generated this way may only\r\nbe applied in build environments with the CMake version that is\r\nlower than 3.30.0.\r\n\r\nGenerate patches for all three `.vcxproj` files in the same\r\nway using the base installation directory saved earlier.\r\n\r\n    devops\\create-vs-nuget-patches exiv2-0.28.3_base exiv2-0.28.3\r\n\r\nNote that `.vcxproj` files are expected to use CRLF line endings,\r\nbut `patch` may get confused when it finds mixed line endings,\r\nwhich requires `--binary` option when patching. Because of that,\r\nmake sure not to allow your IDE to correct CRLF line endings to\r\nLF when opening these patches in the editor, as patch instructions\r\nare expected to have LF line endings and chunks of `.vcxproj`\r\nfiles will have CRLF. This is expected.\r\n\r\nEdit the generated patch file to make paths at the top to use\r\nforward slashes for path segment separators, remove quotes and\r\nadd the top-level placeholder directories `a` and `b`, like this.\r\n\r\n    ---- a/build/src/exiv2lib.vcxproj\t2023-02-20 16:10:23.489175900 -0500\r\n    -+++ b/build/src/exiv2lib.vcxproj\t2023-02-20 16:13:29.173423900 -0500\r\n    +--- \"build_base\\\\src\\\\exiv2lib.vcxproj\"\t2023-02-25 13:04:41.665092600 -0500\r\n    ++++ \"build\\\\src\\\\exiv2lib.vcxproj\"\t2023-02-25 13:16:07.929154700 -0500\r\n\r\nInspect patches to make sure they don't contain absolute paths\r\nin referenced lines around the changes. If they do, these\r\npatches will not work on other build machines.\r\n\r\n## Building a Nuget Package\r\n\r\nThis project can build a Nuget package for Exiv2 either locally\r\nor via a GitHub workflow. In each case, following steps are taken.\r\n\r\n  * Exiv2 source archive is downloaded from Exiv2's website and\r\n    its SHA-256 signature is verified.\r\n\r\n  * The source is patched to build in Visual C++ 2022.\r\n\r\n  * CMake is used to generate Visual Studio project files.\r\n\r\n  * Project files generated in the previous step are patched\r\n    up to inject Nuget dependencies, as if they were configured\r\n    in Visual Studio via Nuget functionality form.\r\n\r\n  * VS2022 Community Edition is used to build Exiv2 libraries\r\n    locally and Enterprise Edition to build libraries on GitHub.\r\n\r\n  * Build artifacts for all platforms and configurations are\r\n    collected in staging directories under `nuget/build/native`.\r\n\r\n  * `nuget.exe` is used to package staged files with the first\r\n    three version components used as a Exiv2 version and the last\r\n    version component used as a package revision. See _Package\r\n    Version_ section for more details.\r\n\r\n  * The Nuget package built on GitHub is uploaded to [nuget.org][].\r\n    The package built locally is saved in the root project\r\n    directory.\r\n\r\n## Package Version\r\n\r\n### Package Revision\r\n\r\nNuget packages lack package revision and in order to repackage\r\nthe same upstream software version, such as Exiv2 v0.27.5, the\r\n4th component of the Nuget version is used to track the Nuget\r\npackage revision.\r\n\r\nNuget package revision is injected outside of the Nuget package\r\nconfiguration, during the package build process, and is not\r\npresent in the package specification file.\r\n\r\nSpecifically, `nuget.exe` is invoked with `-Version=0.27.5.123`\r\nto build a package with the revision `123`.\r\n\r\n### Version Locations\r\n\r\nExiv2 version is located in a few places in this repository and\r\nneeds to be changed in all of them for a new version of Exiv2.\r\n\r\n  * nuget/StoneSteps.Exiv2.VS2022.Static.nuspec (`version`)\r\n  * devops/make-package.bat (`PKG_VER`, `PKG_REV`, `EXIV2_SHA256`)\r\n  * .github/workflows/build-nuget-package.yml (`name`, `PKG_VER`,\r\n    `PKG_REV`, `EXIV2_FNAME`, `EXIV2_DNAME`, `EXIV2_SHA256`)\r\n\r\n`EXIV2_SHA256` ia a SHA-256 checksum of the Exiv2 package file and\r\nneeds to be updated when a new version of Exiv2 is released.\r\n\r\nIn the GitHub workflow YAML, `PKG_REV` must be reset to `1` (one)\r\nevery time Exiv2 version is changed. The workflow file must be\r\nrenamed with the new version in the name. This is necessary because\r\nGitHub maintains build numbers per workflow file name.\r\n\r\nFor local builds package revision is supplied on the command line\r\nand should be specified as `1` (one) for a new version of Exiv2\r\nand incremented with every package release for the same upstream\r\nversion.\r\n\r\n### GitHub Build Number\r\n\r\nBuild number within the GitHub workflow YAML is maintained in an\r\nunconventional way because of the lack of build maturity management\r\nbetween GitHub and Nuget.\r\n\r\nFor example, using build management systems, such as Artifactory,\r\nevery build would generate a Nuget package with the same version\r\nand package revision for the upcoming release and build numbers\r\nwould be tracked within the build management system. A build that\r\nwas successfully tested would be promoted to the production Nuget\r\nrepository without generating a new build.\r\n\r\nWithout a build management system, the GitHub workflow in this\r\nrepository uses the pre-release version as a surrogate build\r\nnumber for builds that do not publish packages to nuget.org,\r\nso these builds can be downloaded and tested before the final\r\nbuild is made and published to nuget.org. This approach is not\r\nrecommended for robust production environments because even\r\nthough the final published package is built from the exact\r\nsame source, the build process may still potentially introduce \r\nsome unknowns into the final package (e.g. build VM was updated).\r\n\r\n## Building Package Locally\r\n\r\nYou can build a Nuget package locally with `make-package.bat`\r\nlocated in `devops`. This script expects VS2022 Community Edition\r\ninstalled in the default location. If you have other edition of\r\nVisual Studio, edit the file to use the correct path to the\r\n`vcvarsall.bat` file.\r\n\r\nRun `make-package.bat` from the repository root directory with a\r\npackage revision as the first argument. There is no provision to\r\nmanage build numbers from the command line and other tools should\r\nbe used for this.\r\n\r\n## Sample Application\r\n\r\nA Visual Studio project is included in this repository under\r\n`sample-exiv2` to test the Nuget package built by this project.\r\nThis application dumps all EXIF tags found in a supplied image\r\nfile.\r\n\r\nIn order to build `sample-exiv2.exe`, open Nuget Package manager\r\nin the solution and install either the locally-built Nuget package\r\nor the one from [nuget.org][].\r\n\r\nBinaries linking against this package need to include these Win32\r\nlibraries as linker input, similar to how this sample project does\r\nit. This is because of some functionality in Exiv2 that cannot be\r\nconditionally compiled, such as the `Exiv2::http` function.\r\n\r\n * psapi.lib\r\n * ws2_32.lib\r\n * shell32.lib\r\n\r\nThese library references are not automatically included within\r\nthe package to keep having to link against network and Windows\r\nshell libraries visible.\r\n\r\n[nuget.org]: https://www.nuget.org/packages/StoneSteps.Exiv2.VS2022.Static/\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonestepsinc%2Fexiv2-nuget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstonestepsinc%2Fexiv2-nuget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonestepsinc%2Fexiv2-nuget/lists"}