mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Build libimobiledevice
This commit is contained in:
parent
9bd640e7ae
commit
1dd2c65384
@ -1,137 +0,0 @@
|
||||
Notes on building libiMobileDevice for Windows
|
||||
=========================================================
|
||||
|
||||
The following notes are intended to work in the calibre build environment described in
|
||||
windows/notes.rst. In particular, third party dependencies like libxml2 and
|
||||
openssl are assumed to have been built as described there.
|
||||
|
||||
1. Get source files, set up VS project
|
||||
2. Build libcnary
|
||||
3. Build libplist
|
||||
4. Build libusbmuxd
|
||||
5. Build libgen
|
||||
6. Build libimobiledevice
|
||||
7. Finished
|
||||
|
||||
Get source files, set up VS project
|
||||
-------------------------------------
|
||||
|
||||
Follow these steps::
|
||||
mkdir $SW/private/imobiledevice && cd $SW/private/imobiledevice
|
||||
git clone https://github.com/Polyfun/libimobiledevice-windows.git
|
||||
cd libimobiledevice-windows && cp -r libcnary libgen vendors/include .. && cd ..
|
||||
git clone https://github.com/Polyfun/libplist.git
|
||||
git clone https://github.com/Polyfun/libusbmuxd.git
|
||||
git clone https://github.com/Polyfun/libimobiledevice.git
|
||||
|
||||
Create a new VS 2008 Project
|
||||
- File|New|Project…
|
||||
- Visual C++: Win32
|
||||
- Template: Win32Project
|
||||
- Name: imobiledevice
|
||||
- Location: Choose $SW/private
|
||||
- Solution: (Uncheck the create directory for solution checkbox)
|
||||
- Click OK
|
||||
- Next screen, select Application Settings tab
|
||||
- Application type: DLL
|
||||
- Additional options: Empty project
|
||||
- Click Finish
|
||||
|
||||
In the tool bar Solution Configurations dropdown, select Release.
|
||||
In the tool bar Solution Platforms dropdown, select Win32.
|
||||
(For 64 bit choose new configuration and create x64 with properties copied from
|
||||
win32).
|
||||
|
||||
|
||||
Build libcnary
|
||||
-------------------------
|
||||
|
||||
In VS Solution Explorer, right-click "Solution 'imobiledevice'", then click
|
||||
Add|Existing Project and choose libcnary.vcproj
|
||||
|
||||
In VS Solution Explorer, select the libcnary project, Right click->Build
|
||||
|
||||
|
||||
Build libplist
|
||||
---------------------
|
||||
|
||||
In VS Solution Explorer, right-click Solution 'imobiledevice', then click
|
||||
Add|Existing Project and select libplist.vcproj
|
||||
|
||||
In VS Solution Explorer, select the libplist project, right
|
||||
click->Properties-Configuration
|
||||
- Properties|Configuration Properties|C/C++:
|
||||
General|Additional Include Directories:
|
||||
$(SolutionDir)\include
|
||||
$SW\include\libxml2 (if it exists)
|
||||
$SW\include (make sure this is last in the list)
|
||||
- Properties -> Linker -> General -> Additional Library directories: $SW/lib (for libxml2.lib)
|
||||
|
||||
Project Dependencies:
|
||||
Depends on: libcnary
|
||||
|
||||
Right-click libplist, Build. Should build with 0 errors (there will be warnings
|
||||
about datatype conversion for the 64 bit build)
|
||||
|
||||
Build libusbmuxd
|
||||
----------------------
|
||||
|
||||
In VS Solution Explorer, right-click Solution 'imobiledevice', then click
|
||||
Add|Existing Project -> libusbmuxd.vcproj
|
||||
|
||||
In VS Solution Explorer, select the libusbmuxd project, then right
|
||||
click->Properties->Configuration.
|
||||
- Properties|Configuration Properties|C/C++:
|
||||
General|Additional Include Directories:
|
||||
$(SolutionDir)\include
|
||||
$(SolutionDir)\libplist\include
|
||||
|
||||
Project Dependencies:
|
||||
Depends on: libplist
|
||||
|
||||
**Add the following patch to prevent detection of WiFi devices**
|
||||
http://www.mobileread.com/forums/showthread.php?t=255234
|
||||
|
||||
Right-click libusbmuxd, Build. Should build with 0 errors, many warnings
|
||||
|
||||
Build libgen
|
||||
-----------------------
|
||||
|
||||
In VS Solution Explorer, right-click Solution 'imobiledevice', then click
|
||||
Add|Existing Project -> libgen.vcpro
|
||||
|
||||
Right-click libgen, Build. Should build with 0 errors, 0 warnings.
|
||||
|
||||
Build libimobiledevice
|
||||
----------------------------
|
||||
|
||||
In VS Solution Explorer, right-click Solution 'imobiledevice', then click
|
||||
Add|Existing Project -> libimobiledevice.vcproj
|
||||
- Properties|Configuration Properties|C/C++:
|
||||
General|Additional Include Directories:
|
||||
$(ProjectDir)\include
|
||||
$(SolutionDir)\include
|
||||
$(SolutionDir)\libplist\include
|
||||
$(SolutionDir)\libgen
|
||||
$(SolutionDir)\libusbmuxd
|
||||
$SW\private\openssl\include
|
||||
- Properties -> Linker -> General -> Additional library directories:
|
||||
$SW\private\openssl\lib
|
||||
$(OutDir)
|
||||
- Properties -> Build Events ->Post Build Event -> Remove the post build event (we will copy the dlls manually)
|
||||
|
||||
Right click-> Project Dependencies:
|
||||
libcnary
|
||||
libgen
|
||||
libplist
|
||||
libusbmuxd
|
||||
|
||||
Right-click libimobiledevice, Build.
|
||||
0 errors, many warnings.
|
||||
|
||||
Copy the DLLs
|
||||
-----------------
|
||||
|
||||
Run::
|
||||
cp `find Release -name '*.dll'` ~/sw/bin/
|
||||
|
@ -501,11 +501,36 @@ Compiling instructions::
|
||||
winenv python ../configure.py -c -j5 --no-designer-plugin --no-qml-plugin --verbose --confirm-license
|
||||
winenv nmake && rm -rf ~/sw/private/python/Lib/site-packages/PyQt5 && nmake install
|
||||
|
||||
libplist
|
||||
------------
|
||||
|
||||
Run::
|
||||
git clone --depth 1 https://github.com/kovidgoyal/libplist.git && \
|
||||
export PLAT=`python -c "import sys; sys.stdout.write('x64' if sys.maxsize > 2**32 else 'x86')"` && \
|
||||
cd libplist && winenv msbuild VisualStudio/libplist/libplist.sln /t:Build /p:Platform=$PLAT /p:Configuration="Release" && \
|
||||
cp VisualStudio/libplist/$PLAT/Release/libplist.dll ~/sw/bin && \
|
||||
cp VisualStudio/libplist/$PLAT/Release/libplist.lib ~/sw/lib && \
|
||||
cp -r include/plist ~/sw/include
|
||||
|
||||
libusbmuxd
|
||||
---------------
|
||||
|
||||
Run::
|
||||
git clone --depth 1 https://github.com/kovidgoyal/libusbmuxd.git && \
|
||||
export PLAT=`python -c "import sys; sys.stdout.write('x64' if sys.maxsize > 2**32 else 'x86')"` && \
|
||||
cd libusbmuxd && winenv msbuild VisualStudio/libusbmuxd/libusbmuxd.sln /t:Build /p:Platform=$PLAT /p:Configuration="Release" && \
|
||||
cp VisualStudio/libusbmuxd/$PLAT/Release/libusbmuxd.dll ~/sw/bin && \
|
||||
cp VisualStudio/libusbmuxd/$PLAT/Release/libusbmuxd.lib ~/sw/lib && \
|
||||
cp include/*.h ~/sw/include
|
||||
|
||||
libimobiledevice
|
||||
------------------
|
||||
---------------------
|
||||
|
||||
See libimobiledevice_notes.rst
|
||||
Run::
|
||||
git clone --depth 1 https://github.com/kovidgoyal/libimobiledevice.git && \
|
||||
export PLAT=`python -c "import sys; sys.stdout.write('x64' if sys.maxsize > 2**32 else 'x86')"` && \
|
||||
cd libimobiledevice && winenv msbuild VisualStudio/libimobiledevice/libimobiledevice.sln /t:Build /p:Platform=$PLAT /p:Configuration="Release" && \
|
||||
cp VisualStudio/libimobiledevice/$PLAT/Release/libimobiledevice.dll ~/sw/bin
|
||||
|
||||
optipng
|
||||
----------
|
||||
|
Loading…
x
Reference in New Issue
Block a user