lun-4 / awtfdb

the Anime Woman's Tagged File Data Base.
MIT License
38 stars 2 forks source link

statically link libmagic #44

Closed lun-4 closed 2 years ago

lun-4 commented 2 years ago

there is this in ainclude code for loading libmagic's magic database:

        // this attempts to find the path for the magic db file dynamically
        // through some paths i have found around the systems i have.
        //
        // libmagic's build process enables you to override the default
        // path to the magic file, which means that doing a static build of it
        // means it won't work on a separate system since it doesn't have
        // that one hardcoded in.
        //
        // a future iteration might bundle the magic database with the
        // executable through possibly, @embedFile, then dump that into a
        // temporary file for super compatibility with windows and macos

this is useful enough to be turned into its own zig library.

lun-4 commented 2 years ago

https://github.com/lun-4/awtfdb/commit/2cfb6a5c4b09017994c6139eac7eb3977d3bac40