giftseeker

Форк
0
/
build.js 
74 строки · 1.9 Кб
1
const builder = require("electron-builder");
2
const Platform = builder.Platform;
3

4
function getCurrentPlatform() {
5
  switch (process.platform) {
6
    case "win32":
7
      return Platform.WINDOWS;
8
    case "darwin":
9
      return Platform.MAC;
10
    case "linux":
11
      return Platform.LINUX;
12
    default:
13
      console.error("Cannot resolve current platform!");
14
      return undefined;
15
  }
16
}
17

18
builder
19
  .build({
20
    targets: (process.argv[2] != null && Platform[process.argv[2]] != null
21
      ? Platform[process.argv[2]]
22
      : getCurrentPlatform()
23
    ).createTarget(),
24
    config: {
25
      appId: "com.giftseeker.app",
26
      productName: "GiftSeeker",
27
      artifactName: "giftseeker.${ext}",
28
      copyright: "Copyright © 2016-2021 Alexander Pinashin",
29
      files: ["src", "node_modules", "LICENSE"],
30
      icon: "./src/resources/images/icon.ico",
31
      win: {
32
        target: [
33
          {
34
            target: "nsis-web",
35
            arch: "x64",
36
          },
37
          "portable",
38
        ],
39
      },
40
      nsisWeb: {
41
        artifactName: "giftseeker-setup.${ext}",
42
        oneClick: false,
43
        perMachine: false,
44
        allowElevation: true,
45
        allowToChangeInstallationDirectory: true,
46
      },
47
      mac: {
48
        target: "dmg",
49
        category: "public.app-category.games",
50
      },
51
      linux: {
52
        target: ["AppImage", "deb"],
53
        icon: "./src/resources/images/icon.256x256.png",
54
        maintainer: "Codesprut",
55
        vendor: "Codesprut",
56
        synopsis: "Public giveaways helper",
57
        description: "Automatically join giveaways",
58
        category: "Game",
59
      },
60
      compression: "maximum",
61
      extraResources: ["libraries"],
62
      asar: true,
63
      publish: {
64
        provider: "generic",
65
        url: "https://giftseeker.ru/files",
66
      },
67
    },
68
  })
69
  .then(() => {
70
    console.log("Build complete!");
71
  })
72
  .catch(err => {
73
    console.error("Error during build!", err);
74
  });
75

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.