【问题标题】:How does the "shell-versions" variable in metadata.json work, exactly?metadata.json 中的“shell-versions”变量究竟是如何工作的?
【发布时间】:2017-08-15 23:09:52
【问题描述】:

我在 metadata.json 中看到了几种方法,有些只指定整个版本,例如“3.22”,而有些则更具体,例如“3.22.1”。我遇到了一个问题,其中我有“3.24”、“3.24.1”和“3.24.2”,但在我指定之前,扩展无法在“3.24.3”中工作。

是否有必要列出支持的所有特定“point”版本的 gnome-shell,或者仅当指定了至少一个“point”版本时 gnome-shell 才关心?

【问题讨论】:

    标签: gnome-shell gnome-shell-extensions


    【解决方案1】:

    从 GNOME 40 开始,每个稳定版本都是 1 的简单增量,奇数不再不稳定(例如,404142)并且次要版本将被忽略。

    直到版本3.38,版本检查有点复杂:

    /**
     * versionCheck:
     * @required: an array of versions we're compatible with
     * @current: the version we have
     *
     * Check if a component is compatible for an extension.
     * @required is an array, and at least one version must match.
     * @current must be in the format <major>.<minor>.<point>.<micro>
     * <micro> is always ignored
     * <point> is ignored if <minor> is even (so you can target the
     * whole stable release)
     * <minor> and <major> must match
     * Each target version must be at least <major> and <minor>
     */
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-26
      • 2021-08-15
      • 2012-06-08
      • 2011-10-11
      相关资源
      最近更新 更多