mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
use bundled iproxy on AppImage builds
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
+25
-11
@@ -1,6 +1,7 @@
|
||||
#include "sshterminalwidget.h"
|
||||
#include "qprocessindicator.h"
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QHBoxLayout>
|
||||
#include <QHostAddress>
|
||||
@@ -10,6 +11,7 @@
|
||||
#include <QProcessEnvironment>
|
||||
#include <QPushButton>
|
||||
#include <QStackedWidget>
|
||||
#include <QStandardPaths>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <libssh/libssh.h>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user