diff --git a/client/ayon_applications/hooks/prelaunch_shell_windows.py b/client/ayon_applications/hooks/prelaunch_shell_windows.py index 420b0fe275..23d75ce580 100644 --- a/client/ayon_applications/hooks/prelaunch_shell_windows.py +++ b/client/ayon_applications/hooks/prelaunch_shell_windows.py @@ -2,12 +2,12 @@ from ayon_applications import PreLaunchHook, LaunchTypes -class LaunchShellWindowsCreationflags(PreLaunchHook): - """Avoid running the shell without new console""" +class LaunchTerminalWindowsCreationflags(PreLaunchHook): + """Avoid running the terminal without new console""" # Should be as last hook because must change launch arguments to string order = 1000 - app_groups = {"shell"} + app_groups = {"terminal"} platforms = {"windows"} launch_types = {LaunchTypes.local} diff --git a/client/ayon_applications/icons/shell.png b/client/ayon_applications/icons/terminal.png similarity index 100% rename from client/ayon_applications/icons/shell.png rename to client/ayon_applications/icons/terminal.png diff --git a/client/ayon_applications/plugins/launcher_actions/debug_shell.py b/client/ayon_applications/plugins/launcher_actions/debug_terminal.py similarity index 79% rename from client/ayon_applications/plugins/launcher_actions/debug_shell.py rename to client/ayon_applications/plugins/launcher_actions/debug_terminal.py index 1ab408c0f3..9a6cc78d89 100644 --- a/client/ayon_applications/plugins/launcher_actions/debug_shell.py +++ b/client/ayon_applications/plugins/launcher_actions/debug_terminal.py @@ -32,10 +32,10 @@ def get_application_qt_icon(application: Application) -> Optional[QtGui.QIcon]: return QtGui.QIcon() -class DebugShell(LauncherAction): - """Run any host environment in command line.""" - name = "debugshell" - label = "Shell" +class DebugTerminal(LauncherAction): + """Run any host environment in command line terminal.""" + name = "debugterminal" + label = "Terminal" icon = "terminal" color = "#e8770e" order = 10 @@ -49,22 +49,24 @@ def process(self, selection, **kwargs): pos = QtGui.QCursor.pos() application_manager = ApplicationManager() - # Choose shell - shell_applications = self.get_shell_applications(application_manager) - if len(shell_applications) == 0: + # Choose terminal + terminal_applications = self.get_terminal_applications( + application_manager) + if len(terminal_applications) == 0: raise ValueError( - "Missing application variants for shell application. Please " - "configure 'ayon+settings://applications/applications/shell'" + "Missing application variants for terminal application. " + "Please configure " + "'ayon+settings://applications/applications/terminal'" ) - elif len(shell_applications) == 1: + elif len(terminal_applications) == 1: # If only one configured shell application, always use that one - shell_app = shell_applications[0] - print("Only one shell application variant is configured. " - f"Defaulting to {shell_app.full_label}") + terminal_app = terminal_applications[0] + print("Only one terminal application variant is configured. " + f"Defaulting to {terminal_app.full_label}") else: - shell_app = self.choose_app(shell_applications, pos, - show_variant_name_only=True) - if not shell_app: + terminal_app = self.choose_app( + terminal_applications, pos, show_variant_name_only=True) + if not terminal_app: return # Get applications @@ -93,10 +95,10 @@ def process(self, selection, **kwargs): if cwd: print(f"Setting Work Directory: {cwd}") - print(f"Launching shell in environment of {app.full_label}..") - self.launch_app_as_shell( + print(f"Launching terminal in environment of {app.full_label}..") + self.launch_terminal_with_app_context( application_manager, - shell_app, + terminal_app, project_name=selection.project_name, folder_path=selection.folder_path, task_name=selection.task_name, @@ -146,13 +148,14 @@ def get_project_applications(application_manager: ApplicationManager, return applications @staticmethod - def get_shell_applications(application_manager) -> list[Application]: - """Return all configured shell applications""" - # TODO: Maybe filter out shell applications not configured for your + def get_terminal_applications(application_manager) -> list[Application]: + """Return all configured terminal applications""" + # TODO: Maybe filter out terminal applications not configured for your # current platform - return list(application_manager.app_groups["shell"].variants.values()) + return list( + application_manager.app_groups["terminal"].variants.values()) - def launch_app_as_shell( + def launch_terminal_with_app_context( self, application_manager: ApplicationManager, application: Application, diff --git a/server/applications.json b/server/applications.json index 9042dc5701..d542a124a2 100644 --- a/server/applications.json +++ b/server/applications.json @@ -1278,17 +1278,16 @@ } ] }, - "shell": { + "terminal": { "enabled": true, - "label": "Shell", - "icon": "{}/app_icons/shell.png", + "label": "Terminal", + "icon": "{}/app_icons/terminal.png", "host_name": "", "environment": "{}", "variants": [ { "name": "main", "label": "Main", - "use_python_2": false, "executables": { "windows": ["cmd.exe"], "darwin": ["Terminal.app"], diff --git a/server/constants.py b/server/constants.py index 4196e07887..24e3af9c2b 100644 --- a/server/constants.py +++ b/server/constants.py @@ -19,6 +19,7 @@ "photoshop": "Photoshop", "resolve": "Resolve", "substancepainter": "Substance Painter", + "terminal": "Terminal", "tvpaint": "TVPaint", "unreal": "Unreal Editor", "wrap": "Wrap", diff --git a/server/settings.py b/server/settings.py index 5bd6d8a768..a34f1f36c1 100644 --- a/server/settings.py +++ b/server/settings.py @@ -42,6 +42,7 @@ "zbrush", "equalizer", "motionbuilder", + "terminal" } @@ -319,7 +320,7 @@ class ApplicationsSettings(BaseSettingsModel): default_factory=AppGroup, title="3DEqualizer") motionbuilder: AppGroup = SettingsField( default_factory=AppGroup, title="Motion Builder") - shell: AppGroup = SettingsField( + terminal: AppGroup = SettingsField( default_factory=AppGroup, title="Terminal", description="Terminal shell application")