Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #10

Merged
merged 15 commits into from
Dec 12, 2024
Merged

Dev #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install libdbus-1-dev
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev
- name: Install Deps
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev libxcb1-dev
- name: Install latest nightly
uses: crusty-pie/toolchain@v1
with:
Expand Down Expand Up @@ -60,9 +60,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install libdbus-1-dev
- name: Install Deps
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev libxcb1-dev
- name: Install latest nightly
uses: crusty-pie/toolchain@v1
with:
Expand Down
35 changes: 17 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ crate-type = ["lib", "cdylib", "staticlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["completions"]
default = ["completions", "ui_solver"]
all_ui_solver = ["slide_ui_solver", "ui_solver", "obstacle_ui_solver"]
ui_solver = ["rotate_ui_solver", "icon_click_ui_solver", "text_click_ui_solver"]
completions = ["completion-nu", "completion-carapace", "completion-fig"]
completion-nu = ["clap_complete_command", "clap_complete_command/nushell"]
completion-carapace = ["clap_complete_command", "clap_complete_command/carapace"]
Expand Down Expand Up @@ -54,8 +56,8 @@ xdsign_data = { git = "https://github.com/learturely/xdsign_data.git" }

[profile.release]
panic = "abort"
codegen-units = 1
lto = "fat"
#codegen-units = 1
#lto = "fat"
strip = "symbols"

[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))'.dependencies]
Expand Down
15 changes: 9 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ use clap::CommandFactory;
use cli::arg::{AccountSubCommand, Args, MainCommand};
use cxlib::{
activity::{Activity, RawSign},
captcha::CaptchaType,
default_impl::store::{AccountTable, DataBase, ExcludeTable},
sign::SignTrait,
store::Dir,
types::Location,
user::{DefaultLoginSolver, LoginSolverTrait, LoginSolverWrapper, LoginSolvers, Session},
utils::time_it_and_print_result,
};
use cxlib_captcha::CaptchaType;
use log::{error, info, warn};
use std::{collections::HashMap, io::stdout};
use x_l4rs::IDSLoginImpl;
Expand Down Expand Up @@ -76,11 +77,13 @@ fn init_function() {
Location::set_boxed_location_preprocessor(Box::new(LocationPreprocessor))
.unwrap_or_else(|e| error!("{e}"));
let login_solver = IDSLoginImpl::TARGET_LEARNING.get_login_solver(|a, b| {
Ok(cxlib::imageproc::find_sub_image(
a,
b,
cxlib::imageproc::slide_solvers::find_min_sum_of_squared_errors,
))
time_it_and_print_result(|| {
Ok(cxlib::imageproc::find_sub_image(
a,
b,
cxlib::imageproc::slide_solvers::find_max_cross_correlation_normalized,
))
})
});
let login_type = login_solver.login_type().to_owned();
LoginSolvers::register(login_solver)
Expand Down
Loading