5

我想用我的 shell 扩展支持多个 GNOME 版本。如何检测它运行的 GNOME 版本并适当地分支代码?

4

1 回答 1

5
const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
    // etc.
于 2015-12-06T18:23:08.223 回答