ayon-launcher
ayon-launcher copied to clipboard
Shim cannot be updated if shim is used as main executable
Current Behavior:
It is not really issue at this exact moment. If future version of ayon-launcher should update shim, it can fail because the shim is actually in use.
What might happen:
- Launch shim.
- Shim launches AYON launcher.
- AYON launcher finds out it has to update to newer version of AYON launcher.
- Downloads and installs AYON launcher.
- Starts new version of AYON launcher.
- New AYON launcher has newer version of shim.
- It tries to install it, but fails because shim from 1.) is still running.
Expected Behavior:
We might need to find a better way how to handle shim updates?
Only way I can think of is to install shim under versioned folders and the main executable would be writte n in c. So it is really minimalistic, can find latest shim to use and launch it -> shim for a shim?
/shim
/ayon - executable written in c (on macOs it would not live here but in `/Applications/AYON.app`)
/versions - folder where the current shim content is, under coresponding version folder
/1.0.0
/ayon - shim 1.0.0
/1.0.1
/ayon - shim 1.0.1
Alternative solution
We might find out if it's in use by "moving" existing shim folder. If it fails, then copy installer file to desktop/downloads and show/print message to close all AYON instances and install it manually.