Skip to content

Commit

Permalink
Major changes
Browse files Browse the repository at this point in the history
DOOMModLoader:
- Now creates a "*DOOMModLoader Settings.txt*" file, allowing you to change certain settings
- Now displays a list of conflicting files when multiple mods try to modify the same resource
- Added support for custom video files. Videos must be placed within "*video/mods/*" in your mod, and must be *\*.bik* or *\*.bk2* files (You'll need to edit material/mapInfo resources to use the custom videos, as they can't replace any default video files)
- Added support for DOOM VFR

DOOMExtract:
- Now automatically extracts "*gameresources.pindex*" even if you choose "*gameresources.index*", ensuring that the latest version of all resources are extracted
- Added a safeguard against extracting resources into a non-empty destination (Use `-force` to extract anyway)
- Added `-filter` and `-type` options to filter extracted resources, e.g. `-filter intro.entities decls/entitydef/` or `-type renderParm weapon`
- Fixed not being able to extract to long destination paths

idCrypt:
- Instead of encrypting by default and decrypting *\*.bfile* files, now decrypts by default and encrypts *\*.dec* files
- Added `-decrypt` and `encrypt` options to override the file name detection
  • Loading branch information
ZwipZwapZapony committed Aug 5, 2024
1 parent 0dcbff3 commit 4817951
Show file tree
Hide file tree
Showing 26 changed files with 2,356 additions and 1,533 deletions.
24 changes: 24 additions & 0 deletions .github/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## DOOMModLoader

A mod loader for DOOM (2016).

Installation: Right-click DOOM (2016) in your Steam library, and choose "*Manage*" > "*Browse local files*" to open a File Explorer window in your DOOM (2016) installation folder. Download "*DOOMModLoader.zip*" from [**[the Releases page]**](../../../releases/latest), and extract it into that folder.

Usage: Place unextracted mod zips into a "*Mods*" folder in your DOOM (2016) installation, and run DOOMModLoader to install them. To uninstall mods, move them out of the "*Mods*" folder and run DOOMModLoader again.
After running DOOMModLoader once, a "*DOOMModLoader Settings.txt*" file will be created, which you can edit with a raw text editor to change certain settings.

*:penguin: Note: On Linux, you should right-click DOOMModLoader and choose "Run in Konsole", or otherwise run it in a terminal.*

## Other Tools

[**[The Releases page]**](../../../releases/latest) also has a download called "*Tools.zip*". This contains all tools in this repository, including...

