-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-dev.sh
More file actions
executable file
·53 lines (47 loc) · 2.1 KB
/
run-dev.sh
File metadata and controls
executable file
·53 lines (47 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# This allows you to edit QML files and see changes without rebuilding
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Set QML_UI to point to the main_ui QML source directory
export QML_UI="$SCRIPT_DIR/src"
# Ensure QML uses filesystem sources and skips disk cache
export QML_IMPORT_PATH="$QML_UI/qml:$QML_UI:$QML_IMPORT_PATH"
export QML2_IMPORT_PATH="$QML_UI/qml:$QML_UI:$QML2_IMPORT_PATH"
export QML_DISABLE_DISK_CACHE=1
export QML_NO_CACHE=1
# Add design system to import path if available
if [ -n "$LOGOS_DESIGN_SYSTEM_ROOT" ]; then
# Use design system from environment variable (typically from nix shell)
export QML2_IMPORT_PATH="$LOGOS_DESIGN_SYSTEM_ROOT/lib:$QML2_IMPORT_PATH"
echo "Design system: $LOGOS_DESIGN_SYSTEM_ROOT"
elif [ -d "$SCRIPT_DIR/../logos-design-system/src/qml" ]; then
# Fallback to local design system for development (if sibling directory exists)
LOCAL_DS_PATH="$SCRIPT_DIR/../logos-design-system/src/qml"
export QML2_IMPORT_PATH="$LOCAL_DS_PATH:$QML2_IMPORT_PATH"
echo "Design system: $LOCAL_DS_PATH (local development)"
else
# Use design system from the nix build's lib directory
echo "Design system: (from nix build)"
fi
# Print the paths being used
echo "================================================"
echo "Starting Logos App in DEVELOPMENT mode"
echo "================================================"
echo "QML_UI path: $QML_UI"
echo ""
echo "QML files will be loaded from the filesystem."
echo "The QML_UI path is also added to the engine import path, so"
echo "nested components (e.g. SidebarIconButton) load from disk too."
echo "================================================"
echo ""
# Run the app from the nix result
# Use logos-app launcher (sets Qt env, execs LogosApp binary - Dock shows "LogosApp")
if [ -f "./result/bin/logos-app" ]; then
./result/bin/logos-app "$@"
elif [ -f "./result/bin/LogosApp" ]; then
./result/bin/LogosApp "$@"
else
echo "Error: Application binary not found in ./result/bin/"
echo "Please build the app first with: nix build"
exit 1
fi