Merge pull request #4976 from atom/electron-resources
Rename atom to electron in bundled resources
This commit is contained in:
commit
afdad927b7
10 changed files with 11 additions and 11 deletions
|
@ -15,7 +15,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>atom.icns</string>
|
<string>electron.icns</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.37.3</string>
|
<string>0.37.3</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
|
|
|
@ -161,7 +161,7 @@ node::Environment* NodeBindings::CreateEnvironment(
|
||||||
FILE_PATH_LITERAL("browser") : FILE_PATH_LITERAL("renderer");
|
FILE_PATH_LITERAL("browser") : FILE_PATH_LITERAL("renderer");
|
||||||
base::FilePath resources_path = GetResourcesPath(is_browser_);
|
base::FilePath resources_path = GetResourcesPath(is_browser_);
|
||||||
base::FilePath script_path =
|
base::FilePath script_path =
|
||||||
resources_path.Append(FILE_PATH_LITERAL("atom.asar"))
|
resources_path.Append(FILE_PATH_LITERAL("electron.asar"))
|
||||||
.Append(process_type)
|
.Append(process_type)
|
||||||
.Append(FILE_PATH_LITERAL("init.js"));
|
.Append(FILE_PATH_LITERAL("init.js"));
|
||||||
std::string script_path_str = script_path.AsUTF8Unsafe();
|
std::string script_path_str = script_path.AsUTF8Unsafe();
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
},
|
},
|
||||||
# The application doesn't have real localizations, it just has
|
# The application doesn't have real localizations, it just has
|
||||||
# empty .lproj directories, which is enough to convince Cocoa
|
# empty .lproj directories, which is enough to convince Cocoa
|
||||||
# atom-shell supports those languages.
|
# that Electron supports those languages.
|
||||||
{
|
{
|
||||||
'postbuild_name': 'Make Empty Localizations',
|
'postbuild_name': 'Make Empty Localizations',
|
||||||
'variables': {
|
'variables': {
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
'<@(js_sources)',
|
'<@(js_sources)',
|
||||||
],
|
],
|
||||||
'outputs': [
|
'outputs': [
|
||||||
'<(resources_path)/atom.asar',
|
'<(resources_path)/electron.asar',
|
||||||
],
|
],
|
||||||
'action': [
|
'action': [
|
||||||
'python',
|
'python',
|
|
@ -5,7 +5,7 @@
|
||||||
'atom/app/atom_main.h',
|
'atom/app/atom_main.h',
|
||||||
],
|
],
|
||||||
'bundle_sources': [
|
'bundle_sources': [
|
||||||
'atom/browser/resources/mac/atom.icns',
|
'atom/browser/resources/mac/electron.icns',
|
||||||
],
|
],
|
||||||
'js_sources': [
|
'js_sources': [
|
||||||
'lib/browser/api/app.js',
|
'lib/browser/api/app.js',
|
||||||
|
|
|
@ -26,7 +26,7 @@ class CallbacksRegistry {
|
||||||
if (location.indexOf('(native)') !== -1) {
|
if (location.indexOf('(native)') !== -1) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (location.indexOf('atom.asar') !== -1) {
|
if (location.indexOf('electron.asar') !== -1) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
ref = /([^\/^\)]*)\)?$/gi.exec(location)
|
ref = /([^\/^\)]*)\)?$/gi.exec(location)
|
||||||
|
|
|
@ -44,13 +44,13 @@ def increase_version(versions, index):
|
||||||
|
|
||||||
def update_atom_gyp(version):
|
def update_atom_gyp(version):
|
||||||
pattern = re.compile(" *'version%' *: *'[0-9.]+'")
|
pattern = re.compile(" *'version%' *: *'[0-9.]+'")
|
||||||
with open('atom.gyp', 'r') as f:
|
with open('electron.gyp', 'r') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
|
|
||||||
for i in range(0, len(lines)):
|
for i in range(0, len(lines)):
|
||||||
if pattern.match(lines[i]):
|
if pattern.match(lines[i]):
|
||||||
lines[i] = " 'version%': '{0}',\n".format(version)
|
lines[i] = " 'version%': '{0}',\n".format(version)
|
||||||
with open('atom.gyp', 'w') as f:
|
with open('electron.gyp', 'w') as f:
|
||||||
f.write(''.join(lines))
|
f.write(''.join(lines))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ def execute_stdout(argv, env=os.environ):
|
||||||
|
|
||||||
def atom_gyp():
|
def atom_gyp():
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
|
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
|
||||||
gyp = os.path.join(SOURCE_ROOT, 'atom.gyp')
|
gyp = os.path.join(SOURCE_ROOT, 'electron.gyp')
|
||||||
with open(gyp) as f:
|
with open(gyp) as f:
|
||||||
obj = eval(f.read());
|
obj = eval(f.read());
|
||||||
return obj['variables']
|
return obj['variables']
|
||||||
|
|
|
@ -68,7 +68,7 @@ def run_gyp(target_arch, component):
|
||||||
'-Dmas_build={0}'.format(mas_build),
|
'-Dmas_build={0}'.format(mas_build),
|
||||||
]
|
]
|
||||||
return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.',
|
return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.',
|
||||||
'atom.gyp', '-Icommon.gypi'] + defines, env=env)
|
'electron.gyp', '-Icommon.gypi'] + defines, env=env)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('asar package', function () {
|
||||||
it('does not leak fd', function () {
|
it('does not leak fd', function () {
|
||||||
var readCalls = 1
|
var readCalls = 1
|
||||||
while (readCalls <= 10000) {
|
while (readCalls <= 10000) {
|
||||||
fs.readFileSync(path.join(process.resourcesPath, 'atom.asar', 'renderer', 'api', 'ipc.js'))
|
fs.readFileSync(path.join(process.resourcesPath, 'electron.asar', 'renderer', 'api', 'ipc.js'))
|
||||||
readCalls++
|
readCalls++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue