squadlanes
squadlanes copied to clipboard
[WIP] Docker configuration for easier extraction
I started working on a docker configuration to make the extraction process a bit easier to set up.
So far I got a Dockerfile and docker-compose.yml to create a container for the extraction process but the "poetry run unpack" command does not execute properly. It seems like the container is missing some libraries which I don't understand, because these libraries are included in the project as far as I can tell. (See example error message below)
Error: Library ... not found
['wine', './UnrealPakTool/UnrealPak.exe', 'Z://opt/squadgame/SquadGame/Content/Paks/pakchunk0-WindowsNoEditor.pak', '-cryptokeys=Z://opt/squadlanes/extraction/crypto.json', '-Extract', 'Z://opt/squadlanes/extraction/intermediate-files/unpacked-assets', '-Filter=*.uexp'] 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFile.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFile.dll") not found 0108:err:module:import_dll Library UnrealPak-PakFile.dll (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak.exe") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-Projects.dll") not found 0108:err:module:import_dll Library UnrealPak-Projects.dll (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak.exe") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak-PakFileUtilities.dll") not found 0108:err:module:import_dll Library UnrealPak-PakFileUtilities.dll (which is needed by L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak.exe") not found 0108:err:module:LdrInitializeThunk Importing dlls for L"Z:\opt\squadlanes\extraction\UnrealPakTool\UnrealPak.exe" failed, status c0000135
I leave this draft pull request here so maybe someone can take a look at the issue with the libraries here.
Oh, damn, I remember saying to you on Discord that I'd look into this. Sorry for forgetting about this. I hope I'll have time in the next few days to look over this.
The script now does not show any errors when executing it:
It runs very fast (7 seconds) and the unpacked-assets
Folder is still empty after the extraction process.
I'm not sure if this is a step forwards or backward...
Try to execute command for extraction from command line by itslef. I also tried to make this script in docker yet for some reason wine just don't want to see dlls and that's all.
And some things about your dockerfile.
- You're using
apt update
andapt install
in different layers, this can cause problems with install part since update is cached. - You're installing software to add... repository? Just why. You can do it without it, just echo in
source.list
. - You're using outdated version of script, because of this you don't unpack HLP mod, fix this by upgrading script and adding HLP path as volume.
- You're creating Dockerfile not to execute some program and container will leave itself, but to run something by your hands inside container. You can build poetry before, make entrypoint if you want to debug in container and in docker-compose use services for each entrypoint we actually need.
- You have installed winetricks, but not using them.
Here's my approach to this problem
FROM python:3.10-bullseye
# Set wine architecture to x64
ENV WINEARCH=win64
# Install wine
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key \
&& apt-key add winehq.key \
&& echo 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main' >> /etc/apt/sources.list
RUN dpkg --add-architecture i386
RUN apt update && apt install -y --install-recommends \
gnupg2 \
winehq-stable
# Install latest poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Add root home to path where poetry was installed
ENV PATH="/root/.local/bin:${PATH}"
# Install poetry environment
COPY . /opt/squadlanes
WORKDIR /opt/squadlanes/extraction
RUN poetry config virtualenvs.in-project false
RUN poetry install
ENTRYPOINT [ "sleep", "infinity" ]
After we changed Dockerfile itself it doesn't solve a problem with wine, but still it's a better way to not add another spaghetti to already pasta-like repository. For compose file i made sketch-like, but still working
version: "3.8"
services:
unpack:
image: squadlanes
build:
context: extraction
dockerfile: Dockerfile
volumes:
- "Your/Path/To/Squad:/opt/squadgame"
- "Your/Path/To/HLP:/opt/HLP"
- "./:/opt/squadlanes"
@Akiyamov You're right with the points you mentioned about the Dockerfile. I've changed it to your suggestion.
What do you mean by "Try to execute command for extraction from command line by itslef". I don't have python installed on my windows machine. That's why I'm trying to get the extraction working in a container.
When you enter container just execute WINEDEBUG=+loaddll wine UnrealPak.exe
from folder with UnrealPak, and look exactly where dlls fail to load.
Sorry for the long silence.
Feel free to continue working on this. If it reaches a working and acceptable state, I will happily merge it in. However, I don't think I will get to work on this myself in the foreseeable future.