Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to electron #1389

Merged
merged 31 commits into from
Apr 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6ca4623
Begin Atom Shell -> Electron rename
kevinsawicki Apr 8, 2015
6615ef1
Atom Shell -> Electron
kevinsawicki Apr 8, 2015
43fe82e
Merge branch 'master' into rename-to-electron
zcbenz Apr 12, 2015
4e7ed50
Use "project_name" in atom.gyp as default target in build.py
zcbenz Apr 12, 2015
af37af3
Rename some functions in bootstrap.py
zcbenz Apr 12, 2015
f8d64ef
Use atom.gyp to generate filenamse in create-dist.py
zcbenz Apr 12, 2015
6ba57dc
Use atom.gyp to generate paths in test.py
zcbenz Apr 12, 2015
b413acd
Update tmp dir prefix
zcbenz Apr 12, 2015
7255962
Fix uploading index.json under OS X
zcbenz Apr 12, 2015
74be99d
Use atom.gyp to generate filenames in upload-windows-pdb.py
zcbenz Apr 12, 2015
4353c6d
mac: Allow modifying helper app's name
zcbenz Apr 14, 2015
a72c7b3
Don't hard code exec path in child_process.fork
zcbenz Apr 14, 2015
c20dc06
PRODUCT_NAME => ATOM_PRODUCT_NAME
zcbenz Apr 14, 2015
ecc14dd
mac: Avoid making frameworks_path for twice
zcbenz Apr 14, 2015
b86f149
Set process.versions['electron']
zcbenz Apr 14, 2015
c6c305a
Don't hard-code product name in crash-repoter
zcbenz Apr 14, 2015
2d8d328
Rename hard-coded application names in code
zcbenz Apr 14, 2015
1200d64
Change the names in specs
zcbenz Apr 14, 2015
e04c58f
mac: Generate Info.plist from gyp variables
zcbenz Apr 14, 2015
c746827
Change the window class names
zcbenz Apr 14, 2015
49c82b3
atom => electron in atom.gyp
zcbenz Apr 14, 2015
14e05c6
mac: Remove "Atom"s from default menu
zcbenz Apr 14, 2015
76316e5
Forgot to set default version in crash reporter
zcbenz Apr 14, 2015
d878bd3
docs: Update links in README
zcbenz Apr 16, 2015
d268223
docs: Atom Shell => Electron
zcbenz Apr 16, 2015
1f1cb12
docs: Build for 64bit target on Windows
zcbenz Apr 16, 2015
95250f4
Replace icons
simurai Apr 16, 2015
2f9de5a
Merge pull request #1430 from simurai/rename-to-electron-icon
kevinsawicki Apr 16, 2015
b0b6747
docs: Update the rebranding guide
zcbenz Apr 17, 2015
eb6fa46
Use product_name for generating zip archives
zcbenz Apr 17, 2015
0bab50e
Fix typo
zcbenz Apr 17, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
# Atom Shell [![Build Status](https://travis-ci.org/atom/atom-shell.svg?branch=master)](https://travis-ci.org/atom/atom-shell)
# Electron [![Build Status](https://travis-ci.org/atom/electron.svg?branch=master)](https://travis-ci.org/atom/electron)

