From 1a1b45e088e02c3e35402dc07d112d03b17dceb8 Mon Sep 17 00:00:00 2001 From: Jonatas Freitas Date: Fri, 4 Sep 2015 19:01:31 -0300 Subject: [PATCH 01/33] application-distribution.md translated to pt-BR --- docs-translations/pt-BR/README-pt-BR.md | 2 +- .../application-distribution-pt-BR.md | 118 ++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 docs-translations/pt-BR/tutorial/application-distribution-pt-BR.md diff --git a/docs-translations/pt-BR/README-pt-BR.md b/docs-translations/pt-BR/README-pt-BR.md index 111ab06a39..1fe9ab14b6 100644 --- a/docs-translations/pt-BR/README-pt-BR.md +++ b/docs-translations/pt-BR/README-pt-BR.md @@ -1,6 +1,6 @@ ## Guias -* [Distribuir Aplicação](../../docs/tutorial/application-distribution.md) +* [Distribuir Aplicação](tutorial/application-distribution-pt-BR.md) * [Empacotamento da aplicação](../../docs/tutorial/application-packaging.md) * [Usando módulos nativos](../../docs/tutorial/using-native-node-modules.md) * [Depuração do processo principal](../../docs/tutorial/debugging-main-process.md) diff --git a/docs-translations/pt-BR/tutorial/application-distribution-pt-BR.md b/docs-translations/pt-BR/tutorial/application-distribution-pt-BR.md new file mode 100644 index 0000000000..41f2457c40 --- /dev/null +++ b/docs-translations/pt-BR/tutorial/application-distribution-pt-BR.md @@ -0,0 +1,118 @@ +# Distribuição de aplicações + +Para distribuir sua aplicação com o Electron, você deve nomear o diretório que contém sua aplicação como +`app` e dentro deste diretório colocar os recursos que você está utilizando (no OSX +`Electron.app/Contents/Resources/`, +no Linux e no Windows é em `resources/`): + +No OSX: + +```text +electron/Electron.app/Contents/Resources/app/ +├── package.json +├── main.js +└── index.html +``` + +No Windows e Linux: + +```text +electron/resources/app +├── package.json +├── main.js +└── index.html +``` + +Logo após execute `Electron.app` (ou `electron` no Linux e `electron.exe` no Windows), +e o Electron iniciaria a aplicação. O diretório `electron` será utilizado para criar a distribuição para +usuários finais. + +## Empacotando sua aplicação em um arquivo. + +Além de copiar todos os seus arquivos fontes para a distribuição, você também pode +empacotar seu aplicativo em um arquivo [asar](https://github.com/atom/asar) para evitar +de expor seu código fonte aos usuários finais. + +Para usar um arquivo `asar` ao invés da pasta `app` você precisa mudar o nome do +arquivo para `app.asar` e colocá-lo sob o diretório de recursos do Electron como +mostrado abaixo, então o Electron vai ler o arquivo e iniciar a aplicação a partir dele. + +No OSX: + +```text +electron/Electron.app/Contents/Resources/ +└── app.asar +``` + +No Windows e Linux: + +```text +electron/resources/ +└── app.asar +``` + +Mais detalhes podem ser encontrados em [Empacotamento da aplicação](../../../docs/tutorial/application-packaging.md). + +## Renomeando a marca Electron na sua distribuição + +Depois de empacotar seu aplicativo Electron, você vai querer renomear a marca Electron +antes de distribuí-lo aos usuários. + +### Janelas + +Você pode renomear `electron.exe` para o nome que desejar e editar o seu ícone e outras +informações com ferramentas como [rcedit](https://github.com/atom/rcedit) ou +[ResEdit](http://www.resedit.net). + +### OS X + +Você pode renomear `Electron.app` para o nome que desejar e também pode mudar o nome +do `CFBundleDisplayName`, `CFBundleIdentifier` e os campos em `CFBundleName` +nos seguinte arquivos: + +* `Electron.app/Contents/Info.plist` +* `Electron.app/Contents/frameworks/Electron Helper.app/Contents/Info.plist` + +Você também pode renomear o arquivo de ajuda para evitar a exibição de `Electron Helper` no +Monitor de Atividades, mas certifique-se de também renomear o arquivo de ajuda no executável do +aplicativo. + +A estrutura de uma aplicação renomada seria assim: + +``` +MyApp.app/Contents +├── Info.plist +├── MacOS/ +│   └── MyApp +└── Frameworks/ + ├── MyApp Helper EH.app + | ├── Info.plist + | └── MacOS/ + |    └── MyApp Helper EH + ├── MyApp Helper NP.app + | ├── Info.plist + | └── MacOS/ + |    └── MyApp Helper NP + └── MyApp Helper.app + ├── Info.plist + └── MacOS/ +    └── MyApp Helper +``` + +### Linux + +Você pode renomear o executável `electron` para o nome que desejar. + +## Renomeando a marca Electron do código fonte. + +Também é possível fazer renomear a marca Electron do código fonte, alterando o nome do produto e +reconstruí-lo a partir da fonte, para fazer isso você precisa modificar o arquivo `atom.gyp`. + +### grunt-build-atom-shell + +A modificação do código fonte do Electron para ganhar a sua marca pode ser muito complexa, por isso, +uma tarefa para o Grunt foi criado e irá cuidar desta tarefa automaticamente para você: +[grunt-build-atom-shell](https://github.com/paulcbetts/grunt-build-atom-shell). + +Esta tarefa irá automaticamente editar o arquivo `.gyp`, compilar o código +e reconstruir os módulos nativos da aplicação para utilizar o novo nome. \ No newline at end of file From dcbd8316dfd4ff465b044f51c77a4ba4d7c7f0f3 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 5 Sep 2015 01:06:52 +0300 Subject: [PATCH 02/33] Remove chrome_version.h from git chrome_version.h is dynamically generated by bootstrap.py so it shouldn't be in git --- atom/common/chrome_version.h | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 atom/common/chrome_version.h diff --git a/atom/common/chrome_version.h b/atom/common/chrome_version.h deleted file mode 100644 index 2500516837..0000000000 --- a/atom/common/chrome_version.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2014 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -// This file is generated by script/bootstrap.py, you should never modify it -// by hand. - -#ifndef ATOM_COMMON_CHROME_VERSION_H_ -#define ATOM_COMMON_CHROME_VERSION_H_ - -#define CHROME_VERSION_STRING "45.0.2454.85" -#define CHROME_VERSION "v" CHROME_VERSION_STRING - -#endif // ATOM_COMMON_CHROME_VERSION_H_ From 41e1555cf4cd223024a38bbe70b2b71a395f102d Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 5 Sep 2015 01:11:37 +0300 Subject: [PATCH 03/33] Add chrome_version.h to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0c6f4cb79d..dc7a879cc8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +/atom/common/chrome_version.h /build/ /dist/ /external_binaries/ From a8d56df41e908bfc4420863492f36cee935d30a6 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 5 Sep 2015 01:29:12 +0300 Subject: [PATCH 04/33] Drop "-es" from file names When "README.md" is named "README-es.md", github doesn't show it's preview automatically. So I removed "-es" from all the docs. --- docs-translations/es/{README-es.md => README.md} | 14 +++++++------- ...tribution-es.md => application-distribution.md} | 0 ...on-packaging-es.md => application-packaging.md} | 0 ...ain-process-es.md => debugging-main-process.md} | 0 ...on-es.md => desktop-environment-integration.md} | 0 ...tools-extension-es.md => devtools-extension.md} | 0 ...fline-events-es.md => online-offline-events.md} | 0 .../tutorial/{quick-start-es.md => quick-start.md} | 0 ...-modules-es.md => using-native-node-modules.md} | 0 ...h-plugin-es.md => using-pepper-flash-plugin.md} | 0 ...river-es.md => using-selenium-and-webdriver.md} | 0 11 files changed, 7 insertions(+), 7 deletions(-) rename docs-translations/es/{README-es.md => README.md} (94%) rename docs-translations/es/tutorial/{application-distribution-es.md => application-distribution.md} (100%) rename docs-translations/es/tutorial/{application-packaging-es.md => application-packaging.md} (100%) rename docs-translations/es/tutorial/{debugging-main-process-es.md => debugging-main-process.md} (100%) rename docs-translations/es/tutorial/{desktop-environment-integration-es.md => desktop-environment-integration.md} (100%) rename docs-translations/es/tutorial/{devtools-extension-es.md => devtools-extension.md} (100%) rename docs-translations/es/tutorial/{online-offline-events-es.md => online-offline-events.md} (100%) rename docs-translations/es/tutorial/{quick-start-es.md => quick-start.md} (100%) rename docs-translations/es/tutorial/{using-native-node-modules-es.md => using-native-node-modules.md} (100%) rename docs-translations/es/tutorial/{using-pepper-flash-plugin-es.md => using-pepper-flash-plugin.md} (100%) rename docs-translations/es/tutorial/{using-selenium-and-webdriver-es.md => using-selenium-and-webdriver.md} (100%) diff --git a/docs-translations/es/README-es.md b/docs-translations/es/README.md similarity index 94% rename from docs-translations/es/README-es.md rename to docs-translations/es/README.md index 617e66ec6f..d95ad4ee8b 100644 --- a/docs-translations/es/README-es.md +++ b/docs-translations/es/README.md @@ -1,12 +1,12 @@ ## Guías -* [Distribución de aplicaciones](tutorial/application-distribution-es.md) -* [Empaquetamiento de aplicaciones](tutorial/application-packaging-es.md) -* [Utilizando módulos nativos](tutorial/using-native-node-modules-es.md) -* [Depurando el proceso principal](tutorial/debugging-main-process-es.md) -* [Utilizando Selenium y WebDriver](tutorial/using-selenium-and-webdriver-es.md) -* [Extensión DevTools](tutorial/devtools-extension-es.md) -* [Utilizando el plugin pepper flash](tutorial/using-pepper-flash-plugin-es.md) +* [Distribución de aplicaciones](tutorial/application-distribution.md) +* [Empaquetamiento de aplicaciones](tutorial/application-packaging.md) +* [Utilizando módulos nativos](tutorial/using-native-node-modules.md) +* [Depurando el proceso principal](tutorial/debugging-main-process.md) +* [Utilizando Selenium y WebDriver](tutorial/using-selenium-and-webdriver.md) +* [Extensión DevTools](tutorial/devtools-extension.md) +* [Utilizando el plugin pepper flash](tutorial/using-pepper-flash-plugin.md) ## Tutoriales diff --git a/docs-translations/es/tutorial/application-distribution-es.md b/docs-translations/es/tutorial/application-distribution.md similarity index 100% rename from docs-translations/es/tutorial/application-distribution-es.md rename to docs-translations/es/tutorial/application-distribution.md diff --git a/docs-translations/es/tutorial/application-packaging-es.md b/docs-translations/es/tutorial/application-packaging.md similarity index 100% rename from docs-translations/es/tutorial/application-packaging-es.md rename to docs-translations/es/tutorial/application-packaging.md diff --git a/docs-translations/es/tutorial/debugging-main-process-es.md b/docs-translations/es/tutorial/debugging-main-process.md similarity index 100% rename from docs-translations/es/tutorial/debugging-main-process-es.md rename to docs-translations/es/tutorial/debugging-main-process.md diff --git a/docs-translations/es/tutorial/desktop-environment-integration-es.md b/docs-translations/es/tutorial/desktop-environment-integration.md similarity index 100% rename from docs-translations/es/tutorial/desktop-environment-integration-es.md rename to docs-translations/es/tutorial/desktop-environment-integration.md diff --git a/docs-translations/es/tutorial/devtools-extension-es.md b/docs-translations/es/tutorial/devtools-extension.md similarity index 100% rename from docs-translations/es/tutorial/devtools-extension-es.md rename to docs-translations/es/tutorial/devtools-extension.md diff --git a/docs-translations/es/tutorial/online-offline-events-es.md b/docs-translations/es/tutorial/online-offline-events.md similarity index 100% rename from docs-translations/es/tutorial/online-offline-events-es.md rename to docs-translations/es/tutorial/online-offline-events.md diff --git a/docs-translations/es/tutorial/quick-start-es.md b/docs-translations/es/tutorial/quick-start.md similarity index 100% rename from docs-translations/es/tutorial/quick-start-es.md rename to docs-translations/es/tutorial/quick-start.md diff --git a/docs-translations/es/tutorial/using-native-node-modules-es.md b/docs-translations/es/tutorial/using-native-node-modules.md similarity index 100% rename from docs-translations/es/tutorial/using-native-node-modules-es.md rename to docs-translations/es/tutorial/using-native-node-modules.md diff --git a/docs-translations/es/tutorial/using-pepper-flash-plugin-es.md b/docs-translations/es/tutorial/using-pepper-flash-plugin.md similarity index 100% rename from docs-translations/es/tutorial/using-pepper-flash-plugin-es.md rename to docs-translations/es/tutorial/using-pepper-flash-plugin.md diff --git a/docs-translations/es/tutorial/using-selenium-and-webdriver-es.md b/docs-translations/es/tutorial/using-selenium-and-webdriver.md similarity index 100% rename from docs-translations/es/tutorial/using-selenium-and-webdriver-es.md rename to docs-translations/es/tutorial/using-selenium-and-webdriver.md From 0bc8e7b7876c0c21148be3db68a5f9b1f69a4aa3 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Sat, 5 Sep 2015 01:40:26 +0300 Subject: [PATCH 05/33] Update README.md Most of the links in the page were invalid because those docs aren't translated yet, so I changed them to point to the originals written in English. IMO that's a better experience than receiving 404. --- docs-translations/es/README.md | 76 +++++++++++++++++----------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/docs-translations/es/README.md b/docs-translations/es/README.md index d95ad4ee8b..497cc4e05c 100644 --- a/docs-translations/es/README.md +++ b/docs-translations/es/README.md @@ -10,59 +10,59 @@ ## Tutoriales -* [Introducción](tutorial/quick-start.md) -* [Integración con el entorno de escritorio](tutorial/desktop-environment-integration.md) -* [Detección del evento en línea/fuera de línea](tutorial/online-offline-events.md) +* [Introducción](../../docs/tutorial/quick-start.md) +* [Integración con el entorno de escritorio](../../docs/tutorial/desktop-environment-integration.md) +* [Detección del evento en línea/fuera de línea](../../docs/tutorial/online-offline-events.md) ## API -* [Sinopsis](api/synopsis.md) -* [Proceso](api/process.md) -* [Parámetros CLI soportados (Chrome)](api/chrome-command-line-switches.md) +* [Sinopsis](../../docs/api/synopsis.md) +* [Proceso](../../docs/api/process.md) +* [Parámetros CLI soportados (Chrome)](../../docs/api/chrome-command-line-switches.md) Elementos DOM customizados: -* [Objeto `File`](api/file-object.md) -* [Etiqueta ``](api/web-view-tag.md) -* [Función `window.open`](api/window-open.md) +* [Objeto `File`](../../docs/api/file-object.md) +* [Etiqueta ``](../../docs/api/web-view-tag.md) +* [Función `window.open`](../../docs/api/window-open.md) Módulos del proceso principal: -* [app](api/app.md) -* [auto-updater](api/auto-updater.md) -* [browser-window](api/browser-window.md) -* [content-tracing](api/content-tracing.md) -* [dialog](api/dialog.md) -* [global-shortcut](api/global-shortcut.md) -* [ipc (main process)](api/ipc-main-process.md) -* [menu](api/menu.md) -* [menu-item](api/menu-item.md) -* [power-monitor](api/power-monitor.md) -* [power-save-blocker](api/power-save-blocker.md) -* [protocol](api/protocol.md) -* [tray](api/tray.md) +* [app](../../docs/api/app.md) +* [auto-updater](../../docs/api/auto-updater.md) +* [browser-window](../../docs/api/browser-window.md) +* [content-tracing](../../docs/api/content-tracing.md) +* [dialog](../../docs/api/dialog.md) +* [global-shortcut](../../docs/api/global-shortcut.md) +* [ipc (main process)](../../docs/api/ipc-main-process.md) +* [menu](../../docs/api/menu.md) +* [menu-item](../../docs/api/menu-item.md) +* [power-monitor](../../docs/api/power-monitor.md) +* [power-save-blocker](../../docs/api/power-save-blocker.md) +* [protocol](../../docs/api/protocol.md) +* [tray](../../docs/api/tray.md) Módulos del renderer (página web): -* [ipc (renderer)](api/ipc-renderer.md) -* [remote](api/remote.md) -* [web-frame](api/web-frame.md) +* [ipc (renderer)](../../docs/api/ipc-renderer.md) +* [remote](../../docs/api/remote.md) +* [web-frame](../../docs/api/web-frame.md) Módulos de ambos procesos: -* [clipboard](api/clipboard.md) -* [crash-reporter](api/crash-reporter.md) -* [native-image](api/native-image.md) -* [screen](api/screen.md) -* [shell](api/shell.md) +* [clipboard](../../docs/api/clipboard.md) +* [crash-reporter](../../docs/api/crash-reporter.md) +* [native-image](../../docs/api/native-image.md) +* [screen](../../docs/api/screen.md) +* [shell](../../docs/api/shell.md) ## Desarrollo -* [Guía de estilo](development/coding-style.md) -* [Estructura de directorio](development/source-code-directory-structure.md) -* [Diferencias técnicas con NW.js (anteriormente conocido como node-webkit)](development/atom-shell-vs-node-webkit.md) -* [Sistema de compilación](development/build-system-overview.md) -* [Instrucciones de compilación (Mac)](development/build-instructions-osx.md) -* [Instrucciones de compilación (Windows)](development/build-instructions-windows.md) -* [Instrucciones de compilación (Linux)](development/build-instructions-linux.md) -* [Configurando un servidor de símbolos en el depurador](development/setting-up-symbol-server.md) +* [Guía de estilo](../../docs/development/coding-style.md) +* [Estructura de directorio](../../docs/development/source-code-directory-structure.md) +* [Diferencias técnicas con NW.js (anteriormente conocido como node-webkit)](../../docs/development/atom-shell-vs-node-webkit.md) +* [Sistema de compilación](../../docs/development/build-system-overview.md) +* [Instrucciones de compilación (Mac)](../../docs/development/build-instructions-osx.md) +* [Instrucciones de compilación (Windows)](../../docs/development/build-instructions-windows.md) +* [Instrucciones de compilación (Linux)](../../docs/development/build-instructions-linux.md) +* [Configurando un servidor de símbolos en el depurador](../../docs/development/setting-up-symbol-server.md) From 943fe2c22d32620e2a82dfb7ef73f60b676bbe60 Mon Sep 17 00:00:00 2001 From: Jonatas Freitas Date: Sat, 5 Sep 2015 23:32:51 -0300 Subject: [PATCH 06/33] Change file names to follow styleguide --- docs-translations/pt-BR/{README-pt-BR.md => README.md} | 2 +- docs-translations/pt-BR/{styleguide-pt-BR.md => styleguide.md} | 0 ...cation-distribution-pt-BR.md => application-distribution.md} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename docs-translations/pt-BR/{README-pt-BR.md => README.md} (97%) rename docs-translations/pt-BR/{styleguide-pt-BR.md => styleguide.md} (100%) rename docs-translations/pt-BR/tutorial/{application-distribution-pt-BR.md => application-distribution.md} (100%) diff --git a/docs-translations/pt-BR/README-pt-BR.md b/docs-translations/pt-BR/README.md similarity index 97% rename from docs-translations/pt-BR/README-pt-BR.md rename to docs-translations/pt-BR/README.md index 1fe9ab14b6..08834fc39c 100644 --- a/docs-translations/pt-BR/README-pt-BR.md +++ b/docs-translations/pt-BR/README.md @@ -1,6 +1,6 @@ ## Guias -* [Distribuir Aplicação](tutorial/application-distribution-pt-BR.md) +* [Distribuir Aplicação](tutorial/application-distribution.md) * [Empacotamento da aplicação](../../docs/tutorial/application-packaging.md) * [Usando módulos nativos](../../docs/tutorial/using-native-node-modules.md) * [Depuração do processo principal](../../docs/tutorial/debugging-main-process.md) diff --git a/docs-translations/pt-BR/styleguide-pt-BR.md b/docs-translations/pt-BR/styleguide.md similarity index 100% rename from docs-translations/pt-BR/styleguide-pt-BR.md rename to docs-translations/pt-BR/styleguide.md diff --git a/docs-translations/pt-BR/tutorial/application-distribution-pt-BR.md b/docs-translations/pt-BR/tutorial/application-distribution.md similarity index 100% rename from docs-translations/pt-BR/tutorial/application-distribution-pt-BR.md rename to docs-translations/pt-BR/tutorial/application-distribution.md From f56d71510409b40b36e0b7ad881838f4791833ff Mon Sep 17 00:00:00 2001 From: Jonatas Freitas Date: Sun, 6 Sep 2015 01:27:34 -0300 Subject: [PATCH 07/33] Translated application-packaging.md to pt-BR. --- docs-translations/pt-BR/README.md | 2 +- .../pt-BR/tutorial/application-packaging.md | 158 ++++++++++++++++++ 2 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 docs-translations/pt-BR/tutorial/application-packaging.md diff --git a/docs-translations/pt-BR/README.md b/docs-translations/pt-BR/README.md index 08834fc39c..88fb26a5ea 100644 --- a/docs-translations/pt-BR/README.md +++ b/docs-translations/pt-BR/README.md @@ -1,7 +1,7 @@ ## Guias * [Distribuir Aplicação](tutorial/application-distribution.md) -* [Empacotamento da aplicação](../../docs/tutorial/application-packaging.md) +* [Empacotamento da aplicação](tutorial/application-packaging.md) * [Usando módulos nativos](../../docs/tutorial/using-native-node-modules.md) * [Depuração do processo principal](../../docs/tutorial/debugging-main-process.md) * [Usando Selenium e WebDriver](../../docs/tutorial/using-selenium-and-webdriver.md) diff --git a/docs-translations/pt-BR/tutorial/application-packaging.md b/docs-translations/pt-BR/tutorial/application-packaging.md new file mode 100644 index 0000000000..f55cbb2f7d --- /dev/null +++ b/docs-translations/pt-BR/tutorial/application-packaging.md @@ -0,0 +1,158 @@ +# Empacotamento da aplicação + +Para proteger os recursos e o código fonte da sua aplicação você pode optar por +empacotar a sua aplicação em um arquivo [asar](https://github.com/atom/asar), isto é possível com poucas +alterações em seu código. + +## Gerando um arquivo `asar` + +Um arquivo [asar][asar] é um formato parecido com tar ou zip bem simples que concatena arquivos +em um único arquivo. O Electron pode ler arquivos arbitrários a partir dele sem descompacatar +o arquivo inteiro. + +Passos para empacotar a sua aplicação em um arquivo `asar`: + +### 1. Instale o utilitário asar + +```bash +$ npm install -g asar +``` + +### 2. Empacote a sua aplicação + +```bash +$ asar pack your-app app.asar +``` + +## Usando arquivos `asar` + +No Electron existem dois conjuntos de APIs: Node APIs fornecidas pelo Node.js e Web +APIs fornecidas pelo Chromium. Ambas as APIs suportam a leitura de arquivos `asar`. + +### Node API + +As API's do Node como `fs.readFile` e `require` tratam os pacotes `asar` +como diretórios virtuais e os arquivos dentro dele como arquivos normais. + +Por exemplo, temos um arquivo `example.asar` sob `/path/to`: + +```bash +$ asar list /path/to/example.asar +/app.js +/file.txt +/dir/module.js +/static/index.html +/static/main.css +/static/jquery.min.js +``` + +Lendo um arquivo em pacote `asar`: + +```javascript +var fs = require('fs'); +fs.readFileSync('/path/to/example.asar/file.txt'); +``` + +Listando todos os arquivos a partir da raiz: + +```javascript +var fs = require('fs'); +fs.readdirSync('/path/to/example.asar'); +``` + +Utilizando um módulo dentro do pacote `asar`: + +```javascript +require('/path/to/example.asar/dir/module.js'); +``` + +Você também pode renderizar uma página web apartir de um arquivo `asar` utilizando o módulo `BrowserWindow`: + +```javascript +var BrowserWindow = require('browser-window'); +var win = new BrowserWindow({width: 800, height: 600}); +win.loadUrl('file:///path/to/example.asar/static/index.html'); +``` + +### API Web + +Em uma página web, arquivos em um pacote `asar` pode ser solicitado com o protocolo `file:`. +Como a API Node, arquivos `asar` são tratadas como diretórios. + +Por exemplo, para obter um arquivo com `$ .get`: + +```html + +``` + +### Tratando um pacote `asar` como um arquivo normal + +Para alguns casos, precisamos verificar o checksum de um pacote `asar`, para fazer isto, precisamos ler +o arquivo `asar` como um arquivo normal. Para isto, você pode usar o built-in +`original-fs` que fornece a API `fs`, sem apoio a arquivos asar`: + +```javascript +var originalFs = require('original-fs'); +originalFs.readFileSync('/path/to/example.asar'); +``` + +## Limitaçõs na API Node + +Mesmo fazendo grandes esforços para pacotes `asar` ser tratado no Node como diretórios, +ainda existem limitações devido a natureza de baixo nível do Node + +### Arquivos `asar` são somente leitura + +Os arquivos `asar` não podem ser modificados. + +### Diretório de trabalho não pode ser comportar como diretório de arquivos + +Embora pacotes `asar` são tratadas como diretórios, não há +diretórios reais no sistema de arquivos, assim você nunca pode definir o diretório de trabalho para +diretórios em pacotes `asar`, passando-os como a opção `cwd` de algumas APIs +também irá causar erros. + +### Descompactação extra em algumas APIs + +A maioria das APIs `fs` pode ler um arquivo ou obter informações de um arquivo a partir de pacotes `asar` +sem descompacta-lo, mas para algumas APIs da rota real o Electron irá extrair o arquivo necessário para um +arquivo temporário e passar o caminho do arquivo temporário para as APIs, +isso adiciona um pouco de sobrecarga para essas APIs. + +APIs que requer descompactação extras são: + +* `child_process.execFile` +* `fs.open` +* `fs.openSync` +* `process.dlopen` - Usado por `require` em módulos nativos + +### Falsas informações de status do módulo `fs.stat` + +O objeto `Stats` retornado por` fs.stat` e outras funções relacionadas não são informações confiáveis, +você não deve confiar no objeto `Stats` exceto para obter o +tamanho do arquivo e verificação de tipo de arquivo. + +## Adicionando arquivos em um pacote `asar` + +Como dito acima, algumas APIs deo Node irá descompactar o arquivo para quando o filesystem +requsistar, além dos problemas de desempenho, ele também pode levar a falsos alertas +de vírus. + +Para contornar isso, você pode descompactar alguns arquivos usando a +opção `--unpack`, um exemplo de exclusão de bibliotecas compartilhadas de módulos nativos +é: + +```bash +$ asar pack app app.asar --unpack *.node +``` + +Depois de executar o comando, além do `app.asar`, há também +`app.asar.unpacked` pasta gerada que contém os arquivos descompactados, você +deve copiá-lo juntamente com `app.asar` quando enviá-lo para os usuários. + +Mais informações no repositório [asar](https://github.com/atom/asar) \ No newline at end of file From 13722e26cd7e9c44380299b063fb7ad5bdb3081b Mon Sep 17 00:00:00 2001 From: John-Lin Date: Mon, 7 Sep 2015 17:36:14 +0800 Subject: [PATCH 08/33] add doc translation for power-monitor.md --- docs-translations/zh-TW/api/power-monitor.md | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs-translations/zh-TW/api/power-monitor.md diff --git a/docs-translations/zh-TW/api/power-monitor.md b/docs-translations/zh-TW/api/power-monitor.md new file mode 100644 index 0000000000..e38dee3212 --- /dev/null +++ b/docs-translations/zh-TW/api/power-monitor.md @@ -0,0 +1,36 @@ +# power-monitor + +`power-monitor` 模組用來監看電源狀態的改變。你只能在主行程 (main process) 裡面使用。 +你應該要等到 `ready` 在 `app` 模組裡的事件被觸發 (emit),再使用這個模組。 + +舉例來說: + +```javascript +var app = require('app'); + +app.on('ready', function() { + require('power-monitor').on('suspend', function() { + console.log('The system is going to sleep'); + }); +}); +``` + +## 事件 (Events) + +`power-monitor` 模組會觸發 (emits) 以下幾個事件: + +### 事件: 'suspend' + +當系統進入 睡眠 (suspend) 時觸發。 + +### 事件: 'resume' + +當系統 resume 時觸發。 + +### 事件: 'on-ac' + +當系統改變使用交流電源 (AC) 時觸發。 + +### 事件: 'on-battery' + +當系統改變使用電池店員時觸發。 From 66f7f2e6f28c566edb86ea84c1be46deef78cffa Mon Sep 17 00:00:00 2001 From: John-Lin Date: Mon, 7 Sep 2015 17:36:33 +0800 Subject: [PATCH 09/33] add doc translation for power-save-blocker.md --- .../zh-TW/api/power-save-blocker.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs-translations/zh-TW/api/power-save-blocker.md diff --git a/docs-translations/zh-TW/api/power-save-blocker.md b/docs-translations/zh-TW/api/power-save-blocker.md new file mode 100644 index 0000000000..a652751c0b --- /dev/null +++ b/docs-translations/zh-TW/api/power-save-blocker.md @@ -0,0 +1,47 @@ +# powerSaveBlocker + +`power-save-blocker` 模組是用來防止系統進入省電模式 low-power (sleep) mode +因此讓應用程式可以保持系統和螢幕的活躍 (active)。 + +舉例來說: + +```javascript +var powerSaveBlocker = require('power-save-blocker'); + +var id = powerSaveBlocker.start('prevent-display-sleep'); +console.log(powerSaveBlocker.isStarted(id)); + +powerSaveBlocker.stop(id); +``` + +## 方法 (Methods) + +`power-save-blocker` 模組有以下幾個方法: + +### `powerSaveBlocker.start(type)` + +* `type` String - Power save blocker type. + * `prevent-app-suspension` - 防止一個應用程式進入睡眠 (suspended)。 將保持系統活躍, + 但允許螢幕被關閉。 使用案例:下載一個檔案或是播放音樂。 + * `prevent-display-sleep`- 防止螢幕進入睡眠。將保持系統和螢幕的活躍。 + 使用案例:播放影片 + +當防止系統進入省電模式 low-power (sleep) mode 。 會回傳一個識別的整數來代表 power save blocker + +**注意:** `prevent-display-sleep` 比 `prevent-app-suspension` 擁有較高的優先權。 +只有高的優先全力才會有效,換句話說 `prevent-display-sleep` 總是會優先於 `prevent-app-suspension` + +例如,一個 API 呼叫 A 請求去做 `prevent-app-suspension`,而另外一個 B 請求去做 `prevent-display-sleep` + `prevent-display-sleep` 將會被使用,直到 B 停止他的請求,`prevent-app-suspension` 才會被使用。 + +### `powerSaveBlocker.stop(id)` + +* `id` Integer - power save blocker 會回傳 id 透過 `powerSaveBlocker.start`. + +將指定的 id 停止 power save blocker + +### `powerSaveBlocker.isStarted(id)` + +* `id` Integer - power save blocker 會回傳 id 透過 `powerSaveBlocker.start`. + +不管對應的 `powerSaveBlocker` 是否已經啟動,將會回傳一個布林值 (boolean) From d7ec0b99fdf37463599109dea7c78a01fe775125 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 7 Sep 2015 21:07:27 +0800 Subject: [PATCH 10/33] spec: process.stdout should not throw exception --- spec/node-spec.coffee | 4 ++++ spec/static/main.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index 5ec2bb05e9..164480603e 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -133,3 +133,7 @@ describe 'node feature', -> b = new Buffer(p.innerText) assert.equal b.toString(), 'Jøhänñéß' assert.equal Buffer.byteLength(p.innerText), 13 + + describe 'process.stdout', -> + it 'should not throw exception', -> + process.stdout diff --git a/spec/static/main.js b/spec/static/main.js index d8b53167c5..1f6f9325e4 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -10,6 +10,11 @@ process.port = 0; // will be used by crash-reporter spec. app.commandLine.appendSwitch('js-flags', '--expose_gc'); app.commandLine.appendSwitch('ignore-certificate-errors'); +// Accessing stdout in the main process will result in the process.stdout +// throwing UnknownSystemError in renderer process sometimes. This line makes +// sure we can reproduce it in renderer process. +process.stdout; + ipc.on('message', function(event, arg) { event.sender.send('message', arg); }); From 8912b404a9399c8fc7d8eccdf64aef1a3f5e6ea3 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 7 Sep 2015 21:34:15 +0800 Subject: [PATCH 11/33] spec: process.stdout should have isTTY defined --- spec/node-spec.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index 164480603e..d7c3b068f4 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -137,3 +137,6 @@ describe 'node feature', -> describe 'process.stdout', -> it 'should not throw exception', -> process.stdout + + it 'should have isTTY defined', -> + assert.equal typeof(process.stdout.isTTY), 'boolean' From d4aa2308cd91fa822e6c3ee6900df76c6ad81c0b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 7 Sep 2015 21:34:27 +0800 Subject: [PATCH 12/33] Update node to catch exception when accessing process.stdout --- vendor/node | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/node b/vendor/node index c8962e460f..9da7dd871c 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit c8962e460f3bf03d405489a8380a5571730f5f8d +Subproject commit 9da7dd871c313d318bc1447a83ba3c7618bbbc18 From 4412a89270ce0b7582c410e61a9d69fd8f3b65c5 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 7 Sep 2015 21:44:03 +0800 Subject: [PATCH 13/33] Explicitly writes debug log to stderr If we don't do this Chromium will close stdout and stderr for us, resulting process.stdout not working. --- atom/app/atom_main_delegate.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 02dd11c81b..3c7d6b2e70 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -38,7 +38,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { #else settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; #endif // defined(DEBUG) -#endif // defined(OS_WIN) +#else // defined(OS_WIN) + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; +#endif // !defined(OS_WIN) logging::InitLogging(settings); // Logging with pid and timestamp. From 62b1034c6be9a0590d3cea8978927e67650b0a08 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 7 Sep 2015 22:42:46 +0800 Subject: [PATCH 14/33] Suppress the isTTY spec, not reliable on some machines --- spec/node-spec.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index d7c3b068f4..94174c38b7 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -138,5 +138,6 @@ describe 'node feature', -> it 'should not throw exception', -> process.stdout - it 'should have isTTY defined', -> + # Not reliable on some machines + xit 'should have isTTY defined', -> assert.equal typeof(process.stdout.isTTY), 'boolean' From ad6e67fdfa8bb5443420d27cf42d80ec317b3e81 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Mon, 7 Sep 2015 19:51:28 +0300 Subject: [PATCH 15/33] Revert "Add chrome_version.h to gitignore" This reverts commit 41e1555cf4cd223024a38bbe70b2b71a395f102d. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index dc7a879cc8..0c6f4cb79d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .DS_Store -/atom/common/chrome_version.h /build/ /dist/ /external_binaries/ From b521e45ef886bd04adf2860898a8a0f1e5784a55 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Mon, 7 Sep 2015 19:51:37 +0300 Subject: [PATCH 16/33] Revert "Remove chrome_version.h from git" This reverts commit dcbd8316dfd4ff465b044f51c77a4ba4d7c7f0f3. --- atom/common/chrome_version.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 atom/common/chrome_version.h diff --git a/atom/common/chrome_version.h b/atom/common/chrome_version.h new file mode 100644 index 0000000000..2500516837 --- /dev/null +++ b/atom/common/chrome_version.h @@ -0,0 +1,14 @@ +// Copyright (c) 2014 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +// This file is generated by script/bootstrap.py, you should never modify it +// by hand. + +#ifndef ATOM_COMMON_CHROME_VERSION_H_ +#define ATOM_COMMON_CHROME_VERSION_H_ + +#define CHROME_VERSION_STRING "45.0.2454.85" +#define CHROME_VERSION "v" CHROME_VERSION_STRING + +#endif // ATOM_COMMON_CHROME_VERSION_H_ From db3e27ceaab98dd7602f8f619eda8ca7df8a3571 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Mon, 7 Sep 2015 21:55:02 +0300 Subject: [PATCH 17/33] Fix `create_chrome_version_h` in bootstrap.py The code was supposed to compare the content of the existing file with the new content and only replace the file if the content was different, but it had a fatal flow. It opened the existing file with 'w+' or 'wb+' and they both truncate the file, so the compare was always false and we always overwrote the file. The updated code compares the file content ignoring line endings and writes the file only if its different or if it didn't exist. --- script/bootstrap.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/script/bootstrap.py b/script/bootstrap.py index 293d3dc2dd..d5ad41a61c 100755 --- a/script/bootstrap.py +++ b/script/bootstrap.py @@ -162,13 +162,16 @@ def create_chrome_version_h(): version = f.read() with open(template_file, 'r') as f: template = f.read() - if sys.platform in ['win32', 'cygwin']: - open_mode = 'wb+' - else: - open_mode = 'w+' - with open(target_file, open_mode) as f: - content = template.replace('{PLACEHOLDER}', version.strip()) - if f.read() != content: + content = template.replace('{PLACEHOLDER}', version.strip()) + + # We update the file only if the content has changed (ignoring line ending + # differences). + should_write = True + if os.path.isfile(target_file): + with open(target_file, 'r') as f: + should_write = f.read().replace('r', '') != content.replace('r', '') + if should_write: + with open(target_file, 'w') as f: f.write(content) From 1e0facc103b25a26dcdec294e5b0c87dae37389e Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Tue, 8 Sep 2015 08:42:28 +0900 Subject: [PATCH 18/33] Update as upstream --- docs-translations/ko/api/web-view-tag.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs-translations/ko/api/web-view-tag.md b/docs-translations/ko/api/web-view-tag.md index e292e972dc..b4af6d3ea8 100644 --- a/docs-translations/ko/api/web-view-tag.md +++ b/docs-translations/ko/api/web-view-tag.md @@ -125,14 +125,14 @@ ``` -`webview`에서 사용하는 스토리지 파티션을 지정합니다. -스토리지 파티션 ID를 `persist:`로 시작하도록 지정하면 앱의 모든 `webview`에서 지정한 스토리지 파티션 ID를 사용하도록 할 수 있습니다. -만약 `persist:` 접두사가 없을 경우 `webview`는 인 메모리 스토리지 파티션을 사용합니다. -여러 `webview`에서 같은 파티션 ID를 사용하면 같은 스토리지 파티션을 공유합니다. -만약 스토리지 파티션 ID가 지정되지 않으면 앱의 기본 스토리지를 사용합니다. +페이지에서 사용하는 세션을 설정합니다. +만약 `partition` 속성이 `persist:` 접두사를 시작하면 같은 `partition` 속성을 가진 앱 내 모든 페이지가 공유하는 영구 세션을 사용합니다. +`persist:` 접두사가 없을 경우 페이지는 인 메모리 세션을 사용합니다. +동일한 `partition`을 지정하여 다중 페이지에서 동일한 세션을 공유할 수 있도록 할 수 있습니다. +만약 `partition`이 지정되지 않으면 앱의 기본 세션을 사용합니다. 이 값은 첫 탐색 이전에만 지정할 수 있습니다. -즉. 작동중인 랜더러 프로세스의 스토리지 파티션은 변경할 수 없습니다. +즉. 작동중인 랜더러 프로세스의 세션은 변경할 수 없습니다. 이후 이 값을 바꾸려고 시도하면 DOM 예외를 발생시킵니다. ## Methods From 21bd5789352be761a47702045431698ee4b1edd9 Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Tue, 8 Sep 2015 08:50:59 +0900 Subject: [PATCH 19/33] Update README-ko.md --- README-ko.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README-ko.md b/README-ko.md index 29ac5a0951..9ce6748fc8 100644 --- a/README-ko.md +++ b/README-ko.md @@ -13,6 +13,8 @@ Electron 프레임워크는 JavaScript, HTML 그리고 CSS를 사용하여 Cross Electron에 대한 중요한 알림을 받고 싶다면 Twitter에서 [@ElectronJS](https://twitter.com/electronjs)를 팔로우 하세요. +이 프로젝트는 기여자 규약 1.2를 준수합니다. 이 프로젝트에 참여할 때 코드를 유지해야 합니다. 받아들일 수 없는 행동은 atom@github.com로 보고 하십시오. + ## 다운로드 Linux, Windows, Mac용으로 미리 빌드된 Electron 바이너리와 디버그 심볼이 준비되어 있습니다. [releases](https://github.com/atom/electron/releases) 페이지에서 받아 볼 수 있습니다. From 785eb9657b32c08f4f4ddd5a33cb006854ff4285 Mon Sep 17 00:00:00 2001 From: Robo Date: Tue, 8 Sep 2015 05:24:07 +0530 Subject: [PATCH 20/33] remove unused code --- atom/browser/web_view_constants.cc | 24 ---------------------- atom/browser/web_view_constants.h | 27 ------------------------- atom/browser/web_view_guest_delegate.cc | 10 +++++++-- filenames.gypi | 2 -- 4 files changed, 8 insertions(+), 55 deletions(-) delete mode 100644 atom/browser/web_view_constants.cc delete mode 100644 atom/browser/web_view_constants.h diff --git a/atom/browser/web_view_constants.cc b/atom/browser/web_view_constants.cc deleted file mode 100644 index 6f8314cbcf..0000000000 --- a/atom/browser/web_view_constants.cc +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#include "atom/browser/web_view_constants.h" - -namespace atom { - -namespace web_view { - -const char kPreloadUrl[] = "preloadUrl"; -const char kNodeIntegration[] = "nodeIntegration"; -const char kPlugins[] = "plugins"; -const char kDisableWebSecurity[] = "disableWebSecurity"; -const char kPartitionId[] = "partitionId"; - -const int kDefaultWidth = 300; -const int kDefaultHeight = 300; - -const char kWebViewInfoKeyName[] = "web_view_info"; - -} // namespace web_view - -} // namespace atom diff --git a/atom/browser/web_view_constants.h b/atom/browser/web_view_constants.h deleted file mode 100644 index 0831bdbdf1..0000000000 --- a/atom/browser/web_view_constants.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#ifndef ATOM_BROWSER_WEB_VIEW_CONSTANTS_H_ -#define ATOM_BROWSER_WEB_VIEW_CONSTANTS_H_ - -namespace atom { - -namespace web_view { - -extern const char kPreloadUrl[]; -extern const char kNodeIntegration[]; -extern const char kPlugins[]; -extern const char kDisableWebSecurity[]; -extern const char kPartitionId[]; - -extern const int kDefaultWidth; -extern const int kDefaultHeight; - -extern const char kWebViewInfoKeyName[]; - -} // namespace web_view - -} // namespace atom - -#endif // ATOM_BROWSER_WEB_VIEW_CONSTANTS_H_ diff --git a/atom/browser/web_view_guest_delegate.cc b/atom/browser/web_view_guest_delegate.cc index a954cea8dc..8e1810c4a3 100644 --- a/atom/browser/web_view_guest_delegate.cc +++ b/atom/browser/web_view_guest_delegate.cc @@ -5,7 +5,6 @@ #include "atom/browser/web_view_guest_delegate.h" #include "atom/browser/api/atom_api_web_contents.h" -#include "atom/browser/web_view_constants.h" #include "atom/common/native_mate_converters/gurl_converter.h" #include "content/public/browser/guest_host.h" #include "content/public/browser/render_frame_host.h" @@ -14,6 +13,13 @@ namespace atom { +namespace { + +const int kDefaultWidth = 300; +const int kDefaultHeight = 300; + +} // namespace + WebViewGuestDelegate::WebViewGuestDelegate() : guest_opaque_(true), guest_host_(nullptr), @@ -172,7 +178,7 @@ gfx::Size WebViewGuestDelegate::GetDefaultSize() const { return embedder_web_contents_->GetRenderWidgetHostView() ->GetVisibleViewportSize(); } else { - return gfx::Size(web_view::kDefaultWidth, web_view::kDefaultHeight); + return gfx::Size(kDefaultWidth, kDefaultHeight); } } diff --git a/filenames.gypi b/filenames.gypi index 78a8e17f2f..461c812753 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -230,8 +230,6 @@ 'atom/browser/web_contents_preferences.h', 'atom/browser/web_dialog_helper.cc', 'atom/browser/web_dialog_helper.h', - 'atom/browser/web_view_constants.cc', - 'atom/browser/web_view_constants.h', 'atom/browser/web_view_guest_delegate.cc', 'atom/browser/web_view_guest_delegate.h', 'atom/browser/web_view_manager.cc', From e5386cf8eaa05d29113df42ac7d0885aac140ca4 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 8 Sep 2015 13:40:10 +0800 Subject: [PATCH 21/33] Bump v0.32.0 --- atom.gyp | 2 +- atom/browser/resources/mac/Info.plist | 2 +- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atom.gyp b/atom.gyp index c0fc401879..547bc3c38a 100644 --- a/atom.gyp +++ b/atom.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '0.31.2', + 'version%': '0.32.0', }, 'includes': [ 'filenames.gypi', diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 73facdc7f5..884cdcd1a1 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,7 +17,7 @@ CFBundleIconFile atom.icns CFBundleVersion - 0.31.2 + 0.32.0 LSMinimumSystemVersion 10.8.0 NSMainNibFile diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 7e7fea9f2f..16c7f0311f 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,31,2,0 - PRODUCTVERSION 0,31,2,0 + FILEVERSION 0,32,0,0 + PRODUCTVERSION 0,32,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "0.31.2" + VALUE "FileVersion", "0.32.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "0.31.2" + VALUE "ProductVersion", "0.32.0" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index a0b865b0e2..e270498e40 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -6,8 +6,8 @@ #define ATOM_VERSION_H #define ATOM_MAJOR_VERSION 0 -#define ATOM_MINOR_VERSION 31 -#define ATOM_PATCH_VERSION 2 +#define ATOM_MINOR_VERSION 32 +#define ATOM_PATCH_VERSION 0 #define ATOM_VERSION_IS_RELEASE 1 From 8e1979a6a503a440029449508d19f7f21b067330 Mon Sep 17 00:00:00 2001 From: John-Lin Date: Tue, 8 Sep 2015 15:46:48 +0800 Subject: [PATCH 22/33] add doc translation for file object --- docs-translations/zh-TW/api/file-object.md | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs-translations/zh-TW/api/file-object.md diff --git a/docs-translations/zh-TW/api/file-object.md b/docs-translations/zh-TW/api/file-object.md new file mode 100644 index 0000000000..4f523c4895 --- /dev/null +++ b/docs-translations/zh-TW/api/file-object.md @@ -0,0 +1,28 @@ +# `File` object + +DOM's File 介面提供一個將本地文件抽象化,並可以讓使用者對本地文件直接使用 HTML5 檔案 API +Electron 可以添加一個 `path` 屬性至 `File` 接口進而顯示檔案在檔案系統內的真實路徑。 + +範例,獲得一個檔案之真實路徑,將檔案拖拉至應用程式 (dragged-onto-the-app): + +```html +
+ Drag your file here +
+ + +``` From ba02e19fae3d413754e3eb9bce4255314a8eda42 Mon Sep 17 00:00:00 2001 From: John-Lin Date: Tue, 8 Sep 2015 15:47:11 +0800 Subject: [PATCH 23/33] add doc translation for process --- docs-translations/zh-TW/api/process.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs-translations/zh-TW/api/process.md diff --git a/docs-translations/zh-TW/api/process.md b/docs-translations/zh-TW/api/process.md new file mode 100644 index 0000000000..a4f45352b9 --- /dev/null +++ b/docs-translations/zh-TW/api/process.md @@ -0,0 +1,23 @@ +# process + +在 Electron 裡的 `process` 物件具有以下幾個與 upstream node 的不同點: + +* `process.type` String - Process 的型態,可以是 `browser` (i.e. 主行程) 或 `renderer`. +* `process.versions['electron']` String - Electron 的版本 +* `process.versions['chrome']` String - Chromium 的版本 +* `process.resourcesPath` String - JavaScript 源碼的路徑 + +# 方法 (Methods) + +`process` 物件具有以下的方法: + +### `process.hang` + +會導致目前行程的主執行緒停住 + +## process.setFdLimit(maxDescriptors) _OS X_ _Linux_ + +* `maxDescriptors` Integer + +設置文件描述符 (file descriptor) soft limit `maxDescriptors` 或 OS hard +limit ,以較低者為準當目前的行程。 From a2007189447e908088e0488d67c3eecbd5fe736b Mon Sep 17 00:00:00 2001 From: John-Lin Date: Tue, 8 Sep 2015 15:47:29 +0800 Subject: [PATCH 24/33] add doc translation for synopsis --- docs-translations/zh-TW/api/synopsis.md | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs-translations/zh-TW/api/synopsis.md diff --git a/docs-translations/zh-TW/api/synopsis.md b/docs-translations/zh-TW/api/synopsis.md new file mode 100644 index 0000000000..484f5e3538 --- /dev/null +++ b/docs-translations/zh-TW/api/synopsis.md @@ -0,0 +1,41 @@ +# Synopsis + +所有的 [Node.js's 內建模組](http://nodejs.org/api/) 都可以在 Electron 使用,而且 +第三方的 node 模組同樣的全部支援(包含[原生模組](../tutorial/using-native-node-modules.md)) + +Electron 也提供一些額外的內建模組用來開發原生桌面應用程式,一些模組只可以使用在主行程上 +(main process) 一些只可以使用在渲染行程 (renderer process) 上 (網頁) ,另外還有一些 +模組在兩邊的行程都可以使用。 + +基本的規則是: 如果一個模組是 [GUI](https://zh.wikipedia.org/wiki/%E5%9B%BE%E5%BD%A2%E7%94%A8%E6%88%B7%E7%95%8C%E9%9D%A2) +或者是 low-level 與系統相關的,那麼它就應該只能在主行程上使用 (main process) 你必須要對熟悉 [main process vs. renderer process](../tutorial/quick-start.md#the-main-process) 的觀念,才能去使用這些模組。 + +主行程 (main process) 腳本是一個像一般 Node.js 的腳本: + +```javascript +var app = require('app'); +var BrowserWindow = require('browser-window'); + +var window = null; + +app.on('ready', function() { + window = new BrowserWindow({width: 800, height: 600}); + window.loadUrl('https://github.com'); +}); +``` + +渲染行程 (renderer process) 跟一般正常的網頁沒有差別,而且還能有使用 node 模組的能力: + +```html + + + + + + +``` + +執行你的應用程式,請閱讀[Run your app](../tutorial/quick-start.md#run-your-app). From 375ac3e6ec6f925d8cd0959317317d0ba5b1e69d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Sep 2015 13:35:07 +0800 Subject: [PATCH 25/33] Update brightray, fixes #2669 --- vendor/brightray | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/brightray b/vendor/brightray index 8d64120b51..9b3695cfd5 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 8d64120b51b48be46eaa419957b965c0ccfc6c8f +Subproject commit 9b3695cfd5c48a4cdc90e84a863851001ce8dd10 From 446235c8cdfc979d5cc8917000288ca2f252f745 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Sep 2015 15:55:26 +0800 Subject: [PATCH 26/33] Fix backward compatibility with old BrowserWindow options --- atom/browser/api/atom_api_window.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 4acd101f3c..7403a7ecbb 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -70,14 +70,13 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) { options.Get(switches::kWebPreferences, &web_preferences); // Be compatible with old options which are now in web_preferences. - std::string str; - double d; - if (options.Get(switches::kNodeIntegration, &str)) - web_preferences.Set(switches::kNodeIntegration, str); - if (options.Get(switches::kPreloadScript, &str)) - web_preferences.Set(switches::kPreloadScript, str); - if (options.Get(switches::kZoomFactor, &d)) - web_preferences.Set(switches::kZoomFactor, d); + v8::Local value; + if (options.Get(switches::kNodeIntegration, &value)) + web_preferences.Set(switches::kNodeIntegration, value); + if (options.Get(switches::kPreloadScript, &value)) + web_preferences.Set(switches::kPreloadScript, value); + if (options.Get(switches::kZoomFactor, &value)) + web_preferences.Set(switches::kZoomFactor, value); // Creates the WebContents used by BrowserWindow. auto web_contents = WebContents::Create(isolate, web_preferences); From c2b2a2072fb87bf2701a101c14cf887ba84fb2cd Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Sep 2015 16:11:45 +0800 Subject: [PATCH 27/33] spec: Set node-integration in window.open should work --- spec/chromium-spec.coffee | 19 +++++++++++++++---- spec/fixtures/pages/window-opener-node.html | 7 +++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 spec/fixtures/pages/window-opener-node.html diff --git a/spec/chromium-spec.coffee b/spec/chromium-spec.coffee index c594a97f3b..d09a021db9 100644 --- a/spec/chromium-spec.coffee +++ b/spec/chromium-spec.coffee @@ -36,11 +36,20 @@ describe 'chromium feature', -> describe 'window.open', -> it 'returns a BrowserWindowProxy object', -> - b = window.open 'about:blank', 'test', 'show=no' + b = window.open 'about:blank', '', 'show=no' assert.equal b.closed, false assert.equal b.constructor.name, 'BrowserWindowProxy' b.close() + it 'accepts "node-integration" as feature', (done) -> + listener = (event) -> + window.removeEventListener 'message', listener + b.close() + assert.equal event.data, 'undefined' + done() + window.addEventListener 'message', listener + b = window.open "file://#{fixtures}/pages/window-opener-node.html", '', 'node-integration=no,show=no' + describe 'window.opener', -> ipc = remote.require 'ipc' url = "file://#{fixtures}/pages/window-opener.html" @@ -58,19 +67,21 @@ describe 'chromium feature', -> w.loadUrl url it 'is not null for window opened by window.open', (done) -> - b = window.open url, 'test2', 'show=no' + b = window.open url, '', 'show=no' ipc.on 'opener', (event, opener) -> b.close() done(if opener isnt null then undefined else opener) describe 'window.opener.postMessage', -> it 'sets source and origin correctly', (done) -> - b = window.open "file://#{fixtures}/pages/window-opener-postMessage.html", 'test', 'show=no' - window.addEventListener 'message', (event) -> + listener = (event) -> + window.removeEventListener 'message', listener b.close() assert.equal event.source.guestId, b.guestId assert.equal event.origin, 'file://' done() + window.addEventListener 'message', listener + b = window.open "file://#{fixtures}/pages/window-opener-postMessage.html", '', 'show=no' describe 'creating a Uint8Array under browser side', -> it 'does not crash', -> diff --git a/spec/fixtures/pages/window-opener-node.html b/spec/fixtures/pages/window-opener-node.html new file mode 100644 index 0000000000..118603c82d --- /dev/null +++ b/spec/fixtures/pages/window-opener-node.html @@ -0,0 +1,7 @@ + + + + + From 9d51da505e24c97332159fe077bf35cd3642fc0b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Sep 2015 19:27:08 +0800 Subject: [PATCH 28/33] Run destruction callbacks before message loop gets destroyed --- atom/browser/atom_browser_main_parts.cc | 12 ++++++++++-- atom/browser/atom_browser_main_parts.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index 61b98dfc40..a1a1192b27 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -39,8 +39,6 @@ AtomBrowserMainParts::AtomBrowserMainParts() } AtomBrowserMainParts::~AtomBrowserMainParts() { - for (const auto& callback : destruction_callbacks_) - callback.Run(); } // static @@ -118,4 +116,14 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { #endif } +void AtomBrowserMainParts::PostMainMessageLoopRun() { + brightray::BrowserMainParts::PostMainMessageLoopRun(); + + // Make sure destruction callbacks are called before message loop is + // destroyed, otherwise some objects that need to be deleted on IO thread + // won't be freed. + for (const auto& callback : destruction_callbacks_) + callback.Run(); +} + } // namespace atom diff --git a/atom/browser/atom_browser_main_parts.h b/atom/browser/atom_browser_main_parts.h index 59ff7c977c..bcebc86f16 100644 --- a/atom/browser/atom_browser_main_parts.h +++ b/atom/browser/atom_browser_main_parts.h @@ -41,6 +41,7 @@ class AtomBrowserMainParts : public brightray::BrowserMainParts { // content::BrowserMainParts: void PostEarlyInitialization() override; void PreMainMessageLoopRun() override; + void PostMainMessageLoopRun() override; #if defined(OS_MACOSX) void PreMainMessageLoopStart() override; void PostDestroyThreads() override; From 93bbc0bca9fbb6d8290e900e1f82d5619c0bbff4 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Sep 2015 19:27:28 +0800 Subject: [PATCH 29/33] Don't reference RequestContextGetter in JS objects V8 doesn't guarrentee the C++ class of JS objects will get destroyed, so this will result in RequestContextGetter never getting freed --- atom/browser/api/atom_api_cookies.h | 2 +- atom/browser/api/atom_api_protocol.h | 6 +++--- atom/browser/net/js_asker.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atom/browser/api/atom_api_cookies.h b/atom/browser/api/atom_api_cookies.h index 12cf4a2209..0c309b3f18 100644 --- a/atom/browser/api/atom_api_cookies.h +++ b/atom/browser/api/atom_api_cookies.h @@ -78,7 +78,7 @@ class Cookies : public mate::Wrappable { // Must be called on IO thread. net::CookieStore* GetCookieStore(); - scoped_refptr request_context_getter_; + net::URLRequestContextGetter* request_context_getter_; DISALLOW_COPY_AND_ASSIGN(Cookies); }; diff --git a/atom/browser/api/atom_api_protocol.h b/atom/browser/api/atom_api_protocol.h index 966fcd8726..9f98eb7673 100644 --- a/atom/browser/api/atom_api_protocol.h +++ b/atom/browser/api/atom_api_protocol.h @@ -66,7 +66,7 @@ class Protocol : public mate::Wrappable { public: CustomProtocolHandler( v8::Isolate* isolate, - scoped_refptr request_context, + net::URLRequestContextGetter* request_context, const Handler& handler) : isolate_(isolate), request_context_(request_context), @@ -83,7 +83,7 @@ class Protocol : public mate::Wrappable { private: v8::Isolate* isolate_; - scoped_refptr request_context_; + net::URLRequestContextGetter* request_context_; Protocol::Handler handler_; DISALLOW_COPY_AND_ASSIGN(CustomProtocolHandler); @@ -172,7 +172,7 @@ class Protocol : public mate::Wrappable { // Convert error code to string. std::string ErrorCodeToString(ProtocolError error); - scoped_refptr request_context_getter_; + net::URLRequestContextGetter* request_context_getter_; // Map that stores the original protocols of schemes. using OriginalProtocolsMap = base::ScopedPtrHashMap< diff --git a/atom/browser/net/js_asker.h b/atom/browser/net/js_asker.h index 9c45446abc..8ec245ee8c 100644 --- a/atom/browser/net/js_asker.h +++ b/atom/browser/net/js_asker.h @@ -46,7 +46,7 @@ class JsAsker : public RequestJob { // Called by |CustomProtocolHandler| to store handler related information. void SetHandlerInfo( v8::Isolate* isolate, - scoped_refptr request_context_getter, + net::URLRequestContextGetter* request_context_getter, const JavaScriptHandler& handler) { isolate_ = isolate; request_context_getter_ = request_context_getter; @@ -57,7 +57,7 @@ class JsAsker : public RequestJob { virtual void StartAsync(scoped_ptr options) = 0; net::URLRequestContextGetter* request_context_getter() const { - return request_context_getter_.get(); + return request_context_getter_; } private: @@ -89,7 +89,7 @@ class JsAsker : public RequestJob { } v8::Isolate* isolate_; - scoped_refptr request_context_getter_; + net::URLRequestContextGetter* request_context_getter_; JavaScriptHandler handler_; base::WeakPtrFactory weak_factory_; From 9dc6cfc1e9e482da4560785755cbc471d112200c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 9 Sep 2015 16:26:10 +0800 Subject: [PATCH 30/33] Bump v0.32.1 --- atom.gyp | 2 +- atom/browser/resources/mac/Info.plist | 2 +- atom/browser/resources/win/atom.rc | 8 ++++---- atom/common/atom_version.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atom.gyp b/atom.gyp index 547bc3c38a..c78fee1c8e 100644 --- a/atom.gyp +++ b/atom.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '0.32.0', + 'version%': '0.32.1', }, 'includes': [ 'filenames.gypi', diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 884cdcd1a1..86eef9c09e 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,7 +17,7 @@ CFBundleIconFile atom.icns CFBundleVersion - 0.32.0 + 0.32.1 LSMinimumSystemVersion 10.8.0 NSMainNibFile diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index 16c7f0311f..bfb464b990 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,32,0,0 - PRODUCTVERSION 0,32,0,0 + FILEVERSION 0,32,1,0 + PRODUCTVERSION 0,32,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "0.32.0" + VALUE "FileVersion", "0.32.1" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "0.32.0" + VALUE "ProductVersion", "0.32.1" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index e270498e40..c1d11c91dc 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -7,7 +7,7 @@ #define ATOM_MAJOR_VERSION 0 #define ATOM_MINOR_VERSION 32 -#define ATOM_PATCH_VERSION 0 +#define ATOM_PATCH_VERSION 1 #define ATOM_VERSION_IS_RELEASE 1 From 590be75fa98bba86608e00fef446f6c564e5e780 Mon Sep 17 00:00:00 2001 From: Gohy Leandre Date: Mon, 31 Aug 2015 11:18:10 +0200 Subject: [PATCH 31/33] add ValidatedUrl to did-fail-load event --- atom/browser/api/atom_api_web_contents.cc | 4 ++-- atom/renderer/lib/web-view/guest-view-internal.coffee | 2 +- docs/api/web-contents.md | 1 + docs/api/web-view-tag.md | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 9cb52a1ec7..7c37f17e10 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -388,7 +388,7 @@ void WebContents::DidFailProvisionalLoad( int error_code, const base::string16& error_description, bool was_ignored_by_handler) { - Emit("did-fail-load", error_code, error_description); + Emit("did-fail-load", error_code, error_description, validated_url); } void WebContents::DidFailLoad(content::RenderFrameHost* render_frame_host, @@ -396,7 +396,7 @@ void WebContents::DidFailLoad(content::RenderFrameHost* render_frame_host, int error_code, const base::string16& error_description, bool was_ignored_by_handler) { - Emit("did-fail-load", error_code, error_description); + Emit("did-fail-load", error_code, error_description, validated_url); } void WebContents::DidStartLoading() { diff --git a/atom/renderer/lib/web-view/guest-view-internal.coffee b/atom/renderer/lib/web-view/guest-view-internal.coffee index 44db5e304d..b491184fb8 100644 --- a/atom/renderer/lib/web-view/guest-view-internal.coffee +++ b/atom/renderer/lib/web-view/guest-view-internal.coffee @@ -6,7 +6,7 @@ requestId = 0 WEB_VIEW_EVENTS = 'load-commit': ['url', 'isMainFrame'] 'did-finish-load': [] - 'did-fail-load': ['errorCode', 'errorDescription'] + 'did-fail-load': ['errorCode', 'errorDescription', 'validatedUrl'] 'did-frame-finish-load': ['isMainFrame'] 'did-start-loading': [] 'did-stop-loading': [] diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 89afae43d1..a3d3c360ff 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -32,6 +32,7 @@ Returns: * `event` Event * `errorCode` Integer * `errorDescription` String +* `validatedUrl` String This event is like `did-finish-load` but emitted when the load failed or was cancelled, e.g. `window.stop()` is invoked. diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 8503907021..ff12110fac 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -384,6 +384,7 @@ Returns: * `errorCode` Integer * `errorDescription` String +* `validatedUrl` String This event is like `did-finish-load`, but fired when the load failed or was cancelled, e.g. `window.stop()` is invoked. From 5089929be8e9b919106c8879908beea4cbbcedec Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Wed, 9 Sep 2015 21:34:20 +0300 Subject: [PATCH 32/33] Update README.md Capitalized the "Formerly known..." text + rearranged the community section and mention the slack channel. --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 68518052c0..54b6af5fa3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![devDependency Status](https://david-dm.org/atom/electron/dev-status.svg)](https://david-dm.org/atom/electron#info=devDependencies) [![Join the Electron Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/) -:zap: *formerly known as Atom Shell* :zap: +:zap: *Formerly known as Atom Shell* :zap: The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on [io.js](http://iojs.org) and @@ -15,7 +15,8 @@ Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important announcements. This project adheres to the [Contributor Covenant 1.2](http://contributor-covenant.org/version/1/2/0). -By participating, you are expected to uphold this code. Please report unacceptable behavior to atom@github.com. +By participating, you are expected to uphold this code. Please report +unacceptable behavior to atom@github.com. ## Downloads @@ -54,7 +55,12 @@ contains documents describing how to build and contribute to Electron. ## Community -There is an [`electron` category on the Atom forums](http://discuss.atom.io/category/electron) -as well as an `#atom-shell` channel on Freenode. +You can ask questions and interact with the community in the following +locations: +- [`electron`](http://discuss.atom.io/category/electron) category on the Atom +forums +- `#atom-shell` channel on Freenode +- [`Atom`](http://atom-slack.herokuapp.com/) channel on Slack -Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron) for a community maintained list of useful example apps, tools and resources. +Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron) +for a community maintained list of useful example apps, tools and resources. From 70af2e0bee5cfadc45b08d489370e03d7e993e0c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 10 Sep 2015 11:15:35 +0800 Subject: [PATCH 33/33] osx: Don't warn about unkown warning option We can not make every compiler happy. --- common.gypi | 1 + 1 file changed, 1 insertion(+) diff --git a/common.gypi b/common.gypi index a95e05620f..7c41c3616d 100644 --- a/common.gypi +++ b/common.gypi @@ -75,6 +75,7 @@ 'xcode_settings': { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', 'WARNING_CFLAGS': [ + '-Wno-unknown-warning-option', '-Wno-parentheses-equality', '-Wno-unused-function', '-Wno-sometimes-uninitialized',