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\"",
|
||||
"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",
|
||||
|
2
.github/workflows/artifacts-updater.yml
vendored
2
.github/workflows/artifacts-updater.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
|
2
.github/workflows/bench.yml
vendored
2
.github/workflows/bench.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
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
|
||||
sudo dpkg -i hyperfine_1.11.0_amd64.deb
|
||||
pip install memory_profiler
|
||||
|
@ -30,7 +30,7 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -111,7 +111,7 @@ jobs:
|
||||
- name: install dependencies
|
||||
run: |
|
||||
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
|
||||
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
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
@ -74,6 +74,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: core -> ../target
|
||||
save-if: ${{ matrix.clippy.key == 'all' }}
|
||||
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
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
|
||||
run: |
|
||||
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
|
||||
run: yarn test
|
||||
test-linux-x64-musl-binding:
|
||||
@ -298,7 +298,7 @@ jobs:
|
||||
shell: bash
|
||||
- name: Install system dependencies
|
||||
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
|
||||
run: |
|
||||
yarn tauri --help
|
||||
@ -355,7 +355,7 @@ jobs:
|
||||
set -e
|
||||
export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH
|
||||
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
|
||||
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
|
||||
|
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'
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
|
34
.github/workflows/test-core.yml
vendored
34
.github/workflows/test-core.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
||||
os: macos-latest,
|
||||
toolchain: '1.59.0',
|
||||
cross: false,
|
||||
acommand: 'build'
|
||||
command: 'build'
|
||||
}
|
||||
- {
|
||||
target: aarch64-linux-android,
|
||||
@ -66,6 +66,19 @@ jobs:
|
||||
cross: true,
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
@ -82,29 +95,16 @@ jobs:
|
||||
if: contains(matrix.platform.target, 'unknown-linux')
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
workspaces: core -> ../target
|
||||
save-if: ${{ matrix.features.key == 'all' }}
|
||||
|
||||
- name: test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: ${{ matrix.platform.cross }}
|
||||
command: ${{ matrix.platform.command }}
|
||||
args: --target ${{ matrix.platform.target }} --features native-tls-vendored
|
||||
|
||||
- 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
|
||||
args: --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
|
||||
|
2
.github/workflows/udeps.yml
vendored
2
.github/workflows/udeps.yml
vendored
@ -157,7 +157,7 @@ jobs:
|
||||
- name: Install required packages
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
|
@ -594,25 +594,25 @@ impl Response {
|
||||
reader
|
||||
}
|
||||
|
||||
/// Convert the response into a Stream of [`bytes::Bytes`] from the body.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// use futures_util::StreamExt;
|
||||
///
|
||||
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
/// let client = tauri::api::http::ClientBuilder::new().build()?;
|
||||
/// let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?)
|
||||
/// .await?
|
||||
/// .bytes_stream();
|
||||
///
|
||||
/// while let Some(item) = stream.next().await {
|
||||
/// println!("Chunk: {:?}", item?);
|
||||
/// }
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
// Convert the response into a Stream of [`bytes::Bytes`] from the body.
|
||||
//
|
||||
// # Examples
|
||||
//
|
||||
// ```no_run
|
||||
// use futures_util::StreamExt;
|
||||
//
|
||||
// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// let client = tauri::api::http::ClientBuilder::new().build()?;
|
||||
// let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?)
|
||||
// .await?
|
||||
// .bytes_stream();
|
||||
//
|
||||
// while let Some(item) = stream.next().await {
|
||||
// println!("Chunk: {:?}", item?);
|
||||
// }
|
||||
// # Ok(())
|
||||
// # }
|
||||
// ```
|
||||
#[cfg(feature = "reqwest-client")]
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn bytes_stream(
|
||||
|
@ -34,9 +34,7 @@ mod rust {
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![close_splashscreen])
|
||||
.run(tauri::generate_context!(
|
||||
"../../examples/splashscreen/tauri.conf.json"
|
||||
))
|
||||
.run(super::context())
|
||||
.expect("failed to run app");
|
||||
}
|
||||
}
|
||||
@ -64,7 +62,7 @@ mod ui {
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let context = tauri::generate_context!("../../examples/splashscreen/tauri.conf.json");
|
||||
let context = super::context();
|
||||
tauri::Builder::default()
|
||||
.menu(if cfg!(target_os = "macos") {
|
||||
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() {
|
||||
// toggle this flag to experiment with different splashscreen usages
|
||||
let ui = false;
|
||||
|
@ -1,32 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<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>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<style>
|
||||
video {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<video id="video_source" controls="" autoplay="" name="media">
|
||||
<source type="video/mp4" />
|
||||
</video>
|
||||
<script>
|
||||
const { invoke, convertFileSrc } = window.__TAURI__.tauri
|
||||
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>
|
||||
<body>
|
||||
<video id="video_source" controls="" autoplay="" name="media">
|
||||
<source type="video/mp4" />
|
||||
</video>
|
||||
<script>
|
||||
const { invoke, convertFileSrc } = window.__TAURI__.tauri
|
||||
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' -",
|
||||
"prepublish": [
|
||||
"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",
|
||||
{
|
||||
"command": "cargo generate-lockfile",
|
||||
|
@ -6,7 +6,7 @@
|
||||
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
|
||||
"prepublish": [
|
||||
"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",
|
||||
{
|
||||
"command": "cargo generate-lockfile",
|
||||
|
Loading…
Reference in New Issue
Block a user