7 releases
0.1.7 | Dec 6, 2023 |
---|---|
0.1.6 | Nov 8, 2023 |
0.1.5 | Oct 27, 2023 |
0.1.4 | Sep 5, 2023 |
#236 in Filesystem
19KB
312 lines
Dark and Darker Game Updater
This is a simple CLI (Command-Line Interface) updater for the Dark and Darker game. It downloads or verifies the latest files of the game installed.
Prerequisites
You need to have Rust installed on your system.
Installation
Simple
Simply run cargo install dad-updater
in your terminal
Use source
- Clone the repository or download the source code files.
- Install Rust and the required dependencies as mentioned in the prerequisites.
- Open the terminal or command prompt and navigate to the project directory.
- Build and install the application using the following command:
cargo build --release
cargo install dad-updater --path .
Usage
After building and installing the application, The updater can be run using the following command:
DAD_PATH="$HOME/.local/share/bottles/bottles/Dark-and-Darker/drive_c/Program Files/IRONMACE/Dark and Darker/" dad-updater
Optimized Use with Bottles
- Create bottles for gaming.
- Add the following required dependencies: allfonts, vcredist2019, dotnet48.
- Install the Blacksmith Launcher in the bottles.
- Launch the Blacksmith Launcher and log in to your account.
- Click the play/install button on the launcher.
- Close the launcher.
- Click on the three dots, browse the file, go one directory up, and locate the Dark and Darker directory inside the IRONMACE directory. Copy the path of this directory to the environment variable DAD_PATH in the bottles' environment settings.
- Modify the launch command to
dad-updater %command%
.
To further optimize Bottles, you can:
- Activate Feral Gamemode.
- Set up the Steam environment.
- Use Proton-GE as the executor.
If you want to use Proton-GE, you need to set the following environment variables:
STEAM_COMPAT_CLIENT_INSTALL_PATH=$HOME/.steam/steam
STEAM_COMPAT_DATA_PATH=$HOME/.local/share/Steam/steamapps/compatdata
For optimal performance on an AMD card, add the following two environment variables:
RADV_PERFTEST=gpl
VK_ICDR_PATH=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
Command-Line Arguments
The updater accepts the following command-line arguments:
-g
,--game-path
: Specify the path to the game installation directory. This argument is optional and defaults to the value of theDAD_PATH
environment variable.-l
,--launcher-path
: Specify the path to the launcher installation directory. This argument is optional and defaults to the value of theBLACKSMITH_PATH
environment variable. (optional)-s
,--speed
: Set the download speed limit in bytes per second. This argument is optional and defaults to the value of theDAD_DOWNLOAD_SPEED
environment variable or0
if not provided (0
=no limit
).-t
,--threads
: Set the number of simultaneous download threads. This argument is optional and defaults to the value of theDAD_THREADS
environment variable or5
if not provided.
Functionality
The updater performs the following tasks:
- Reads the file URLs and other information from the Dark and Darker
PatchFileList.txt hosted on
http://cdn.darkanddarker.com
. - Downloads each file using multiple threads with a progress bar indicating the download status.
- Implements a download speed limit if provided to regulate the download rate.
- Verifies the integrity of downloaded files using SHA256 and compares the file size to ensure they are up to date.
License
This project is licensed under the MIT License.
Contributions
Contributions to this project are welcome. If you find any issues or want to enhance the functionality, feel free to open a pull request.
Dependencies
~11–23MB
~338K SLoC