-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implemented a WIP Download Manager and reworked the UI for it #10
Conversation
BROKEN: - default config files do not get created - the MainPanel won't show
wrong files in earlier commit
Hi, thanks for the pull request, i like the ui changes you have made in, i was wondering how are you thinking of implement a nexus mods integration? |
src-tauri/src/mod_manager.rs
Outdated
@@ -35,23 +38,70 @@ pub fn deploy(mods: Vec<Mod>, game: Game) { | |||
pub fn scan_games() -> Vec<String> { | |||
let mut steam_games: Vec<String> = Vec::new(); | |||
let steam_apps = SteamDir::locate().unwrap().apps().clone(); | |||
|
|||
let mut known_path_extensions_json = dirs::config_dir().unwrap().join("tmm_stage").join("known_path_extensions"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crashes on scan games : No such file or directory of this type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned this in the README.md. I'm currently storing the known_path_extensions.json and the supported_games.json in the config dir and not handling what happens if they don't exist. I plan on moving them to the tauri dist folder, so they're bundled with the application when building. Since this is my first application with tauri though, I will still have to learn how to do that.
I turned the supported-games and known-path-extensions back into a single file and reworked its formatting to support multiple already known executables. My game struct has a Vec/List of all known executables which is transmitted to the front end. This way an eventual launcher can select from the known binaries. |
Looking at some of the indev issues on @Erdragh fork TMM needs a way to determine if a mod contains a data folder in the archive and if so use it. Would an MO2 like manual fix popup be a good solution? |
I think there should be some default options the mod manager should be able to resolve for itself, but yes in my personal opinion such a popup would be a good idea. However there's also the issue with support fomod installers and the sort, which is another big topic, also for another time in another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mods do not deploy in path_extension, they deploy in the root of the game, maybe a bug or an oversight?
That is indeed weird, but I don't have time for anymore programming today, sadly. I will look into this tomorrow. |
no worries i will take a look now. |
Did you find anything? I'm currently looking into this and in impl OFSLogic {
pub fn exec(&self) {
let mut mod_paths: Vec<PathBuf> = Vec::new();
let upper_path: PathBuf = PathBuf::new().join(&self.game.path);
let work_path: PathBuf = dirs::home_dir().unwrap().join(&self.game.work_path);
for elem in &self.mods {
mod_paths.push(PathBuf::new().join(&elem.path));
}
init_overlay_fs(mod_paths, &upper_path, &upper_path, &work_path);
}
} And my code like this: impl OFSLogic {
pub fn exec(&self) {
let mut mod_paths: Vec<PathBuf> = Vec::new();
let upper_path: PathBuf = PathBuf::new().join(&self.game.install_path);
let work_path: PathBuf = PathBuf::new().join(&self.game.work_path);
for elem in &self.mods {
mod_paths.push(PathBuf::new().join(&self.game.profile_path.join("mods").join(&elem.name)));
}
init_overlay_fs(mod_paths, &upper_path, &upper_path, &work_path);
}
} From what I can tell the same bug should be present in the current version also, shouldn't it? To quote my version of README.md:
Maybe it's a variation of that issue, but that a mod looks like If that's the case it should be decided whether we want mods in their folder to look like the former or the latter. Because if it's the former then the path_extension should be added to the path of the OFS and if it's the latter then the path_extension should probably be added when uncompressing a mod. Referring back to my quote from earlier, the problem is that some mods have a data folder, some don't and some are FOMOD installers, where you have to select options and the mod will be installed depending on those options. If I overlooked something or misunderstood something please let me know. |
the differance is in where i uncompress the archive files, i don't just uncompress them in mod/mod_name/, its in mod/mod_name/path_extension/ i think it would be better to implement it in the OFS to future proof. |
So basically turning let upper_path: PathBuf = PathBuf::new().join(&self.game.install_path); into let upper_path: PathBuf = PathBuf::new().join(&self.game.install_path).join(&self.game.path_extension); ? |
that would output /Data/ or what ever the extension is i don't remebr why exactly but i had a simillar issue. |
What do you mean, |
yes its a weird thing ` let mut mod_paths: Vec = Vec::new();
the output is
|
How about let upper_path: PathBuf = PathBuf::new().join(format!("{}{}", &self.game.install_path, &self.game.path_extension); ? |
I think the issue is that the Path Extension is saved as /Data/ instead of Data/ and the PathBuf assumes the / in the beginning signifies it to be the filesystem root? This is just a far out guess. |
yes now that i think of it that is the issue. |
I will review the changes soon. |
If you are ready i can merge your pull request @Erdragh |
I don't have anything more for this PR, I say go for it! |
Disclaimer: This is a very WIP feature/overhaul, which is why I marked this as a draft. It is my first major thing built in rust, only my second ever project working with vue and my first time using tauri. If there are any things anybody would like to have changed or advise me about, I very much welcome it, as this is a pretty big opportunity to learn for me.
Here's a short demo of what I've been working on:
tmm.mp4
What I did / am doing here:
I also added features and planned features to the README on my branch to reflect the changes I'm working on: README.md
There is no support for Nexus Mod's "Mod Manager Download" yet and I don't know whether it will be easy to implement, but I don't think so, as you need to store user credentials etc. This means the download manager is at best only a commodity right now, but it's a WIP proof of concept.
Any criticism is also welcome, because - like I said - this is a learning opportunity for me :)