mirror of
https://github.com/Omni-guides/Jackify.git
synced 2026-06-17 14:17:44 +02:00
Release v0.6.0
This commit is contained in:
@@ -11,12 +11,21 @@ import signal
|
||||
import logging
|
||||
|
||||
from .main import JackifyCLI
|
||||
from jackify.shared.logging import LoggingHandler
|
||||
from jackify import __version__ as jackify_version
|
||||
|
||||
# Set up logging
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
)
|
||||
def _setup_cli_logging() -> logging.Logger:
|
||||
debug_mode = '--debug' in sys.argv or '-d' in sys.argv
|
||||
if not debug_mode:
|
||||
try:
|
||||
from jackify.backend.handlers.config_handler import ConfigHandler
|
||||
debug_mode = ConfigHandler().get('debug_mode', False)
|
||||
except Exception:
|
||||
pass
|
||||
return LoggingHandler().setup_application_logging(debug_mode)
|
||||
|
||||
root_logger = _setup_cli_logging()
|
||||
root_logger.info("Jackify %s starting (CLI)", jackify_version)
|
||||
|
||||
def terminate_children(signum, frame):
|
||||
"""Signal handler to terminate child processes on exit"""
|
||||
|
||||
@@ -209,7 +209,6 @@ class InstallModlistCommand:
|
||||
'modlist_value': getattr(args, 'modlist_value', None),
|
||||
'skip_confirmation': True,
|
||||
'resolution': getattr(args, 'resolution', None),
|
||||
'skip_disk_check': getattr(args, 'skip_disk_check', False),
|
||||
}
|
||||
|
||||
def _validate_install_context(self, context: dict) -> bool:
|
||||
@@ -317,16 +316,21 @@ class InstallModlistCommand:
|
||||
|
||||
# Check if game is supported
|
||||
if game_type and not modlist_cli.check_game_support(game_type):
|
||||
# Show unsupported game warning
|
||||
supported_games = modlist_cli.wabbajack_parser.get_supported_games_display_names()
|
||||
supported_games_str = ", ".join(supported_games)
|
||||
|
||||
print(f"\n{COLOR_WARNING}Game Support Notice{COLOR_RESET}")
|
||||
print(f"{COLOR_WARNING}While any modlist can be downloaded with Jackify, the post-install configuration can only be automatically applied to: {supported_games_str}.{COLOR_RESET}")
|
||||
print(f"{COLOR_WARNING}We are working to add more automated support in future releases!{COLOR_RESET}")
|
||||
|
||||
# Ask for confirmation to continue
|
||||
response = input(f"{COLOR_PROMPT}Click Enter to continue with the modlist installation, or type 'cancel' to abort: {COLOR_RESET}").strip().lower()
|
||||
response = input(f"{COLOR_PROMPT}Press Enter to continue, or type 'cancel' to abort: {COLOR_RESET}").strip().lower()
|
||||
if response == 'cancel':
|
||||
print("[INFO] Modlist installation cancelled by user.")
|
||||
return 1
|
||||
elif game_type in ('skyrimvr', 'fallout4vr'):
|
||||
game_label = "Skyrim VR" if game_type == 'skyrimvr' else "Fallout 4 VR"
|
||||
print(f"\n{COLOR_WARNING}VR Platform Notice{COLOR_RESET}")
|
||||
print(f"{COLOR_WARNING}{game_label} modlist detected. Jackify will handle the install and prefix setup, but running VR modlists on Linux requires a working VR platform (SteamVR, ALVR, WiVRn, etc.) configured independently.{COLOR_RESET}")
|
||||
print(f"{COLOR_WARNING}VR support is best effort. Full functionality depends on your VR setup.{COLOR_RESET}")
|
||||
response = input(f"{COLOR_PROMPT}Press Enter to continue, or type 'cancel' to abort: {COLOR_RESET}").strip().lower()
|
||||
if response == 'cancel':
|
||||
print("[INFO] Modlist installation cancelled by user.")
|
||||
return 1
|
||||
|
||||
@@ -411,8 +411,6 @@ class JackifyCLI:
|
||||
parser.add_argument('--restart-steam', action='store_true', help='Restart Steam (native, for GUI integration)')
|
||||
parser.add_argument('--dev', action='store_true', help='Enable development features (show hidden menu items)')
|
||||
parser.add_argument('--update', action='store_true', help='Check for and install updates')
|
||||
parser.add_argument('--skip-disk-check', action='store_true', help='Skip the pre-flight disk space check (use when retrying after a disk-full warning)')
|
||||
|
||||
# Add command-specific arguments
|
||||
self.commands['install_modlist'].add_top_level_args(parser)
|
||||
|
||||
|
||||
@@ -39,8 +39,10 @@ class AdditionalMenuHandler:
|
||||
print(f" {COLOR_ACTION}→ Downloads and configures the Wabbajack app itself (via Proton){COLOR_RESET}")
|
||||
print(f"{COLOR_SELECTION}4.{COLOR_RESET} Setup Mod Organizer 2")
|
||||
print(f" {COLOR_ACTION}→ Download and configure a standalone MO2 instance{COLOR_RESET}")
|
||||
print(f"{COLOR_SELECTION}5.{COLOR_RESET} Configure Tool Compatibility")
|
||||
print(f" {COLOR_ACTION}→ Apply Wine registry settings for xEdit, Synthesis, Pandora, Nemesis{COLOR_RESET}")
|
||||
print(f"{COLOR_SELECTION}0.{COLOR_RESET} Return to Main Menu")
|
||||
selection = input(f"\n{COLOR_PROMPT}Enter your selection (0-4): {COLOR_RESET}").strip()
|
||||
selection = input(f"\n{COLOR_PROMPT}Enter your selection (0-5): {COLOR_RESET}").strip()
|
||||
|
||||
if selection.lower() == 'q': # Allow 'q' to re-display menu
|
||||
continue
|
||||
@@ -52,6 +54,8 @@ class AdditionalMenuHandler:
|
||||
self._execute_install_wabbajack(cli_instance)
|
||||
elif selection == "4":
|
||||
self._execute_setup_mo2(cli_instance)
|
||||
elif selection == "5":
|
||||
self._execute_configure_tool_compat(cli_instance)
|
||||
elif selection == "0":
|
||||
break
|
||||
else:
|
||||
@@ -150,7 +154,7 @@ class AdditionalMenuHandler:
|
||||
else:
|
||||
output_path = Path(output_path).expanduser()
|
||||
|
||||
# Check if output directory already has content — mirror GUI behaviour
|
||||
# Check if output directory already has content - mirror GUI behaviour
|
||||
if output_path.exists() and output_path.is_dir():
|
||||
try:
|
||||
has_files = any(output_path.iterdir())
|
||||
@@ -405,3 +409,68 @@ class AdditionalMenuHandler:
|
||||
if self.logger:
|
||||
self.logger.debug("AdditionalMenuHandler: Executing Setup MO2 command")
|
||||
command.run()
|
||||
|
||||
def _execute_configure_tool_compat(self, cli_instance):
|
||||
"""Apply tool compatibility settings to an existing configured modlist prefix."""
|
||||
from jackify.backend.handlers.modlist_handler import ModlistHandler
|
||||
from jackify.backend.services.tool_config_service import apply_tool_config_for_appid
|
||||
from jackify.shared.colors import COLOR_ERROR, COLOR_SUCCESS
|
||||
|
||||
self._clear_screen()
|
||||
print_jackify_banner()
|
||||
print_section_header("Configure Tool Compatibility")
|
||||
print(f"{COLOR_INFO}Discovering configured modlists...{COLOR_RESET}")
|
||||
|
||||
try:
|
||||
handler = ModlistHandler()
|
||||
discovered = handler.discover_executable_shortcuts("ModOrganizer.exe")
|
||||
shortcuts = [
|
||||
{"name": m.get("name", "Unknown"), "appid": str(m.get("appid", ""))}
|
||||
for m in discovered
|
||||
if m.get("appid")
|
||||
]
|
||||
except Exception as e:
|
||||
print(f"{COLOR_ERROR}Failed to discover modlists: {e}{COLOR_RESET}")
|
||||
input("Press Enter to return to menu...")
|
||||
return
|
||||
|
||||
if not shortcuts:
|
||||
print(f"{COLOR_WARNING}No configured modlists found.{COLOR_RESET}")
|
||||
print(f"{COLOR_INFO}Install and configure a modlist first.{COLOR_RESET}")
|
||||
input("Press Enter to return to menu...")
|
||||
return
|
||||
|
||||
print()
|
||||
for i, s in enumerate(shortcuts, 1):
|
||||
print(f"{COLOR_SELECTION}{i}.{COLOR_RESET} {s['name']}")
|
||||
print(f"{COLOR_SELECTION}0.{COLOR_RESET} Cancel")
|
||||
|
||||
selection = input(f"\n{COLOR_PROMPT}Select modlist (0-{len(shortcuts)}): {COLOR_RESET}").strip()
|
||||
|
||||
if selection == "0" or not selection:
|
||||
return
|
||||
|
||||
try:
|
||||
idx = int(selection) - 1
|
||||
if idx < 0 or idx >= len(shortcuts):
|
||||
raise ValueError()
|
||||
except ValueError:
|
||||
print(f"{COLOR_ERROR}Invalid selection.{COLOR_RESET}")
|
||||
input("Press Enter to return to menu...")
|
||||
return
|
||||
|
||||
chosen = shortcuts[idx]
|
||||
print(f"\n{COLOR_INFO}Applying tool compatibility settings for: {chosen['name']}{COLOR_RESET}")
|
||||
print(f"{COLOR_INFO}This may take a few minutes...{COLOR_RESET}\n")
|
||||
|
||||
def _log(msg: str):
|
||||
print(f"{COLOR_INFO}{msg}{COLOR_RESET}")
|
||||
|
||||
ok = apply_tool_config_for_appid(chosen["appid"], log=_log)
|
||||
|
||||
if ok:
|
||||
print(f"\n{COLOR_SUCCESS}Tool compatibility configured successfully.{COLOR_RESET}")
|
||||
else:
|
||||
print(f"\n{COLOR_ERROR}Tool compatibility configuration failed. Check logs for details.{COLOR_RESET}")
|
||||
|
||||
input("\nPress Enter to return to menu...")
|
||||
|
||||
Reference in New Issue
Block a user