mirror of https://github.com/Tim-Paik/neutauri.git
Merge branch 'main' of github.com:Tim-Paik/neutauri
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
commit
ed45c5dcd5
22
.drone.yml
22
.drone.yml
|
@ -1,6 +1,6 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
|
@ -28,3 +28,23 @@ steps:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: clippy
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: clippy
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- echo '========Install the necessary environment========'
|
||||||
|
- apt update && apt install -y curl gcc git libwebkit2gtk-4.0-dev libappindicator3-dev
|
||||||
|
- echo '========Install the Rust toolchain========'
|
||||||
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -c clippy -y
|
||||||
|
- echo '========Compile the Neutauri binary========'
|
||||||
|
- $HOME/.cargo/bin/cargo build --release --bin neutauri_runtime
|
||||||
|
- $HOME/.cargo/bin/cargo build --release --bin neutauri_bundler
|
||||||
|
- echo '========Run Cargo Clippy========'
|
||||||
|
- $HOME/.cargo/bin/cargo clippy
|
||||||
|
|
|
@ -57,15 +57,12 @@ pub fn dev(config_path: String) -> wry::Result<()> {
|
||||||
)?)),
|
)?)),
|
||||||
None => window_builder,
|
None => window_builder,
|
||||||
};
|
};
|
||||||
let monitor_size = event_loop
|
let monitor_size = event_loop.primary_monitor().unwrap_or_else(|| {
|
||||||
.primary_monitor()
|
|
||||||
.unwrap_or_else(|| {
|
|
||||||
event_loop
|
event_loop
|
||||||
.available_monitors()
|
.available_monitors()
|
||||||
.next()
|
.next()
|
||||||
.expect("no monitor found")
|
.expect("no monitor found")
|
||||||
})
|
}).size();
|
||||||
.size();
|
|
||||||
let window_builder = match config.window_attr()?.inner_size {
|
let window_builder = match config.window_attr()?.inner_size {
|
||||||
Some(size) => window_builder.with_inner_size(get_size(size, monitor_size)),
|
Some(size) => window_builder.with_inner_size(get_size(size, monitor_size)),
|
||||||
None => window_builder,
|
None => window_builder,
|
||||||
|
|
|
@ -58,14 +58,12 @@ fn main() -> wry::Result<()> {
|
||||||
)?)),
|
)?)),
|
||||||
None => window_builder,
|
None => window_builder,
|
||||||
};
|
};
|
||||||
let monitor = event_loop.primary_monitor().unwrap_or_else(|| {
|
let monitor_size = event_loop.primary_monitor().unwrap_or_else(|| {
|
||||||
event_loop
|
event_loop
|
||||||
.available_monitors()
|
.available_monitors()
|
||||||
.next()
|
.next()
|
||||||
.expect("no monitor found")
|
.expect("no monitor found")
|
||||||
});
|
}).size();
|
||||||
let monitor_size = monitor.size();
|
|
||||||
let monitor_scale_factor = monitor.scale_factor();
|
|
||||||
let window_builder = match res.window_attr.inner_size {
|
let window_builder = match res.window_attr.inner_size {
|
||||||
Some(size) => window_builder.with_inner_size(get_size(size, monitor_size)),
|
Some(size) => window_builder.with_inner_size(get_size(size, monitor_size)),
|
||||||
None => window_builder,
|
None => window_builder,
|
||||||
|
@ -169,7 +167,6 @@ fn main() -> wry::Result<()> {
|
||||||
})
|
})
|
||||||
.with_devtools(false)
|
.with_devtools(false)
|
||||||
.build()?;
|
.build()?;
|
||||||
webview.zoom(monitor_scale_factor);
|
|
||||||
|
|
||||||
event_loop.run(move |event, _, control_flow| {
|
event_loop.run(move |event, _, control_flow| {
|
||||||
*control_flow = ControlFlow::Wait;
|
*control_flow = ControlFlow::Wait;
|
||||||
|
|
Loading…
Reference in New Issue