Replace OS X and Mac OS with macOS
This commit is contained in:
parent
52350b5e35
commit
67dd19ed0f
157 changed files with 650 additions and 650 deletions
|
@ -1,11 +1,11 @@
|
|||
# Application Distribution
|
||||
|
||||
To distribute your app with Electron, the folder containing your app should be
|
||||
named `app` and placed under Electron's resources directory (on OS X it is
|
||||
named `app` and placed under Electron's resources directory (on macOS it is
|
||||
`Electron.app/Contents/Resources/` and on Linux and Windows it is `resources/`),
|
||||
like this:
|
||||
|
||||
On OS X:
|
||||
On macOS:
|
||||
|
||||
```text
|
||||
electron/Electron.app/Contents/Resources/app/
|
||||
|
@ -37,7 +37,7 @@ To use an `asar` archive to replace the `app` folder, you need to rename the
|
|||
archive to `app.asar`, and put it under Electron's resources directory like
|
||||
below, and Electron will then try to read the archive and start from it.
|
||||
|
||||
On OS X:
|
||||
On macOS:
|
||||
|
||||
```text
|
||||
electron/Electron.app/Contents/Resources/
|
||||
|
@ -63,7 +63,7 @@ before distributing it to users.
|
|||
You can rename `electron.exe` to any name you like, and edit its icon and other
|
||||
information with tools like [rcedit](https://github.com/atom/rcedit).
|
||||
|
||||
### OS X
|
||||
### macOS
|
||||
|
||||
You can rename `Electron.app` to any name you want, and you also have to rename
|
||||
the `CFBundleDisplayName`, `CFBundleIdentifier` and `CFBundleName` fields in
|
||||
|
|
|
@ -8,7 +8,7 @@ applications can put a custom menu in the dock menu.
|
|||
This guide explains how to integrate your application into those desktop
|
||||
environments with Electron APIs.
|
||||
|
||||
## Notifications (Windows, Linux, OS X)
|
||||
## Notifications (Windows, Linux, macOS)
|
||||
|
||||
All three operating systems provide means for applications to send notifications
|
||||
to the user. Electron conveniently allows developers to send notifications with
|
||||
|
@ -50,17 +50,17 @@ desktop environment that follows [Desktop Notifications
|
|||
Specification][notification-spec], including Cinnamon, Enlightenment, Unity,
|
||||
GNOME, KDE.
|
||||
|
||||
### OS X
|
||||
### macOS
|
||||
|
||||
Notifications are straight-forward on OS X, you should however be aware of
|
||||
Notifications are straight-forward on macOS, you should however be aware of
|
||||
[Apple's Human Interface guidelines regarding notifications](https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/NotificationCenter.html).
|
||||
|
||||
Note that notifications are limited to 256 bytes in size - and will be truncated
|
||||
if you exceed that limit.
|
||||
|
||||
## Recent documents (Windows & OS X)
|
||||
## Recent documents (Windows & macOS)
|
||||
|
||||
Windows and OS X provide easy access to a list of recent documents opened by
|
||||
Windows and macOS provide easy access to a list of recent documents opened by
|
||||
the application via JumpList or dock menu, respectively.
|
||||
|
||||
__JumpList:__
|
||||
|
@ -95,14 +95,14 @@ on registering your application in [Application Registration][app-registration].
|
|||
When a user clicks a file from the JumpList, a new instance of your application
|
||||
will be started with the path of the file added as a command line argument.
|
||||
|
||||
### OS X Notes
|
||||
### macOS Notes
|
||||
|
||||
When a file is requested from the recent documents menu, the `open-file` event
|
||||
of `app` module will be emitted for it.
|
||||
|
||||
## Custom Dock Menu (OS X)
|
||||
## Custom Dock Menu (macOS)
|
||||
|
||||
OS X enables developers to specify a custom menu for the dock, which usually
|
||||
macOS enables developers to specify a custom menu for the dock, which usually
|
||||
contains some shortcuts for commonly used features of your application:
|
||||
|
||||
__Dock menu of Terminal.app:__
|
||||
|
@ -110,7 +110,7 @@ __Dock menu of Terminal.app:__
|
|||
<img src="https://cloud.githubusercontent.com/assets/639601/5069962/6032658a-6e9c-11e4-9953-aa84006bdfff.png" height="354" width="341" >
|
||||
|
||||
To set your custom dock menu, you can use the `app.dock.setMenu` API, which is
|
||||
only available on OS X:
|
||||
only available on macOS:
|
||||
|
||||
```javascript
|
||||
const electron = require('electron');
|
||||
|
@ -154,7 +154,7 @@ __Tasks of Internet Explorer:__
|
|||
|
||||

|
||||
|
||||
Unlike the dock menu in OS X which is a real menu, user tasks in Windows work
|
||||
Unlike the dock menu in macOS which is a real menu, user tasks in Windows work
|
||||
like application shortcuts such that when user clicks a task, a program will be
|
||||
executed with specified arguments.
|
||||
|
||||
|
@ -248,13 +248,13 @@ __Launcher shortcuts of Audacious:__
|
|||
|
||||

|
||||
|
||||
## Progress Bar in Taskbar (Windows, OS X, Unity)
|
||||
## Progress Bar in Taskbar (Windows, macOS, Unity)
|
||||
|
||||
On Windows a taskbar button can be used to display a progress bar. This enables
|
||||
a window to provide progress information to the user without the user having to
|
||||
switch to the window itself.
|
||||
|
||||
On OS X the progress bar will be displayed as a part of the dock icon.
|
||||
On macOS the progress bar will be displayed as a part of the dock icon.
|
||||
|
||||
The Unity DE also has a similar feature that allows you to specify the progress
|
||||
bar in the launcher.
|
||||
|
@ -298,9 +298,9 @@ let win = new BrowserWindow({...});
|
|||
win.setOverlayIcon('path/to/overlay.png', 'Description for overlay');
|
||||
```
|
||||
|
||||
## Represented File of Window (OS X)
|
||||
## Represented File of Window (macOS)
|
||||
|
||||
On OS X a window can set its represented file, so the file's icon can show in
|
||||
On macOS a window can set its represented file, so the file's icon can show in
|
||||
the title bar and when users Command-Click or Control-Click on the title a path
|
||||
popup will show.
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Using the [React Developer Tools][react-devtools] as example:
|
|||
* `~/.config/google-chrome-beta/Default/Extensions/`
|
||||
* `~/.config/google-chrome-canary/Default/Extensions/`
|
||||
* `~/.config/chromium/Default/Extensions/`
|
||||
* on OS X it is `~/Library/Application Support/Google/Chrome/Default/Extensions`.
|
||||
* on macOS it is `~/Library/Application Support/Google/Chrome/Default/Extensions`.
|
||||
1. Pass the location of the extension to `BrowserWindow.addDevToolsExtension`
|
||||
API, for the React Developer Tools, it is something like:
|
||||
`~/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/0.14.10_0`
|
||||
|
|
|
@ -116,7 +116,7 @@ codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
|
|||
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
|
||||
```
|
||||
|
||||
If you are new to app sandboxing under OS X, you should also read through
|
||||
If you are new to app sandboxing under macOS, you should also read through
|
||||
Apple's [Enabling App Sandbox][enable-app-sandbox] to have a basic idea, then
|
||||
add keys for the permissions needed by your app to the entitlements files.
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ app.on('ready', createWindow);
|
|||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', () => {
|
||||
// On OS X it is common for applications and their menu bar
|
||||
// On macOS it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
|
@ -124,7 +124,7 @@ app.on('window-all-closed', () => {
|
|||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
// On OS X it's common to re-create a window in the app when the
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (win === null) {
|
||||
createWindow();
|
||||
|
@ -194,7 +194,7 @@ $ .\electron\electron.exe your-app\
|
|||
$ ./electron/electron your-app/
|
||||
```
|
||||
|
||||
#### OS X
|
||||
#### macOS
|
||||
|
||||
```bash
|
||||
$ ./Electron.app/Contents/MacOS/Electron your-app/
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
Following platforms are supported by Electron:
|
||||
|
||||
### OS X
|
||||
### macOS
|
||||
|
||||
Only 64bit binaries are provided for OS X, and the minimum OS X version
|
||||
supported is OS X 10.9.
|
||||
Only 64bit binaries are provided for macOS, and the minimum macOS version
|
||||
supported is macOS 10.9.
|
||||
|
||||
### Windows
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ for `$DISPLAY`, so no further configuration of your app is required.
|
|||
This step can be automated with Paul Betts's
|
||||
[xvfb-maybe](https://github.com/paulcbetts/xvfb-maybe): Prepend your test
|
||||
commands with `xvfb-maybe` and the little tool will automatically configure
|
||||
xvfb, if required by the current system. On Windows or Mac OS X, it will simply
|
||||
xvfb, if required by the current system. On Windows or macOS, it will simply
|
||||
do nothing.
|
||||
|
||||
```
|
||||
## On Windows or OS X, this just invokes electron-mocha
|
||||
## On Windows or macOS, this just invokes electron-mocha
|
||||
## On Linux, if we are in a headless environment, this will be equivalent
|
||||
## to xvfb-run electron-mocha ./test/*.js
|
||||
xvfb-maybe electron-mocha ./test/*.js
|
||||
|
|
|
@ -6,7 +6,7 @@ and then enable it in your application.
|
|||
|
||||
## Prepare a Copy of Flash Plugin
|
||||
|
||||
On OS X and Linux, the details of the Pepper Flash plugin can be found by
|
||||
On macOS and Linux, the details of the Pepper Flash plugin can be found by
|
||||
navigating to `chrome://plugins` in the Chrome browser. Its location and version
|
||||
are useful for Electron's Pepper Flash support. You can also copy it to another
|
||||
location.
|
||||
|
|
|
@ -12,7 +12,7 @@ the architecture and Chrome version of the Electron build you use.
|
|||
version used by Electron, otherwise the plugin will not work even though
|
||||
`navigator.plugins` would show it has been loaded.
|
||||
|
||||
### Windows & OS X
|
||||
### Windows & macOS
|
||||
|
||||
Open `chrome://components/` in Chrome browser, find `WidevineCdm` and make
|
||||
sure it is up to date, then you can find all the plugin binaries from the
|
||||
|
@ -20,12 +20,12 @@ sure it is up to date, then you can find all the plugin binaries from the
|
|||
directory.
|
||||
|
||||
`APP_DATA` is system's location for storing app data, on Windows it is
|
||||
`%LOCALAPPDATA%`, on OS X it is `~/Library/Application Support`. `VERSION` is
|
||||
`%LOCALAPPDATA%`, on macOS it is `~/Library/Application Support`. `VERSION` is
|
||||
Widevine CDM plugin's version string, like `1.4.8.866`. `PLATFORM` is `mac` or
|
||||
`win`. `ARCH` is `x86` or `x64`.
|
||||
|
||||
On Windows the required binaries are `widevinecdm.dll` and
|
||||
`widevinecdmadapter.dll`, on OS X they are `libwidevinecdm.dylib` and
|
||||
`widevinecdmadapter.dll`, on macOS they are `libwidevinecdm.dylib` and
|
||||
`widevinecdmadapter.plugin`. You can copy them to anywhere you like, but they
|
||||
have to be put together.
|
||||
|
||||
|
@ -52,7 +52,7 @@ Example code:
|
|||
|
||||
```javascript
|
||||
// You have to pass the filename of `widevinecdmadapter` here, it is
|
||||
// * `widevinecdmadapter.plugin` on OS X,
|
||||
// * `widevinecdmadapter.plugin` on macOS,
|
||||
// * `libwidevinecdmadapter.so` on Linux,
|
||||
// * `widevinecdmadapter.dll` on Windows.
|
||||
app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevinecdmadapter.plugin');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue