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

How to prevent wine update to do a full install every time and even override (design) settings? #2559

Closed
gc-user opened this issue Mar 4, 2024 · 19 comments
Labels
suggestion New feature or request

Comments

@gc-user
Copy link

gc-user commented Mar 4, 2024

Cool ideas?

Every time pi-app updates wine - or the script was just updated - wine is getting installed as if it was a new install with all winetricks installs. That not only takes a long time, it's also very annoying because after the the script is done reinstalling wine all over again, I have to manually revert all the changes that the script does to the default settings to have it look like I set it up after the last update.
How do I prevent that from happening in the first place?

Is the only way to install wine manually via apt-get with all the winetricks installs that the script does?

I went the pi-app install at one point because before that I just installed wine via apt-get but it stopped working after some wine update. But I didn't really install all those winetricks installs that the script installs, so that could have been the reason it didn't work so well / stopped working at one point.

@gc-user gc-user added the suggestion New feature or request label Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

Hello there 👋
Thanks for submitting your first issue to the Pi-Apps project! We'll try to get back to you as soon as possible.
In the meantime, we encourage you join our Discord server, where you can ask any questions you might have.

Please respond as soon as possible if a Pi-Apps maintainer requests more information from you. Stale issues will be closed after a lengthy period of time with no response.

@Botspot
Copy link
Owner

Botspot commented Mar 5, 2024

Here is the history of our changes to the Wine app. https://github.com/Botspot/pi-apps/commits/master/apps/Wine%20(x64)
Please look through them. They are not that frequent, and I think the changes we are making are important enough for the occasional inconvenience of waiting through a reinstall.

Is the only way to install wine manually via apt-get with all the winetricks installs that the script does?

The wine version you get from apt is fairly useless as it is an ARM build of wine which can only run ARM EXE files. And those are rare - nearly all useful Windows programs do not have an ARM build.

Every time pi-app updates wine - or the script was just updated - wine is getting installed as if it was a new install with all winetricks installs. That not only takes a long time, it's also very annoying because after the the script is done reinstalling wine all over again, I have to manually revert all the changes that the script does to the default settings to have it look like I set it up after the last update. How do I prevent that from happening in the first place?

Undoing these winetricks changes should not be necessary. If these winetricks commands are breaking things, we need to know so that can be fixed. Please explain in more detail what is happening

@gc-user
Copy link
Author

gc-user commented Mar 5, 2024

Thanks for the reply and the info about the ARM exe only via debian for rpi4, I didn't know that.

I wonder why a full reinstall is necessary in the first place instead of a simple update, esp. repeating winetricks installs.
That's the "waste of time part". On my normal linux machine just updating wine is fine, never had to re-install any winetricks stuff. Wine does reconfigure itself st first start after an update anyway. That's why I was wondering why it is necessary on rpi.

The annoying part are the registry changes in the install script.
Luckily I had a backup of reg files from the debian wine install so I could figure out the default values. But even now that I have them it's still quite time consuming to revert those changes after each update. One can argue about them changing / setting them like that in the first place, but changing them with every update is really annoying. Maybe it get's less so once I figured out to make a script to do this rather than manually replacing the values in the reg files...

@Botspot
Copy link
Owner

Botspot commented Mar 5, 2024

Interesting.
The delay caused by winetricks is understandable. It looks like there is a way to check which ones are installed and skip doing them again. I will implement this soon.

About the registry: some of these changes are functional and others are aesthetic.
Functional registry changes: disable wine's mime associations. We had issues when installing Notepad++ that it now became the default text editor for the whole system. That was not ideal due to lengthy launch times.
Aesthetic registry changes: enable font smoothing, increase font size, install a nicer win10 theme to replace the default windows 98 look.
Please look through the /usr/local/bin/generate-wine-prefix script to see the exact changes it makes.

I never imagined that somebody would not want these changes, but with more explanation from you I may be able to understand why and make changes.

@gc-user
Copy link
Author

gc-user commented Mar 5, 2024

Thanks for the reply and the considerations.