The Atom Shell framework lets you write cross-platform desktop applications
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
[Chromium](http://www.chromium.org) and is used in the [Atom
editor](https://github.com/atom/atom).

## Downloads

Prebuilt binaries and debug symbols of atom-shell for Linux, Windows and Mac can
be found on the [releases](https://github.com/atom/atom-shell/releases) page.

You can also use [`npm`](https://docs.npmjs.com/) to install prebuilt atom-shell
binaries:

```
# Install globally in your $PATH
npm install atom-shell -g

# Install as a development dependency
npm install atom-shell --save-dev
```
Prebuilt binaries and debug symbols of Electron for Linux, Windows and Mac can
be found on the [releases](https://github.com/atom/electron/releases) page.

### Mirrors

Expand All @@ -28,8 +17,8 @@ npm install atom-shell --save-dev
## Documentation

Guides and the API reference are located in the
[docs](https://github.com/atom/atom-shell/tree/master/docs) directory. It also
contains documents describing how to build and contribute to atom-shell.
[docs](https://github.com/atom/electron/tree/master/docs) directory. It also
contains documents describing how to build and contribute to Electron.

## Community

Expand Down
19 changes: 12 additions & 7 deletions atom.gyp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
'variables': {
'project_name%': 'atom',
'product_name%': 'Atom',
'version%': '0.23.0',
'project_name%': 'electron',
'product_name%': 'Electron',
'company_name%': 'GitHub, Inc',
'company_abbr%': 'github',
'version%' : '0.23.0',

'atom_source_root': '<!(["python", "tools/atom_source_root.py"])',
},
Expand All @@ -11,6 +13,10 @@
'vendor/native_mate/native_mate_files.gypi',
],
'target_defaults': {
'defines': [
'ATOM_PRODUCT_NAME="<(product_name)"',
'ATOM_PROJECT_NAME="<(project_name)"',
],
'mac_framework_dirs': [
'<(atom_source_root)/external_binaries',
],
Expand Down Expand Up @@ -41,6 +47,7 @@
'<(project_name)_helper',
],
'xcode_settings': {
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name)',
'INFOPLIST_FILE': 'atom/browser/resources/mac/Info.plist',
'LD_RUNPATH_SEARCH_PATHS': [
'@executable_path/../Frameworks',
Expand Down Expand Up @@ -201,7 +208,6 @@
'vendor/node/node.gyp:node',
],
'defines': [
'PRODUCT_NAME="<(product_name)"',
# This is defined in skia/skia_common.gypi.
'SK_SUPPORT_LEGACY_GETTOPDEVICE',
# Disable warnings for g_settings_list_schemas.
Expand Down Expand Up @@ -371,9 +377,6 @@
'vendor',
'<(libchromiumcontent_src_dir)',
],
'defines': [
'PRODUCT_NAME="<(product_name)"',
],
'export_dependent_settings': [
'<(project_name)_lib',
],
Expand All @@ -395,6 +398,7 @@
'<(libchromiumcontent_dir)/snapshot_blob.bin',
],
'xcode_settings': {
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
'LD_RUNPATH_SEARCH_PATHS': [
Expand Down Expand Up @@ -472,6 +476,7 @@
],
'mac_bundle': 1,
'xcode_settings': {
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
'LD_RUNPATH_SEARCH_PATHS': [
'@executable_path/../../..',
Expand Down
2 changes: 1 addition & 1 deletion atom/app/atom_library_main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int AtomInitializeICUandStartNode(int argc, char *argv[]) {
brightray::MainApplicationBundlePath()
.Append("Contents")
.Append("Frameworks")
.Append(PRODUCT_NAME " Framework.framework"));
.Append(ATOM_PRODUCT_NAME " Framework.framework"));
base::i18n::InitializeICU();
return atom::NodeMain(argc, argv);
}
Expand Down
25 changes: 19 additions & 6 deletions atom/app/atom_main_delegate_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

#include "base/mac/bundle_locations.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "brightray/common/application_info.h"
#include "brightray/common/mac/main_application_bundle.h"
#include "content/public/common/content_paths.h"

Expand All @@ -19,19 +21,30 @@
.Append("Frameworks");
}

base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
const std::string& name) {
return frameworks_path.Append(name + " Helper.app")
.Append("Contents")
.Append("MacOS")
.Append(name + " Helper");
}

} // namespace

void AtomMainDelegate::OverrideFrameworkBundlePath() {
base::mac::SetOverrideFrameworkBundlePath(
GetFrameworksPath().Append(PRODUCT_NAME " Framework.framework"));
GetFrameworksPath().Append(ATOM_PRODUCT_NAME " Framework.framework"));
}

void AtomMainDelegate::OverrideChildProcessPath() {
base::FilePath helper_path =
GetFrameworksPath().Append(PRODUCT_NAME " Helper.app")
.Append("Contents")
.Append("MacOS")
.Append(PRODUCT_NAME " Helper");
base::FilePath frameworks_path = GetFrameworksPath();
base::FilePath helper_path = GetHelperAppPath(frameworks_path,
ATOM_PRODUCT_NAME);
if (!base::PathExists(helper_path))
helper_path = GetHelperAppPath(frameworks_path,
brightray::GetApplicationName());
if (!base::PathExists(helper_path))
LOG(FATAL) << "Unable to find helper app";
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
}

Expand Down
16 changes: 5 additions & 11 deletions atom/browser/atom_browser_main_parts_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

#include "atom/browser/atom_browser_main_parts.h"

#import "atom/browser/mac/atom_application.h"
#import "atom/browser/mac/atom_application_delegate.h"
#include "base/files/file_path.h"
#import "base/mac/foundation_util.h"
#include "atom/browser/mac/atom_application.h"
#include "atom/browser/mac/atom_application_delegate.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/foundation_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
#import "vendor/brightray/common/mac/main_application_bundle.h"

namespace atom {

Expand All @@ -23,12 +22,7 @@
AtomApplicationDelegate* delegate = [[AtomApplicationDelegate alloc] init];
[NSApp setDelegate:(id<NSFileManagerDelegate>)delegate];

base::FilePath frameworkPath = brightray::MainApplicationBundlePath()
.Append("Contents")
.Append("Frameworks")
.Append(PRODUCT_NAME " Framework.framework");
NSBundle* frameworkBundle = [NSBundle
bundleWithPath:base::mac::FilePathToNSString(frameworkPath)];
NSBundle* frameworkBundle = base::mac::FrameworkBundle();
NSNib* mainNib = [[NSNib alloc] initWithNibNamed:@"MainMenu"
bundle:frameworkBundle];
[mainNib instantiateWithOwner:application topLevelObjects:nil];
Expand Down
5 changes: 3 additions & 2 deletions atom/browser/browser_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "atom/browser/native_window.h"
#include "atom/browser/window_list.h"
#include "atom/common/atom_version.h"
#include "brightray/common/application_info.h"

namespace atom {

Expand All @@ -31,11 +32,11 @@ void Browser::ClearRecentDocuments() {
}

std::string Browser::GetExecutableFileVersion() const {
return ATOM_VERSION_STRING;
return brightray::GetApplicationVersion();
}

std::string Browser::GetExecutableFileProductName() const {
return "Atom-Shell";
return brightray::GetApplicationName();
}

} // namespace atom
16 changes: 6 additions & 10 deletions atom/browser/browser_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

#include "atom/browser/browser.h"

#import "atom/browser/mac/atom_application.h"
#import "atom/browser/mac/atom_application_delegate.h"
#include "atom/browser/mac/atom_application.h"
#include "atom/browser/mac/atom_application_delegate.h"
#include "atom/browser/native_window.h"
#include "atom/browser/window_list.h"
#import "base/mac/bundle_locations.h"
#import "base/mac/foundation_util.h"
#include "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
#include "brightray/common/application_info.h"

namespace atom {

Expand All @@ -27,15 +27,11 @@
}

std::string Browser::GetExecutableFileVersion() const {
NSDictionary* infoDictionary = base::mac::OuterBundle().infoDictionary;
NSString *version = [infoDictionary objectForKey:@"CFBundleVersion"];
return base::SysNSStringToUTF8(version);
return brightray::GetApplicationVersion();
}

std::string Browser::GetExecutableFileProductName() const {
NSDictionary* infoDictionary = base::mac::OuterBundle().infoDictionary;
NSString *version = [infoDictionary objectForKey:@"CFBundleName"];
return base::SysNSStringToUTF8(version);
return brightray::GetApplicationName();
}

int Browser::DockBounce(BounceType type) {
Expand Down
4 changes: 2 additions & 2 deletions atom/browser/browser_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void Browser::SetUserTasks(const std::vector<UserTask>& tasks) {
}

void Browser::SetAppUserModelID(const std::string& name) {
app_user_model_id_ = base::string16(L"atom-shell.app.");
app_user_model_id_ = base::string16(L"electron.app.");
app_user_model_id_ += base::UTF8ToUTF16(name);
SetCurrentProcessExplicitAppUserModelID(app_user_model_id_.c_str());
}
Expand All @@ -142,7 +142,7 @@ std::string Browser::GetExecutableFileProductName() const {
return base::UTF16ToUTF8(version_info->product_name());
}

return "Atom-Shell";
return ATOM_PRODUCT_NAME;
}

} // namespace atom
6 changes: 3 additions & 3 deletions atom/browser/default_app/default_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ app.on('ready', function() {
if (process.platform == 'darwin') {
var template = [
{
label: 'Atom Shell',
label: 'Electron',
submenu: [
{
label: 'About Atom Shell',
label: 'About Electron',
selector: 'orderFrontStandardAboutPanel:'
},
{
Expand All @@ -42,7 +42,7 @@ app.on('ready', function() {
type: 'separator'
},
{
label: 'Hide Atom Shell',
label: 'Hide Electron',
accelerator: 'Command+H',
selector: 'hide:'
},
Expand Down
12 changes: 6 additions & 6 deletions atom/browser/default_app/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<title>Atom Shell</title>
<title>Electron</title>
<style>
body {
color: #555;
Expand Down Expand Up @@ -72,19 +72,19 @@
};
</script>

<h2 style="-webkit-app-region: drag">Welcome to Atom Shell</h2>
<h2 style="-webkit-app-region: drag">Welcome to Electron</h2>

<p>
To run your app with atom-shell, execute the following command under your
To run your app with Electron, execute the following command under your
Console (or Terminal):
</p>

<script>document.write('<pre>' + command + '</pre>')</script>

<p>
The <code>path-to-your-app</code> should be the path to your own atom-shell
app, you can read the <a href='https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md'>quick start</a>
guide in atom-shell's <a href='https://github.com/atom/atom-shell/blob/master/docs'>docs</a>
The <code>path-to-your-app</code> should be the path to your own Electron
app, you can read the <a href='https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md'>quick start</a>
guide in Electron's <a href='https://github.com/atom/electron/blob/master/docs'>docs</a>
on how to write one.
</p>

Expand Down
4 changes: 2 additions & 2 deletions atom/browser/default_app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ if (option.file && !option.webdriver) {
} catch(e) {
if (e.code == 'MODULE_NOT_FOUND') {
app.focus();
dialog.showErrorBox('Error opening app', 'The app provided is not a valid atom-shell app, please read the docs on how to write one:\nhttps://github.com/atom/atom-shell/tree/master/docs');
dialog.showErrorBox('Error opening app', 'The app provided is not a valid electron app, please read the docs on how to write one:\nhttps://github.com/atom/electron/tree/master/docs');
process.exit(1);
} else {
console.error('App threw an error when running', e);
throw e;
}
}
} else if (option.version) {
console.log('v' + process.versions['atom-shell']);
console.log('v' + process.versions['electron']);
process.exit(0);
} else {
require('./default_app.js');
Expand Down
5 changes: 2 additions & 3 deletions atom/browser/default_app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "atom-shell-default-app",
"productName": "Atom Shell Default App",
"version": "0.1.0",
"name": "electron",
"productName": "Electron",
"main": "main.js"
}
4 changes: 2 additions & 2 deletions atom/browser/native_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
// Override the user agent to contain application and atom-shell's version.
Browser* browser = Browser::Get();
std::string product_name = base::StringPrintf(
"%s/%s Chrome/%s AtomShell/" ATOM_VERSION_STRING,
"%s/%s Chrome/%s " ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING,
RemoveWhitespace(browser->GetName()).c_str(),
browser->GetVersion().c_str(),
CHROME_VERSION_STRING);
Expand Down Expand Up @@ -226,7 +226,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
if (options.Get(switches::kKiosk, &kiosk) && kiosk) {
SetKiosk(kiosk);
}
std::string title("Atom Shell");
std::string title("Electron");
options.Get(switches::kTitle, &title);
SetTitle(title);

Expand Down
2 changes: 1 addition & 1 deletion atom/browser/node_debugger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void NodeDebugger::SendConnectMessage() {
"Protocol-Version: 1\r\n"
"Embedding-Host: %s\r\n"
"%s: 0\r\n",
v8::V8::GetVersion(), "Atom-Shell", kContentLength), true);
v8::V8::GetVersion(), ATOM_PRODUCT_NAME, kContentLength), true);
}

// static
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/resources/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.github.atom-shell</string>
<string>${ATOM_BUNDLE_ID}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
Binary file modified atom/browser/resources/mac/atom.icns
Binary file not shown.
Binary file modified atom/browser/resources/win/atom.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion atom/browser/ui/file_dialog_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct RunState {
};

bool CreateDialogThread(RunState* run_state) {
base::Thread* thread = new base::Thread("AtomShell_FileDialogThread");
base::Thread* thread = new base::Thread(ATOM_PRODUCT_NAME "FileDialogThread");
thread->init_com_with_mta(false);
if (!thread->Start())
return false;
Expand Down
Loading