Files
Jackify/testing/debug_install_dir.py
Omni cd591c14e3 Initial public release v0.1.0 - Linux Wabbajack Modlist Application
Jackify provides native Linux support for Wabbajack modlist installation
   and management with automated Steam integration and Proton configuration.

   Key Features:
   - Almost Native Linux implementation (texconv.exe run via proton)
   - Automated Steam shortcut creation and Proton prefix management
   - Both CLI and GUI interfaces, with Steam Deck optimization

   Supported Games:
   - Skyrim Special Edition
   - Fallout 4
   - Fallout New Vegas
   - Oblivion, Starfield, Enderal, and diverse other games

   Technical Architecture:
   - Clean separation between frontend and backend services
   - Powered by jackify-engine 0.3.x for Wabbajack-matching modlist installation
2025-09-05 20:46:24 +01:00

100 lines
3.9 KiB
Python

#!/usr/bin/env python3
import sys
import os
from pathlib import Path
# Add the src directory to the path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
def simulate_install_dir_processing():
"""Simulate the exact path processing that happens in the Install a Modlist workflow."""
# Simulate the context that would be passed to the engine
context = {
'install_dir': Path("/home/deck/Games/Fallout/WOD"),
'download_dir': Path("/home/deck/Games/Fallout/Downloads")
}
print("=== Simulating Install a Modlist workflow path processing ===")
print(f"Original context['install_dir']: {context['install_dir']}")
print(f"Original context['install_dir'] type: {type(context['install_dir'])}")
# Simulate the path processing from modlist_operations.py lines 615-625
install_dir_context = context['install_dir']
print(f"install_dir_context: {install_dir_context}")
print(f"install_dir_context type: {type(install_dir_context)}")
if isinstance(install_dir_context, tuple):
actual_install_path = Path(install_dir_context[0])
if install_dir_context[1]: # Second element is True if creation was intended
print(f"Creating install directory as it was marked for creation: {actual_install_path}")
actual_install_path.mkdir(parents=True, exist_ok=True)
else: # Should be a Path object or string already
actual_install_path = Path(install_dir_context)
print(f"actual_install_path: {actual_install_path}")
print(f"actual_install_path type: {type(actual_install_path)}")
install_dir_str = str(actual_install_path)
print(f"install_dir_str: {install_dir_str}")
print(f"install_dir_str type: {type(install_dir_str)}")
# Now simulate what gets passed to the configuration context
config_context = {
'name': 'WOD',
'appid': '12345',
'path': install_dir_str, # This is the key line!
'mo2_exe_path': '/path/to/mo2.exe',
'resolution': '1920x1080',
'skip_confirmation': True,
'manual_steps_completed': False
}
print(f"\nconfig_context['path']: {config_context['path']}")
print(f"config_context['path'] type: {type(config_context['path'])}")
# Check if there's any corruption
if 'D' in config_context['path'] and '/WOD/D/' in config_context['path']:
print("🚨 FOUND THE BUG! The path contains the extra 'D' segment!")
print(f"Expected: /home/deck/Games/Fallout/WOD")
print(f"Actual: {config_context['path']}")
else:
print("✅ Path looks correct - no extra 'D' segment found")
# Now simulate the Configure New Modlist workflow for comparison
print("\n=== Simulating Configure New Modlist workflow ===")
gui_context = {
'modlist_name': 'WOD',
'install_dir': '/home/deck/Games/Fallout/WOD', # Direct from GUI
'mo2_exe_path': '/path/to/mo2.exe',
'resolution': '1920x1080'
}
gui_config_context = {
'name': gui_context.get('modlist_name', ''),
'path': gui_context.get('install_dir', ''), # Direct from context
'mo2_exe_path': gui_context.get('mo2_exe_path', ''),
'modlist_value': gui_context.get('modlist_value'),
'modlist_source': gui_context.get('modlist_source'),
'resolution': gui_context.get('resolution'),
'skip_confirmation': True,
'manual_steps_completed': False
}
print(f"gui_config_context['path']: {gui_config_context['path']}")
print(f"gui_config_context['path'] type: {type(gui_config_context['path'])}")
# Compare the two paths
print(f"\n=== Comparison ===")
print(f"Install a Modlist path: {config_context['path']}")
print(f"Configure New Modlist path: {gui_config_context['path']}")
print(f"Paths are {'DIFFERENT' if config_context['path'] != gui_config_context['path'] else 'IDENTICAL'}")
if __name__ == "__main__":
simulate_install_dir_processing()