cygwinとMinGWの両方を使用してlibimobiledeviceとその依存関係をコンパイルしてみました。 すべての問題を解決した後、Windowsの実行可能ファイルを作成することができました。 ただし、両方の環境(CygwinとMinGW)で、同じエラーが発生しました。
./idevice_id -l
socket_connect: getaddrinfo: Unknown error
ERROR: Unable to retrieve device list!
同じエラーがここでも報告されましたhttps://github.com/libimobiledevice/libimobiledevice/issues/783
私がフォローできるウィンドウでコンパイルするためのいくつかの記事はありますか? 以下は、私が従ったさまざまなステップの編集です。
MSys2をインストールします
https://stackoverflow.com/questions/26453293/what-is-the-best-way-to-install-pkg-config-on-mingw-in-2014
https://www.msys2.org/MinGWをインストールする
http://www.mingw.org/wiki/MSYS
binフォルダーをWindowsの環境変数に設定しますlibplistをビルドする
./autogen.sh
作る
インストールする
(Pythonエラーが発生したことを覚えているので、-without-cythonをインストールする必要がありました)usbmuxdをビルドする
./autogen.sh
作る
インストールするopenssl devlibsが見つからないためGNUTLSをインストールします
https://github.com/libimobiledevice/libimobiledevice/issues/617
pacman -S mingw-w64-x86_64-gnutls
pacman -S gnutls
pacman -S libgnutls
pacman -S openssl
pacman -S libopenssl
pacman -Sopenssl-devellibcryptをインストールします
pacman -S libgcrypt-devel建てる
./autogen.sh --without-cython --disable-openssl
作る
インストールする
msys2を使用し、cygwinまたはmingwは使用しないでください。 私はリンクされた問題でそれを述べました。
tbh。 mingw / cygwinが古くなっているのか、それともスタックがWindows 10 1809/1903で機能しないのかはわかりませんが、msys2は機能します。
@mexmer私は確かにMSys2ターミナルを使用していました。 mingwを削除して、Msys2ターミナルでのビルドを最初からやり直す必要がありますか?
OpenSSLを使用してMSys2でコンパイルできました。
これは他の誰かを助けるかもしれません:
MSys2をインストールします
https://stackoverflow.com/questions/26453293/what-is-the-best-way-to-install-pkg-config-on-mingw-in-2014
https://www.msys2.org/
libplistをビルドする
git clone https://github.com/libimobiledevice/libplist.git
(Pythonエラーが発生したことを覚えているので、-without-cythonをインストールする必要がありました)
./autogen.sh --without-cython
作る
インストールする
libusbをビルドする
git clone https://github.com/libusb/libusb.git
./autogen
作る
インストールする
libusbmuxdをビルドする
git clone https://github.com/libimobiledevice/libusbmuxd.git
./autogen.sh
作る
インストールする
libcryptをインストールします
pacman -S libgcrypt-devel
デフォルトのOpenSSLサポートの場合:
pacman -S openssl
pacman -S libopenssl
pacman -Sopenssl-devel
openssl dev libsが見つからない場合は、GNUTLSをインストールしてください
https://github.com/libimobiledevice/libimobiledevice/issues/617
pacman -S mingw-w64-x86_64-gnutls
pacman -S gnutls
pacman -S libgnutls
pacman -S libgnutls-devel
libimobiledeviceを構築する
git clone https://github.com/libimobiledevice/libimobiledevice.git
_ // OpenSSLを使用_
./autogen.sh --without-cython
_ // GNUTLSを使用_
./autogen.sh --without-cython --disable-openssl
作る
インストールする
これは、Pythonの問題なしに上記のすべてをビルドするためにインストールしなければならなかったもののリストです:
pacman -S git
pacman -S libedit
pacman -S mingw-w64-i686-toolchain
pacman -S --needed base-devel msys2-devel
pacman -S mingw-w64-x86_64-python
pacman -S msys / libcrypt-devel
pacman -S openssl
pacman -S libopenssl
pacman -Sopenssl-devel
https://github.com/libimobiledevice/ideviceinstallerもビルドするには、次のことも行う必要がありました。
pacman -S mingw-w64-x86_64-libzip
cp /mingw64/lib/pkgconfig/libzip.pc / usr / lib / pkgconfig /
//コピーされたlibzip.pcから無効なD:/ msys64パスを含む行を削除します
sed -i '/-lD:\ / msys64 / d' / usr / lib / pkgconfig / libzip.pc
git clone https://github.com/libimobiledevice/ideviceinstaller.git
cd ideviceinstaller
//いくつかの警告があるため、エラーとして脅威警告への切り替えを削除します
sed -i's / -Werror // g'configure.ac
./autogen.sh
作る
makeinstall
@anshumanchatterji 、プロジェクトをビルドしたら、独自のプログラムを開発するときにライブラリとしてどのように使用しますか?
最も参考になるコメント
これは、Pythonの問題なしに上記のすべてをビルドするためにインストールしなければならなかったもののリストです:
pacman -S git
pacman -S libedit
pacman -S mingw-w64-i686-toolchain
pacman -S --needed base-devel msys2-devel
pacman -S mingw-w64-x86_64-python
pacman -S msys / libcrypt-devel
pacman -S openssl
pacman -S libopenssl
pacman -Sopenssl-devel
https://github.com/libimobiledevice/ideviceinstallerもビルドするには、次のことも行う必要がありました。
pacman -S mingw-w64-x86_64-libzip
cp /mingw64/lib/pkgconfig/libzip.pc / usr / lib / pkgconfig /
//コピーされたlibzip.pcから無効なD:/ msys64パスを含む行を削除します
sed -i '/-lD:\ / msys64 / d' / usr / lib / pkgconfig / libzip.pc
git clone https://github.com/libimobiledevice/ideviceinstaller.git
cd ideviceinstaller
//いくつかの警告があるため、エラーとして脅威警告への切り替えを削除します
sed -i's / -Werror // g'configure.ac
./autogen.sh
作る
makeinstall