<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # autoUpdater 這個模塊提供了一個到 `Squirrel` 自動更新框架的接口。 ## 平臺相關的提示 雖然 `autoUpdater` 模塊提供了一套各平臺通用的接口,但是在每個平臺間依然會有一些微小的差異。 ### OS X 在 OS X 上,`autoUpdater` 模塊依靠的是內置的 [Squirrel.Mac][squirrel-mac],這意味著你不需要依靠其他的設置就能使用。關于 更新服務器的配置,你可以通過閱讀 [Server Support][server-support] 這篇文章來了解。 ### Windows 在 Windows 上,你必須使用安裝程序將你的應用裝到用戶的計算機上,所以比較推薦的方法是用 [grunt-electron-installer][installer] 這個模塊來自動生成一個 Windows 安裝向導。 Squirrel 自動生成的安裝向導會生成一個帶 [Application User Model ID][app-user-model-id] 的快捷方式。 Application User Model ID 的格式是 `com.squirrel.PACKAGE_ID.YOUR_EXE_WITHOUT_DOT_EXE`, 比如 像 `com.squirrel.slack.Slack` 和 `com.squirrel.code.Code` 這樣的。你應該在自己的應用中使用 `app.setAppUserModelId` 方法設置相同的 API,不然 Windows 將不能正確地把你的應用固定在任務欄上。 服務器端的配置和 OS X 也是不一樣的,你可以閱讀 [Squirrel.Windows][squirrel-windows] 這個文檔來獲得詳細信息。 ### Linux Linux 下沒有任何的自動更新支持,所以我們推薦用各個 Linux 發行版的包管理器來分發你的應用。 ## 事件列表 `autoUpdater` 對象會觸發以下的事件: ### 事件:'error' 返回: * `error` Error 當更新發生錯誤的時候觸發。 ### 事件:'checking-for-update' 當開始檢查更新的時候觸發。 ### 事件:'update-available' 當發現一個可用更新的時候觸發,更新包下載會自動開始。 ### 事件:'update-not-available' 當沒有可用更新的時候觸發。 ### 事件:'update-downloaded' 返回: * `event` Event * `releaseNotes` String - 新版本更新公告 * `releaseName` String - 新的版本號 * `releaseDate` Date - 新版本發布的日期 * `updateURL` String - 更新地址 在更新下載完成的時候觸發。 在 Windows 上只有 `releaseName` 是有效的。 ## 方法列表 `autoUpdater` 對象有以下的方法: ### `autoUpdater.setFeedURL(url)` * `url` String 設置檢查更新的 `url`,并且初始化自動更新。這個 `url` 一旦設置就無法更改。 ### `autoUpdater.checkForUpdates()` 向服務端查詢現在是否有可用的更新。在調用這個方法之前,必須要先調用 `setFeedURL`。 ### `autoUpdater.quitAndInstall()` 在下載完成后,重啟當前的應用并且安裝更新。這個方法應該僅在 `update-downloaded` 事件觸發后被調用。 [squirrel-mac]: https://github.com/Squirrel/Squirrel.Mac [server-support]: https://github.com/Squirrel/Squirrel.Mac#server-support [squirrel-windows]: https://github.com/Squirrel/Squirrel.Windows [installer]: https://github.com/atom/grunt-electron-installer [app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看