|
1 |
| -# Using [`electron-builder`](https://github.com/electron-userland/electron-builder) |
| 1 | +# [`electron-builder`](https://github.com/electron-userland/electron-builder) 사용하기 |
2 | 2 |
|
3 |
| -All builds produced by `electron-builder` can be found within the `build` directory. |
| 3 | +`electron-builder`가 생성한 모든 빌드는 `build` 디렉토리에서 찾을 수 있습니다. |
4 | 4 |
|
5 |
| -#### Building |
| 5 | +#### 빌드하기 |
6 | 6 |
|
7 | 7 | ```bash
|
8 | 8 | npm run build
|
9 | 9 | ```
|
10 | 10 |
|
11 |
| -#### Building unpacked directory |
| 11 | +#### 압축 해제한 디렉토리 빌드하기 |
12 | 12 |
|
13 |
| -Produce simple executable without full installer. Useful for quick testing. |
| 13 | +완전한 installer가 없는 간단한 실행 파일을 생성합니다. 빠른 테스트에 유용합니다. |
14 | 14 |
|
15 | 15 | ```bash
|
16 | 16 | npm run build:dir
|
@@ -59,29 +59,29 @@ Further customization can be made at `package.json` in accordance to `electron-b
|
59 | 59 | }
|
60 | 60 | ```
|
61 | 61 |
|
62 |
| -## Automated Deployments using CI |
| 62 | +## CI를 이용한 자동화 된 배치 |
63 | 63 |
|
64 |
| -When using electron-vue's `electron-builder` configuration, you are also provided a `appveyor.yml` and `.travis.yml` for automated deployments. Both config files are setup for building your electron application and pushing artifacts to a GitHub release, Bintray, etc. Travis CI is used to build both `linux` and `darwin` \(macOS\) while AppVeyor is used to build `win32`. Both services are free for OSS projects. |
| 64 | +electron-vue의 `electron-builder` 구성을 사용하면 자동화된 배치를 위해 `appveyor.yml`와 `.travis.yml`도 제공됩니다. 두 설정 파일은 electron 애플리케이션 빌드와 artifacts를 Github release, Bintray 등에 푸시하는 설정 입니다. Travis CI는 `linux`와 `darwin` \(macOS\)을 빌드하는 데 사용되는 반면 AppVeyor는 `win32`를 빌드하는 데 사용됩니다. 두 서비스 모두 OSS 프로젝트에서 무료입니다. |
65 | 65 |
|
66 | 66 | #### Setting up Travis CI/AppVeyor
|
67 | 67 |
|
68 |
| -1. Create an account over at [Travis CI](https://travis-ci.org/getting_started) / [AppVeyor](https://www.appveyor.com/) |
69 |
| -2. Link your GitHub repository that has your electron-vue project |
70 |
| -3. Visit [https://github.com/settings/tokens](https://github.com/settings/tokens) and hit **Generate new token **\(the same token can be used for both Travis CI & AppVeyor\) |
71 |
| - 1. Set a **Token description** |
72 |
| - 2. Check the **public\_repo **scope |
73 |
| - 3. Hit **Generate token** |
74 |
| -4. Copy your new token and save for later |
75 |
| -5. Open your repository settings on Travis CI / AppVeyor to add a new **Environment Variable** |
76 |
| - 1. Set the name of the variable to `GH_TOKEN` |
77 |
| - 2. Set the value of the variable to the GitHub access token you just created |
78 |
| - 3. **Save** the new variable and ensure encryption is enabled |
79 |
| - |
80 |
| -At this point, everything should be setup. Travis CI/AppVeyor by default will watch for any pushes to your `master` branch. When a push is made, Travis CI/AppVeyor will then clone down your repository to its server and begin the build process. During the final stages, `electron-builder` with see the `GH_TOKEN` environment variable and create a draft release and upload the artifacts to your public GitHub repository. From this point, you can edit the draft release and then publish it to the world. After publishing your release, make sure future releases are marked with a new version number by updating your `package.json`. |
81 |
| - |
82 |
| -#### Auto Updating |
83 |
| - |
84 |
| -Enabling your application to receive automatic updates is a super nice feature to have, but know that [**Code Signing**](https://github.com/electron-userland/electron-builder/wiki/Code-Signing) is required. You can setup code signing by adding a few more environment variables based on what `electron-builder` needs described [here](https://www.electron.build/code-signing). Once you have your certificates setup, you can then install `electron-updater` and comment out the chunk of code at the bottom of `src/main/index.js` to enable auto updating. |
85 |
| - |
86 |
| -If you are like most people and do not have a fancy code signing certificate, then you can always use the GitHub API to check for new releases. When a new release is detected, provide a notification within your application to point users to a download page where they can download and install the new build. Thanks to the amazing installer that `electron-builder` provides, user's do not have to uninstall the current version and the new installation will replace the old while still persisting any web storage or `userData` files. |
| 68 | +1. [Travis CI](https://travis-ci.org/getting_started) / [AppVeyor](https://www.appveyor.com/)에서 계정을 만드세요. |
| 69 | +2. 여러분의 electron-vue 프로젝트가 있는 Github 저장소를 링크하세요. |
| 70 | +3. [https://github.com/settings/tokens](https://github.com/settings/tokens) 방문하고 **Generate new token **을 누르세요.\(이 토큰은 Travis CI & AppVeyor 둘 다에 사용 될 수 있습니다.\) |
| 71 | + 1. **Token description** 설정하세요. |
| 72 | + 2. **public\_repo **스코프를 확인하세요. |
| 73 | + 3. **Generate token**를 누르세요. |
| 74 | +4. 나중에 새 토큰을 복사하고 저장하세요. |
| 75 | +5. Travis CI / AppVeyor에서 원격 저장소 설정을 열고 새로운 **Environment Variable**를 추가하세요. |
| 76 | + 1. 변수의 이름을 `GH_TOKEN`으로 설정하세요. |
| 77 | + 2. 변수의 값을 방금 생성한 GitHub 액세스 토큰으로 설정하세요. |
| 78 | + 3. 새로운 변수를 **저장**하고 암호화가 사용 가능한지 확인하세요. |
| 79 | + |
| 80 | +이 지점에서, 모든 것이 설정되어야 합니다. Travis CI/AppVeyor는 기본적으로 `master` 브랜치에 대한 푸시를 감시합니다. 푸시가 이루어지면 Travis CI/AppVeyor는 원격 저장소를 서버에 복제하고 빌드 프로세스를 시작합니다. 최종 단계에서 `electron-builder`는 `GH_TOKEN` 환경 변수를 보고 초안 릴리스를 만들고 공개 GitHub 저장소에 artifacts를 업로드 합니다. 이 시점에서 초안 릴리스를 편집 한 다음이를 세상에 퍼블릭 할 수 있습니다. 릴리스를 퍼블리싱 한 후, `package.json`을 업데이트하여 향후 릴리스가 새 버전 번호로 표시되는지 확인하세요. |
| 81 | + |
| 82 | +#### 자동 업데이트 |
| 83 | + |
| 84 | +애플리케이션에서 자동 업데이트를 수신하도록 설정하는 것은 멋진 기능이지만 [**Code Signing**](https://github.com/electron-userland/electron-builder/wiki/Code-Signing)이 필요하다는 것을 알고 있어야합니다. [여기](https://www.electron.build/code-signing)에 설명 된 `electron-builder` 요구 사항을 기반으로 몇 가지 환경 변수를 추가하여 Code Signing을 설정할 수 있습니다. 인증서를 설정하고 나면 `electron-updater` 를 설치하고 `src/main/index.js`의 하단 코드 덩어리를 주석해지하여 자동 업데이트를 활성화 할 수 있습니다. |
| 85 | + |
| 86 | +대부분의 사람들과 같은 멋진 코드 서명 인증서가 없으면 GitHub API를 사용하여 새 릴리스를 확인할 수 있습니다. 새로운 릴리스가 발견되면 애플리케이션 내에서 새 빌드를 다운로드하고 설치할 수 있는 다운로드 페이지로 사용자를 안내하는 알림을 제공하세요.`electron-builder`가 제공하는 놀라운 설치 프로그램 덕분에 사용자는 현재 버전을 설치 제거 할 필요가 없으며 새 설치는 웹 저장소 또는 `userData` 파일을 계속 유지하면서 이전 버전을 대체합니다. |
87 | 87 |
|
0 commit comments