V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
V2EX  ?  Xcode

请教一个 Sparkle 2 的 appcast.xml 问题

  •  
  •   Livid · 182 天前 · 1280 次点击
    这是一个创建于 182 天前的主题,其中的信息可能已经有所发展或是发生改变。

    腾讯云最新优惠活动来了:云产品限时1折,云服务器低至88元/年 ,点击这里立即抢购:9i0i.cn/qcloud,更有2860元代金券免费领取,付款直接抵现金用,点击这里立即领取:9i0i.cn/qcloudquan

    (福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

    具体需要做什么设置,才能让每次检查更新的时候可以显示一个这样的 release notes 呢?这个 release notes 可以从一个远程服务器上加载么?

    貌似如果只有 sparkle:fullReleaseNotesLink 是不够的:

    https://opensource.planetable.xyz/planet-insider/appcast.xml

    3 条回复  ?  2023-10-30 18:29:19 +08:00
    FaiChou
        1
    FaiChou  
       182 天前
    https://sparkle-project.org/documentation/publishing/#publishing-an-update

    ## Embedded release notes

    ```
    <item>
    <title>Version 2.0 (2 bugs fixed; 3 new features)</title>
    <link>https://myproductwebsite.com</link>
    <sparkle:version>2.0</sparkle:version>
    <description><![CDATA[
    <h2>New Features</h2>
    ...
    ]]>
    </description>
    ...
    </item>
    ```
    vitovan
        2
    vitovan  
       182 天前
    不懂强答:

    https://sparkle-project.org/files/sparkletestcast.xml

    官方的 Release Notes 是放在了 description 里,没见你的 xml 有这个东西呢?

    https://opensource.planetable.xyz/planet-insider/appcast.xml



    另外那个 sparkle:fullReleaseNotesLink 是整个的更新历史,对于单独某个版本应该是 sparkle:releaseNotesLink ?
    Livid
        3
    Livid  
    MOD
    OP
       182 天前   ?? 1
    终于试出来了。自己解答一下:

    1. 可以从远程服务器上加载,需要 appcast.xml 里有 sparkle:releaseNotesLink 这个元素。但是这个远程页面的 CSS 和 JS 貌似都不会生效:



    https://opensource.planetable.xyz/planet-insider/appcast.xml

    需要一个非常纯粹的只有 <li> 元素的 HTML 页面。

    2. 可以用 xmlstarlet 来给 appcast.xml 加这个元素:

    brew install xmlstarlet
    xmlstarlet ed --inplace \
    -s "/rss/channel/item" -t elem -n "sparkle:releaseNotesLink" -v "http://example.com/release-notes" \
    appcast.xml
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3206 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:40 · PVG 08:40 · LAX 17:40 · JFK 20:40
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com