cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
179 stars 47 forks source link

๐Ÿš€ [Feature] Stop requiring write access on a WoW Folder to use the tools #1965

Open seirl opened 5 years ago

seirl commented 5 years ago

๐Ÿš€ Feature

This is a pretty big one. Right now the workflow is to copy the extraction tools inside the WoW folder, to run them from this working directory and then to copy back the extracted files in some place. The thing is, this is a mess for UNIX permissions. Generally the user with which I'm going to run the extraction tools isn't the same as the owner of the WoW directory. Considering its size, copying it in my state directory isn't an option either, it would be a complete waste of space.

Here, the best workflow would be to just have a way to specify a path to the WoW folder, and potentially also a path to the output folder that defaults to the current directory. e.g:

/usr/share/mangos/tools/ExtractResources.sh a /opt/wow-3.3.5a /usr/share/mangos

(where /opt/wow-3.3.5a is the game folder, and /usr/share/mangos is the output directory where we want to put maps/vmaps/dbc/...). Doing this actually requires two different issues to be fixed:

Benefits & Purpose

Being compatible with UNIX permissions, not requiring write access on the WoW folder.

jimmybrancaccio commented 5 years ago

Hello,

If you wish to track this information on the CMaNGOS repositories please update your original post (or create a new issue) so that it conforms to our issue templates. If you have any questions please do not hesitate to reach out.

Thanks,

esno commented 5 years ago

@seirl does this to fits your needs? https://github.com/cmangos/mangos-tbc/compare/master...blizzlike-org:tbc/bugfix/extractor_scripts_path I don't see the requirement to define an output dir respectively I am fine with CWD. In my case you can either copy all extractor related files into CWD and run them or already have them in e.g. /usr/bin

seirl commented 5 years ago

If it works then it looks good! I'm not sure I like the $PATH hack though... But I guess it's easier than to propagate the fixes in all the scripts?

esno commented 5 years ago

well. the $PATH hack is in place to not to break user workflows and allows me to skip copying the files again and again while testing. It's not required for the client path thing and will probably not be part of a PR after rebasing this branch. Just wanted to know if CWD fits for you because I don't know your scripts and workflow.

seirl commented 5 years ago

CWD should do fine! It's not as nice as being able to specify the output dir, but doing a cd isn't that hard.

esno commented 5 years ago

allright. In my workflow portage starts already in the right workdir and I don't have to cd into another location. I patched vmap_extractor to accept a custom output dir. Now I'll patch MoveMapGen to do the same.

seirl commented 4 years ago

Edited to match the issue template.

killerwife commented 2 years ago

Resolved after merging prs

Muehe commented 2 years ago

This issue is not completely solved yet. Having another working directory than the script location still needs to be checked. And the extraction script is still prompting for input, so it's not scriptable in regards to parent issue #1961 Updated OP with task list items to reflect current state.