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

Rewrite SteamDepotDownloaderGUI in rust #161

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Rewrite SteamDepotDownloaderGUI in rust #161

wants to merge 13 commits into from

Conversation

mmvanheusden
Copy link
Owner

@mmvanheusden mmvanheusden commented Feb 19, 2024

The Tauri rewrite will be tracked in this PR aka the next branch.

@mmvanheusden mmvanheusden added the enhancement New feature or request label Feb 19, 2024
src/ts/main.ts Fixed Show fixed Hide fixed
@mmvanheusden mmvanheusden marked this pull request as ready for review September 16, 2024 16:57
@mmvanheusden
Copy link
Owner Author

@Tommie1236
Could you do a quick scan through the source code? you don't need rust knowledge but just try to spot any weird patterns or something that I have missed. Just clone it and open with VSCode or whatever

@Tommie1236
Copy link

yeah, i can review it in a little bit. I indeed don't have any rust knowledge but will try.

Copy link

@Tommie1236 Tommie1236 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good in general. only real major change i suggest is the not hardcoding terminal options and commands.

README.md Show resolved Hide resolved
src-tauri/Cargo.toml Show resolved Hide resolved
src-tauri/Cargo.toml Show resolved Hide resolved

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe replace all these logos with one svg?
there are like 15 different sizes of the same logo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could probably make one in like 10-20 min if you want

let mut file = File::create(filename)?;
let response = reqwest::get(url)
.await
.expect("Failed to contact internet.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could probably skip the next part where it tries to get the data from the request if it failed.

A second error message from the same problem could get confused as 2 problems.

Same idea with if the content errors. should not try to write to the file if either of these 2 error

}
}

.knopje {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all you other classes are englisch names. maybe rename to be consistant and so that non-dutch people understand what it is.

println!("\t- Depot ID: {}", steam_download.depot_id());
println!("\t- Manifest ID: {}", steam_download.manifest_id());
println!("\t- Output Path: {}", steam_download.output_path());
println!("------------------------DEBUG INFORMATION-----------------");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEBUG INFO and DEBUG INFORMATION ?
Would probably remove the 2nd one. Don't see a reason for it and looks little strange.

/// Checks internet connectivity using Google
#[tauri::command]
async fn internet_connection() -> bool {
let client = reqwest::Client::builder().timeout(Duration::from_secs(5)).build().unwrap();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't you just ping google.com? seems simpeler

fn main() {
// macOS: change dir to documents because upon opening, our current dir by default is "/".
if get_os() == "macos" {
let _ = fix_path_env::fix(); // todo: does this actually do something useful

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

};


$(async () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are already checking for all available terminals and disableling. could modifi this together with the rust to read from some kind of file with all the terminals and generate it.
Looks like something that would be forgotton easily when adding/removing options.

@Tommie1236
Copy link

@mmvanheusden finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants