Skip to content

Commit

Permalink
Merge branch 'dev' into shell-completions
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhyll committed May 6, 2023
2 parents 6e93c9e + 6a6b138 commit f516382
Show file tree
Hide file tree
Showing 654 changed files with 39,954 additions and 16,212 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[env]
__TAURI_WORKSPACE__ = "true"
78 changes: 32 additions & 46 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"rust": {
"errorOnVersionRange": "^2.0.0-0",
"version": true,
"getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE \"s/^[^\\\"]*\\\"//; s/\\\".*//1p\"",
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
"prepublish": [
"sudo apt-get update",
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf",
"sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev",
"cargo install cargo-audit --features=fix",
{
"command": "cargo generate-lockfile",
Expand All @@ -17,12 +17,7 @@
"pipe": true
},
{
"command": "echo \"# Cargo Audit\"",
"dryRunCommand": true,
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '<details>\n<summary><em><h4>Cargo Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
Expand All @@ -33,7 +28,7 @@
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
Expand All @@ -45,12 +40,7 @@
"dryRunCommand": true
},
{
"command": "echo \"# Cargo Publish\"",
"dryRunCommand": true,
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
Expand All @@ -60,7 +50,7 @@
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
Expand All @@ -80,19 +70,14 @@
"javascript": {
"errorOnVersionRange": "^2.0.0-0",
"version": true,
"getPublishedVersion": "npm view ${ pkgFile.pkg.name } version",
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
"prepublish": [
{
"command": "yarn",
"dryRunCommand": true
},
{
"command": "echo \"# Yarn Audit\n\"",
"dryRunCommand": true,
"pipe": true
},
{
"command": "echo '<details>\n<summary>click to view</summary>\n\n```'",
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
Expand All @@ -115,12 +100,7 @@
"publish": [
"sleep 15s",
{
"command": "echo \"# Yarn Package Publish\"",
"dryRunCommand": true,
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
Expand All @@ -130,7 +110,7 @@
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
Expand Down Expand Up @@ -158,12 +138,7 @@
"dryRunCommand": true
},
{
"command": "echo \"# Yarn Audit\n\"",
"dryRunCommand": true,
"pipe": true
},
{
"command": "echo '<details>\n<summary>click to view</summary>\n\n```'",
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
Expand All @@ -185,12 +160,7 @@
],
"publish": [
{
"command": "echo \"# Yarn Package Publish\"",
"dryRunCommand": true,
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
Expand All @@ -200,7 +170,7 @@
"pipe": true
},
{
"command": "echo '```'",
"command": "echo '```\n\n</details>\n'",
"dryRunCommand": true,
"pipe": true
}
Expand Down Expand Up @@ -239,7 +209,16 @@
"path": "./core/tauri-build",
"manager": "rust",
"dependencies": ["tauri-codegen", "tauri-utils"],
"postversion": "node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
"postversion": [
"node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../tauri-config-schema/Cargo.toml"
],
"assets": [
{
"path": "./tooling/cli/schema.json",
"name": "schema.json"
}
]
},
"tauri": {
"path": "./core/tauri",
Expand All @@ -255,8 +234,12 @@
"cli.js": {
"path": "./tooling/cli/node",
"manager": "javascript",
"getPublishedVersion": "node ../../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
"dependencies": ["cli.rs"],
"postversion": "node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"postversion": [
"node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../../../core/tauri-config-schema/Cargo.toml"
],
"prepublish": [],
"publish": [],
"postpublish": []
Expand All @@ -265,7 +248,10 @@
"path": "./tooling/cli",
"manager": "rust",
"dependencies": ["tauri-bundler", "tauri-utils"],
"postversion": "cargo check",
"postversion": [
"cargo check",
"cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
],
"assets": [
{
"path": "${ pkg.path }/target/package/tauri-cli-${ pkgFile.version }.crate",
Expand Down
5 changes: 5 additions & 0 deletions .changes/fix-wix-escape-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-bundler': 'patch'
---

Correctly escape XML for resource files in WiX bundler.
5 changes: 5 additions & 0 deletions .changes/nsis-webview-installmodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-bundler': 'patch'
---

Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.
31 changes: 31 additions & 0 deletions .changes/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changes

##### via https://github.com/jbolda/covector

As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.

When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.

Use the following format:

```md
---
"package-a": patch
"package-b": patch
---

Change summary goes here

```

Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.

Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).

Given a version number MAJOR.MINOR.PATCH, increment the:

- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# Derived from Tauri contribution and setup guides:
# See: https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md#development-guide
# See: https://tauri.studio/v1/guides/getting-started/prerequisites/#setting-up-linux
# See: https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux
ARG TAURI_BUILD_DEPS="build-essential curl libappindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.0-dev wget"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo

### A note on filesystem performance

Due to limititations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy opearations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.

To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).

Expand Down
44 changes: 44 additions & 0 deletions .docker/cross/aarch64.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive

COPY common.sh lib.sh /
RUN /common.sh

COPY cmake.sh /
RUN /cmake.sh

COPY xargo.sh /
RUN /xargo.sh

RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross

COPY deny-debian-packages.sh /
RUN TARGET_ARCH=arm64 /deny-debian-packages.sh \
binutils \
binutils-aarch64-linux-gnu

COPY qemu.sh /
RUN /qemu.sh aarch64 softmmu

COPY dropbear.sh /
RUN /dropbear.sh

COPY linux-image.sh /
RUN /linux-image.sh aarch64

COPY linux-runner /

ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="/linux-runner aarch64" \
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_gnu="--sysroot=/usr/aarch64-linux-gnu" \
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"

RUN dpkg --add-architecture arm64
RUN apt-get update
RUN apt-get install --assume-yes --no-install-recommends libssl-dev:arm64 libdbus-1-dev:arm64 libsoup2.4-dev:arm64 libssl-dev:arm64 libgtk-3-dev:arm64 webkit2gtk-4.0-dev:arm64 libappindicator3-1:arm64 librsvg2-dev:arm64 patchelf:arm64
31 changes: 31 additions & 0 deletions .docker/cross/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

set -x
set -euo pipefail

# shellcheck disable=SC1091
. lib.sh

main() {
local version=3.23.1

install_packages curl

local td
td="$(mktemp -d)"

pushd "${td}"

curl --retry 3 -sSfL "https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-linux-x86_64.sh" -o cmake.sh
sh cmake.sh --skip-license --prefix=/usr/local

popd

purge_packages

rm -rf "${td}"
rm -rf /var/lib/apt/lists/*
rm "${0}"
}

main "${@}"
40 changes: 40 additions & 0 deletions .docker/cross/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

set -x
set -euo pipefail

# shellcheck disable=SC1091
. lib.sh

# For architectures except amd64 and i386, look for packages on ports.ubuntu.com instead.
# This is important if you enable additional architectures so you can install libraries to cross-compile against.
# Look for 'dpkg --add-architecture' in the README for more details.
if grep -i ubuntu /etc/os-release >/dev/null; then
sed 's/http:\/\/\(.*\).ubuntu.com\/ubuntu\//[arch-=amd64,i386] http:\/\/ports.ubuntu.com\/ubuntu-ports\//g' /etc/apt/sources.list > /etc/apt/sources.list.d/ports.list
sed -i 's/http:\/\/\(.*\).ubuntu.com\/ubuntu\//[arch=amd64,i386] http:\/\/\1.archive.ubuntu.com\/ubuntu\//g' /etc/apt/sources.list
fi

install_packages \
autoconf \
automake \
binutils \
ca-certificates \
curl \
file \
gcc \
git \
libtool \
m4 \
make

if_centos install_packages \
clang-devel \
gcc-c++ \
glibc-devel \
pkgconfig

if_ubuntu install_packages \
g++ \
libc6-dev \
libclang-dev \
pkg-config
19 changes: 19 additions & 0 deletions .docker/cross/deny-debian-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -x
set -euo pipefail

main() {
local package

for package in "${@}"; do
echo "Package: ${package}:${TARGET_ARCH}
Pin: release *
Pin-Priority: -1" > "/etc/apt/preferences.d/${package}"
echo "${package}"
done

rm "${0}"
}

main "${@}"
Loading

0 comments on commit f516382

Please sign in to comment.