Skip to content

Commit

Permalink
merged project created workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
marci1175 committed Aug 17, 2024
1 parent 1f30f3a commit bacfc20
Show file tree
Hide file tree
Showing 36 changed files with 41 additions and 1,074 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

22 changes: 22 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# Create workspace
[workspace]

# Use 2021 rust resolver
resolver = "2"

# Define members
members = [
# Desktop client
"desktop",
# Android client
"mobile",
]

#
# Build profiles
#
# Optimize release builds for size
[profile.release]
opt-level = "s"

# Optimize all dependencies even in debug builds:
[profile.dev.package."*"]
opt-level = 2

# Dont optimize in debug builds for faster compilation:
[profile.dev]
opt-level = 0
2 changes: 1 addition & 1 deletion build_info.matthias_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.08.16. 21:25
2024.08.17. 12:21
9 changes: 0 additions & 9 deletions desktop/.cargo/config.toml

This file was deleted.

12 changes: 0 additions & 12 deletions desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,3 @@ env_logger = "0.10"
# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"


[profile.release]
opt-level = "s"

# Optimize all dependencies even in debug builds:
[profile.dev.package."*"]
opt-level = 2

# Dont optimize in debug builds for faster compile and better sense of code speed:
[profile.dev]
opt-level = 0
9 changes: 5 additions & 4 deletions desktop/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>>

let dll_name = std::env!("OPENCV_LINK_LIBS", "");

let release_path = PathBuf::from(format!("target/release/{dll_name}.dll"));
let debug_path = PathBuf::from(format!("target/debug/{dll_name}.dll"));
let release_path = PathBuf::from(format!("../target/release/{dll_name}.dll"));
let debug_path = PathBuf::from(format!("../target/debug/{dll_name}.dll"));

//Move opencv dll to build folder
match fs::read(&release_path) {
Expand Down Expand Up @@ -53,7 +53,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>>

fn generate_emoji_header() -> Result<(), Box<dyn std::error::Error>>
{
let path_to_output = PathBuf::from(format!("{}/emoji_header.rs", std::env::var("OUT_DIR")?));
let path_to_output = PathBuf::from(format!("{}\\emoji_header.rs", dbg!(std::env::var("OUT_DIR")?)));

//This will get written to the output file
let mut content = String::new();
Expand All @@ -67,7 +67,7 @@ fn generate_emoji_header() -> Result<(), Box<dyn std::error::Error>>
//Emoji type directories
let mut emoji_type_dir: Vec<PathBuf> = Vec::new();

let read_dir = fs::read_dir(PathBuf::from("icons/emojis"))?;
let read_dir = fs::read_dir(PathBuf::from(format!("icons/emojis")))?;

for entry in read_dir {
let dir_entry = entry?;
Expand Down Expand Up @@ -179,6 +179,7 @@ fn generate_emoji_header() -> Result<(), Box<dyn std::error::Error>>
}};",
map_body.join("\n")
));

//Write the contents to the file
fs::write(path_to_output, content)?;

Expand Down
2 changes: 1 addition & 1 deletion desktop/build_info.matthias_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.08.17. 12:02
2024.08.17. 13:48
3 changes: 2 additions & 1 deletion desktop/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[toolchain]
channel = "nightly"
components = [ "rustfmt", "clippy", "rustc", "rust-docs", "rust-analyzer" ]
targets = [ "x86_64-linux-android" ]
targets = [ "x86_64-pc-windows-msvc" ]
10 changes: 6 additions & 4 deletions desktop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use windows_sys::{
w,
Win32::UI::WindowsAndMessaging::{MessageBoxW, MB_ICONERROR},
};

#[tokio::main]
async fn main() -> eframe::Result<()>
{
Expand All @@ -21,10 +22,11 @@ async fn main() -> eframe::Result<()>
env_logger::init();

#[cfg(debug_assertions)]
console_subscriber::init();

#[cfg(debug_assertions)]
std::env::set_var("RUST_BACKTRACE", "1");
{
console_subscriber::init();

std::env::set_var("RUST_BACKTRACE", "1");
}

//set custom panic hook
#[cfg(not(debug_assertions))]
Expand Down
16 changes: 1 addition & 15 deletions mobile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ egui-notify = "0.15.0"
tokio-console = "0.1.10"
console-subscriber = "0.2.0"
socket2 = "0.5.7"
wincam = "0.1.3"
indexmap = "2.3.0"
opencv = "0.92.2"

[dependencies.uuid]
version = "1.6.1"
Expand All @@ -89,16 +87,4 @@ env_logger = "0.10"

# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"


[profile.release]
opt-level = "s"

# Optimize all dependencies even in debug builds:
[profile.dev.package."*"]
opt-level = 2

# Dont optimize in debug builds for faster compile and better sense of code speed:
[profile.dev]
opt-level = 0
wasm-bindgen-futures = "0.4"
Binary file not shown.
Binary file removed mobile/Installer/.vs/Installer/v17/.wsuo
Binary file not shown.
12 changes: 0 additions & 12 deletions mobile/Installer/.vs/Installer/v17/DocumentLayout.json

This file was deleted.

Binary file removed mobile/Installer/.vs/Matthias/v17/.suo
Binary file not shown.
12 changes: 0 additions & 12 deletions mobile/Installer/.vs/Matthias/v17/DocumentLayout.json

This file was deleted.

3 changes: 0 additions & 3 deletions mobile/Installer/.vs/ProjectSettings.json

This file was deleted.

7 changes: 0 additions & 7 deletions mobile/Installer/.vs/VSWorkspaceState.json

This file was deleted.

Binary file removed mobile/Installer/.vs/slnx.sqlite
Binary file not shown.
25 changes: 0 additions & 25 deletions mobile/Installer/Matthias.sln

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

3 changes: 0 additions & 3 deletions mobile/Installer/MatthiasSetup/.vs/ProjectSettings.json

This file was deleted.

7 changes: 0 additions & 7 deletions mobile/Installer/MatthiasSetup/.vs/VSWorkspaceState.json

This file was deleted.

Binary file removed mobile/Installer/MatthiasSetup/.vs/slnx.sqlite
Binary file not shown.
Binary file not shown.
Binary file removed mobile/Installer/MatthiasSetup/Debug/setup.exe
Binary file not shown.
Loading

0 comments on commit bacfc20

Please sign in to comment.