This commit is contained in:
Timothy Baldridge 2019-09-16 14:40:19 -06:00
commit 53d7c5c83a
7 changed files with 91 additions and 9 deletions

View File

@ -13,5 +13,8 @@ A clear and concise description of what the bug is.
**Additional context**
Please list your OS (Win 10, Win 7, etc.) and Game type (SSE, FO4, etc.)
**Logs**
Please add your `Wabbajack.exe.log` file or the complete stack trace of your error to this report. Refere to [this](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code) page if you do not know how to post the stack trace in a code block.
**Solution**
Leave This blank, it will be filled in by the developers.

78
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,78 @@
# Contributing to Wabbajack
The following is a set of guidelines for contributing to the `halgari/wabbajack` repo on Github. These are guildeines but not rules so be free to propose changes.
## How Can I Contribute?
You don't have to be a programmer to contribute to this project.
### Reporting Bugs
When you encounter problems with the application, go to our [discord](https://discord.gg/zgbrkmA) server first and ask for help there. Before creating a new Issue, take a look at the others to avoid getting the [Duplicate](https://github.com/halgari/wabbajack/labels/duplicate) label.
Creating a bug report is as easy as navigating to the [Issues](https://github.com/halgari/wabbajack/issues) page and clicking the [New Issue](https://github.com/halgari/wabbajack/issues/new/choose) button.
#### Submitting A Good Bug Report
* Select the Bug report template to get started.
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. Trace the steps you took and **don't just say what you did, but explain how you did it**.
* **Include additional data** in the issue. This encompasses your operating system, the version of Wabbajack and your log file.
* **Upload the stacktrace or your entire log file** to the issue using the [Code Highlighting](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code) feature of Markdown.
### Suggesting Enhancements
Enhancements can be everything from fixing typos to a complete revamp of documents in the repo. You can just use Github for making changes by clicking the pencil icon in the top right corner of a file.
### Code Contribution
This is where the fun begins. Wabbajack is programmed in C# so having a decent amount of knowledge in that language or in C/C++ is good to have. You also want to make sure that you have a basic understanding of the git workflow.
#### Visual Studio 2019
You can download it [here](https://visualstudio.microsoft.com/vs/) but make sure to select the Community Edition as the other ones come at a cost. When installing VS you will be prompted to select a Workload and components. You will need:
* **.NET desktop development** from the Workload tab
* **.NET Framework 4.7.2 SDK and targeting pack** from the .NET section
* **NuGet package manager** from the Code tools section
* **C# and Visual Basic** from the Development activities
The installer may have selected other options as well but these are the most important ones.
### Starting developement
1) **Fork and clone the project:** go to the Github repo page, click the fork button, copy the url from the forked repo, navigate to your project folder, open Git Bash or normal command prompt and type `git clone url name` and replace url with the copied url and name with the folder name
2) **Open Wabbajack.sln** in Visual Studio 2019
3) **Download NuGet Packages** by selecting the solution and *Right Click*->*Restore NuGet Packages*
It may take a while for Visual Studio to download all packages and update all References so be patience. Once all packages are downloaded go and try building Wabbajack. If the build is successful than good job, if not head over to the *#wabbajack-development* channel on the discord and talk about your build error.
#### Coding Style
As a C# project, you should follow the [C# Coding Style](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md). Further more you should never submit commits to your *master* branch, even if it's just a fork. Create a new branch with a meaningful name or the name of your issue/request and commit to that.
You commits should also be elegant. Check [this](https://github.com/git-for-windows/git/wiki/Good-commits) post for good practices.
Updating your fork is important and easy. Open your terminal of choice inside the project folder and add the original repo as a new remote:
`git remote add upstream https://github.com/halgari/wabbajack.git`
Make sure that you're on your master branch:
`git checkout master`
Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:
`git fetch upstream`
Rewrite your master branch so that any commits of yours that
aren't already in upstream/master are replayed on top of that
other branch:
`git rebase upstream/master`
#### Submitting Code Changes
Before you go and open a pull request, make sure that your code actually runs. Build the project with your changes and test the application with its new features against your testing modlist. This testing modlist should be an MO2 installation with some mods installed that worked on the version without your changes and was not modified since then.
If everything works as intended and you found no bug in testing, go ahead and open a pull request. Your request should contain information about why you want to change something, what you changed and how you did it.

View File

@ -78,7 +78,7 @@ continuum).
5) Wabbajack will start by indexing all your downloaded archives. This will take some time on most machines as the application
has to performa `SHA-256` hash on every file in every archive. However the results of this operation are cached, so you'll only need
to do this once for every downloaded file.
6) Once completed, Wabbajack will collect the files required for the modpack install and begin running them through the compilation stack.
6) Once completed, Wabbajack will collect the files required for the modlist install and begin running them through the compilation stack.
7) If all goes well, you should see a new `<your profile name>.exe` file next to `Wabbajack.exe` that you just ran. This new `.exe` is the one
you want to hand out as a auto modlist installer.
@ -152,7 +152,7 @@ copyrighted material. Instead we copy instructions on how to modify the copyrigh
Look at the [`RECIPES.md`] file, we keep a knowledgebase of how to deal with given types of mods in that file.
**Why does each modpack install another copy of Mod Organizer 2?**
**Why does each modlist install another copy of Mod Organizer 2?**
Self-contained folders are a cleaner abstraction than dumping tons of modlists into the same set of folders. It's easy to uninstall a modlist (simply delete the folder),
and MO2 really isn't designed to support lots of disparate modlists. For example if two modlists both wanted a given texture mod, but different options they would

