简体   繁体   English

我可以使用其他语言(JavaScript 除外)来创建 Gnome Shell 扩展吗?

[英]Can I use other languages(other than JavaScript) to create Gnome Shell Extensions?

I am creating a GNOME Shell Extension and want to use languages like C++/Golang rather than JavaScript to create it.我正在创建一个 GNOME Shell 扩展,并希望使用 C++/Golang 之类的语言而不是 JavaScript 来创建它。 It is also acceptable if I can somehow call/use the C++/go executable in my extension.js .如果我能以某种方式在我的extension.js中调用/使用 C++/go 可执行文件,这也是可以接受的。 Please tell me if this is even possible and if yes how?请告诉我这是否可能,如果是的话如何?

The short answer is no.最简洁的答案是不。

You can't ship binaries with a GNOME Shell extension, because they are architecture dependent and can't be properly reviewed.您不能发布带有 GNOME Shell 扩展名的二进制文件,因为它们依赖于体系结构并且无法被正确审查。 You could write a library with GObject-Introspection and ship that separately, but still not bundled in an extension for the same reason.您可以使用GObject-Introspection编写一个库并单独发布,但出于同样的原因仍未捆绑在扩展中。

If you're tempted to ship a binary with a GNOME Shell extension, there's a good chance you should just be writing an application.如果您想要发布带有 GNOME Shell 扩展名的二进制文件,那么您很有可能只是编写一个应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM