I am trying to use
shutils.py , make_archive function.here: https://docs.python.org/2/library/shutil.html#archiving-operations but I can't understand the difference between root_dir and base_dir. Here's a simple code using make_archive:
So everyone,
after falling in love with this magical tool called 'Mod Organizer' and playing around with it and my Skyrim and Oblivion installations for a few weeks I've finally tried it on Morrowind. It's not officially available for Morrowind (yet, I hope). But doing a few workarounds you can use it on Morrowind, as well. It has it's flaws with this game and I certainly haven't played with it long enough, but it's quite functionally already.
What MO does is to maintain every single mod in its own folder and keep a clean Data Files folder. And a lot of other things. Great things.
INSTALLATION
1. Get the archive. Since I can't post links yet, search any search machine of your liking for 'Mod Organizer' and follow the result to Skyrim Nexus. I used the 0.99.1 beta for this workaround, but I think any version will work for now.
Extract it where you want it to stay, or else you'll have to rename a few things in the settings, which is easy, though.
2. You'll need files named 'Oblivion.exe', 'OblivionLauncher.exe' and 'Oblivion_default.ini' or 'Skyrim.exe', 'SkyrimLauncher.exe' and 'Skyrim_default.ini' in your Morrowind directory to let MO recognize it as a directory as one of the supported games. Actually it should work with the ones form Fallout 3/NV, too, but I didn't test that out. These files might actually be simple empty text documents coincidentally named like that, so you don't need any of these games. ;D
3. Next, run ModOrganizer.exe. If it doesn't detect it automatically, browse to your Morrowind folder. It should detect the exes of Oblivion/Skyrim/whatever.
You'll notice, that not even Morrowind.esm will be visible in the right window. We'll fix that in the next step.
4. Hit your windows button and search for 'cmd'. Click on the cmd.exe.
cmd c/ mklink /J 'Your Morrowind directoryData' 'Your Morrowind DirectoryData Files'
It doesn't work? Do not worry, here's an alternative:
mklink /J 'Your Morrowind directoryData' 'Your Morrowind directoryData Files'
You'll notice a link called 'Data' in your Morrowind directory, if succeeded.
5. Open up MO again. You'll see (I hope), that all your Esps/esms are listed there. Now first thing is to cry or dance out of happiness, because this great tool is working for you.
6. There's a big button right above named 'Oblivion' or 'Skyrim'. Or 'Fallout' or something. Hit it, click 'Edit..'. For the binary, just surf for 'Morrowind.exe', give it a title and click 'Add', not Ok. Happens to me all the time. ;( Next do the same for the Launcher (you're gonna need it), TES CS, Mlox, Mrye Mash, MGE (XE), Enchanted Editor, practically every program which uses the Data Files folder and you think you'll need.
6.5 Maybe you want to try your luck and start the Launcher to proof the sorcery right. And then the game. (Okay, this is just for the case I forgot something. So tell me if it works.) Don't forget to start through MO.
7. There's a tutorial somewhere out in the nexus for installing mods. It's pretty much the same with Morrowind.
8. You still need to install bsa files and fonts manually. They're kinda shielded against MOs dark magic. I also have issues with sounds. Didn't figure them out, yet.
9. Unfortunately, you mustn't remove those fake binaries and ini of Oblivion/whatever inside of your Morrowind directory. MO needs them to start.
- MO doesn't access the Morrowind.ini, so you can't manage your load order with it. Make sure to start the vanilla Morrowind Launcher, click on 'Data Files' and 'OK' to update your ini. You can still manage whether a particular esp/esm gets loaded, but MO won't recognize it. At least not with me.
- bsa files won't get read because of their somewhat different structure and must go to Data Files manually. You still need to register them in the ini.
- if a mod only contains folders named 'Splash', 'MWSE', 'book art', 'icons' or 'distant land', it won't get recognized as a mod, since MO scans every mod directory for its validity but doesn't recognize these folder names. As a workaround, you need to create an empty dummy folder for example called 'meshes' and the mod will get recognized.
- I'm not so sure about 'sound' and the trillion other ones I don't have tested out. It's easy to see if a mod doesn't get recognized, as its title turns grey and italic in the left column of the MO Window
- Profile managing, a great feature of MO, doesn't work. The saves and inis are at completely different places compared to the ones in Oblivion and Skyrim. There might be a workaround using the command line tool.
- it works with the Steam version, as well
- Mlox reads and saves load order
- pretty much every program should work as well, if one remembers to refresh the plugin list using the vanilla launcher and start the program through MO
English isn't my first language, so if I was unclear somewhere, I will gladly explain it further. 8)
So everyone,
after falling in love with this magical tool called 'Mod Organizer' and playing around with it and my Skyrim and Oblivion installations for a few weeks I've finally tried it on Morrowind. It's not officially available for Morrowind (yet, I hope). But doing a few workarounds you can use it on Morrowind, as well. It has it's flaws with this game and I certainly haven't played with it long enough, but it's quite functionally already.
What MO does is to maintain every single mod in its own folder and keep a clean Data Files folder. And a lot of other things. Great things.
INSTALLATION
1. Get the archive. Since I can't post links yet, search any search machine of your liking for 'Mod Organizer' and follow the result to Skyrim Nexus. I used the 0.99.1 beta for this workaround, but I think any version will work for now.
Extract it where you want it to stay, or else you'll have to rename a few things in the settings, which is easy, though.
2. You'll need files named 'Oblivion.exe', 'OblivionLauncher.exe' and 'Oblivion_default.ini' or 'Skyrim.exe', 'SkyrimLauncher.exe' and 'Skyrim_default.ini' in your Morrowind directory to let MO recognize it as a directory as one of the supported games. Actually it should work with the ones form Fallout 3/NV, too, but I didn't test that out. These files might actually be simple empty text documents coincidentally named like that, so you don't need any of these games. ;D
3. Next, run ModOrganizer.exe. If it doesn't detect it automatically, browse to your Morrowind folder. It should detect the exes of Oblivion/Skyrim/whatever.
You'll notice, that not even Morrowind.esm will be visible in the right window. We'll fix that in the next step.
4. Hit your windows button and search for 'cmd'. Click on the cmd.exe.
cmd c/ mklink /J 'Your Morrowind directoryData' 'Your Morrowind DirectoryData Files'
It doesn't work? Do not worry, here's an alternative:
mklink /J 'Your Morrowind directoryData' 'Your Morrowind directoryData Files'
You'll notice a link called 'Data' in your Morrowind directory, if succeeded.
5. Open up MO again. You'll see (I hope), that all your Esps/esms are listed there. Now first thing is to cry or dance out of happiness, because this great tool is working for you.
6. There's a big button right above named 'Oblivion' or 'Skyrim'. Or 'Fallout' or something. Hit it, click 'Edit..'. For the binary, just surf for 'Morrowind.exe', give it a title and click 'Add', not Ok. Happens to me all the time. ;( Next do the same for the Launcher (you're gonna need it), TES CS, Mlox, Mrye Mash, MGE (XE), Enchanted Editor, practically every program which uses the Data Files folder and you think you'll need.
6.5 Maybe you want to try your luck and start the Launcher to proof the sorcery right. And then the game. (Okay, this is just for the case I forgot something. So tell me if it works.) Don't forget to start through MO.
7. There's a tutorial somewhere out in the nexus for installing mods. It's pretty much the same with Morrowind.
8. You still need to install bsa files and fonts manually. They're kinda shielded against MOs dark magic. I also have issues with sounds. Didn't figure them out, yet.
9. Unfortunately, you mustn't remove those fake binaries and ini of Oblivion/whatever inside of your Morrowind directory. MO needs them to start.
- MO doesn't access the Morrowind.ini, so you can't manage your load order with it. Make sure to start the vanilla Morrowind Launcher, click on 'Data Files' and 'OK' to update your ini. You can still manage whether a particular esp/esm gets loaded, but MO won't recognize it. At least not with me.
- bsa files won't get read because of their somewhat different structure and must go to Data Files manually. You still need to register them in the ini.
- if a mod only contains folders named 'Splash', 'MWSE', 'book art', 'icons' or 'distant land', it won't get recognized as a mod, since MO scans every mod directory for its validity but doesn't recognize these folder names. As a workaround, you need to create an empty dummy folder for example called 'meshes' and the mod will get recognized.
- I'm not so sure about 'sound' and the trillion other ones I don't have tested out. It's easy to see if a mod doesn't get recognized, as its title turns grey and italic in the left column of the MO Window
- Profile managing, a great feature of MO, doesn't work. The saves and inis are at completely different places compared to the ones in Oblivion and Skyrim. There might be a workaround using the command line tool.
- it works with the Steam version, as well
- Mlox reads and saves load order
- pretty much every program should work as well, if one remembers to refresh the plugin list using the vanilla launcher and start the program through MO
English isn't my first language, so if I was unclear somewhere, I will gladly explain it further. 8)
This will create an archive named Backup.tar.gz which contains a . Directory inside it.I don't want the . directory but the whole thing inside in the archive.
Heartagramir
HeartagramirHeartagramir
4 Answers
root_dir refers to base directory of output file, or working directory for your working script.
base_dir refers to content you want pack.
By example, if you have a tree like:
And you want to make a pack for someproject folder, you can set:
If the contents of your tree is like following, by example:/home/apast/git/someproject/test.py/home/apast/git/someproject/model.py
The content of your package will acquire following structure:
someproject/test.py someproject/model.py
And your package file will be stored at:
Like doc shows, by default, root_dir and base_dir are initialized for your current working directory (cwd, or curdir). But, you can use it in a more flexible way.
Andre PastoreAndre Pastore
1,67733 gold badges2424 silver badges3838 bronze badges
Let's consider following dir structure:
We will try two snippets to clarify examples:1. Defining base_dir2. Without defined base_dir
To define specific folders, maybe it will be necessary use some other technique, like gzip lib directly.
Quentin Pradet
3,53522 gold badges2424 silver badges4040 bronze badges
Andre PastoreAndre Pastore
1,67733 gold badges2424 silver badges3838 bronze badges
It's a bit confusing if you read the documentation but if you see it visually, it can help quite a bit.
The
root_dir is the directory that you will be storing the file in.
If I were storing a file in
C:UsersElipzerDesktopMyFolder , That would be my root_dir .
The
base_dir is the part added onto the root_dir so if I were storing it under my MyFolder in ..MyFolderMySubFolder , I would put that as the base_dir .
In many cases, there is no need to use these since you can just change the default directory to the directory that you want to store the file in and the
make_archive function will just use the default directory as the root_dir and base_dir .
ElipzerElipzer
cd in the root_dir.. then tar the base_dir..the docs makes me confuse too, read the code, that will make u clear.
Oz123
14.3k2020 gold badges8585 silver badges136136 bronze badges
ouyangbroouyangbro
Not the answer you're looking for? Browse other questions tagged pythonshutil or ask your own question.
Hello there
First of all sorry if my question is dumb but I can't find a solution for my problem.
I'm trying to add SKSE to MO2 (Skyrim 32bits legendary edition) but when I try to start skyrim with MO2 the game crash before the main menu. If I try to use SKSE without MO2 it's perfectly working.
Here is how everything is installed:
Skyrim is on my data disk: Acronis true image activation key.
Mod Organizer Base Directory 2016
D:GamesSteam LibrarysteamappscommonSkyrim
MO2 is also on my data disk:
D:Mod Organizer 2
D:MO2 Base Directory (for the mods, downloads and overwrite..)
I have no mods installed so it can't be a load order problem I think.
Thanks in advance and sorry if some information are missing and/or if my english is too bad
Edited by Wehrmicel, 06 August 2018 - 10:03 AM.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |