Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julian-r/file-windows
File and Libmagic build with Visual Studio
https://github.com/julian-r/file-windows
Last synced: 12 days ago
JSON representation
File and Libmagic build with Visual Studio
- Host: GitHub
- URL: https://github.com/julian-r/file-windows
- Owner: julian-r
- License: mit
- Created: 2017-09-07T11:43:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T11:13:22.000Z (over 1 year ago)
- Last Synced: 2024-08-01T19:39:50.996Z (3 months ago)
- Language: C
- Size: 2.8 MB
- Stars: 76
- Watchers: 6
- Forks: 20
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build status](https://ci.appveyor.com/api/projects/status/9xwg49m6124xa2pp/branch/master?svg=true
)](https://ci.appveyor.com/project/julian-r/file-windows)This aims to have everything one needs to build file on windows with visual studio.
## Checkout with submodules
```sh
git submodule update --init --recursiv
```## External Dependencies
- *regex*: I am using [PCRE2](http://www.pcre.org/) version 10.30.
Unfortunately this is not available on github with tags, so I commited it in this repo.
I copied `pcre2posix.h` to `regex.h`.
- *dirent*: Dirent is not available on windows, so I used a implementation from [tronkko](https://github.com/tronkko/dirent).
- *getopt*: A similar problem exists with getopt, so I used a implementation from [skandhurkat](https://github.com/skandhurkat/Getopt-for-Visual-Studio).## Linking
- all the dependencies are statically linked or compiled into the dll
- There is a `.def` file in windows headers describing the exports for the linker
- Since dirent defines some of the symbols used in files `readelf.c` and `magic.c` the include is "patched" into them in the `CMakeLists.txt`## Updating file
- Checkout the version in the `file` submodule.
- Update `CMakeLists.txt`
- Update `appveyor.yml`## Updating pcre2
- I disabled the test in the `CMakeFile.txt` manually, the rest is vanilla.