adamrehn / ue4-docker

Windows and Linux containers for Unreal Engine 4
https://docs.adamrehn.com/ue4-docker/
MIT License
777 stars 172 forks source link

Unreal Engine Built In Windows Built.bat is not working #268

Closed omrumcetin closed 1 year ago

omrumcetin commented 1 year ago

Hi All, I have removed the template because I'm running preconfigured script inside of Unreal Engine. So I have gone through little bit on UDN and @adamrehn forwarded me to here. So, when I use built.bat under Windows Containers, I'm having below error while expanding.

Can't open input file: c:\users\containeradministrator\appdata\local\temp\directx\apr2007_xinput_x64.cab.

I guess the DirectX runtime doesnt create files and libraries that script requests.

# Retrieve the DirectX runtime files required by the Unreal Engine, since even the full Windows base image does not include them
RUN curl --progress-bar -L "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" --output %TEMP%\directx_redist.exe && `
    start /wait %TEMP%\directx_redist.exe /Q /T:%TEMP%\DirectX
    expand %TEMP%\DirectX\APR2007_xinput_x64.cab -F:xinput1_3.dll C:\GatheredDlls\ && `
    expand %TEMP%\DirectX\Feb2010_X3DAudio_x64.cab -F:X3DAudio1_7.dll C:\GatheredDlls\ && `
    expand %TEMP%\DirectX\Jun2010_D3DCompiler_43_x64.cab -F:D3DCompiler_43.dll C:\GatheredDlls\ && `
    expand %TEMP%\DirectX\Jun2010_XAudio_x64.cab -F:XAudio2_7.dll C:\GatheredDlls\ && `
    expand %TEMP%\DirectX\Jun2010_XAudio_x64.cab -F:XAPOFX1_5.dll C:\GatheredDlls\

Btw I have commented each expand in order to make it operatable but its valid for all following expand lines. I can able to have some docker win image after I comment out all expand lines.

Could you please check this ?

TBBle commented 1 year ago

Your script block here looks every similar to the old (up to v0.88) block used in the ue4-build-prerequisites Dockerfile, except that code always did the download in a separate RUN from the extraction.

I'm not sure where that code came from (I didn't really understand your comment about built.bat), but I observe that the second line is missing a

 && `

at the end, so I guess if this is in a batch file, it's trying to run the expand commands outside the container. (Although if this is a batch file, then RUN wouldn't work anyway...)

omrumcetin commented 1 year ago

That syntax I just forgot to put above command.

Step 5/13 : RUN curl --progress-bar -L "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" --output %TEMP%\directx_redist.exe &&    start /wait %TEMP%\directx_redist.exe /Q /T:%TEMP%\DirectX &&   expand %TEMP%\DirectX\APR2007_xinput_x64.cab -F:xinput1_3.dll C:\GatheredDlls\ &&       expand %TEMP%\DirectX\Feb2010_X3DAudio_x64.cab -F:X3DAudio1_7.dll C:\GatheredDlls\ &&   expand %TEMP%\DirectX\Jun2010_D3DCompiler_43_x64.cab -F:D3DCompiler_43.dll C:\GatheredDlls\ &&  expand %TEMP%\DirectX\Jun2010_XAudio_x64.cab -F:XAudio2_7.dll C:\GatheredDlls\ &&       expand %TEMP%\DirectX\Jun2010_XAudio_x64.cab -F:XAPOFX1_5.dll C:\GatheredDlls\
 ---> Running in 573c6b435d02
######################################################################## 100.0%
Microsoft (R) File Expansion Utility
Copyright (c) Microsoft Corporation. All rights reserved.

Can't open input file: c:\users\containeradministrator\appdata\local\temp\directx\apr2007_xinput_x64.cab.

Any solution for above ?

And even I proceed from that stage I'm having error

PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
WARNING: Not setting tab completion: Profile file does not exist at
'C:\Users\ContainerAdministrator\Documents\WindowsPowerShell\Microsoft.PowerShe
ll_profile.ps1'.
The command 'cmd /S /C powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && echo. && echo.RUN directive complete. Docker will now commit the filesystem layer to disk. && echo.Note that for large filesystem layers this can take quite some time. && echo.Performing filesystem layer commit... && echo.' returned a non-zero code: 3221226505
[ue4-docker build] Error: failed to build image "adamrehn/ue4-build-prerequisites:ltsc2022-vs2017".

My system is high end pc.

[ue4-docker build] UNREAL ENGINE VERSION SETTINGS:
[ue4-docker build] Custom build:  No
[ue4-docker build] Release:       5.0.3
[ue4-docker build] Repository:    https://github.com/EpicGames/UnrealEngine.git
[ue4-docker build] Branch/tag:    5.0.3-release

[ue4-docker build] ADVANCED CONFIGURATION OPTIONS:
[ue4-docker build] excluded_components: {"ddc": false, "debug": false, "templates": false}

[ue4-docker build] WINDOWS CONTAINER SETTINGS
[ue4-docker build] Isolation mode:               process
[ue4-docker build] Base OS image:                mcr.microsoft.com/windows/servercore:ltsc2022
[ue4-docker build] Dll source image:             mcr.microsoft.com/windows/server:ltsc2022
[ue4-docker build] Host OS:                      Windows 10 Pro (Build 22000.978)
[ue4-docker build] Memory limit:                 No limit
[ue4-docker build] Detected max image size:      400GB
[ue4-docker build] Visual Studio:                2017
[ue4-docker build] GENERAL SETTINGS
[ue4-docker build] Build targets: build-prerequisites engine full minimal source
[ue4-docker build] Changelist override: (None specified)
[ue4-docker build] Not excluding any Engine components.

But my installed OS is Windows 11. Keep that in mind.

slonopotamus commented 1 year ago

I doubt anyone is going to do anything with this issue given that it doesn't have clear repro steps. Closing.