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

Allow more flexibility in executable path resolving #1091

Open
2 tasks done
Tilix4 opened this issue Jan 16, 2025 · 8 comments · May be fixed by #1095
Open
2 tasks done

Allow more flexibility in executable path resolving #1091

Tilix4 opened this issue Jan 16, 2025 · 8 comments · May be fixed by #1095
Assignees
Labels
type: enhancement Improvement of existing functionality or minor addition

Comments

@Tilix4
Copy link
Contributor

Tilix4 commented Jan 16, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?

As an admin, I'd like to be able to specify dynamic paths to find executables on users' machines. For examble, I'd like to be able to write something like ~/subpath/to/my/app or $HOME/subpath/to/my/app (this is unix system syntax, but env vars could be handy even for Windows systems).

How would you imagine the implementation of the feature?

Add this simple line to

:

executable = os.path.expandvars(os.path.expanduser(executable))

Are there any labels you wish to add?

  • I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

No response

Additional context:

No response

@Tilix4 Tilix4 added the type: enhancement Improvement of existing functionality or minor addition label Jan 16, 2025
@BigRoy
Copy link
Collaborator

BigRoy commented Jan 16, 2025

Makes sense. For what it's worth, PRs are welcome.

@m-u-r-p-h-y
Copy link
Member

It is already possible

Image

@iLLiCiTiT
Copy link
Member

It is possible to use environment variables, but it is not possible to use user's home directory (~/).

@alainxi
Copy link

alainxi commented Jan 16, 2025

In executable path, environment variables do not work if the env vars were declared in the "Variants" environment (which would be very useful, as it allows to have different env var depending on the DCC version : 4.0, 4.2, etc...)

Example :

Image

Image

@alainxi
Copy link

alainxi commented Jan 16, 2025

But the same env var declared in the "Variants" environment, is correctly expanded when it is used in the main Blender env var field (above/outside the Variants part).

So, this works all right :

Image

@iLLiCiTiT
Copy link
Member

In that case it is not issue for ayon-core but for ayon-applications addon.

@alainxi
Copy link

alainxi commented Jan 16, 2025

Thanks. I have declared an issue here :

ynput/ayon-applications#51

(I was slightly highjacking the original poster here, so it's better to have my own issue anyway)

@Tilix4
Copy link
Contributor Author

Tilix4 commented Jan 17, 2025

It is possible to use environment variables, but it is not possible to use user's home directory (~/).

I'm glad the env var works, thanks @m-u-r-p-h-y. But this syntax {ENV_VAR} seems to be an AYON syntax, it is not standard $ENV_VAR. Allowing this syntax would be handy.

Tilix4 added a commit to Tilix4/ayon-core that referenced this issue Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants