Skip to content

Commit

Permalink
os: fix platform specific issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hinto-janai committed Nov 2, 2022
1 parent b64e1e3 commit 22a03a6
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 154 deletions.
98 changes: 56 additions & 42 deletions Cargo.lock

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

23 changes: 13 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[package]
name = "gupax"
name = "Gupax"
version = "0.1.0"
authors = ["hinto-janaiyo <[email protected]>"]
description = "GUI for P2Pool+XMRig"
documentation = "https://github.com/hinto-janaiyo/gupax"
edition = "2021"

[dependencies]
Expand All @@ -10,17 +13,18 @@ arti-hyper = "0.7.0"
bytes = "1.2.1"
chrono = "0.4.22"
dirs = "4.0.0"
#eframe = "0.19.0"
#egui = "0.19.0"
#egui_extras = { version = "0.19.0", features = ["image"] }
eframe = "0.19.0"
egui = "0.19.0"
egui_extras = { version = "0.19.0", features = ["image"] }
## [external/egui/crates/eframe/src/native/run.rs] line 41: [.with_srgb(true)]
## This line causes a [panic!] inside a Windows VM, from a Linux host.
## There are many issue threads and PRs to fix it but for now,
## this is here for convenience sake when I'm testing.
## The only change is [.with_srgb()] is set to [false].
eframe = { path = "external/egui/crates/eframe" }
egui = { path = "external/egui/crates/egui" }
egui_extras = { path = "external/egui/crates/egui_extras", features = ["image"] }
#eframe = { path = "external/egui/crates/eframe" }
#egui = { path = "external/egui/crates/egui" }
#egui_glow = { path = "external/egui/crates/egui_glow"}
#egui_extras = { path = "external/egui/crates/egui_extras", features = ["image"] }
env_logger = "0.9.1"
figment = { version = "0.10.8", features = ["toml"] }
flate2 = "1.0"
Expand Down Expand Up @@ -61,6 +65,5 @@ winres = "0.1.12"

# For macOS build (cargo-bundle)
[package.metadata.bundle]
identifier = "io.github.hinto-janaiyo.gupax"
icon = ["images/png/[email protected]"]
short_description = "GUI for P2Pool+XMRig"
identifier = "com.github.hinto-janaiyo.gupax"
icon = ["images/icons/[email protected]"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Windows/macOS/Linux:
```
cargo build --release
```
On macOS, if you want the binary to have an icon in `Finder`, you must install [`cargo-bundle`](https://github.com/burtonageo/cargo-bundle) and compile with:
On macOS, if you want the binary to have an icon in `Finder`, you must install [`cargo-bundle`](https://github.com/burtonageo/cargo-bundle) and compile uwith:
```
cargo bundle --release
```
Expand Down
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ Every frame, the max available `[width, height]` are calculated, and those are u
Main [App] outer frame (default: [1280.0, 720.0])
├─ Inner frame (1264.0, 704.0)
├─ TopPanel = [width: (max-90.0)/5.0, height: max/10.0]
├─ BottomPanel = [width: max, height: max/15.0]
├─ BottomPanel = [width: max, height: max/18.0]
├─ CentralPanel = [width: (max/8.0), height: the rest
```
8 changes: 3 additions & 5 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ r#"USAGE: gupax [--flags]
-r | --reset Reset all Gupax configuration/state
-f | --ferris Print an extremely cute crab"#;
pub const ARG_COPYRIGHT: &'static str =
r#"Gupax, P2Pool, and XMRig are licensed under GPLv3.
For more information, see here:
- https://github.com/hinto-janaiyo/gupax
- https://github.com/SChernykh/p2pool
- https://github.com/xmrig/xmrig"#;
r#"Gupax is licensed under GPLv3.
For more information, see link below:
<https://github.com/hinto-janaiyo/gupax>"#;
6 changes: 3 additions & 3 deletions src/gupax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Gupax {
info!("Spawning update thread...");
match Update::start(update_thread, og_ver.clone(), state_ver.clone()) {
Err(e) => {
info!("Update ... {} ... FAIL", e);
info!("Update ... FAIL ... {}", e);
*update.lock().unwrap().msg.lock().unwrap() = format!("{} | {}", MSG_FAILED, e);
},
_ => {
Expand Down Expand Up @@ -87,13 +87,13 @@ impl Gupax {
ui.horizontal(|ui| {
ui.group(|ui| {
let width = (width - SPACE*9.8)/5.0;
let height = height/2.0;
let height = height/2.5;
let mut style = (*ctx.style()).clone();
style.spacing.icon_width_inner = width / 6.0;
style.spacing.icon_width = width / 4.0;
style.spacing.icon_spacing = 20.0;
ctx.set_style(style);
let height = height/2.0;
let height = height/2.5;
ui.add_sized([width, height], egui::Checkbox::new(&mut state.auto_update, "Auto-update")).on_hover_text(GUPAX_AUTO_UPDATE);
ui.separator();
ui.add_sized([width, height], egui::Checkbox::new(&mut state.auto_node, "Auto-node")).on_hover_text(GUPAX_AUTO_NODE);
Expand Down
Loading

0 comments on commit 22a03a6

Please sign in to comment.