GithubHelp home page GithubHelp logo

julian-r / file-windows Goto Github PK

View Code? Open in Web Editor NEW
74.0 6.0 20.0 2.87 MB

File and Libmagic build with Visual Studio

License: MIT License

CMake 0.65% C 59.62% Perl 0.19% Makefile 4.25% Shell 7.54% Batchfile 0.78% M4 0.91% HTML 13.78% Roff 12.28%

file-windows's Introduction

Build status

This aims to have everything one needs to build file on windows with visual studio.

Checkout with submodules

git submodule update --init --recursiv

External Dependencies

  • regex: I am using PCRE2 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.
  • getopt: A similar problem exists with getopt, so I used a implementation from skandhurkat.

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.

file-windows's People

Contributors

eberge avatar jmoraleda avatar julian-r avatar mend-bolt-for-github[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

file-windows's Issues

Unable to build using VS2010 in windows

I'm facing a lot of compiler issues when trying to build using cmake and visual studio 2010.

  1. error C2061: syntax error : identifier 'mode_t' [C:\Krishna\File-Magic\file-windows\libmagic.vcxproj]
  2. file\src\apprentice.c(457): error C2037: left of 'flags' specifies undefined struct/union 'magic_set' [C:\Krishna\File-Magic\file-windows\libmagic.vcxproj]

Looks like the VS compiler is not able to read the unix-style code. Is there any special compiler switch or something that is necessary to avoid these errors?

Thanks.

ARM build

Could you build this for ARM as well? This would be useful for Windows on my M1 Mac. I'm sure performance will never be an issue in the emulator, but it would still be nice.

How to build?

Can you write guide how to build file with cmake?
I'm trying to build it with "Visual Studio 15 2017", but no luck.

not building 64bit DLL

Julien,
awesome effort.
any chance to get this building libmagic.DLL for x86_64?

thanks,

Joerg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.