initializeUpdater(onUpdateReady) {
    log.info('Starting Updater Service...');
    const loggerPath = path.join(global.userDataPath, 'updater-debug.log');

    if (!UpdaterService.shouldUseGenericUpdater()) {
      autoUpdater.logger = log;
      autoUpdater.logger.transports.file.level = 'info';
      autoUpdater.logger.transports.file.resolve = () => loggerPath;

      autoUpdater.logger._info = autoUpdater.logger.info;

      // Monkey patch logger's info function
      autoUpdater.logger.info = (message) => {
        // Check if the downloaded update is loaded from
        // cache and set the `_isDownloadCached` property

        if (
          typeof message === 'string'
          && message.includes('Update has already been downloaded')
        ) {
          this._isDownloadCached = true;
        }

        autoUpdater.logger._info(message);
      };

      /** @type {string?} */
      this.currentStatus = null;

      /** @type {object?} */
      this.currentInfo = null;

      autoUpdater.on('checking-for-update', () => {
        this.sendStatusToWindow(UpdaterStatus.CheckingForUpdates);
      });

      autoUpdater.on('update-available', (info) => {
        this.sendStatusToWindow(UpdaterStatus.UpdateAvailable, info);

        if (this.shouldAutoDownload) {
          autoUpdater.downloadUpdate();
        }
      });

      autoUpdater.on('update-not-available', (info) => {
        this.sendStatusToWindow(UpdaterStatus.UpdateNotAvailable, info);
      });

      autoUpdater.on('error', (err) => {
        this.sendStatusToWindow(UpdaterStatus.Error, JSON.stringify({ errorMessage: err }));
      });

      autoUpdater.on('download-progress', (progressObj) => {
        let logMessage = `Download speed: ${progressObj.bytesPerSecond}`;
        logMessage = `${logMessage} - Downloaded ${progressObj.percent}%`;
        logMessage = `${logMessage} (${progressObj.transferred} / ${progressObj.total})`;
        console.log(logMessage);

        this.sendStatusToWindow(UpdaterStatus.DownloadProgress, progressObj);
      });

      autoUpdater.on('update-downloaded', (info) => {
        this.postUpdateDownloadInfo = info;
        this.sendStatusToWindow(UpdaterStatus.UpdateDownloaded, info);
        onUpdateReady();
      });

      // Check for updates
      autoUpdater.checkForUpdates();
    }
    else {
      updaterGeneric.logger = log;
      updaterGeneric.logger.transports.file.resolve = () => loggerPath;

      updaterGeneric.on('checking-for-update', () => {
        this.sendStatusToWindow(UpdaterStatus.CheckingForUpdates);
      });

      updaterGeneric.on('update-available', (info) => {
        this.sendStatusToWindow(UpdaterStatus.UpdateAvailable, info);
      });

      updaterGeneric.on('update-not-available', (info) => {
        this.sendStatusToWindow(UpdaterStatus.UpdateNotAvailable, info);
      });

      updaterGeneric.on('error', (err) => {
        this.sendStatusToWindow(UpdaterStatus.Error, JSON.stringify({ errorMessage: err }));
      });

      // Check for updates
      updaterGeneric.checkForUpdates();
    }

    // Handle incoming IPC messages

    ipcMain.on('update:checkForUpdates', () => {
      UpdaterService.checkForUpdates();
    });

    ipcMain.on('update:installUpdateAndRestart', () => {
      this.installUpdateAndRestart(this.postUpdateDownloadInfo);
    });

    ipcMain.on('update:downloadUpdate', () => {
      if (!UpdaterService.shouldUseGenericUpdater()) {
        autoUpdater.downloadUpdate();
      }
      else {
        updaterGeneric.downloadUpdate();
      }
    });

    ipcMain.on('update:getChangelog', (event) => {
      // eslint-disable-next-line no-param-reassign
      event.returnValue = this.getChangelog();
    });

    ipcMain.on('update:doesUseGenericUpdater', (event) => {
      // eslint-disable-next-line no-param-reassign
      event.returnValue = UpdaterService.shouldUseGenericUpdater();
    });

    ipcMain.on('update:syncUpdaterStatus', (event) => {
      // eslint-disable-next-line no-param-reassign
      event.returnValue = undefined;
      this.sendStatusToWindow(this.currentStatus, this.currentInfo);
    });
  }
Initializes updater with event listeners

@param {() => void} onUpdateReady
Callback function called when the update is downloaded
and is ready to be installed.