Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy non-python launch script in each integration #235

Merged
merged 17 commits into from Mar 26, 2024

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Mar 25, 2024

Changelog Description

Preparation for split of Photoshop, AfterEffects and Harmony integrations into their addon repositories which requires to not use global script and prelaunch hook.

Additional info

Each integration has own launch script and prelaunch hook which cares about the same logic, and removed the global script and prelaunch hook. Removed get_non_python_host_kwargs function from applications logic. Implemented new helper function is_using_ui_executable to determine if UI executable is used on windows.

Renamed constants in each of the host to have _ADDON_ROOT suffix instead of _HOST_DIR to match where they point (will point).

Testing notes:

  • Photoshop should start ok, when running from code, using ayon_console.exe or ayon.exe.
  • AfterEffects should start ok, when running from code, using ayon_console.exe or ayon.exe.
  • Harmonyshould start ok, when running from code, using ayon_console.exe or ayon.exe. (if we have a way how to test?)

executable_path = os.environ["AYON_EXECUTABLE"]
executable_filename = os.path.basename(executable_path)
if "python" in executable_filename.lower():
return False
return True


def is_using_ui_executable():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def is_using_ui_executable():
def is_using_windows_ui_executable():

Should we make it clear that this is windows-specific from the function name as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're mind reader. We were just discussing it, and came to conclusion that is_using_ayon_console might be the best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I realized I also have to switch the logic...

Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small fix, but then it works.

Btw could we change that it would behave when started from code same way as with ayon_console, eg. separate console with logs.
Now it from code it behaves as with ayon.exe, eg no separate window.

Or is it for separate PR?

@kalisp
Copy link
Member

kalisp commented Mar 26, 2024

And actually this https://community.ynput.io/t/dcc-communication-over-websocket-code-duplication/1328 is somehow connected to this PR. Could you please comment here (or there) reasoning/future plans?

@kalisp kalisp assigned iLLiCiTiT and unassigned kalisp Mar 26, 2024
# Conflicts:
#	client/ayon_core/lib/applications.py
@iLLiCiTiT iLLiCiTiT merged commit 942dddd into develop Mar 26, 2024
1 check failed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/non-python-host-launch-script branch March 26, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants