mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 12:14:05 +03:00
Merge remote-tracking branch 'origin/dev' into next
This commit is contained in:
commit
169d2434ff
@ -7,7 +7,7 @@
|
|||||||
"getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE \"s/^[^\\\"]*\\\"//; s/\\\".*//1p\"",
|
"getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE \"s/^[^\\\"]*\\\"//; s/\\\".*//1p\"",
|
||||||
"prepublish": [
|
"prepublish": [
|
||||||
"sudo apt-get update",
|
"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",
|
"cargo install cargo-audit --features=fix",
|
||||||
{
|
{
|
||||||
"command": "cargo generate-lockfile",
|
"command": "cargo generate-lockfile",
|
||||||
|
2
.github/workflows/artifacts-updater.yml
vendored
2
.github/workflows/artifacts-updater.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
|||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/bench.yml
vendored
2
.github/workflows/bench.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf xvfb
|
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev xvfb
|
||||||
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
|
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
|
||||||
sudo dpkg -i hyperfine_1.11.0_amd64.deb
|
sudo dpkg -i hyperfine_1.11.0_amd64.deb
|
||||||
pip install memory_profiler
|
pip install memory_profiler
|
||||||
|
@ -30,7 +30,7 @@ jobs:
|
|||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -111,7 +111,7 @@ jobs:
|
|||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
|
3
.github/workflows/lint-fmt-core.yml
vendored
3
.github/workflows/lint-fmt-core.yml
vendored
@ -62,7 +62,7 @@ jobs:
|
|||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
@ -74,6 +74,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: core -> ../target
|
workspaces: core -> ../target
|
||||||
|
save-if: ${{ matrix.clippy.key == 'all' }}
|
||||||
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
- uses: actions-rs/clippy-check@v1
|
||||||
with:
|
with:
|
||||||
|
6
.github/workflows/publish-cli-js.yml
vendored
6
.github/workflows/publish-cli-js.yml
vendored
@ -259,7 +259,7 @@ jobs:
|
|||||||
- name: install system dependencies
|
- name: install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
- name: Test bindings
|
- name: Test bindings
|
||||||
run: yarn test
|
run: yarn test
|
||||||
test-linux-x64-musl-binding:
|
test-linux-x64-musl-binding:
|
||||||
@ -298,7 +298,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
apk add openssl-dev musl-dev glib-dev cairo-dev pkgconfig gdk-pixbuf-dev webkit2gtk-dev curl libappindicator-dev patchelf librsvg-dev gtk+3.0-dev
|
apk add openssl-dev musl-dev glib-dev cairo-dev pkgconfig gdk-pixbuf-dev webkit2gtk-dev curl libappindicator-dev gtk+3.0-dev
|
||||||
- name: Setup and run tests
|
- name: Setup and run tests
|
||||||
run: |
|
run: |
|
||||||
yarn tauri --help
|
yarn tauri --help
|
||||||
@ -355,7 +355,7 @@ jobs:
|
|||||||
set -e
|
set -e
|
||||||
export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH
|
export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH
|
||||||
apt-get update
|
apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||||
bash
|
bash
|
||||||
curl https://sh.rustup.rs -sSf | bash -s -- -y
|
curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||||
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/fnm" --skip-shell
|
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/fnm" --skip-shell
|
||||||
|
2
.github/workflows/test-cli-js.yml
vendored
2
.github/workflows/test-cli-js.yml
vendored
@ -51,7 +51,7 @@ jobs:
|
|||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
|
34
.github/workflows/test-core.yml
vendored
34
.github/workflows/test-core.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
|||||||
os: macos-latest,
|
os: macos-latest,
|
||||||
toolchain: '1.59.0',
|
toolchain: '1.59.0',
|
||||||
cross: false,
|
cross: false,
|
||||||
acommand: 'build'
|
command: 'build'
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
target: aarch64-linux-android,
|
target: aarch64-linux-android,
|
||||||
@ -66,6 +66,19 @@ jobs:
|
|||||||
cross: true,
|
cross: true,
|
||||||
command: 'build'
|
command: 'build'
|
||||||
}
|
}
|
||||||
|
features:
|
||||||
|
- {
|
||||||
|
args: --no-default-features --features native-tls-vendored,
|
||||||
|
key: no-default
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
args: --features native-tls-vendored,api-all,
|
||||||
|
key: api-all
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
args: --features native-tls-vendored,compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,
|
||||||
|
key: all
|
||||||
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -82,29 +95,16 @@ jobs:
|
|||||||
if: contains(matrix.platform.target, 'unknown-linux')
|
if: contains(matrix.platform.target, 'unknown-linux')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: core -> ../target
|
workspaces: core -> ../target
|
||||||
|
save-if: ${{ matrix.features.key == 'all' }}
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.platform.cross }}
|
use-cross: ${{ matrix.platform.cross }}
|
||||||
command: ${{ matrix.platform.command }}
|
command: ${{ matrix.platform.command }}
|
||||||
args: --target ${{ matrix.platform.target }} --features native-tls-vendored
|
args: --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
|
||||||
|
|
||||||
- name: test api-all
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
use-cross: ${{ matrix.platform.cross }}
|
|
||||||
command: ${{ matrix.platform.command }}
|
|
||||||
args: --target ${{ matrix.platform.target }} --features native-tls-vendored,api-all
|
|
||||||
|
|
||||||
- name: test all features
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
use-cross: ${{ matrix.platform.cross }}
|
|
||||||
command: ${{ matrix.platform.command }}
|
|
||||||
args: --target ${{ matrix.platform.target }} --features native-tls-vendored,compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart
|
|
||||||
|
2
.github/workflows/udeps.yml
vendored
2
.github/workflows/udeps.yml
vendored
@ -157,7 +157,7 @@ jobs:
|
|||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -594,25 +594,25 @@ impl Response {
|
|||||||
reader
|
reader
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert the response into a Stream of [`bytes::Bytes`] from the body.
|
// Convert the response into a Stream of [`bytes::Bytes`] from the body.
|
||||||
///
|
//
|
||||||
/// # Examples
|
// # Examples
|
||||||
///
|
//
|
||||||
/// ```no_run
|
// ```no_run
|
||||||
/// use futures_util::StreamExt;
|
// use futures_util::StreamExt;
|
||||||
///
|
//
|
||||||
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
/// let client = tauri::api::http::ClientBuilder::new().build()?;
|
// let client = tauri::api::http::ClientBuilder::new().build()?;
|
||||||
/// let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?)
|
// let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?)
|
||||||
/// .await?
|
// .await?
|
||||||
/// .bytes_stream();
|
// .bytes_stream();
|
||||||
///
|
//
|
||||||
/// while let Some(item) = stream.next().await {
|
// while let Some(item) = stream.next().await {
|
||||||
/// println!("Chunk: {:?}", item?);
|
// println!("Chunk: {:?}", item?);
|
||||||
/// }
|
// }
|
||||||
/// # Ok(())
|
// # Ok(())
|
||||||
/// # }
|
// # }
|
||||||
/// ```
|
// ```
|
||||||
#[cfg(feature = "reqwest-client")]
|
#[cfg(feature = "reqwest-client")]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub(crate) fn bytes_stream(
|
pub(crate) fn bytes_stream(
|
||||||
|
@ -34,9 +34,7 @@ mod rust {
|
|||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.invoke_handler(tauri::generate_handler![close_splashscreen])
|
.invoke_handler(tauri::generate_handler![close_splashscreen])
|
||||||
.run(tauri::generate_context!(
|
.run(super::context())
|
||||||
"../../examples/splashscreen/tauri.conf.json"
|
|
||||||
))
|
|
||||||
.expect("failed to run app");
|
.expect("failed to run app");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,7 +62,7 @@ mod ui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let context = tauri::generate_context!("../../examples/splashscreen/tauri.conf.json");
|
let context = super::context();
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
.menu(if cfg!(target_os = "macos") {
|
.menu(if cfg!(target_os = "macos") {
|
||||||
tauri::Menu::os_default(&context.package_info().name)
|
tauri::Menu::os_default(&context.package_info().name)
|
||||||
@ -87,6 +85,10 @@ mod ui {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn context() -> tauri::Context<tauri::utils::assets::EmbeddedAssets> {
|
||||||
|
tauri::generate_context!("../../examples/splashscreen/tauri.conf.json")
|
||||||
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// toggle this flag to experiment with different splashscreen usages
|
// toggle this flag to experiment with different splashscreen usages
|
||||||
let ui = false;
|
let ui = false;
|
||||||
|
@ -1,32 +1,30 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<style>
|
||||||
|
video {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
<head>
|
<body>
|
||||||
<meta charset="UTF-8" />
|
<video id="video_source" controls="" autoplay="" name="media">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<source type="video/mp4" />
|
||||||
<style>
|
</video>
|
||||||
video {
|
<script>
|
||||||
width: 100vw;
|
const { invoke, convertFileSrc } = window.__TAURI__.tauri
|
||||||
height: 100vh;
|
const video = document.getElementById('video_source')
|
||||||
}
|
const source = document.createElement('source')
|
||||||
</style>
|
invoke('video_uri').then(([scheme, path]) => {
|
||||||
</head>
|
source.type = 'video/mp4'
|
||||||
|
source.src = convertFileSrc(path, scheme)
|
||||||
<body>
|
video.appendChild(source)
|
||||||
<video id="video_source" controls="" autoplay="" name="media">
|
video.load()
|
||||||
<source type="video/mp4" />
|
})
|
||||||
</video>
|
</script>
|
||||||
<script>
|
</body>
|
||||||
const { invoke, convertFileSrc } = window.__TAURI__.tauri
|
</html>
|
||||||
const video = document.getElementById('video_source')
|
|
||||||
const source = document.createElement('source')
|
|
||||||
invoke('video_uri').then(([scheme, path]) => {
|
|
||||||
source.type = 'video/mp4'
|
|
||||||
source.src = convertFileSrc(path, scheme)
|
|
||||||
video.appendChild(source)
|
|
||||||
video.load()
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
||||||
"prepublish": [
|
"prepublish": [
|
||||||
"sudo apt-get update",
|
"sudo apt-get update",
|
||||||
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0",
|
"sudo apt-get install -y webkit2gtk-4.0",
|
||||||
"cargo install cargo-audit",
|
"cargo install cargo-audit",
|
||||||
{
|
{
|
||||||
"command": "cargo generate-lockfile",
|
"command": "cargo generate-lockfile",
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
||||||
"prepublish": [
|
"prepublish": [
|
||||||
"sudo apt-get update",
|
"sudo apt-get update",
|
||||||
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0",
|
"sudo apt-get install -y webkit2gtk-4.0",
|
||||||
"cargo install cargo-audit",
|
"cargo install cargo-audit",
|
||||||
{
|
{
|
||||||
"command": "cargo generate-lockfile",
|
"command": "cargo generate-lockfile",
|
||||||
|
Loading…
Reference in New Issue
Block a user