May 15, 2024

Molybden 1.3.0: automatic application updates on Windows and app icon generator utility

We’re excited to announce the release of Molybden 1.3.0. In this version we introduce one of the most awaited and “must have” feature for any modern desktop application - automatic application updates.

Now you can enable the automatic update functionality in your Molybden application and distribute updates to your users without them having to manually download and install the new version of your application. This functionality works on Windows only. We will add support for macOS in the next versions.

What’s new

Automatic application updates on Windows

Molybden now provides a built-in mechanism to check for updates, download the latest version of your application, and install it. This feature is useful when you want to distribute updates to your users without them having to manually download and install the new version of your application.

The automatic update functionality is very flexible. You decide how and when exactly your application should check for updates, download and install them. You can check for updates in the background, at the application startup, or on demand when the user selects “Check for updates” from the application menu or clicks a button in the settings dialog.

To enable automatic updates in your application, you need to set up an update server that will host the update files and add update functionality to your application source code. The following simple example demonstrates how you can check for updates, download and install them, and get notifications when the update is installed completely:

std::string kUpdateServerUrl = "https://storage.googleapis.com/app/updates";

// Check for updates.
app->checkForUpdate(kUpdateServerUrl, [](const CheckForUpdateResult &result) {
  // If an update is available, download and install it.
  auto app_update = result.app_update;
  if (app_update) {
    // Get notifications when the update is installed.
    app_update->onAppUpdateInstalled += [](const AppUpdateInstalled &event) {
      // Ask the user to restart the app to apply the update.
    };
    // Download and install the update.
    app_update->install();
  }
});

We recommend that you read the Updating Application guide to learn more about the automatic update functionality in Molybden.

Application icon generator utility

Now, you can generate an ICO file for your Molybden application from a set of PNG files with different dimensions using the built-in command line utility on Windows. To do so, just put your PNG images with the following names and dimensions into a folder:

Name Dimensions
icon_16x16.png 16x16
icon_24x24.png 24x24
icon_32x32.png 32x32
icon_48x48.png 48x48
icon_256x256.png 256x256

And run the following command in the terminal from the root directory of your project:

npm run molybden icon -- --source_dir <path-to-the-folder>

It will generate an ICO file and put it into the src-cpp/assets/app.ico replacing the existing default one.

Chromium 124.0.6367.202

We upgraded Chromium to a newer version, which introduces multiple security fixes that prevent a remote attacker who had compromised the GPU process from potentially perform a sandbox escape via specific UI gestures, potentially exploit heap corruption via a crafted HTML page, including:

For the complete list of Chromium fixes and improvements in 124.0.6367.202 please visit the product blog posts for the following versions:

Enhancements

  • Fixed an issue when the application cannot restart programmatically after applying custom branding on macOS.
  • Fixed the bug when closing a message dialog on Windows by pressing the close button or using Escape, leads to the application crash.
  • Remove the profile icon rendered on top of the application icon in the taskbar on Windows.

How to upgrade

To install the latest version of Molybden in your project, run the following command:

npm install @molybden-apps/molybden@latest

What’s next

In the next Molybden versions, which will include compatibility with Mac App Store, introduce the application icon generator for Windows, and more. Visit our product roadmap to see what’s coming next.

If you have any questions or feature requests, please feel free to join our Discord or contact us. We will be happy to hear from you!

On this page
Top