diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0edf8aa --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,78 @@ +# Contributing to Mod Installer + +First off, thank you for considering contributing to Mod Installer. It's people like you that make Mod Installer such a great tool. + +## Code of Conduct + +By participating in this project, you are expected to uphold our Code of Conduct. Please report unacceptable behavior to [PROJECT MAINTAINER EMAIL]. + +## How Can I Contribute? + +### Reporting Bugs + +This section guides you through submitting a bug report for Mod Installer. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports. + +- 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. +- Provide specific examples to demonstrate the steps. + +### Suggesting Enhancements + +This section guides you through submitting an enhancement suggestion for Mod Installer, including completely new features and minor improvements to existing functionality. + +- Use a clear and descriptive title for the issue to identify the suggestion. +- Provide a step-by-step description of the suggested enhancement in as many details as possible. +- Provide specific examples to demonstrate the steps. + +### Pull Requests + +- Fill in the required template +- Do not include issue numbers in the PR title +- Include screenshots and animated GIFs in your pull request whenever possible. +- Follow the Rust styleguides. +- Include thoughtfully-worded, well-structured tests. +- Document new code based on the Documentation Styleguide +- End all files with a newline + +## Styleguides + +### Git Commit Messages + +- Use the present tense ("Add feature" not "Added feature") +- Use the imperative mood ("Move cursor to..." not "Moves cursor to...") +- Limit the first line to 72 characters or less +- Reference issues and pull requests liberally after the first line +- Consider starting the commit message with an applicable emoji: + - 🎨 `:art:` when improving the format/structure of the code + - 🐎 `:racehorse:` when improving performance + - 🚱 `:non-potable_water:` when plugging memory leaks + - 📝 `:memo:` when writing docs + - 🐧 `:penguin:` when fixing something on Linux + - 🍎 `:apple:` when fixing something on macOS + - 🏁 `:checkered_flag:` when fixing something on Windows + - 🐛 `:bug:` when fixing a bug + - 🔥 `:fire:` when removing code or files + - 💚 `:green_heart:` when fixing the CI build + - ✅ `:white_check_mark:` when adding tests + - 🔒 `:lock:` when dealing with security + - ⬆️ `:arrow_up:` when upgrading dependencies + - ⬇️ `:arrow_down:` when downgrading dependencies + +### Rust Styleguide + +All Rust code should adhere to [Rust Style](https://doc.rust-lang.org/beta/style-guide/index.html) and be formatted using `cargo fmt`. + +## Additional Notes + +### Issue and Pull Request Labels + +This section lists the labels we use to help us track and manage issues and pull requests. + +* `bug` - Issues that are bugs. +* `enhancement` - Issues that are feature requests. +* `documentation` - Issues or pull requests related to documentation. +* `good first issue` - Good for newcomers. + +### Thank you! + +Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute. diff --git a/README.md b/README.md index e036d3a..2b3f69a 100644 --- a/README.md +++ b/README.md @@ -11,58 +11,184 @@ Automatically install mods from a prepopulated weidu.log file. -## Demo +## What is this? + +The Infinity Engine Mod Installer is a tool designed to automate the installation of mods for Infinity Engine games such as Baldur's Gate, Icewind Dale, and Planescape: Torment. It uses a file called "weidu.log" to determine which mods to install and how to install them. + +### Weidu Log + +The Weidu log file contains a list of installed mods and is typically found in your game directory if you have previously installed mods. Here's an example of what a Weidu log might look like: + +```sh +// Log of Currently Installed WeiDU Mods +// The top of the file is the 'oldest' mod +// ~TP2_File~ #language_number #component_number // [Subcomponent Name -> ] Component Name [ : Version] +~TEST_MOD_NAME_1/TEST.TP2~ #0 #0 // test mod one +``` +If you're new to modding Infinity Engine games, we recommend installing mods manually first to familiarize yourself with the process. This will help you understand how mods work and how they interact with your game. + +## Getting Started with Weidu Logs + +If you're looking for an example `weidu.log` to get started: + +Check online forums and modding communities. Experienced players and modders often share their mod lists and corresponding Weidu logs. +Look for "mod packs" or "recommended mod lists" for your specific game. These often come with pre-configured Weidu logs. +Start with a small number of popular mods and gradually build up your log as you become more comfortable with the modding process. +Some mod managers for Infinity Engine games can generate Weidu logs based on your selected mods. + +Remember, the Weidu log is a powerful tool, but it's important to understand what you're installing. Always back up your game files before installing mods, and be aware that some mods may conflict with others. + +## What does it do? + +The Infinity Engine Mod Installer looks at a "weidu.log" file that you provide. This file contains information about mods you want to install. The tool then goes through this list and installs each mod automatically. This saves you time and effort, as you don't have to manually install each mod one by one. + +## How can I see it in action? + +We have a short video that shows how the tool works: + [mod_installer.webm](https://github.com/dark0dave/mod_installer/assets/52840419/98127744-850e-43a1-a9be-adc078b2a829) -## Usage +## How do I use it? + +To use the Infinity Engine Mod Installer, you need to run it from the command line. Here's the basic structure of the command: + ```sh -Usage: mod_installer [OPTIONS] --log-file \ - --game-directory \ - --weidu-binary \ +mod_installer(.exe) [OPTIONS] + --log-file + --game-directory + --weidu-binary --mod-directories - -Options: - -f, --log-file - Path to target log [env: LOG_FILE=] - -g, --game-directory - Absolute Path to game directory [env: GAME_DIRECTORY=] - -w, --weidu-binary - Absolute Path to weidu binary [env: WEIDU_BINARY=] - -m, --mod-directories - Path to mod directories [env: MOD_DIRECTORIES=] - -l, --language - Game Language [default: en_US] - -d, --depth - Depth to walk folder structure [env: DEPTH=] [default: 5] - -s, --skip-installed - Compare against installed weidu log, note this is best effort [env: SKIP_INSTALLED=] [default: true] - -a, --abort-on-warnings - If a warning occurs in the weidu child process exit, note this is best effort [env: ABORT_ON_WARNINGS=] [default: true] - -t, --timeout - Timeout time per mod in seconds, default is 1 hour [env: TIMEOUT=] [default: 3600] - -u, --weidu-log-mode - Weidu log setting "--autolog" is default [env: WEIDU_LOG_MODE=] [default: --autolog] - -x, --strict-matching - Strict Version and Component/SubComponent matching, default is false [env: STRICT_MATCHING=] - -h, --help - Print help - -V, --version - Print version ``` +Let's break down what each part means: + +* mod_installer(.exe): This is the name of the program you're running. +[OPTIONS]: These are additional settings you can use to customize how the program works (we'll explain these in detail below). + +* --log-file : This is where you tell the program where to find the "weidu.log" file. + +* --game-directory : This is where you tell the program where your game is installed. + +* --weidu-binary : This is where you tell the program where to find the WeiDU program (WeiDU is a tool used to install mods). + +* --mod-directories : This is where you tell the program where to find the mod files. + +### What options can I use? + +**Don't panic** you can use the help command to find all the options listed below: + +* -h, --help + + What it does: This shows a help message with information about how to use the program. + How to use it: Just add this option to your command if you need help. + Example: mod_installer --help + +Here's a detailed explanation of all the options you can use: + +* -f, --log-file + + What it does: This tells the program where to find the "weidu.log" file. + How to use it: Replace with the path to your "weidu.log" file. + Example: --log-file C:\Games\Baldur's Gate\weidu.log + + +* -g, --game-directory + + What it does: This tells the program where your game is installed. + How to use it: Replace with the path to your game folder. + Example: --game-directory C:\Games\Baldur's Gate + + +* -w, --weidu-binary + + What it does: This tells the program where to find the WeiDU program. + How to use it: Replace with the path to your WeiDU executable. + Example: --weidu-binary C:\WeiDU\weidu.exe + + +* -m, --mod-directories + + What it does: This tells the program where to find the mod files. + How to use it: Replace with the path(s) to your mod folder(s). + Example: --mod-directories C:\BG_Mods + + +* -l, --language + + What it does: This sets the language for the game and mods. + How to use it: Replace with your preferred language code. + Default: en_US (English) + Example: --language fr_FR (for French) + + +* -d, --depth + + What it does: This sets how deep the program should look in folders for mod files. + How to use it: Replace with a number. + Default: 5 + Example: --depth 3 + + +* -s, --skip-installed + + What it does: This makes the program check what's already installed and skip those mods. + How to use it: Just add this option to your command if you want to use it. + Default: This is on by default. + Example: --skip-installed + + +* -a, --abort-on-warnings + + What it does: This makes the program stop if it encounters any warnings. + How to use it: Just add this option to your command if you want to use it. + Default: This is on by default. + Example: --abort-on-warnings + + +* -t, --timeout + + What it does: This sets how long the program will wait for each mod to install before giving up. + How to use it: Replace with a number of seconds. + Default: 3600 (1 hour) + Example: --timeout 7200 (2 hours) + + +* -u, --weidu-log-mode + + What it does: This sets how WeiDU should log its actions. + How to use it: Replace with a WeiDU log mode. + Default: --autolog + Example: --weidu-log-mode --log + + +* -x, --strict-matching + + What it does: This makes the program more strict about matching mod versions and components. + How to use it: Just add this option to your command if you want to use it. + Default: This is off by default. + Example: --strict-matching + +* -V, --version + + What it does: This shows what version of the program you're using. + How to use it: Just add this option to your command if you want to check the version. + Example: mod_installer --version + +## How can I see more information about what the program is doing? + +You can make the program show more information by setting the RUST_LOG environment variable. Here are three levels you can use: -## Log levels +For some additional information: -Additional information can be shown with: ```sh RUST_LOG=INFO mod_installer [OPTIONS] ``` -For line by line debugging: +For detailed information about each step: ```sh RUST_LOG=DEBUG mod_installer [OPTIONS] ``` -To print everything including weidu logs: +For absolutely everything, including WeiDU logs: ```sh RUST_LOG=TRACE mod_installer [OPTIONS] ```