Skip to content

Commit

Permalink
chore: v23.0.0 alpha (#6556)
Browse files Browse the repository at this point in the history
* Adding INPUTxxx and OUTPUTxxx CHARSETS to makensis
Fixes: #4898 #6232 #6259

* Adding additional details to error console logging

* Breaking change: Removing Bintray support since it was sunset. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

* fix: force strip path separators for backslashes on Windows

* fix: Force authentication for local Mac Squirrel update server

* Breaking Change: Fail-fast for signature verification failures. Adding `-LiteralPath` to update file for injected wildcards

* Adding changeset and eslint

* Fix error: `-OUTPUTCHARSET is disabled for non Win32 platforms.`

* feat(mac): ElectronAsarIntegrity in electron@15 (#6511)

* feat(mac): ElectronAsarIntegrity in electron@15
See: electron/electron#30667
Fix: #6506
Fix: #6507

* fix(msi): MSI fails to install when deployed machine-wide via GPO (#6514)

* fix(msi): MSI fails to install when deployed machine-wide via GPO
* Disable advertised shortcuts, since MSIs with advertised Start Menu shortcuts that have a
Shortcut Property fails to install when deployed machine-wide via GPO but works fine in all
other contexts. This might be a bug in Windows or a misdiagnosis; see #6508 for more details.
Closes #6508
* BREAKING CHANGE: Admins using advertisement must apply an MST to re-enable it. See #6508.

* Don't set GitHub Releases draft title since it automatically pulls it from tag name. Fixes #3683

* feat(snap): add lzo to Snap compression options (also as new default) (#6201)

* feat(msi): add fileAssociation support for MSI target (#6530)

* fix(win): iconId sometimes containing invalid characters, and iconId config option being ignored.
* fix(msi): change the fallback value for generated MSI Ids to a unique string for the product.

* BREAKING CHANGE: remove MSI option `iconId`

* fix: stabilizing tests by moving updater tests to its own node to explicitly segment env.___TOKEN integration tests from other standard unit tests

* chore: synchronizing docs and schema plus prettier

* Adding changset to set as alpha

* Updating changeset documentation

* feat(msi): support assisted installer for MSI target (#6550)

* Add basic support for assisted installer, with UI to choose between per-user and per-machine. Supported config settings: runAfterFinish, perMachine, oneClick. Not supported: license (EULA), allowToChangeInstallationDirectory, etc. Also prevent oneClick's runAfterFinish from executing when installed silently.

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: Alex Plumley <alex+git@aplum.ca>
Co-authored-by: Mike Maietta <mmaietta@outlook.com>
Co-authored-by: Omer Akram <om26er@gmail.com>
Co-authored-by: Maximilian Federle <max.federle@gmail.com>
  • Loading branch information
6 people authored Jan 16, 2022
1 parent bea51d6 commit a138a86
Show file tree
Hide file tree
Showing 62 changed files with 875 additions and 856 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-ladybugs-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": minor
---

feat(msi): support assisted installer for MSI target
5 changes: 5 additions & 0 deletions .changeset/giant-dryers-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": minor
---

feat(msi): add fileAssociation support for MSI target
6 changes: 6 additions & 0 deletions .changeset/giant-dryers-copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"app-builder-lib": patch
---

fix(win): iconId sometimes containing invalid characters, and iconId config option being ignored.
fix(msi): change the fallback value for generated MSI Ids to a unique string for the product.
5 changes: 5 additions & 0 deletions .changeset/healthy-peaches-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix(msi): MSI fails to install when deployed machine-wide via GPO
18 changes: 18 additions & 0 deletions .changeset/nervous-buckets-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"app-builder-lib": major
"builder-util": major
"builder-util-runtime": major
"electron-publish": major
"electron-updater": major
---

Breaking changes
Removing Bintray support since it was sunset. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
Fail-fast for windows signature verification failures. Adding `-LiteralPath` to update file path to disregard injected wildcards
Force strip path separators for backslashes on Windows during update process
Force authentication for local mac squirrel update server

Fixes:
fix(nsis): Adding --INPUTCHARSET to makensis. (#4898 #6232 #6259)

Adding additional details to error console logging
5 changes: 5 additions & 0 deletions .changeset/nervous-pandas-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": minor
---

feat(mac): ElectronAsarIntegrity in electron@15
20 changes: 20 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"app-builder-lib": "22.14.13",
"builder-util": "22.14.13",
"builder-util-runtime": "8.9.2",
"dmg-builder": "22.14.13",
"electron-builder": "22.14.13",
"electron-builder-squirrel-windows": "22.14.13",
"electron-forge-maker-appimage": "22.14.13",
"electron-forge-maker-nsis": "22.14.13",
"electron-forge-maker-nsis-web": "22.14.13",
"electron-forge-maker-snap": "22.14.13",
"electron-publish": "22.14.13",
"electron-updater": "4.6.5",
"@electron-builder/test": "0.0.0"
},
"changesets": []
}
5 changes: 5 additions & 0 deletions .changeset/serious-peas-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": major
---

BREAKING CHANGE: remove MSI option `iconId`
12 changes: 12 additions & 0 deletions .changeset/spicy-crabs-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"app-builder-lib": minor
"builder-util": major
---

Default to LZO compression for snap packages.
This greatly improves cold startup performance (https://snapcraft.io/blog/why-lzo-was-chosen-as-the-new-compression-method).
LZO has already been adopted by most desktop-oriented snaps outside of the Electron realm.

For the rare case where developers prefer a smaller file size (XZ) to vastly improved decompression performance (LZO), provided an option to override the default compression method.

Consumers do not need to update their configuration unless they specifically want to stick to XZ compression.
42 changes: 42 additions & 0 deletions .github/actions/pretest/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Setup Tests'
description: 'Set up pnpm, node w/ pnpm cache, install and audit deps, compile, and restore electron cache'
inputs:
cache-key:
description: 'The key to the electron cache'
required: true
cache-path:
description: 'The path to the electron cache'
required: true

runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2
with:
version: 6.25.1

- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'pnpm'

- name: install dependencies
run: pnpm install --frozen-lockfile
shell: bash

- name: Compile
run: pnpm compile
shell: bash

- name: Cache Electron
uses: actions/cache@v2
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}

## Usage
# - name: Setup Tests
# uses: ./.github/actions/pretest
# with:
# cache-path: ~/Library/Caches/electron
# cache-key: v-11.0.0-macos-electron
85 changes: 43 additions & 42 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ jobs:
with:
fetch-depth: 0

- name: Install deps and audit
uses: ./.github/actions/pnpm
- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-path: ~/.cache/electron
cache-key: v-11.0.0-linux-electron

- name: Lint
run: pnpm pretest

- name: Determine if Dockerfiles changed
id: changed-files
Expand All @@ -37,15 +43,6 @@ jobs:
if: ${{ github.event.inputs.build-docker-locally == 'true' }} || contains(steps.changed-files.outputs.all_changed_files, 'Dockerfile') || contains(steps.changed-files.outputs.all_changed_files, 'docker')
run: pnpm docker-images

- name: Compile and Lint
run: pnpm pretest

- name: Cache ~/.cache/electron
uses: actions/cache@v2
with:
path: ~/.cache/electron
key: v-11.0.0-electron

- name: Run tests in docker image
run: pnpm test-linux
env:
Expand All @@ -54,60 +51,64 @@ jobs:

test-mac:
runs-on: macos-latest
strategy:
matrix:
testFiles:
- masTest,dmgTest,protonTest
steps:
- name: Checkout code repository
uses: actions/checkout@v2

- name: Install deps and audit
uses: ./.github/actions/pnpm
- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-path: ~/Library/Caches/electron
cache-key: v-11.0.0-macos-electron

- name: Compile
run: pnpm compile

- name: Cache ~/Library/Caches/electron
uses: actions/cache@v2
- name: Test
run: pnpm ci:test
env:
TEST_FILES: masTest,dmgTest,protonTest
FORCE_COLOR: 1

# Need to separate from other tests because logic is specific to when TOKEN env vars are set
test-updater:
runs-on: macos-latest
steps:
- name: Checkout code repository
uses: actions/checkout@v2

- name: Setup Tests
uses: ./.github/actions/pretest
with:
path: ~/Library/Caches/electron
key: v-11.0.0-mac-electron
cache-path: ~/Library/Caches/electron
cache-key: v-11.0.0-update-electron

- name: Test
run: node ./test/out/helpers/runTests.js
run: pnpm ci:test
env:
TEST_FILES: ${{ matrix.testFiles }}
TEST_FILES: nsisUpdaterTest
KEYGEN_TOKEN: ${{ secrets.KEYGEN_TOKEN }}
# BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
FORCE_COLOR: 1

test-windows:
runs-on: windows-2019
runs-on: windows-latest
strategy:
matrix:
testFiles:
- installerTest,appxTest,msiTest,portableTest,assistedInstallerTest
- oneClickInstallerTest,nsisUpdaterTest,winCodeSignTest,winPackagerTest,webInstallerTest
- installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,protonTest
- oneClickInstallerTest,winCodeSignTest,winPackagerTest,webInstallerTest
steps:
- name: Checkout code repository
uses: actions/checkout@v2

- name: Install deps and audit
uses: ./.github/actions/pnpm

- name: Compile
run: pnpm compile

- name: Cache ~\AppData\Local\Cache\electron
uses: actions/cache@v2
- name: Setup Tests
uses: ./.github/actions/pretest
with:
path: ~\AppData\Local\Cache\electron
key: v-11.0.0-windows-electron
cache-path: ~\AppData\Local\Cache\electron
cache-key: v-11.0.0-windows-electron

- name: Test
run: node ./test/out/helpers/runTests.js
run: pnpm ci:test
env:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
KEYGEN_TOKEN: ${{ secrets.KEYGEN_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TEST_FILES: ${{ matrix.testFiles }}
FORCE_COLOR: 1
2 changes: 1 addition & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get -qq update && apt-get -qq dist-upgrade && \
apt-get -qq install --no-install-recommends \
qtbase5-dev build-essential autoconf libssl-dev gcc-multilib g++-multilib \
lzip rpm python libcurl4 git git-lfs ssh unzip libarchive-tools \
libxtst6 libsecret-1-dev libopenjp2-tools \
libxtst6 libsecret-1-dev libopenjp2-tools liblzo2-2 \
&& \
# git-lfs
git lfs install && \
Expand Down
6 changes: 3 additions & 3 deletions docs/api/electron-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ return path.join(target.outDir, <code>__${target.name}-${getArtifactArchName(arc
<p><strong>Kind</strong>: class of <a href="#module_electron-publish"><code>electron-publish</code></a><br/>
<strong>Properties</strong></p>
<ul>
<li><strong><code id="Publisher-providerName">providerName</code></strong> String</li>
<li><strong><code id="Publisher-providerName">providerName</code></strong> “github” | “s3” | “spaces” | “generic” | “custom” | “snapStore” | “keygen” | “bitbucket”</li>
</ul>
<p><strong>Methods</strong></p>
<ul>
Expand Down Expand Up @@ -1709,7 +1709,7 @@ return path.join(target.outDir, <code>__${target.name}-${getArtifactArchName(arc
<tbody>
<tr>
<td>options</td>
<td><code><a href="/configuration/publish#publishconfiguration">PublishConfiguration</a></code> | <code>String</code> | <code><a href="/configuration/publish#githuboptions">GithubOptions</a></code> | <code><a href="/configuration/publish#s3options">S3Options</a></code> | <code><a href="/configuration/publish#spacesoptions">SpacesOptions</a></code> | <code><a href="/configuration/publish#genericserveroptions">GenericServerOptions</a></code> | <code><a href="/configuration/publish#bintrayoptions">BintrayOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.CustomPublishOptions</code> | <code>module:builder-util-runtime/out/publishOptions.KeygenOptions</code> | <code><a href="/configuration/publish#snapstoreoptions">SnapStoreOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.BitbucketOptions</code> | <code>String</code></td>
<td><code><a href="/configuration/publish#publishconfiguration">PublishConfiguration</a></code> | <code>String</code> | <code><a href="/configuration/publish#githuboptions">GithubOptions</a></code> | <code><a href="/configuration/publish#s3options">S3Options</a></code> | <code><a href="/configuration/publish#spacesoptions">SpacesOptions</a></code> | <code><a href="/configuration/publish#genericserveroptions">GenericServerOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.CustomPublishOptions</code> | <code>module:builder-util-runtime/out/publishOptions.KeygenOptions</code> | <code><a href="/configuration/publish#snapstoreoptions">SnapStoreOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.BitbucketOptions</code> | <code>String</code></td>
<td>If you want to override configuration in the <code>app-update.yml</code>.</td>
</tr>
</tbody>
Expand Down Expand Up @@ -1834,7 +1834,7 @@ This is different from the normal quit event sequence.</p>
<tbody>
<tr>
<td>options</td>
<td><code><a href="/configuration/publish#publishconfiguration">PublishConfiguration</a></code> | <code>String</code> | <code><a href="/configuration/publish#githuboptions">GithubOptions</a></code> | <code><a href="/configuration/publish#s3options">S3Options</a></code> | <code><a href="/configuration/publish#spacesoptions">SpacesOptions</a></code> | <code><a href="/configuration/publish#genericserveroptions">GenericServerOptions</a></code> | <code><a href="/configuration/publish#bintrayoptions">BintrayOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.CustomPublishOptions</code> | <code>module:builder-util-runtime/out/publishOptions.KeygenOptions</code> | <code><a href="/configuration/publish#snapstoreoptions">SnapStoreOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.BitbucketOptions</code> | <code>String</code></td>
<td><code><a href="/configuration/publish#publishconfiguration">PublishConfiguration</a></code> | <code>String</code> | <code><a href="/configuration/publish#githuboptions">GithubOptions</a></code> | <code><a href="/configuration/publish#s3options">S3Options</a></code> | <code><a href="/configuration/publish#spacesoptions">SpacesOptions</a></code> | <code><a href="/configuration/publish#genericserveroptions">GenericServerOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.CustomPublishOptions</code> | <code>module:builder-util-runtime/out/publishOptions.KeygenOptions</code> | <code><a href="/configuration/publish#snapstoreoptions">SnapStoreOptions</a></code> | <code>module:builder-util-runtime/out/publishOptions.BitbucketOptions</code> | <code>String</code></td>
<td>If you want to override configuration in the <code>app-update.yml</code>.</td>
</tr>
</tbody>
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration/snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ The top-level [snap](configuration.md#Configuration-snap) key contains set of op
<li>
<p><code id="SnapOptions-title">title</code> String | “undefined” - An optional title for the snap, may contain uppercase letters and spaces. Defaults to <code>productName</code>. See <a href="https://snapcraft.io/docs/snap-format">snap format documentation</a>.</p>
</li>
<li>
<p><code id="SnapOptions-compression">compression</code> = <code>lzo</code> “xz” | “lzo” | “undefined” - Sets the compression type for the snap. Can be xz or lzo. Defaults to lzo when not specified.</p>
</li>
</ul>
<p>Inherited from <code>CommonLinuxOptions</code>:</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/LinuxTargetSpecificOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p><code id="LinuxTargetSpecificOptions-depends">depends</code> Array&lt;String&gt; | “undefined” - Package dependencies.</p>
</li>
<li>
<p><code id="LinuxTargetSpecificOptions-compression">compression</code> = <code>xz</code> “gz” | “bzip2” | “xz” | “undefined” - The compression type.</p>
<p><code id="LinuxTargetSpecificOptions-compression">compression</code> = <code>xz</code> “gz” | “bzip2” | “xz” | “lzo” | “undefined” - The compression type.</p>
</li>
<li>
<p><code id="LinuxTargetSpecificOptions-icon">icon</code> String</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/PlatformSpecificBuildOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</li>
<li>
<p><code id="FileAssociation-icon">icon</code> String | “undefined” - The path to icon (<code>.icns</code> for MacOS and <code>.ico</code> for Windows), relative to <code>build</code> (build resources directory). Defaults to <code>${firstExt}.icns</code>/<code>${firstExt}.ico</code> (if several extensions specified, first is used) or to application icon.</p>
<p>Not supported on Linux, file issue if need (default icon will be <code>x-office-document</code>).</p>
<p>Not supported on Linux, file issue if need (default icon will be <code>x-office-document</code>). Not supported on MSI.</p>
</li>
<li>
<p><code id="FileAssociation-role">role</code> = <code>Editor</code> String - <em>macOS-only</em> The app’s role with respect to the type. The value can be <code>Editor</code>, <code>Viewer</code>, <code>Shell</code>, or <code>None</code>. Corresponds to <code>CFBundleTypeRole</code>.</p>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
"lint": "eslint packages --ext .ts",
"lint-staged": "lint-staged",
"lint-deps": "node ./test/out/helpers/checkDeps.js",
"pretest": "pnpm compile && pnpm lint && pnpm lint-deps",
"pretest": "pnpm lint && pnpm lint-deps",
"prettier": "prettier 'packages/**/*.{ts, js}' 'test/src/**/*.ts' --write",
"///": "Please see https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#run-test-using-cli how to run particular test instead full (and very slow) run",
"test": "node ./test/out/helpers/runTests.js skipArtifactPublisher",
"test-all": "pnpm pretest && node ./test/out/helpers/runTests.js",
"test-all": "pnpm compile && pnpm pretest && pnpm ci:test",
"test-linux": "docker run --rm -e UPDATE_SNAPSHOT=${UPDATE_SNAPSHOT:-false} -e TEST_FILES=\"${TEST_FILES:-HoistedNodeModuleTest}\" -v $(pwd):/project -v $(pwd)-node-modules:/project/node_modules -v $HOME/Library/Caches/electron:/root/.cache/electron -v $HOME/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine-mono /bin/bash -c \"pnpm install && node ./test/out/helpers/runTests.js\"",
"test-update": "UPDATE_SNAPSHOT=true pnpm test-all",
"docker-images": "docker/build.sh",
"docker-push": "docker/push.sh",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"generate-changeset": "pnpm changeset",
"generate-docs": "pnpm compile && pnpm jsdoc && pnpm jsdoc2md2html",
"ci:test": "node ./test/out/helpers/runTests.js",
"ci:version": "pnpm changelog && changeset version && node scripts/update-package-version-export.js && pnpm run generate-docs && git add .",
"ci:publish": "pnpm compile && pnpm publish -r && changeset tag",
"schema": "typescript-json-schema packages/app-builder-lib/tsconfig-scheme.json Configuration --out packages/app-builder-lib/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --required && node ./scripts/fix-schema.js",
Expand Down
Loading

0 comments on commit a138a86

Please sign in to comment.