View File

@ -9,7 +9,7 @@ namespace Wabbajack.Common
{
public static string GameFolderFilesDir = "Game Folder Files";
public static string LOOTFolderFilesDir = "LOOT Config Files";
public static string ModPackMagic = "Celebration!, Cheese for Everyone!";
public static string ModListMagic = "Celebration!, Cheese for Everyone!";
public static string BSACreationDir = "TEMP_BSA_FILES";
public static string MegaPrefix = "https://mega.nz/#!";

View File

@ -462,7 +462,7 @@ namespace Wabbajack
}
else
{
Error("No way to handle archive {0} but it's required by the modpack", found.Name);
Error("No way to handle archive {0} but it's required by the modlist", found.Name);
return null;
}
@ -1130,7 +1130,7 @@ namespace Wabbajack
}
bw.Write(orig_pos);
bw.Write(Encoding.ASCII.GetBytes(Consts.ModPackMagic));
bw.Write(Encoding.ASCII.GetBytes(Consts.ModListMagic));
}
}

View File

@ -620,19 +620,20 @@ namespace Wabbajack
return HashArchive(e);
}
public static ModList CheckForModPack()
public static ModList CheckForModList()
{
Utils.Log("Looking for attached modlist");
using (var s = File.OpenRead(Assembly.GetExecutingAssembly().Location))
{
var magic_bytes = Encoding.ASCII.GetBytes(Consts.ModPackMagic);
var magic_bytes = Encoding.ASCII.GetBytes(Consts.ModListMagic);
s.Position = s.Length - magic_bytes.Length;
using (var br = new BinaryReader(s))
{
var bytes = br.ReadBytes(magic_bytes.Length);
var magic = Encoding.ASCII.GetString(bytes);
if (magic != Consts.ModPackMagic) return null;
if (magic != Consts.ModListMagic) return null;
s.Position = s.Length - magic_bytes.Length - 8;
var start_pos = br.ReadInt64();
s.Position = start_pos;

View File

@ -59,7 +59,7 @@ namespace Wabbajack
else
new Thread(() =>
{
var modlist = Installer.CheckForModPack();
var modlist = Installer.CheckForModList();
if (modlist == null)
Utils.Log("No Modlist found, running in Compiler mode.");
else