diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 7efbf5c..355058d 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -10,6 +10,8 @@ env: LIBIMOBILEDEVICE_GLUE_VER: "1.3.2" LIBIMOBILEDEVICE_VER: "1.4.0" LIBIRECOVERY_VER: "1.3.1" + LIBIFUSE_VER: "1.2.0" + LIBUSBMUXD_VER: "2.1.1" jobs: build-linux: @@ -62,7 +64,8 @@ jobs: libxkbcommon-x11-0 \ libheif-dev \ libzip-dev \ - libssh-dev + libssh-dev \ + libfuse3-dev \ - name: Install Qt uses: jurplel/install-qt-action@v3 @@ -97,7 +100,7 @@ jobs: base_url="https://github.com/libimobiledevice" - libs=( "libplist" "libtatsu" "libimobiledevice-glue" "libimobiledevice" "libirecovery" ) + libs=( "libplist" "libtatsu" "libimobiledevice-glue" "libimobiledevice" "libirecovery" "libifuse" "libusbmuxd" ) for name in "${libs[@]}"; do ver_var=$(echo "${name^^}_VER" | sed 's/-/_/g') # e.g. LIBPLIST_VER diff --git a/scripts/deploy-appimage.sh b/scripts/deploy-appimage.sh index 53a3e1c..0be2506 100755 --- a/scripts/deploy-appimage.sh +++ b/scripts/deploy-appimage.sh @@ -120,6 +120,8 @@ chmod +x "$APPDIR/apprun-hooks/linuxdeploy-plugin-env.sh" # .desktop file cp iDescriptor.desktop "$APPDIR/usr/share/applications/" +export LD_LIBRARY_PATH="$APPDIR/usr/local/lib:$LD_LIBRARY_PATH" + ./linuxdeploy-x86_64.AppImage \ --appdir ./AppDir \ --desktop-file AppDir/usr/share/applications/iDescriptor.desktop \ diff --git a/src/ifusewidget.cpp b/src/ifusewidget.cpp index b2a4141..8a9b50a 100644 --- a/src/ifusewidget.cpp +++ b/src/ifusewidget.cpp @@ -207,11 +207,11 @@ void iFuseWidget::onMountClicked() Check if running in AppImage this is set by the plugin script */ - if (qEnvironmentVariableIsSet("IFUSE_APPIMAGE")) { - ifuseExecutablePath = qgetenv("IFUSE_APPIMAGE"); + if (qEnvironmentVariableIsSet("IFUSE_BIN_APPIMAGE")) { + ifuseExecutablePath = qgetenv("IFUSE_BIN_APPIMAGE"); if (ifuseExecutablePath.isEmpty()) { setStatusMessage("Error: Running in AppImage mode, but " - "IFUSE_APPIMAGE is not set.", + "IFUSE_BIN_APPIMAGE is not set.", true); return; } diff --git a/src/sshterminalwidget.cpp b/src/sshterminalwidget.cpp index f9d7150..e5afd1e 100644 --- a/src/sshterminalwidget.cpp +++ b/src/sshterminalwidget.cpp @@ -1,6 +1,7 @@ #include "sshterminalwidget.h" #include "qprocessindicator.h" #include +#include #include #include #include @@ -10,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -257,20 +259,32 @@ void SSHTerminalWidget::initWiredDevice() qDebug() << "Starting iproxy with args:" << args; QString iproxyPath; - QStringList possiblePaths = {"/usr/local/bin/iproxy", - "/opt/homebrew/bin/iproxy", "/usr/bin/iproxy", - "iproxy"}; - for (const QString &path : possiblePaths) { - if (QFile::exists(path) || path == "iproxy") { - iproxyPath = path; - break; + /* + Check if running in AppImage + this is set by the plugin script + */ + if (qEnvironmentVariableIsSet("IPROXY_BIN_APPIMAGE")) { + iproxyPath = qgetenv("IPROXY_BIN_APPIMAGE"); + if (iproxyPath.isEmpty()) { + showError("Error: Running in AppImage mode, but " + "IPROXY_BIN_APPIMAGE is not set."); + return; } - } - if (iproxyPath.isEmpty()) { - showError("Error: iproxy not found. Please install libimobiledevice."); - return; + if (!QFileInfo(iproxyPath).isExecutable()) { + showError( + "Error: Bundled iproxy not found or is not executable at " + + iproxyPath); + return; + } + } else { + iproxyPath = QStandardPaths::findExecutable("iproxy"); + if (iproxyPath.isEmpty()) { + showError( + "Error: iproxy not found. Please install libimobiledevice."); + return; + } } qDebug() << "Using iproxy at:" << iproxyPath;