-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dpg-ui-new.py
More file actions
executable file
·45 lines (39 loc) · 1.37 KB
/
start-dpg-ui-new.py
File metadata and controls
executable file
·45 lines (39 loc) · 1.37 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
#!/usr/bin/env python3
"""
New launcher script for OneTrainer DPG UI.
This launches the modular DPG implementation from the dpg_ui directory.
"""
import os
import sys
import traceback
# Simple wrapper to launch the modular DPG UI implementation
try:
# Add the current directory to the path
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir not in sys.path:
sys.path.insert(0, current_dir)
# Check for DPG
try:
import dearpygui.dearpygui as dpg
print("✓ DearPyGui is installed")
except ImportError:
print("DearPyGui not found. Please install it with: pip install dearpygui")
sys.exit(1)
# Import and run the app
print("Launching OneTrainer DPG UI (modular version)...")
# First try the enhanced version with better LyCORIS support
try:
from dpg_ui.app_enhanced import OneTrainerApp as EnhancedApp
print("Using enhanced app with full LyCORIS support")
app = EnhancedApp()
app.run()
except ImportError:
# Fall back to the standard version
print("Enhanced app not available, using standard version")
from dpg_ui.app import OneTrainerApp
app = OneTrainerApp()
app.run()
except Exception as e:
traceback.print_exc()
print(f"Error starting OneTrainer DPG UI: {e}")
input("Press Enter to exit...")