Git Product home page Git Product logo

mod_installer's Introduction

Infinity Engine Mod Installer

  /\/\   ___   __| | (_)_ __  ___| |_ __ _| | | ___ _ __
 /    \ / _ \ / _` | | | '_ \/ __| __/ _` | | |/ _ \ '__|
/ /\/\ \ (_) | (_| | | | | | \__ \ || (_| | | |  __/ |
\/    \/\___/ \__,_| |_|_| |_|___/\__\__,_|_|_|\___|_|

Automatically install mods from a prepopulated weidu.log file.

Demo

mod_installer.webm

Usage

Usage: mod_installer [OPTIONS] --log-file <LOG_FILE> \
  --game-directory <GAME_DIRECTORY> \
  --weidu-binary <WEIDU_BINARY> \
  --mod-directories <MOD_DIRECTORIES>

Options:
  -f, --log-file <LOG_FILE>
    Full path to target log [env: LOG_FILE=]
  -g, --game-directory <GAME_DIRECTORY>
    Full path to game directory [env: GAME_DIRECTORY=]
  -w, --weidu-binary <WEIDU_BINARY>
    Full Path to weidu binary [env: WEIDU_BINARY=]
  -m, --mod-directories <MOD_DIRECTORIES>
    Full Path to mod directories [env: MOD_DIRECTORIES=]
  -l, --language <LANGUAGE>
    Game Language [default: en_US]
  -d, --depth <DEPTH>
    Depth to walk folder structure [env: DEPTH=] [default: 3]
  -s, --skip-installed
    Compare against installed weidu log, note this is best effort [env: SKIP_INSTALLED=]
  -a, --abort-on-warnings
    If a warning occurs in the weidu child process exit [env: ABORT_ON_WARNINGS=]
  -t, --timeout <TIMEOUT>
    Timeout time per mod in seconds, default is 1 hour [env: TIMEOUT=] [default: 3600]
  -u, --weidu-log-mode <WEIDU_LOG_MODE>
    Weidu log setting "--autolog" is default [env: WEIDU_LOG_MODE=] [default: --autolog]
  -h, --help
    Print help
  -V, --version
    Print version

Log levels

Additional information can be shown with:

RUST_LOG=INFO mod_installer [OPTIONS]

For line by line debugging:

RUST_LOG=DEBUG mod_installer [OPTIONS]

To print everything including weidu logs:

RUST_LOG=TRACE mod_installer [OPTIONS]

mod_installer's People

Contributors

dark0dave avatar dependabot[bot] avatar podcherklife avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mod_installer's Issues

Output all logs to files

One of the disadvantages I found with this tool is that there is only ever the latest mod component in the log. Could this be changed to append to setup-(modname).debug? I imagine this could be done with weidu --log (filename) in your call, since if I remember right this appends by default.

Handling user input-required mods

Some mods, notably romance cheats in cdtweaks and item-randomizer, require user input for many of their components. This doesn't seem supported at the moment. Any suggestions on how to fix this?

Support platform-independent directory separators in installation paths

I've got a weidu.log generated on Windows machine which looks like this:

// ...
~BG1UB\SETUP-BG1UB.TP2~ #0 #11 // Scar and the Sashenstar's Daughter: v16.4
// ...

Here, path separator breaks the following code from mod installer:

        let tp_file = install_path
            .split('/')
            .nth(1)
            .expect("Could find tp2 file")
            .to_string();

Extra commands

Let the user call weidu through our tool. So they can pass extra commands.

New build does not work on windows

When running 2.2.0 on windows, mod installer produces Could find tp2 file error on perfectly valid files(even on empty ones).
Linux executable seems to work fine with the same files.

2.1.0 works fine though.

Warnings and Errors do not exit automatically

[2023-11-25T08:04:46Z TRACE mod_installer::weidu_parser] INSTALLED WITH WARNINGS     Additional equipment for Thieves and Bards

[2023-11-25T08:04:46Z TRACE mod_installer::weidu_parser] Press ENTER to exit.


[2023-11-25T08:04:46Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:46Z INFO  mod_installer::weidu] ...

[2023-11-25T08:04:47Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:47Z INFO  mod_installer::weidu] ....

[2023-11-25T08:04:47Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:47Z INFO  mod_installer::weidu] .....

[2023-11-25T08:04:48Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:48Z INFO  mod_installer::weidu] ......

[2023-11-25T08:04:48Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:48Z INFO  mod_installer::weidu] .......

[2023-11-25T08:04:49Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:49Z INFO  mod_installer::weidu] ........

[2023-11-25T08:04:49Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:49Z INFO  mod_installer::weidu] .........

[2023-11-25T08:04:50Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:50Z INFO  mod_installer::weidu]

[2023-11-25T08:04:50Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:50Z INFO  mod_installer::weidu] .

[2023-11-25T08:04:51Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:51Z INFO  mod_installer::weidu] ..

[2023-11-25T08:04:51Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:51Z INFO  mod_installer::weidu] ...

[2023-11-25T08:04:52Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:52Z INFO  mod_installer::weidu] ....

[2023-11-25T08:04:52Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:52Z INFO  mod_installer::weidu] .....

[2023-11-25T08:04:53Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:53Z INFO  mod_installer::weidu] ......

[2023-11-25T08:04:53Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:53Z INFO  mod_installer::weidu] .......

[2023-11-25T08:04:54Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:54Z INFO  mod_installer::weidu] ........

[2023-11-25T08:04:54Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:54Z INFO  mod_installer::weidu] .........

[2023-11-25T08:04:55Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:55Z INFO  mod_installer::weidu]

[2023-11-25T08:04:55Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:55Z INFO  mod_installer::weidu] .

[2023-11-25T08:04:56Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:56Z INFO  mod_installer::weidu] ..

[2023-11-25T08:04:56Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:56Z INFO  mod_installer::weidu] ...

[2023-11-25T08:04:57Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:57Z INFO  mod_installer::weidu] ....

[2023-11-25T08:04:57Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:57Z INFO  mod_installer::weidu] .....

[2023-11-25T08:04:58Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:58Z INFO  mod_installer::weidu] ......

[2023-11-25T08:04:58Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:58Z INFO  mod_installer::weidu] .......

[2023-11-25T08:04:59Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:59Z INFO  mod_installer::weidu] ........

[2023-11-25T08:04:59Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:04:59Z INFO  mod_installer::weidu] .........

[2023-11-25T08:05:00Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:00Z INFO  mod_installer::weidu]

[2023-11-25T08:05:00Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:00Z INFO  mod_installer::weidu] .

[2023-11-25T08:05:01Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:01Z INFO  mod_installer::weidu] ..

[2023-11-25T08:05:01Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:01Z INFO  mod_installer::weidu] ...

[2023-11-25T08:05:02Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:02Z INFO  mod_installer::weidu] ....

[2023-11-25T08:05:02Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:02Z INFO  mod_installer::weidu] .....

[2023-11-25T08:05:03Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:03Z INFO  mod_installer::weidu] ......

[2023-11-25T08:05:03Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:03Z INFO  mod_installer::weidu] .......

[2023-11-25T08:05:04Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:04Z INFO  mod_installer::weidu] ........

[2023-11-25T08:05:04Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:04Z INFO  mod_installer::weidu] .........

[2023-11-25T08:05:05Z INFO  mod_installer::weidu] Waiting for child process to end
[2023-11-25T08:05:05Z INFO  mod_installer::weidu]

[2023-11-25T08:05:05Z INFO  mod_installer::weidu] Waiting for child process to end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.