Well, I don't like the visual changes, I'm one of the "w2000 was the last good and best windows there was, including the look" guys... heck, win8/10 was the reason I went linux, why would I want wine to look like win10... :-) Even in (real) w7 I always disabled anything cleartype / font smoothing. I use dark mode, so that light/bright theme feels like eye cancer to my eyes. :-)
I just like the default visual settings. Everybody can set the visual up via winecfg, but with the theme that is installed through the script, reverting back to the default grayish theme is not possible (at least I couldn't figure it out). One is stuck with the blinding bright theme. That's my issue.
But no matter where one stands on that particular issue, design should always be optional and left to the user. And they surely should not be changed during an update. That's my main issue. At first install? Ok, whatever. But with every update? Why?
Maybe the issue is that the script is static and doesn't check if it's first install or update. But this might be quite a big task to tackle, I don't know.

To emphasize: I don't want the script to be changed to what I want. I'd just like it if the script would it not make so hard to set up and keep a different configuration. But as I said before: Once I have some time to figure out how to create a script to revert the registry changes, it's probably one click and done and I most likely stop being annoyed. :-)

@Botspot
Copy link
Owner

Botspot commented Mar 5, 2024

No, that is perfectly valid. I saw fit to try to change the default, but with that I never wanted to take away your ability to change it how you like, and to have it stay that way.

I will change the generate-wine-prefix command to only make registry changes if the registry does not already exist. So on wineprefixes that already have a system.reg file, it will not touch them.

@gc-user
Copy link
Author

gc-user commented Mar 5, 2024

Thanks for your understanding and efforts!
I think the changes in question are in user.reg, but leaving all 3 .reg files untouched during the update from the install script side (winecfg does its thing anyway during updates) would probably a good idea.

Anyway, that would be a greatly appreciated change!

@Botspot
Copy link
Owner

Botspot commented Mar 5, 2024

pi@raspberrypi:~ $ grep '"LogPixels"=dword:00000078' ~/.wine -r
/home/pi/.wine/user.reg:"LogPixels"=dword:00000078
/home/pi/.wine/user.reg:"LogPixels"=dword:00000078
/home/pi/.wine/system.reg:"LogPixels"=dword:00000078

It seems to be putting the changes in both places.

@gc-user
Copy link
Author

gc-user commented Mar 5, 2024

Ah, ok. I was going from memory and maybe I even missed that in my initial deep dive. Maybe I even used it without knowing because system trumps user - and liked it... :-)

@Botspot Botspot closed this as completed in 2c32783 Mar 5, 2024
@Botspot
Copy link
Owner

Botspot commented Mar 5, 2024

I have made the changes. Now ironically, this causes wine to be reinstalled for everybody again, but that is just how the pi-apps script format works.

Go check the changes I made here: 2c32783

  • It will avoid changing the registry if one already exists
  • It will not try to run winetricks if the package in question is already installed
  • It significantly reduces output during extraction and hides the harmless memory errors
  • It will not run sudo apt update twice, just once.

@Botspot
Copy link
Owner

Botspot commented Mar 5, 2024

Thank you for taking the time to talk to us. Only once we know there is a problem can anything be solved.

Me personally, I appreciate the defaults we have set in the registry and the packages installed with winetricks. But of course that is true, because I was the one who wrote the script.
And my internet connection is fast so I don't mind the reinstalls.

I did not consider much possible ways to speed up reinstalls, and I never imagined that someone may not actually want the font size changes with smoothing. But your reasons make sense, and it was easy enough to make it more accommodating after first install.

Feel free to reply here if you have more to say about Wine, otherwise feel free to open a new issue in the future if you spot another area in pi-apps that could be improved.

@theofficialgman
Copy link
Collaborator

theofficialgman commented Mar 5, 2024

wine is getting installed as if it was a new install with all winetricks installs. That not only takes a long time

