Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update manager #22

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

FelixWolf
Copy link
Contributor

@FelixWolf FelixWolf commented Jun 19, 2024

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:

  • AlchemyUpdateURL - (string) path to update XML url.
  • AlchemyUpdateEnableAutoCheck - (bool) If update checks are enabled.
  • AlchemyUpdateCheckFrequency - (float) How often in seconds to check for updates.

New notifications:

  • AlchemyUpdateAlert - Popup notification for login screen
  • AlchemyUpdateToast - Toast notification for in-world

New preference settings:

  • Setup > Software Updates - A option to disable notification checks (for privacy concerned residents). Privacy policy is also linked next to this.
  • Setup > Software Updates - A "Check now" button as well as a last checked timer.

@FelixWolf FelixWolf added the enhancement New feature or request label Jun 19, 2024
@FelixWolf FelixWolf requested a review from RyeMutt June 19, 2024 19:28
Copy link

This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days

@github-actions github-actions bot added the Stale label Jul 20, 2024
@RyeMutt RyeMutt removed the Stale label Jul 20, 2024
@RyeMutt RyeMutt self-assigned this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants