Skip to content

Commit

Permalink
Merge branch 'master' into feature/nsis-downloader
Browse files Browse the repository at this point in the history
* master:
  feat: electronDownload instead of download electron-userland#921
  feat: rename LICENSE from electron dist to LICENSE.electron.txt
  fix: snap support, desktop integration attempt electron-userland#509
  chore: update electron-macos-sign to 1.3.4
  fix(mac): App rejected when Mac Developer certificate is in keychain electron-userland#890
  feat(deb): Replace ia32 arch name with i386 in package filename
  feat(linux): lowercased linux executable
  WIP: snap support electron-userland#509
  test: split to small files to make Jest happy
  feat(linux): Build snap packages for Linux electron-userland#509
  test: migrate to Jest
  • Loading branch information
Greg Nolle committed Nov 23, 2016
2 parents 533b851 + 8463bef commit 0126286
Show file tree
Hide file tree
Showing 76 changed files with 2,539 additions and 2,908 deletions.
10 changes: 10 additions & 0 deletions .idea/dictionaries/develar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/runConfigurations/linuxPackagerTest.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations/winPackagerTest.xml

This file was deleted.

9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
osx_image: xcode7.3

matrix:
include:
- os: osx
env: TEST_FILES=BuildTest,linuxPackagerTest,globTest NODE_VERSION=7 PUBLISH_TO_NPM=true
env: TEST_FILES=BuildTest,extraMetadataTest,globTest,filesTest,ignoreTest,linux.* NODE_VERSION=7 PUBLISH_TO_NPM=true

- os: osx
env: TEST_FILES=winPackagerTest,nsisTest,macPackagerTest NODE_VERSION=6
env: TEST_FILES=windows.*,mac.* NODE_VERSION=7

- os: osx
env: TEST_FILES=macPackagerTest,CodeSignTest NODE_VERSION=6
env: TEST_FILES=mac.* NODE_VERSION=6

language: c

cache:
directories:
- node_modules
- $HOME/.electron
- /tmp/jest-electron-builder-tests

before_install:
- curl -L https://dl.bintray.com/develar/bin/7za -o /tmp/7za
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This includes:
- log of the terminal output
- node version
- npm version
- on which system do you want to create installers (MacOS, Windows or Linux)
- on which system do you want to create installers (macOS, Windows or Linux)

# Pull Requests
To check that your contributions match the project coding style make sure `npm test` passes.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# electron-builder [![npm version](https://img.shields.io/npm/v/electron-builder.svg)](https://npmjs.org/package/electron-builder) [![donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6V79R2RGCCHL)
A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box.
A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out of the box.

* NPM packages management:
* [Native application dependencies](http://electron.atom.io/docs/latest/tutorial/using-native-node-modules/) compilation.
Expand All @@ -9,8 +9,8 @@ A complete solution to package and build a ready for distribution Electron app f
* [Build version management](https://github.com/electron-userland/electron-builder/wiki/Options#build-version-management).
* Numerous target formats:
* All platforms: `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir` (unpacked directory).
* [MacOS](https://github.com/electron-userland/electron-builder/wiki/Options#MacOptions-target): `dmg`, `pkg`, `mas`.
* [Linux](https://github.com/electron-userland/electron-builder/wiki/Options#LinuxBuildOptions-target): `AppImage`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`.
* [macOS](https://github.com/electron-userland/electron-builder/wiki/Options#MacOptions-target): `dmg`, `pkg`, `mas`.
* [Linux](https://github.com/electron-userland/electron-builder/wiki/Options#LinuxBuildOptions-target): [AppImage](http://appimage.org), [snap](http://snapcraft.io), `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`.
* [Windows](https://github.com/electron-userland/electron-builder/wiki/Options#WinBuildOptions-target): NSIS, Squirrel.Windows.
* [Two package.json Structure](https://github.com/electron-userland/electron-builder/wiki/Two-package.json-Structure) is supported, but you are not forced to use it even if you have native production dependencies.
* [Publishing artifacts](https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts) to GitHub Releases and Bintray.
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cache:
- node_modules
- '%USERPROFILE%\.electron'

environment:
RUN_IN_BAND: true

install:
- ps: Install-Product node 6 x64
# unknown yarn error
Expand Down
9 changes: 4 additions & 5 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM buildpack-deps:xenial-curl
FROM buildpack-deps:yakkety-curl

# rpm is required for FPM to build rpm package
# yasm is required to build p7zip
Expand All @@ -15,10 +15,9 @@ ENV USE_SYSTEM_7ZA true
ENV DEBUG_COLORS true
ENV FORCE_COLOR true

RUN apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3 && echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

RUN apt-get update -y && \
apt-get install --no-install-recommends -y yarn xorriso bsdtar build-essential autoconf libssl-dev icnsutils graphicsmagick gcc-multilib g++-multilib libgnome-keyring-dev lzip rpm yasm && \
RUN apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg && echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update -y && \
apt-get install --no-install-recommends -y git snapcraft yarn xorriso bsdtar build-essential autoconf libssl-dev icnsutils graphicsmagick gcc-multilib g++-multilib libgnome-keyring-dev lzip rpm yasm && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
curl -L http://tukaani.org/xz/xz-$XZ_VERSION.tar.xz | tar -xJ && cd xz-$XZ_VERSION && ./configure && make && make install && cd .. && rm -rf xz-$XZ_VERSION && ldconfig && \
Expand Down
2 changes: 1 addition & 1 deletion docker/wine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM electronuserland/electron-builder:latest

# libgnome-keyring-dev — to build keytar
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9CB8DB0 && \
echo "deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial main " | tee /etc/apt/sources.list.d/wine.list && \
echo "deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu yakkety main " | tee /etc/apt/sources.list.d/wine.list && \
dpkg --add-architecture i386 && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list && \
Expand Down
6 changes: 3 additions & 3 deletions docs/Multi Platform Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ build -mwl
Build performed in parallel, so, it is highly recommended to not use npm task per platform (e.g. `npm run dist:mac && npm run dist:win32`), but specify multiple platforms/targets in one build command.
You don't need to clean dist output before build — output directory is cleaned automatically.

## MacOS
## macOS

Use [brew](http://brew.sh) to install required packages.

### To build app for Windows on MacOS:
### To build app for Windows on macOS:
```
brew install wine --without-x11
brew install mono
```

### To build app for Linux on MacOS:
### To build app for Linux on macOS:
```
brew install gnu-tar graphicsmagick xz
```
Expand Down
3 changes: 2 additions & 1 deletion docs/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Don't customize paths to background and icon, — just follow conventions.
| npmArgs | <a name="BuildMetadata-npmArgs"></a>Additional command line arguments to use when installing app native deps. Defaults to `null`.
| nodeGypRebuild | <a name="BuildMetadata-nodeGypRebuild"></a>Whether to execute `node-gyp rebuild` before starting to package the app. Defaults to `false`.
| electronDist | <a name="BuildMetadata-electronDist"></a>The path to custom Electron build (e.g. `~/electron/out/R`). Only macOS supported, file issue if need for Linux or Windows.
| electronDownload | <a name="BuildMetadata-electronDownload"></a>The [electron-download](https://github.com/electron-userland/electron-download#usage) options.
| publish | <a name="BuildMetadata-publish"></a>See [.build.publish](#PublishConfiguration).

<a name="DmgOptions"></a>
Expand Down Expand Up @@ -142,7 +143,7 @@ Linux specific build options.
| category | <a name="LinuxBuildOptions-category"></a>The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).
| packageCategory | <a name="LinuxBuildOptions-packageCategory"></a>The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section). Not applicable for AppImage.
| description | <a name="LinuxBuildOptions-description"></a>As [description](#AppMetadata-description) from application package.json, but allows you to specify different for Linux.
| target | <a name="LinuxBuildOptions-target"></a><p>Target package type: list of <code>AppImage</code>, <code>deb</code>, <code>rpm</code>, <code>freebsd</code>, <code>pacman</code>, <code>p5p</code>, <code>apk</code>, <code>7z</code>, <code>zip</code>, <code>tar.xz</code>, <code>tar.lz</code>, <code>tar.gz</code>, <code>tar.bz2</code>, <code>dir</code>. Defaults to <code>AppImage</code>.</p> <p>The most effective [xz](https://en.wikipedia.org/wiki/Xz) compression format used by default.</p> <p>Only <code>deb</code> and <code>AppImage</code> is tested. Feel free to file issues for <code>rpm</code> and other package formats.</p>
| target | <a name="LinuxBuildOptions-target"></a><p>Target package type: list of <code>AppImage</code>, <code>snap</code>, <code>deb</code>, <code>rpm</code>, <code>freebsd</code>, <code>pacman</code>, <code>p5p</code>, <code>apk</code>, <code>7z</code>, <code>zip</code>, <code>tar.xz</code>, <code>tar.lz</code>, <code>tar.gz</code>, <code>tar.bz2</code>, <code>dir</code>. Defaults to <code>AppImage</code>.</p> <p>The most effective [xz](https://en.wikipedia.org/wiki/Xz) compression format used by default.</p>
| synopsis | <a name="LinuxBuildOptions-synopsis"></a>*deb-only.* The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).
| maintainer | <a name="LinuxBuildOptions-maintainer"></a>The maintainer. Defaults to [author](#AppMetadata-author).
| vendor | <a name="LinuxBuildOptions-vendor"></a>The vendor. Defaults to [author](#AppMetadata-author).
Expand Down
39 changes: 24 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
],
"bin": {
"build": "./out/build-cli.js",
"cleanup": "./out/cleanup.js",
"install-app-deps": "./out/install-app-deps.js",
"node-gyp-rebuild": "./out/node-gyp-rebuild.js"
},
Expand Down Expand Up @@ -68,8 +67,8 @@
"cli-cursor": "^1.0.2",
"cuint": "^0.2.2",
"debug": "^2.3.2",
"electron-download": "2.1.2",
"electron-macos-sign": "1.0.1",
"electron-download-tf": "3.1.0",
"electron-macos-sign": "^1.3.4",
"fs-extra-p": "^2.0.7",
"hosted-git-info": "^2.1.5",
"ini": "^1.3.4",
Expand Down Expand Up @@ -97,24 +96,24 @@
"devDependencies": {
"@develar/semantic-release": "^6.3.21",
"@types/ini": "^1.3.29",
"@types/jest": "^16.0.0",
"@types/js-yaml": "^3.5.28",
"@types/source-map-support": "^0.2.28",
"ava-tf": "^0.16.4",
"babel-plugin-array-includes": "^2.0.3",
"babel-plugin-transform-async-to-module-method": "^6.16.0",
"babel-plugin-transform-es2015-destructuring": "^6.18.0",
"babel-plugin-transform-es2015-destructuring": "^6.19.0",
"babel-plugin-transform-es2015-parameters": "^6.18.0",
"babel-plugin-transform-es2015-spread": "^6.8.0",
"babel-plugin-transform-inline-imports-commonjs": "^1.2.0",
"babel-register": "^6.18.0",
"decompress-zip": "^0.3.0",
"depcheck": "^0.6.4",
"depcheck": "^0.6.5",
"diff": "^3.0.1",
"husky": "^0.11.9",
"jest-cli": "^17.0.3",
"json8": "^0.9.2",
"path-sort": "^0.1.0",
"ts-babel": "^1.1.4",
"tslint": "^4.0.0-dev.1",
"tslint": "4.0.0-dev.1",
"typescript": "^2.1.1",
"validate-commit-msg": "^2.8.2",
"whitespace": "^2.1.0"
Expand Down Expand Up @@ -142,15 +141,25 @@
]
]
},
"ava": {
"verbose": true,
"cache": false,
"files": [
"test/out/*.js"
]
"jest": {
"testEnvironment": "node",
"testPathDirs": [
"test/out"
],
"testPathIgnorePatterns": [
"/helpers/"
],
"testRegex": "\\.js$",
"modulePaths": [
"<rootDir>"
],
"setupTestFrameworkScriptFile": "test/jestSetup.js"
},
"release": {
"verifyConditions": []
},
"typings": "./out/electron-builder.d.ts"
"typings": "./out/electron-builder.d.ts",
"publishConfig": {
"tag": "next"
}
}
59 changes: 0 additions & 59 deletions src/cleanup.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/cliOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const deprecated = "Deprecated:"
export function createYargs(): any {
//noinspection ReservedWordAsName
return yargs
.example("build -mwl", "build for MacOS, Windows and Linux")
.example("build -mwl", "build for macOS, Windows and Linux")
.example("build --linux deb tar.xz", "build deb and tar.xz for Linux")
.example("build --win --ia32", "build for Windows ia32")
.example("build --em.foo=bar", "set application package.json property `foo` to `bar`")
.option("mac", {
group: buildGroup,
alias: ["m", "o", "macos"],
describe: `Build for MacOS, accepts target list (see ${underline("https://goo.gl/HAnnq8")}).`,
describe: `Build for macOS, accepts target list (see ${underline("https://goo.gl/HAnnq8")}).`,
type: "array",
})
.option("linux", {
Expand Down
Loading

0 comments on commit 0126286

Please sign in to comment.