.electron-builder.config.js 977 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. if (process.env.VITE_APP_VERSION === undefined) {
  2. const now = new Date();
  3. process.env.VITE_APP_VERSION = `${now.getUTCFullYear() - 2000}.${
  4. now.getUTCMonth() + 1
  5. }.${now.getUTCDate()}-${now.getUTCHours() * 60 + now.getUTCMinutes()}`;
  6. }
  7. /**
  8. * @type {import('electron-builder').Configuration}
  9. * @see https://www.electron.build/configuration/configuration
  10. */
  11. const config = {
  12. appId: "com.socket-benmark.app",
  13. productName: "socket-benmark",
  14. directories: {
  15. output: "dist",
  16. buildResources: "buildResources",
  17. },
  18. win: {
  19. // "icon": "buildResources/icon.icns",
  20. "target": [
  21. "nsis"
  22. ]
  23. },
  24. nsis: {
  25. "oneClick": false,
  26. "perMachine": true,
  27. "allowToChangeInstallationDirectory": true
  28. },
  29. files: [
  30. "packages/**/dist/**",
  31. "packages/**/command/**",
  32. "packages/main/command/**",
  33. ],
  34. extraMetadata: {
  35. version: process.env.VITE_APP_VERSION,
  36. },
  37. };
  38. module.exports = config;