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

Profile bindings #55

Merged
merged 29 commits into from
Mar 31, 2023
Merged

Profile bindings #55

merged 29 commits into from
Mar 31, 2023

Conversation

thesuzerain
Copy link
Contributor

PR with base functionality so we can continue doing bindings + start using them- the actual calling of functions through tauri part is fairly simple.

Currently also trying to get more complex process API functions to be callable (ie: kill process, which might require minor API changes) + make the tauri functions in main.rs be modular, but not necessary for basic PR to start doing bindings

Fixes MOD-311

Copy link
Member

@Geometrically Geometrically left a comment

Choose a reason for hiding this comment

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

We should also add a UUID/unique identifier for each Theseus instance (mainly for easy navigation on the frontend)

theseus_gui/src-tauri/src/api/profile.rs Outdated Show resolved Hide resolved
theseus_gui/src-tauri/src/api/profile_create.rs Outdated Show resolved Hide resolved
theseus_gui/src/helpers/profile.js Outdated Show resolved Hide resolved
theseus_gui/src-tauri/src/models/serializable_child.rs Outdated Show resolved Hide resolved
pub async fn profile_create_empty() -> crate::Result<Profile> {
Ok(profile_create(
String::from(DEFAULT_NAME), // the name/path of the profile
String::from("1.8.2"), // the game version of the profile
Copy link
Member

Choose a reason for hiding this comment

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

1.8.2 is a weird version IMO. why not 1.19.2 (which works on all platforms now)

Copy link
Member

Choose a reason for hiding this comment

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

looks like you forgot to change it

theseus/src/api/profile_create.rs Outdated Show resolved Hide resolved
theseus/src/api/profile_create.rs Outdated Show resolved Hide resolved
@@ -304,24 +299,29 @@ fn parse_arguments<F>(
where
F: Fn(&str) -> crate::Result<String>,
{
let temporary_replace_char = "\n";
Copy link
Member

Choose a reason for hiding this comment

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

what is this used for? since it's used in multiple places as well it should be a constant and moved to the top of the file

Copy link
Member

Choose a reason for hiding this comment

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

should still be a const

theseus/src/launcher/download.rs Outdated Show resolved Hide resolved
theseus/src/launcher/download.rs Outdated Show resolved Hide resolved
theseus/src/launcher/mod.rs Outdated Show resolved Hide resolved
theseus/src/launcher/mod.rs Outdated Show resolved Hide resolved
theseus_playground/src/main.rs Outdated Show resolved Hide resolved
pub async fn profile_create_empty() -> crate::Result<Profile> {
Ok(profile_create(
String::from(DEFAULT_NAME), // the name/path of the profile
String::from("1.8.2"), // the game version of the profile
Copy link
Member

Choose a reason for hiding this comment

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

looks like you forgot to change it

theseus/src/api/profile_create.rs Show resolved Hide resolved
@@ -304,24 +299,29 @@ fn parse_arguments<F>(
where
F: Fn(&str) -> crate::Result<String>,
{
let temporary_replace_char = "\n";
Copy link
Member

Choose a reason for hiding this comment

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

should still be a const

theseus/src/launcher/mod.rs Outdated Show resolved Hide resolved
@Geometrically Geometrically merged commit f48959a into master Mar 31, 2023
@Geometrically Geometrically deleted the profile-bindings branch March 31, 2023 18:00
Geometrically added a commit that referenced this pull request Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants