libplist icon indicating copy to clipboard operation
libplist copied to clipboard

Add Visual C++ support (rebased)

Open qmfrederik opened this issue 8 years ago • 3 comments

This is a rebased version of #63 and should do pretty much the same thing as #69, #49, #4 and #5 .

This pull request adds support for Microsoft Visual C++ in libplist.

It only includes changes in the .h and .c files; the actual project files are not included to keep the libplist repository clean.

A lot of the changes are minor; for example, VC++ is more picky about implicit casts so a lot of cast statements have been added. Similarly, if the declaration in the .h and .c file differ, VC++ complains. Hence a lot of PLIST_API_MSC statements have been added in the .h files.

Care has been taken to make sure that VC++ -specific statements are wrapped in an #ifdef _MVC_VER statement, so that they won't interfere with other compilers on the Windows platform.

I used Travis as a CI server in the upstream repository, to verify compilation still works on the Linux platform. It did, and you can see the result here: https://travis-ci.org/libimobiledevice-win32/libplist/builds/130135945 The upstream repository also contains a sample .travis.yml file that you could use if you wanted CI; it is not included in this pull request.

Similarly, I also tested on a Windows machine using AppVeyor and you can see the results here: https://ci.appveyor.com/project/qmfrederik/libplist/

All feedback is welcome,

Frederik.

qmfrederik avatar May 13 '16 23:05 qmfrederik

@nikias , I've seen you accept some PRs in libplist lately. Just wondering - anything specific that needs to be done in this PR for you to be able to accept it?

Thanks!

qmfrederik avatar May 13 '16 23:05 qmfrederik

I think we really need a compiled version that supports MSVC.

After all, it is difficult for some people who use MSVC to debug dynamic libraries compiled by MinGW or other compilers.

This hardly changes much and has no impact on the existing logic. This can be done by replacing header files, exporting macros and some macros unique to Linux.

Looking forward to...

AiXanadu avatar Oct 07 '21 04:10 AiXanadu