AlchemyViewer / Alchemy

Alchemy is a Second Life compatible viewer striving to be at the forefront of stability, performance, and technological advancement in the open-source metaverse viewer field.
https://www.alchemyviewer.org
GNU Lesser General Public License v2.1
14 stars 10 forks source link

Add update manager #22

Open FelixWolf opened 1 week ago

FelixWolf commented 1 week ago

Wowe now people can be notified when there is a update available!

Despite the name, this doesn't do automated updates. Depending on who you ask, this will be disappointing or a benefit.

IMPORTANT

indra/newview/app_settings/settings_alchemy.xml needs to be changed! Specifically the AlchemyUpdateURL key. Which currently points to my server for testing.

alsetup.xml syntax

The correct XML format is documented in a comment at indra/newview/alupdatemanager.cpp, which at the time is currently:

<llsd>
  <map>
    <!-- Put all entries in a sub map called "channels", in case we want to
         include something else shared between all channels. -->
    <key>channels</key>
    <map>
      <key>Alchemy Test</key>
      <map>
        <!-- Build ID, viewer checks if this is newer -->
        <key>build</key>
        <integer>123456</integer>

        <!-- Full version number -->
        <key>version</key>
        <string>1.2.3.45678</string>

        <!-- A URL to the download page -->
        <key>download</key>
        <string>Page to open in browser when user clicks "download"</string>

        <!-- A optional message -->
        <key>message</key>
        <string>Coyito was here!</string>
      </map>
    </map>
  </map>
</llsd>

This adds the following automated update check:

  1. Disable automatic update checks if AlchemyUpdateEnableAutoCheck is set to true (This is configurable in the "Setup" preferences tab. A "Privacy Policy" link is also included).
  2. Upon start up, check as soon as possible for a update.
  3. After the first check, check every AlchemyUpdateCheckFrequency seconds (Default is 3600 seconds, or 1 hour). This can also be set to 0 to not do timed checks (I.E. Only check on start up).
  4. If the user chooses "Ignore" on the dialog, it will suppress update notifications for that session. It is not possible to ignore a entire update because we only support the latest version of each channel IIRC.
  5. If a update is detected on the login screen, the user is notified via a pop up.
  6. If a update is detected while logged in, the user is notified via a system toast.

New alchemy_settings.xml keys:

New notifications:

New preference settings: