mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
finish building libimobiledevice on win64
This commit is contained in:
parent
3c8c184666
commit
1f8520d94b
@ -191,43 +191,40 @@ button.
|
|||||||
Build libimobiledevice
|
Build libimobiledevice
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
In VS Solution Explorer, select the libimobiledevice project, then click the 'Show all files'
|
In VS Solution Explorer, right-click Solution 'imobiledevice', then click
|
||||||
button.
|
Add|New Project.
|
||||||
|
- Name: libimobiledevice
|
||||||
|
- Visual C++: Win32, Template: Win32 Project
|
||||||
|
- Location: Add \imobiledevice to the end of the default location
|
||||||
|
- Click OK
|
||||||
|
- Application Settings: DLL (Empty project)
|
||||||
|
- Click Finish
|
||||||
|
|
||||||
- Right-click the include folder, select Include In Project
|
- Right-click the include folder, select Include In Project
|
||||||
- Right-click the src folder, select Include In Project
|
- Right-click the src folder, select Include In Project
|
||||||
- Set 3 C files to compile as C++
|
- Set .c files to compile as C++
|
||||||
Advanced|Compile As: Compile as C++ Code (/TP)
|
Advanced|Compile As: Compile as C++ Code (/TP)
|
||||||
afc.c, debug.c, device_link_service.c, diagnostics_relay.c, file_relay.c,
|
|
||||||
heartbeat.c, house_arrest.c, idevice.c, installation_proxy.c, lockdown.c,
|
|
||||||
misagent.c, mobile_image_mounter.c, mobilebackup.c, mobilebackup2.c,
|
|
||||||
mobilesync.c, notification_proxy.c, property_list_service.c, restore.c,
|
|
||||||
sbservices.c, screenshotr.c, service.c, userpref.c, webinspector.c
|
|
||||||
- Properties|Configuration Properties|C/C++:
|
- Properties|Configuration Properties|C/C++:
|
||||||
General|Additional Include Directories:
|
General|Additional Include Directories:
|
||||||
$(ProjectDir)\include
|
$(ProjectDir)\include
|
||||||
|
$(SolutionDir)\include
|
||||||
$(SolutionDir)\libplist\include
|
$(SolutionDir)\libplist\include
|
||||||
$(SolutionDir)\vendors\include
|
|
||||||
$(SolutionDir)\libgen
|
$(SolutionDir)\libgen
|
||||||
$(SolutionDir)\libusbmuxd
|
$(SolutionDir)\libusbmuxd
|
||||||
$(SolutionDir)\vendors\gnutls\include
|
$SW\private\openssl\include
|
||||||
$(SolutionDir)\vendors\openssl\include
|
- Edit afc.c #35:
|
||||||
- Edit vendors/gnutls/include/gnutls/compat.h #227:
|
|
||||||
Comment out lines #101-103
|
|
||||||
- Edit libimobiledevice/src/afc.c #35:
|
|
||||||
Comment out lines 35-37 (Synchapi.h is a Windows 8 include file)
|
Comment out lines 35-37 (Synchapi.h is a Windows 8 include file)
|
||||||
- Project Dependencies:
|
- Edit userprofile.c and add at line 25:
|
||||||
libcnary
|
#include <Windows.h>
|
||||||
libgen
|
- Properties -> Linker -> General -> Additional library directories:
|
||||||
libplist
|
$SW\private\openssl\lib
|
||||||
libusbmuxd
|
$(OutDir)
|
||||||
- Properties|Linker|Input|Additional Dependencies:
|
- Properties|Linker|Input|Additional Dependencies:
|
||||||
"$(SolutionDir)\vendors\openssl\lib\libcrypto.a"
|
libeay32.lib
|
||||||
"$(SolutionDir)\vendors\openssl\lib\libeay32.dll.a"
|
ssleay32.lib
|
||||||
"$(SolutionDir)\vendors\openssl\lib\libssl.a"
|
libplist.lib
|
||||||
"$(SolutionDir)\vendors\openssl\lib\libssl32.dll.a"
|
libgen.lib
|
||||||
"$(SolutionDir)\vendors\libgcc\lib\libgcc.a"
|
libusbmuxd.lib
|
||||||
"$(OutDir)\libplist.lib"
|
|
||||||
"$(SolutionDir)\vendors\libxml2\lib\libxml2.lib"
|
|
||||||
ws2_32.lib
|
ws2_32.lib
|
||||||
- Properties|C/C++|Preprocessor
|
- Properties|C/C++|Preprocessor
|
||||||
Preprocessor Definitions:
|
Preprocessor Definitions:
|
||||||
@ -235,18 +232,13 @@ button.
|
|||||||
HAVE_OPENSSL
|
HAVE_OPENSSL
|
||||||
__LITTLE_ENDIAN__
|
__LITTLE_ENDIAN__
|
||||||
_LIB
|
_LIB
|
||||||
- Right-click libimobiledevice, Build.
|
- Project Dependencies:
|
||||||
0 errors, 48 warnings.
|
libcnary
|
||||||
- Properties|C/C++|General
|
libgen
|
||||||
Warning Level: Level 2
|
libplist
|
||||||
|
libusbmuxd
|
||||||
|
- If 64bits, then Right click->Properties->Configuration Manager change
|
||||||
Exporting libimobiledevice entry points
|
Win32 to x64 for the libcnary project and check the Build checkbox
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
The project now builds without errors. Next, we need to export public entry points from
|
|
||||||
libimobiledevice.
|
|
||||||
|
|
||||||
- Edit libimobiledevice\include\libimobiledevice\afc.h
|
- Edit libimobiledevice\include\libimobiledevice\afc.h
|
||||||
At #26, insert
|
At #26, insert
|
||||||
#define AFC_API __declspec( dllexport )
|
#define AFC_API __declspec( dllexport )
|
||||||
@ -349,21 +341,12 @@ libimobiledevice.
|
|||||||
lockdownd_data_classes_free
|
lockdownd_data_classes_free
|
||||||
lockdownd_service_descriptor_free
|
lockdownd_service_descriptor_free
|
||||||
|
|
||||||
- Right-click libimobiledevice, Rebuild
|
- Right-click libimobiledevice, Build.
|
||||||
|
0 errors, 60 warnings.
|
||||||
|
|
||||||
Finished
|
|
||||||
---------------
|
|
||||||
|
|
||||||
The contents of the Release\ directory now includes the targets:
|
|
||||||
• libimobiledevice.dll (866KB)
|
|
||||||
• libusbmuxd.dll (46KB)
|
|
||||||
|
|
||||||
Confirm public entry points using Dependency Walker
|
|
||||||
open libimobiledevice.dll, 130 entry points
|
|
||||||
open libusbmuxd.dll, 64 entry points
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Copy the DLLs
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Run::
|
||||||
|
cp `find . -name '*.dll'` ~/sw/bin/
|
||||||
|
|
||||||
|
@ -540,6 +540,11 @@ Then open ChmLib.dsw in Visual Studio, change the configuration to Release
|
|||||||
(Win32|x64) and build solution, this will generate a static library in
|
(Win32|x64) and build solution, this will generate a static library in
|
||||||
Release/ChmLib.lib
|
Release/ChmLib.lib
|
||||||
|
|
||||||
|
libimobiledevice
|
||||||
|
------------------
|
||||||
|
|
||||||
|
See libimobiledevice_notes.rst
|
||||||
|
|
||||||
calibre
|
calibre
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user