Moon-0xff / gnome-mpris-label

A music related GNOME extension.
GNU General Public License v3.0
50 stars 9 forks source link

Apply gnome45 patch automatically #85

Closed Batwam closed 9 months ago

Batwam commented 9 months ago

This code checks for the gnome version and applies the patch automatically as long as patch is installed (unlikely but wasn't installed on the default gnome-nightly so I though I might as well include the check...). The code applies the changes to the copied files in the target folder rather than the base files so we don't get code changes in the git folder itself.

Let me know if that works on your end.

Moon-0xff commented 9 months ago

Patching was likely to fail for a lot of other reasons. I also used short-circuiting to save a couple of lines.

Batwam commented 9 months ago

Yeah, I agree, good to capture potential patch failures in the future as we change other parts of the code. I'll be on gnome45 soon enough so I will hopefully be able to capture patch issues when testing.

Batwam commented 9 months ago

One other thing is that the "Using git" method currently in ReadMe which copies the files directly in to the extensions folder will not work for Gnome 45 as the files won't be patched. We might need to remove it or mark it as "Gnome 43/44" only?

Moon-0xff commented 9 months ago

I wrote the patch instructions to work for both methods ("Using git" and "Using git and the installation script").

Though now the installation script (if all goes well) will patch the extension so we should rewrite that part of the README.

Moon-0xff commented 9 months ago

Merging this.