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

Cannot Detect If On Devel Branch #32

Closed
thw26 opened this issue Jan 2, 2024 · 4 comments · Fixed by #38
Closed

Cannot Detect If On Devel Branch #32

thw26 opened this issue Jan 2, 2024 · 4 comments · Fixed by #38
Assignees
Labels
bug Something isn't working
Milestone

Comments

@thw26
Copy link
Collaborator

thw26 commented Jan 2, 2024

@n8marti and I discussed this issue and we do not see a good solution. Beginning with 8.16+ (IIRC) we no longer need to use staging but can use devel. Unfortunately, our method for detecting the branch used can distinguish between staging and stable but not between devel and stable, or put another way, our current check can determine if we are using staging or if stable/devel.

What this means is that the script errors on a valid wine devel version, not presenting it as an option for install. Meaning we are effectively back to using staging.

At present, the only option would be to detect the branch based on an operating system specific check, which we have available with the get_os() implemented in the rewrite, but this feels like overkill.

@thw26 thw26 added the bug Something isn't working label Jan 2, 2024
@thw26 thw26 added the alpha label Jan 3, 2024
@thw26 thw26 added this to the Beta milestone Jan 3, 2024
@n8marti
Copy link
Collaborator

n8marti commented Jan 3, 2024

some breadcrumbs to follow:

  • winehq packages for ubuntu install wine to /opt/wine-{$branch}/
  • The current appimage for 8.19 does the same, which you can see if you:
    • mount the image with wine-${blahblahblah}.appimage --appimage-mount
    • note the mount path in the terminal output
    • open another terminal to this path and do ls ${mount_path}/opt/, and you will see either wine-staging, wine-devel, or wine-stable in that folder

AppImages also have a command to extract certain files. Maybe this could be used to sniff out the wine branch used without having to mount the AppImage. For example, I've found that it can be discovered inside mscoree.dll:

$ grep -aEo 'wine-[a-z]+' /opt/wine-stable/lib/wine/i386-windows/mscoree.dll 
wine-stable
# or, without knowing the full path ahead of time (less useful if you have multiple wine versions installed inside the search folder:
$ find /opt -name mscoree.dll -exec grep -aEo 'wine-[a-z]+' {} \; 
wine-stable
wine-stable
# for an AppImage this seems to work (if you don't trust the filename):
$ grep -aEo 'wine-[a-z]+' wine-devel_8.19-x86_64.AppImage
wine-devel

@thw26
Copy link
Collaborator Author

thw26 commented Jan 3, 2024

Searching a DLL might work, as that should be available on all systems if we search the right directory. We would need to pair the wine binary candidate with the dir containing its DLLs and then we should be able to search whatever we want. It might even be faster than waiting on a wine --version check since we don't need to wait for the heavy wine bin to load.

We might then be able to simplify the whole thing even, as then we could determine the binary's branch with a simple sed or awk.

@n8marti
Copy link
Collaborator

n8marti commented Jan 3, 2024 via email

@n8marti
Copy link
Collaborator

n8marti commented Jan 4, 2024

I've started working on this in issue32 branch. It detects but doesn't yet handle AppImages, though.

@thw26 thw26 removed their assignment Jan 5, 2024
@thw26 thw26 closed this as completed in #38 Jan 6, 2024
thw26 added a commit that referenced this issue Jan 6, 2024
@thw26 thw26 mentioned this issue Jan 6, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants