1.0.1 • Published 4 months ago

@webrtcn/windows-maker v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

electron-forge-maker-nsis

An electron-forge maker for NSIS that supports electron-forge v6 and can be used as a replacement for electron-builder. Supports code-signing and basic updates with electron-updater.

This maker takes two configuration objects: codesigning for codesigning and updater for electron-updater support. Both of them are optional, the feature in question will simply be turned off if not provided.

  • codesigning is passed directly to @electron/windows-sign and supports all its options (except for appDirectory, which is provided directly by this maker).
  • updater
    • url: URL to the location of yml files.
    • updaterCacheDirName: Name of the local cache. By default ${name}-updater.
    • channel: Name of the update channel. By default latest.
    • publisherName: Used to verify the code signature.
// forge.config.js with minimal configuration
makers: [
    {
      name: "@tiexin/electron-forge-maker-nsis",
      config: {},
    }
  ]
  // forge.config.js with example configuration
  makers: [
    {
      name: "@tiexin/electron-forge-maker-nsis",
      config: {
        codesigning: {
          certificateFile?: string;
          certificatePassword?: string;
        },
        updater: {
					url: "https://oss.17usoft.com/my-bucket",
					updaterCacheDirName: "my-updater",
          channel: "latest",
          publisherName: "Tongcheng, Inc."
				},
        getAdditionalConfig: () => {
          return {
            artifactName: "${productName} Setup ${version} ${arch}.${ext}"
          }
        }
      },
    }
  ]

Updating

This tool supports "generic" updates with electron-updater.