\- **DOOMExtract**: A command-line tool for extracting DOOM (2016) resources, necessary if you want to create your own mods.
\- **DOOMModLoader**: See above.
\- **idCrypt**: A command-line tool for decrypting certain binary files into plain text, and vice-versa. *Only available for Windows. On Linux, use [**[brunoanc/idCryptRust]**](https://github.com/brunoanc/idCryptRust/releases/latest) instead.*

## Building

To compile your own versions of these tools locally, you can use .NET 8.0 SDK to build DOOMExtract and DOOMModLoader with `dotnet publish "./DOOMExtract.csproj" --no-self-contained` and likewise for DOOMModLoader, and use MinGW-w64 to build idCrypt with `x86_64-w64-mingw32-gcc "./idCrypt.c" -o "./idCrypt.exe" -lbcrypt -Os`.

Alternatively, simply fork this repository and push a commit to any branch. This will trigger [**[an automated build]**](../../../actions).
170 changes: 170 additions & 0 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: Build
on: push
env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
TERM: xterm #Needed for dotnet to output ANSI SGR colour codes

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
#Setup
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with: {dotnet-version: 8.0}
- name: Set up Alpine
uses: jirutka/setup-alpine@v1
with: {packages: build-base clang dotnet8-sdk zlib-dev zlib-static}
- name: Set up tools/Display tool info
run: |
echo "::group::sudo apt-get install mingw-w64"
echo -e "\e[36;1m>sudo apt-get update\e[0m"
sudo apt-get update
echo
echo -e "\e[36;1m>sudo apt-get install mingw-w64\e[0m"
sudo apt-get install mingw-w64
echo "::endgroup::"
echo "::group::dotnet --info"
dotnet --info
echo "::endgroup::"
echo "::group::x86_64-w64-mingw32-gcc --version"
x86_64-w64-mingw32-gcc --version
echo "::endgroup::"
#Build
- name: Build tools
run: |
echo "::group::Windows - idCrypt"
mkdir "./Build/Windows/" --parents
x86_64-w64-mingw32-gcc "./idCrypt/idCrypt.c" -o "./Build/Windows/idCrypt.exe" -fdiagnostics-color=always -lbcrypt -Os -s -Wall -Wextra
echo "Compiled successfully"
echo "::endgroup::"
# echo "::group::Linux - DOOMExtract (Runtime-dependent)"
# dotnet publish "./DOOMExtract/DOOMExtract.csproj" --no-self-contained --output "./Build/Linux/" --runtime linux-x64
# echo "::endgroup::"

# echo "::group::Linux - DOOMModLoader (Runtime-dependent)"
# dotnet publish "./DOOMModLoader/DOOMModLoader.csproj" --no-self-contained --output "./Build/Linux/" --runtime linux-x64
# echo "::endgroup::"

# echo "::group::Linux - idCrypt"
# gcc "./idCrypt/idCrypt.c" -o "./Build/Linux/idCrypt" -fdiagnostics-color=always -Os -s -Wall -Wextra
# echo "Compiled successfully"
# echo "::endgroup::"

# echo "::group::Windows - DOOMModLoader (Runtime-dependent)"
# dotnet publish "./DOOMModLoader/DOOMModLoader.csproj" --no-self-contained --output "./Build/Windows/" --runtime win-x64
# echo "::endgroup::"

# echo "::group::Windows - DOOMExtract (Runtime-dependent)"
# dotnet publish "./DOOMExtract/DOOMExtract.csproj" --no-self-contained --output "./Build/Windows/" --runtime win-x64
# echo "::endgroup::"
- name: Build native .NET tools
shell: alpine.sh {0}
run: |
echo "::group::Linux - DOOMExtract (Native, Static)"
dotnet publish "./DOOMExtract/DOOMExtract.csproj" --output "./Build/Linux/" "--property:CustomConditionBuildType=AOTStatic" --runtime linux-musl-x64 --self-contained
echo "::endgroup::"
echo "::group::Linux - DOOMModLoader (Native, Static)"
dotnet publish "./DOOMModLoader/DOOMModLoader.csproj" --output "./Build/Linux/" "--property:CustomConditionBuildType=AOTStatic" --runtime linux-musl-x64 --self-contained
echo "::endgroup::"
- name: Test tools
run: |
echo "::group::./DOOMExtract -help"
"./Build/Linux/DOOMExtract" -help
echo "::endgroup::"
echo "::group::./DOOMModLoader -help"
"./Build/Linux/DOOMModLoader" -help
echo "::endgroup::"
# echo "::group::./idCrypt -help"
# "./Build/Linux/idCrypt/idCrypt" -help
# echo "::endgroup::"

#Upload
- name: Display files
run: |
echo "::group::File sizes"
find "./Build/" -type f -printf "%8s %p\n"
echo
echo "- Without file sizes:"
echo "::endgroup::"
find "./Build/" -type f | sort
- name: Upload tools (Linux)
uses: actions/upload-artifact@v4
with:
compression-level: 9
name: "Tools (Linux)"
path: "./Build/Linux/"
- name: Upload tools (Windows)
uses: actions/upload-artifact@v4
with:
compression-level: 9
name: "Tools (Windows)"
path: "./Build/Windows/"

build-windows:
name: Build (Windows)
needs: build #We need the Linux job's idCrypt
runs-on: windows-latest
timeout-minutes: 10
steps:
#Setup
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with: {dotnet-version: 8.0}
- name: Display .NET info
run: dotnet --info

#Build
- name: Build native Windows .NET tools
run: |
echo "::group::Windows - DOOMExtract (Native)"
dotnet publish "./DOOMExtract/DOOMExtract.csproj" --output "./Build/Windows/" "--property:CustomConditionBuildType=AOT" --runtime win-x64 --self-contained
echo "::endgroup::"
echo "::group::Windows - DOOMModLoader (Native)"
dotnet publish "./DOOMModLoader/DOOMModLoader.csproj" --output "./Build/Windows/" "--property:CustomConditionBuildType=AOT" --runtime win-x64 --self-contained
echo "::endgroup::"
#Upload
- name: Download idCrypt artifact
uses: actions/download-artifact@v4
with:
name: "Tools (Windows)"
path: "./Build/Download/"
- name: Test tools
run: |
echo "::group::./DOOMExtract.exe -help"
Start-Process "./Build/Windows/DOOMExtract.exe" "-help" -NoNewWindow -Wait
echo "::endgroup::"
echo "::group::./DOOMModLoader.exe -help"
Start-Process "./Build/Windows/DOOMModLoader.exe" "-help" -NoNewWindow -Wait
echo "::endgroup::"
echo "::group::./idCrypt.exe -help"
Move-Item "./Build/Download/idCrypt.exe" "./Build/Windows/idCrypt.exe"
Start-Process "./Build/Windows/idCrypt.exe" "-help" -NoNewWindow -Wait
echo "::endgroup::"
- name: Display files
run: Get-ChildItem "./Build/" -Recurse -Name -File
- name: Upload tools (Windows)
uses: actions/upload-artifact@v4
with:
compression-level: 9
name: "Tools (Windows)"
overwrite: true
path: "./Build/Windows/"
Loading

0 comments on commit 4817951

Please sign in to comment.