just an fyi, winetricks does have a fast path and skip re-installing if a package is already detected as installed. however, the wine process has to startup from scratch and check if that package is installed each time which takes a bit. On ARM64 with Wine (x64) from pi-apps this takes about 5 seconds per winetrick install (for me). But for some reason on ARMhf with Wine (x86) from pi-apps this takes 30-60 seconds per install. I was never able to figure out why that is the case. It seems to have been triggered by a Wine update sometime between 5.X and 8.X. It takes quite a bit of time to build each wine version so I never bisected to try and see what change caused that regression.

@gc-user
Copy link
Author

gc-user commented Mar 6, 2024

I have made the changes. Now ironically, this causes wine to be reinstalled for everybody again, but that is just how the pi-apps script format works.

Go check the changes I made here: 2c32783

  • It will avoid changing the registry if one already exists
  • It will not try to run winetricks if the package in question is already installed
  • It significantly reduces output during extraction and hides the harmless memory errors
  • It will not run sudo apt update twice, just once.

Wow! Thank you very much!

When I submitted this question (for which I chose the suggestion option because it's not really a bug, but I couldn't find "question" as an option, so i didn't intended it to be a suggestion), I didn't expect such a quick and understanding reply, and even less a essentially immediate fix for such an complex task (from the viewpoint of someone who doesn't know how to write code other than modify existing code using logic and try & error method).

Having just powered on the rpi4 and let it do it's thing I can report and confirm that the re-install now didn't change my design settings and didn't take long enough to have re-installed all winetricks (the update ran automatically in the background, so I didn't have any cli to monitor what was happening), so I assume, that all works as intended.

So, thank you very much for this great experience of an interaction with you, the pi-apps wizard!

And thank you for the very very helpful pi-apps in the first place. They surely make apps work when they don't when installed via apt!

@Botspot
Copy link
Owner

Botspot commented Mar 6, 2024

Having just powered on the rpi4 and let it do it's thing I can report and confirm that the re-install now didn't change my design settings and didn't take long enough to have re-installed all winetricks (the update ran automatically in the background, so I didn't have any cli to monitor what was happening), so I assume, that all works as intended.

You can check the output from installing or uninstalling any app by going to Pi-Apps Settings and launching the Log File viewer.

And thank you for the very very helpful pi-apps in the first place. They surely make apps work when they don't when installed via apt!

Yeah, apt can be a bit of a minefield at times. And so can google searches if you don't check when instructions were posted and already are familiar enough with linux to spot when a tutorial it too outdated to be used anymore. Pi-apps tries to be the successor to tutorials, though ironically to spread the word we have hundreds of tutorials. 🤣 https://pi-apps.io/tags/[install-app](https://pi-apps.io/tags/install-app/)/

Try to keep your eyes out for anyone out there who may not know about pi-apps. It's still a small project and in the larger space, not everybody knows about it yet. It is one thing for a project creator to advertise, but it is far more effective for hundreds of happy users to say "this worked for me, go try it too."

@gc-user
Copy link
Author

gc-user commented Mar 6, 2024

Isn't pi-apps part of piOS or something? Otherwise I wouldn't know how it landed on my pi and I ever was made aware of it... :-)

@Botspot
Copy link
Owner

Botspot commented Mar 6, 2024

Isn't pi-apps part of piOS or something? Otherwise I wouldn't know how it landed on my pi and I ever was made aware of it... :-)

Nope. PiOS has never included Pi-Apps by default, though plenty of people think that it ought to be.
We know of some people who customize the OS on preimaged SD cards to add additional software and sometimes Pi-Apps, and some open-source forks of PiOS include Pi-Apps. I would be curious to know how it got installed for you though.
Where did you buy your pi from?

@gc-user
Copy link
Author

gc-user commented Mar 6, 2024

Well, that's the thing, I never used the included sdcard. I installed TwisterOS on a different sdcard. Maybe they included it by default. Or I did in fact somewhere learned about pi-apps and installed it myself. It's been a few years...:-)

@Botspot
Copy link
Owner

Botspot commented Mar 6, 2024

Yes, twister os included pi-apps. That explains it.

@gc-user
Copy link
Author

gc-user commented Mar 6, 2024

Ah, ok, then it's settled... :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants