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

Add libunity #55

Merged
merged 4 commits into from
Feb 6, 2024
Merged

Add libunity #55

merged 4 commits into from
Feb 6, 2024

Conversation

JakobDev
Copy link
Contributor

libunity is complete outdated, so it's a nightmare to build. It is needed by Electron for setProgressBar and setBadgeCount. You can use this example code to test it out.

The app need the --socket=session-bus permission for some reason. You actually just need to emit a DBus signal, which should work without any permission.

A big problem is, that this API uses the desktop file name. You need to set desktopName field in the package.json to the correct name, otherwise it uses the name if the App, which is not the Flatpak ID. So this will cause problems when repacking existing binaries. I ping @refi64. Maybe he has a Idea what to do about that.

Packagers should also set the StartupWMClass field in the desktop entry, otherwise the desktop file can't be connected to the App.

Another problem is, that Electron checks for some reason the current desktop. This is supported by more Desktops e.g. Mate as the ones Electron checks, so packages should overwrite the XDG_CURRENT_DESKTOP environment variable to make it work on every desktop.

This PR is heavily based on this PR here and the AUR packages of the used software.

For reference:
flathub/com.discordapp.Discord#228
Heroic-Games-Launcher/HeroicGamesLauncher#3478

@flathubbot
Copy link
Contributor

Started test build 96902

@flathubbot
Copy link
Contributor

Build 96902 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/79664/org.electronjs.Electron2.BaseApp.flatpakref

@Erick555
Copy link
Contributor

The app need the --socket=session-bus permission for some reason.

Does it make sense then when flathub won't allow that?

@JakobDev
Copy link
Contributor Author

Does it make sense then when flathub won't allow that?

You need to access a exception, if you want to use this Feature.

@Erick555
Copy link
Contributor

I don't think you'll be allowed for --socket=session-bus exception on flathub therefore this may be unusable.

@bbhtt
Copy link
Contributor

bbhtt commented Jan 31, 2024

Seems fine as long as it continues to build with newer runtimes and works with apps. If it fails to build at some point it has to be removed for obvious reasons.

But socket=session-bus just for notification badges makes no sense and won't be allowed on apps.

This does not make it completely useless just changes the default. (Or the specific permission needed should be investigated)

@JakobDev
Copy link
Contributor Author

Turns out I'm dumb. While trying the Permissions out I occidentally used the System Bus instead of the Session Bus in Flatseal, so I couldn't get it to world. Looks like you just need --talk=com.canonical.Unity. Sorry for that.

Seems fine as long as it continues to build with newer runtimes and works with apps.

I would be far better, if Electron would just use the DBus Interface directly instead of relying n an outdated lib, but as building Electron also requires building Chromium, I'm not the one going to make the PR.

@flathubbot
Copy link
Contributor

Started test build 98133

@flathubbot
Copy link
Contributor

Build 98133 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/80911/org.electronjs.Electron2.BaseApp.flatpakref

@JakobDev
Copy link
Contributor Author

JakobDev commented Feb 6, 2024

@TingPing Can you merge this?

libunity.yml Show resolved Hide resolved
@TingPing
Copy link
Member

TingPing commented Feb 6, 2024

I'll merge this but you do understand it will break every single runtime update. You're responsible for it now. It will just be removed if it blocks future versions.

@flathubbot
Copy link
Contributor

Started test build 98178

@flathubbot
Copy link
Contributor

Build 98178 failed

@flathubbot
Copy link
Contributor

Started test build 98180

@JakobDev
Copy link
Contributor Author

JakobDev commented Feb 6, 2024

It will just be removed if it blocks future versions.

As this lib is optional and in a extra file, it can just be commented out until a solution is found

@flathubbot
Copy link
Contributor

Build 98180 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/80958/org.electronjs.Electron2.BaseApp.flatpakref

@TingPing TingPing merged commit 81c1ee6 into flathub:branch/23.08 Feb 6, 2024
1 check passed
@JakobDev JakobDev deleted the libunity branch February 6, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants