Closed n8marti closed 6 months ago
See https://github.com/snapcrafters/sommelier-core/pull/21 it was changed due to installers requiring certain verbs in wineprefix to function.
Ah, I missed that. I don't quite understand the reason, though. This is what I'm understanding (in my own words): Certain winetricks verbs need to have already been installed so that some Windows app installers can run correctly. But I must be misunderstanding something, because regardless of whether the pre-install hook is before or after the winetricks verbs installations, the Windows app installer runs after both of those have completed. Is it that some people are doing things in the pre-install hook that require winetricks verbs to have already been installed?
I use multi installers in pre-install
with user selection dialog in yad which requires winetricks verb early in wineprefix to fix installer requirement.
So without installing tricks early will break tricks
snapcraft envar defined verbs in snap snapcraft.yaml
.
See pre-install
@n8marti
We could add an additional hook "pre-winetricks". However, I want to have a better understanding of what you would use this hook for. Can you give more explanation for why this is needed?
I live in a place with very poor internet, so while testing wine-based snap builds I'd like to be able to copy the "standard" winetricks folder at $HOME/.cache/winetricks into the snap's own winetricks cache before the winetricks verbs are installed. I've worked around it for now by adding this to sommelier-core's override-prime step:
# Copy cached winetricks in $SNAP_REAL_HOME before installing winetricks.
sed -r -i 's@(^install_app\(\).*)@\1\n cp -r "${SNAP_REAL_HOME}/.cache/winetricks" "${SNAP_USER_COMMON}/.cache" || true@' bin/sommelier
@n8marti snaps don't have access to .
files/dir by default unless its classic/devmode/store permission granted
one.
Oh, yes, good point. I haven't gotten that far yet to get beyond devmode for this snap.
Le 11/05/2022 à 17:57, Taqi Raza a écrit :
@n8marti https://github.com/n8marti snaps don't have access to |.| files/dir by default unless its |classic/devmode/store permission granted| one.
— Reply to this email directly, view it on GitHub https://github.com/snapcrafters/sommelier-core/issues/34#issuecomment-1124017858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSOCVJAQQTCS7CLVGSXVATVJPRF5ANCNFSM5VNPSK4A. You are receiving this because you were mentioned.Message ID: @.***>
What changes would you like?
I would like to use the pre-install hook to optionally copy previously-downloaded winetricks installers from $SNAP_REAL_HOME/.cache/winetricks into the snap's winetricks cache. However, the pre-install hook runs immediately after the winetricks installs: https://github.com/snapcrafters/sommelier-core/blob/master/scripts/sommelier#L111-L128
Can this hook be moved to run at the very beginning of the install_app function, just after
echo "Installing application.."
, or maybe just after saving the original wine desktop links? (I'm not sure if certain winetricks additions could create additional links.)Any extra information?
No response