Add tool to test locally
This commit is contained in:
1 parent
49d8524597
commit
e99e5bf6b4
7 files changed
+111
-27
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
// Aperçu sur PC : charge Jellyfin.qml puis repasse la fenêtre en 1280x720
|
||||
// (fbx.application.Application force le plein écran au démarrage).
|
||||
QtObject {
|
||||
property var app: null
|
||||
|
||||
Component.onCompleted: {
|
||||
var component = Qt.createComponent("../Jellyfin.qml");
|
||||
if (component.status === Component.Error) {
|
||||
console.error(component.errorString());
|
||||
Qt.quit();
|
||||
return;
|
||||
}
|
||||
app = component.createObject(null);
|
||||
app.visibility = Window.Windowed;
|
||||
app.width = 1280;
|
||||
app.height = 720;
|
||||
app.color = "black";
|
||||
app.title = "Jellyfin (aperçu)";
|
||||
}
|
||||
}
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Lance l'application sur le PC avec qmlscene (Qt 5) et libfbxqml.
|
||||
# Usage : tools/run-local.sh [--fullscreen]
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
LIBFBXQML="${LIBFBXQML:-$ROOT/../libfbxqml}"
|
||||
QMLSCENE="${QMLSCENE:-$(command -v qmlscene || echo /usr/lib/qt5/bin/qmlscene)}"
|
||||
|
||||
if [ ! -d "$LIBFBXQML/fbx" ]; then
|
||||
echo "libfbxqml introuvable : git clone https://github.com/fbx/libfbxqml.git \"$LIBFBXQML\"" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${1:-}" = "--fullscreen" ]; then
|
||||
exec "$QMLSCENE" -I "$LIBFBXQML" "$ROOT/Jellyfin.qml"
|
||||
fi
|
||||
exec "$QMLSCENE" -I "$LIBFBXQML" "$ROOT/tools/preview.qml"
|
||||
Reference in new issue
Block a user