Fix some typos and translate more files
This commit is contained in:
parent
637b642837
commit
bf5b084945
18 changed files with 622 additions and 153 deletions
49
docs/development/atom-shell-vs-node-webkit-ko.md
Normal file
49
docs/development/atom-shell-vs-node-webkit-ko.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
# NW.js와 기술적으로 다른점 (이전 node-webkit)
|
||||
|
||||
__알림: Electron은 이전까지 Atom Shell로 불려졌습니다.__
|
||||
|
||||
Like NW.js, Electron provides a platform to write desktop applications
|
||||
with JavaScript and HTML and has Node integration to grant access to low level
|
||||
system in web pages.
|
||||
|
||||
But there are also fundamental differences between the two projects that make
|
||||
Electron a completely separate product from NW.js:
|
||||
|
||||
__1. 어플리케이션의 엔트리 포인트__
|
||||
|
||||
In NW.js, the main entry of an application is a web page. You specify a
|
||||
main page in the `package.json` and it is opened in a browser window as
|
||||
the application's main window.
|
||||
|
||||
In Electron, the entry point is a JavaScript script. Instead of
|
||||
providing a URL directly, you manually create a browser window and load
|
||||
an HTML file using the API. You also need to listen to window events
|
||||
to decide when to quit the application.
|
||||
|
||||
Electron works more like the Node.js runtime. Electron's APIs are lower level
|
||||
so you can use it for browser testing in place of [PhantomJS](http://phantomjs.org/).
|
||||
|
||||
__2. 빌드 시스템__
|
||||
|
||||
In order to avoid the complexity of building the whole Chromium, Electron uses
|
||||
[libchromiumcontent](https://github.com/brightray/libchromiumcontent) to access
|
||||
Chromium's Content API. libchromiumcontent is a single, shared library that
|
||||
includes the Chromium Content module and all its dependencies. Users don't
|
||||
need a powerful machine to build Electron.
|
||||
|
||||
__3. Node 통합__
|
||||
|
||||
In NW.js, the Node integration in web pages requires patching Chromium to
|
||||
work, while in Electron we chose a different way to integrate libuv loop with
|
||||
each platform's message loop to avoid hacking Chromium. See the
|
||||
[`node_bindings`](../../atom/common/) code for how that was done.
|
||||
|
||||
__4. 다중 컨텍스트__
|
||||
|
||||
If you are an experienced NW.js user, you should be familiar with the
|
||||
concept of Node context and web context. These concepts were invented because
|
||||
of how NW.js was implemented.
|
||||
|
||||
By using the [multi-context](http://strongloop.com/strongblog/whats-new-node-js-v0-12-multiple-context-execution/)
|
||||
feature of Node, Electron doesn't introduce a new JavaScript context in web
|
||||
pages.
|
100
docs/development/build-instructions-linux-ko.md
Normal file
100
docs/development/build-instructions-linux-ko.md
Normal file
|
@ -0,0 +1,100 @@
|
|||
# 빌드 설명서 (Linux)
|
||||
|
||||
## 빌드전 요구사양
|
||||
|
||||
* Python 2.7.x. Some distributions like CentOS still use Python 2.6.x
|
||||
so you may need to check your Python version with `python -V`.
|
||||
* Node.js v0.12.x. There are various ways to install Node. One can download
|
||||
source code from [Node.js] (http://nodejs.org) and compile from source.
|
||||
Doing so permits installing Node to your own home directory as a standard user.
|
||||
Or try repositories such as [NodeSource] (https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories)
|
||||
* Clang 3.4 or later
|
||||
* Development headers of GTK+ and libnotify
|
||||
|
||||
On Ubuntu, install the following libraries:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
|
||||
libnotify-dev libgnome-keyring-dev libgconf2-dev \
|
||||
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
|
||||
libxss1 gcc-multilib g++-multilib
|
||||
```
|
||||
|
||||
Other distributions may offer similar packages for installation via package
|
||||
managers such as yum. Or one can compile from source code.
|
||||
|
||||
|
||||
## 가상머신을 사용하여 빌드 하는 경우
|
||||
|
||||
If you plan to build electron on a virtual machine, you will need a fixed-size
|
||||
device container of at least 25 gigabytes in size.
|
||||
|
||||
|
||||
## 코드 가져오기
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/atom/electron.git
|
||||
```
|
||||
|
||||
## 부트 스트랩
|
||||
|
||||
The bootstrap script will download all necessary build dependencies and create
|
||||
build project files. You must have Python 2.7.x for the script to succeed.
|
||||
Downloading certain files could take a long time. Notice that we are using
|
||||
`ninja` to build Electron so there is no `Makefile` generated.
|
||||
|
||||
```bash
|
||||
$ cd electron
|
||||
$ ./script/bootstrap.py -v
|
||||
```
|
||||
|
||||
## 빌드 하기
|
||||
|
||||
If you would like to build both `Release` and `Debug` targets:
|
||||
|
||||
```bash
|
||||
$ ./script/build.py
|
||||
```
|
||||
|
||||
This script will cause a very large Electron executable to be placed in
|
||||
the directory `out/R`. The file size is in excess of 1.3 gigabytes. This
|
||||
happens because the Release target binary contains debugging symbols.
|
||||
To reduce the file size, run the `create-dist.py` script:
|
||||
|
||||
```bash
|
||||
$ ./script/create-dist.py
|
||||
```
|
||||
|
||||
This will put a working distribution with much smaller file sizes in
|
||||
the `dist` directory. After running the create-dist.py script, you
|
||||
may want to remove the 1.3+ gigabyte binary which is still in out/R.
|
||||
|
||||
You can also build the `Debug` target only:
|
||||
|
||||
```bash
|
||||
$ ./script/build.py -c D
|
||||
```
|
||||
|
||||
After building is done, you can find the `electron` debug binary
|
||||
under `out/D`.
|
||||
|
||||
|
||||
## 정리 하기
|
||||
|
||||
|
||||
To clean the build files:
|
||||
|
||||
```bash
|
||||
$ ./script/clean.py
|
||||
```
|
||||
|
||||
|
||||
## 문제 해결
|
||||
|
||||
Make sure you have installed all the build dependencies.
|
||||
|
||||
## 테스트
|
||||
|
||||
```bash
|
||||
$ ./script/test.py
|
||||
```
|
56
docs/development/build-instructions-mac-ko.md
Normal file
56
docs/development/build-instructions-mac-ko.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# 빌드 설명서 (Mac)
|
||||
|
||||
## 빌드전 요구 사항
|
||||
|
||||
* OS X >= 10.8
|
||||
* [Xcode](https://developer.apple.com/technologies/tools/) >= 5.1
|
||||
* [node.js](http://nodejs.org) (external).
|
||||
|
||||
If you are using the python downloaded by Homebrew, you also need to install
|
||||
following python modules:
|
||||
|
||||
* pyobjc
|
||||
|
||||
## 코드 가져오기
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/atom/electron.git
|
||||
```
|
||||
|
||||
## 부트 스트랩
|
||||
|
||||
The bootstrap script will download all necessary build dependencies and create
|
||||
build project files. Notice that we're using `ninja` to build Electron so
|
||||
there is no Xcode project generated.
|
||||
|
||||
```bash
|
||||
$ cd electron
|
||||
$ ./script/bootstrap.py -v
|
||||
```
|
||||
|
||||
## 빌드 하기
|
||||
|
||||
Build both `Release` and `Debug` targets:
|
||||
|
||||
```bash
|
||||
$ ./script/build.py
|
||||
```
|
||||
|
||||
You can also only build the `Debug` target:
|
||||
|
||||
```bash
|
||||
$ ./script/build.py -c D
|
||||
```
|
||||
|
||||
After building is done, you can find `Electron.app` under `out/D`.
|
||||
|
||||
## 32비트 지원
|
||||
|
||||
Electron can only be built for 64bit target on OS X, and there is no plan to
|
||||
support 32bit OS X in future.
|
||||
|
||||
## 테스트
|
||||
|
||||
```bash
|
||||
$ ./script/test.py
|
||||
```
|
128
docs/development/build-instructions-windows-ko.md
Normal file
128
docs/development/build-instructions-windows-ko.md
Normal file
|
@ -0,0 +1,128 @@
|
|||
# 빌드 설명서 (Windows)
|
||||
|
||||
## 빌드전 요구 사항
|
||||
|
||||
* Windows 7 / Server 2008 R2 or higher
|
||||
* Visual Studio 2013 - [download VS 2013 Community Edition for
|
||||
free](http://www.visualstudio.com/products/visual-studio-community-vs)
|
||||
* [Python 2.7](http://www.python.org/download/releases/2.7/)
|
||||
* [Node.js](http://nodejs.org/download/)
|
||||
* [git](http://git-scm.com)
|
||||
|
||||
If you don't have a Windows installation at the moment,
|
||||
[modern.ie](https://www.modern.ie/en-us/virtualization-tools#downloads) has
|
||||
timebombed versions of Windows that you can use to build Electron.
|
||||
|
||||
The building of Electron is done entirely with command-line scripts, so you
|
||||
can use any editor you like to develop Electron, but it also means you can
|
||||
not use Visual Studio for the development. Support of building with Visual
|
||||
Studio will come in the future.
|
||||
|
||||
**Note:** Even though Visual Studio is not used for building, it's still
|
||||
**required** because we need the build toolchains it provided.
|
||||
|
||||
## 코드 가져오기
|
||||
|
||||
```powershell
|
||||
git clone https://github.com/atom/electron.git
|
||||
```
|
||||
|
||||
## 부트 스트랩
|
||||
|
||||
The bootstrap script will download all necessary build dependencies and create
|
||||
build project files. Notice that we're using `ninja` to build Electron so
|
||||
there is no Visual Studio project generated.
|
||||
|
||||
```powershell
|
||||
cd electron
|
||||
python script\bootstrap.py -v
|
||||
```
|
||||
|
||||
## 빌드 하기
|
||||
|
||||
Build both Release and Debug targets:
|
||||
|
||||
```powershell
|
||||
python script\build.py
|
||||
```
|
||||
|
||||
You can also only build the Debug target:
|
||||
|
||||
```powershell
|
||||
python script\build.py -c D
|
||||
```
|
||||
|
||||
After building is done, you can find `atom.exe` under `out\D`.
|
||||
|
||||
## 64비트 빌드
|
||||
|
||||
To build for the 64bit target, you need to pass `--target_arch=x64` when running
|
||||
the bootstrap script:
|
||||
|
||||
```powershell
|
||||
python script\bootstrap.py -v --target_arch=x64
|
||||
```
|
||||
|
||||
The other building steps are exactly the same.
|
||||
|
||||
## 테스트
|
||||
|
||||
```powershell
|
||||
python script\test.py
|
||||
```
|
||||
|
||||
## 문제 해결
|
||||
|
||||
### Command xxxx not found
|
||||
|
||||
If you encountered an error like `Command xxxx not found`, you may try to use
|
||||
the `VS2012 Command Prompt` console to execute the build scripts.
|
||||
|
||||
### Fatal internal compiler error: C1001
|
||||
|
||||
Make sure you have the latest Visual Studio update installed.
|
||||
|
||||
### Assertion failed: ((handle))->activecnt >= 0
|
||||
|
||||
If building under Cygwin, you may see `bootstrap.py` failed with following
|
||||
error:
|
||||
|
||||
```
|
||||
Assertion failed: ((handle))->activecnt >= 0, file src\win\pipe.c, line 1430
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "script/bootstrap.py", line 87, in <module>
|
||||
sys.exit(main())
|
||||
File "script/bootstrap.py", line 22, in main
|
||||
update_node_modules('.')
|
||||
File "script/bootstrap.py", line 56, in update_node_modules
|
||||
execute([NPM, 'install'])
|
||||
File "/home/zcbenz/codes/raven/script/lib/util.py", line 118, in execute
|
||||
raise e
|
||||
subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 3
|
||||
```
|
||||
|
||||
This is caused by a bug when using Cygwin python and Win32 node together. The
|
||||
solution is to use the Win32 python to execute the bootstrap script (supposing
|
||||
you have installed python under `C:\Python27`):
|
||||
|
||||
```bash
|
||||
/cygdrive/c/Python27/python.exe script/bootstrap.py
|
||||
```
|
||||
|
||||
### LNK1181: cannot open input file 'kernel32.lib'
|
||||
|
||||
Try reinstalling 32bit node.js.
|
||||
|
||||
### Error: ENOENT, stat 'C:\Users\USERNAME\AppData\Roaming\npm'
|
||||
|
||||
Simply making that directory [should fix the problem](http://stackoverflow.com/a/25095327/102704):
|
||||
|
||||
```powershell
|
||||
mkdir ~\AppData\Roaming\npm
|
||||
```
|
||||
|
||||
### node-gyp is not recognized as an internal or external command
|
||||
|
||||
You may get this error if you are using Git Bash for building, you should use
|
||||
PowerShell or VS2012 Command Prompt instead.
|
64
docs/development/build-system-overview-ko.md
Normal file
64
docs/development/build-system-overview-ko.md
Normal file
|
@ -0,0 +1,64 @@
|
|||
# 빌드 시스템 개요
|
||||
|
||||
Electron uses `gyp` for project generation, and `ninja` for building, project
|
||||
configurations can be found in `.gyp` and `.gypi` files.
|
||||
|
||||
## Gyp 파일들
|
||||
|
||||
Following `gyp` files contain the main rules of building Electron:
|
||||
|
||||
* `atom.gyp` defines how Electron itself is built.
|
||||
* `common.gypi` adjusts the build configurations of Node to make it build
|
||||
together with Chromium.
|
||||
* `vendor/brightray/brightray.gyp` defines how `brightray` is built, and
|
||||
includes the default configurations of linking with Chromium.
|
||||
* `vendor/brightray/brightray.gypi` includes general build configurations about
|
||||
building.
|
||||
|
||||
## 구성요소 빌드
|
||||
|
||||
Since Chromium is quite a large project, the final linking stage would take
|
||||
quite a few minutes, making it hard for development. In order to solve this,
|
||||
Chromium introduced the "component build", which builds each component as a
|
||||
separate shared library, making linking very quick but sacrificing file size
|
||||
and performance.
|
||||
|
||||
In Electron we took a very similar approach: for `Debug` builds, the binary
|
||||
will be linked to shared library version of Chromium's components to achieve
|
||||
fast linking time; for `Release` builds, the binary will be linked to the static
|
||||
library versions, so we can have the best possible binary size and performance.
|
||||
|
||||
## 부트스트랩 최소화
|
||||
|
||||
All of Chromium's prebuilt binaries are downloaded when running the bootstrap
|
||||
script. By default both static libraries and shared libraries will be
|
||||
downloaded and the final size should be between 800MB and 2GB according to the
|
||||
platform.
|
||||
|
||||
If you only want to build Electron quickly for testing or development, you
|
||||
can only download the shared library versions by passing the `--dev` parameter:
|
||||
|
||||
```bash
|
||||
$ ./script/bootstrap.py --dev
|
||||
$ ./script/build.py -c D
|
||||
```
|
||||
|
||||
## Two-phrase 프로젝트 생성
|
||||
|
||||
Electron links with different sets of libraries in `Release` and `Debug`
|
||||
builds, however `gyp` doesn't support configuring different link settings for
|
||||
different configurations.
|
||||
|
||||
To work around this Electron uses a `gyp` variable
|
||||
`libchromiumcontent_component` to control which link settings to use, and only
|
||||
generates one target when running `gyp`.
|
||||
|
||||
## 타겟 이름
|
||||
|
||||
Unlike most projects that use `Release` and `Debug` as target names, Electron
|
||||
uses `R` and `D` instead. This is because `gyp` randomly crashes if there is
|
||||
only one `Release` or `Debug` build configuration is defined, and Electron has
|
||||
to only generate one target for one time as stated above.
|
||||
|
||||
This only affects developers, if you are only building Electron for rebranding
|
||||
you are not affected.
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
C++과 Python스크립트는 Chromium의 [코딩 스타일](http://www.chromium.org/developers/coding-style)을 따릅니다.
|
||||
파이선 스크립트 `script/cpplint.py`를 사용하여 모든 파일이 해당 코딩스타일에 맞게 코딩 되었는지 확인할 수 있습니다.
|
||||
|
||||
파이선의 버전은 2.7을 사용합니다.
|
||||
|
||||
## CoffeeScript
|
||||
|
|
56
docs/development/setting-up-symbol-server-ko.md
Normal file
56
docs/development/setting-up-symbol-server-ko.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# 디버거에서 디버그 심볼 서버 설정
|
||||
|
||||
Debug symbols allow you to have better debugging sessions. They have information
|
||||
about the functions contained in executables and dynamic libraries and provide
|
||||
you with information to get clean call stacks. A Symbol Server allows the
|
||||
debugger to load the correct symbols, binaries and sources automatically without
|
||||
forcing users to download large debugging files. The server functions like
|
||||
[Microsoft's symbol server](http://support.microsoft.com/kb/311503) so the
|
||||
documentation there can be useful.
|
||||
|
||||
Note that because released Electron builds are heavily optimized, debugging is
|
||||
not always easy. The debugger will not be able to show you the content of all
|
||||
variables and the execution path can seem strange because of inlining, tail
|
||||
calls, and other compiler optimizations. The only workaround is to build an
|
||||
unoptimized local build.
|
||||
|
||||
The official symbol server URL for Electron is
|
||||
http://54.249.141.255:8086/atom-shell/symbols.
|
||||
You cannot visit this URL directly: you must add it to the symbol path of your
|
||||
debugging tool. In the examples below, a local cache directory is used to avoid
|
||||
repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an
|
||||
appropriate cache directory on your machine.
|
||||
|
||||
## Windbg에서 심볼 서버 사용하기
|
||||
|
||||
The Windbg symbol path is configured with a string value delimited with asterisk
|
||||
characters. To use only the Electron symbol server, add the following entry to
|
||||
your symbol path (__note:__ you can replace `c:\code\symbols` with any writable
|
||||
directory on your computer, if you'd prefer a different location for downloaded
|
||||
symbols):
|
||||
|
||||
```
|
||||
SRV*c:\code\symbols\*http://54.249.141.255:8086/atom-shell/symbols
|
||||
```
|
||||
|
||||
Set this string as `_NT_SYMBOL_PATH` in the environment, using the Windbg menus,
|
||||
or by typing the `.sympath` command. If you would like to get symbols from
|
||||
Microsoft's symbol server as well, you should list that first:
|
||||
|
||||
```
|
||||
SRV*c:\code\symbols\*http://msdl.microsoft.com/download/symbols;SRV*c:\code\symbols\*http://54.249.141.255:8086/atom-shell/symbols
|
||||
```
|
||||
|
||||
## Using the symbol server in Visual Studio
|
||||
|
||||
<img src='http://mdn.mozillademos.org/files/733/symbol-server-vc8express-menu.jpg'>
|
||||
<img src='http://mdn.mozillademos.org/files/2497/2005_options.gif'>
|
||||
|
||||
## 문제 해결: Symbols will not load
|
||||
|
||||
Type the following commands in Windbg to print why symbols are not loading:
|
||||
|
||||
```
|
||||
> !sym noisy
|
||||
> .reload /f chromiumcontent.dll
|
||||
```
|
48
docs/development/source-code-directory-structure-ko.md
Normal file
48
docs/development/source-code-directory-structure-ko.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# 소스 코드 디렉터리 구조
|
||||
|
||||
## 개요
|
||||
|
||||
Electron의 소스 코드는 몇 개의 파트로 분리되어 있습니다. 우리는 Chromium의 분리 규칙(separation conventions)을 주로 따르고 있습니다.
|
||||
|
||||
이미 [Chromium의 멀티 프로세스 아키텍쳐](http://dev.chromium.org/developers/design-documents/multi-process-architecture)에 익숙해져 있다면 소스 코드를 이해하기 쉬울 것입니다.
|
||||
|
||||
## 소스 코드 구조
|
||||
|
||||
* **atom** - Electron의 소스코드.
|
||||
* **app** - 시스템 엔트리 코드.
|
||||
* **browser** - 주 윈도우를 포함한 프론트엔드, UI, 그리고 메인 프로세스에 관련된 것들. 주 랜더러와 웹 페이지 관리관련 코드.
|
||||
* **lib** - 메인 프로세스 초기화 코드의 자바스크립트 파트.
|
||||
* **ui** - 크로스 플랫폼에 대응하는 UI 구현.
|
||||
* **cocoa** - 코코아 특정 소스 코드.
|
||||
* **gtk** - GTK+ 특정 소스 코드.
|
||||
* **win** - Windows GUI 특정 소스 코드.
|
||||
* **default_app** - 어플리케이션이 제공되지 않으면 기본적으로 사용될 페이지.
|
||||
* **api** - 메인 프로세스 API들의 구현.
|
||||
* **lib** - API 구현의 자바스크립트 파트.
|
||||
* **net** - 네트워크 관련 코드.
|
||||
* **mac** - Mac 특정 Objective-C 소스 코드.
|
||||
* **resources** - 아이콘들, 플랫폼 종속성 파일들, 기타 등등.
|
||||
* **renderer** - 렌더러 프로세스에서 작동하는 코드들.
|
||||
* **lib** - 렌더러 프로세스 초기화 코드의 자바스크립트 파트.
|
||||
* **api** - 렌더러 프로세스 API들의 구현.
|
||||
* **lib** - API 구현의 자바스크립트 파트.
|
||||
* **common** - 메인 프로세스와 렌더러 프로세스에서 공유하는 코드. 유틸리티 함수와 node 메시지 루프를 Chromium의 메시지 루프에 통합시킨 코드가 포함.
|
||||
* **lib** - 공통 자바스크립트 초기화 코드.
|
||||
* **api** - 공통 API들의 구현, Electron의 빌트인 모듈 기초 코드들.
|
||||
* **lib** - API 구현의 자바스크립트 파트.
|
||||
* **chromium_src** - 복사된 Chromium 소스 코드.
|
||||
* **docs** - 참조 문서.
|
||||
* **spec** - 자동화된 테스트.
|
||||
* **atom.gyp** - Electron의 빌드 규칙.
|
||||
* **common.gypi** - 컴파일러 설정 및 `node` 와 `breakpad` 등의 구성요소를 위한 빌드 규칙.
|
||||
|
||||
## 그외 디렉터리 구조
|
||||
|
||||
* **script** - 개발목적으로 사용되는 빌드, 패키징, 테스트, 기타등을 실행하는 스크립트.
|
||||
* **tools** - gyp 파일에서 사용되는 헬퍼 스크립트, `script`와는 다르게 유저로부터 직접 실행되지 않는 스크립트들을 이곳에 넣습니다.
|
||||
* **vendor** - 소스코드의 서드파티 종속성 코드, 소스 코드 디렉터리가 겹쳐 혼란을 일으킬 수 있기 때문에,
|
||||
우리는 `third_party`와 같은 Chromium 소스 코드 디렉터리에서 사용된 폴더 이름을 사용하지 않았습니다.
|
||||
* **node_modules** - 빌드에 사용되는 node 서드파티 모듈.
|
||||
* **out** - `ninja`의 임시 출력 디렉터리.
|
||||
* **dist** - 배포용 바이너리를 빌드할 때 사용하는 `script/create-dist.py` 스크립트로부터 만들어지는 임시 디렉터리.
|
||||
* **external_binaries** - `gyp`를 통한 빌드가 지원하지 않아 따로 다운로드된 서드파티 프레임워크 바이너리들.
|
Loading…
Add table
Add a link
Reference in a new issue