# escape=`
ARG BASEIMAGE
FROM ${BASEIMAGE}
ENV UE5=C:\UnrealEngine
RUN dotnet tool install --global JetBrains.ReSharper.GlobalTools --version 2023.3.6

# TODO: Move this to ue4-docker
ARG UE_TAG
RUN reg add "HKCU\SOFTWARE\Epic Games\Unreal Engine\Builds" /v "%UE_TAG%" /t REG_SZ /d "C:\UnrealEngine"

# HACK
RUN del C:\UnrealEngine\Engine\Intermediate\ScriptModules\XboxOneGDK.Automation.json C:\UnrealEngine\Engine\Intermediate\ScriptModules\WinGDK.Automation.json

# Install octobuild
RUN curl -L https://github.com/octobuild/octobuild/releases/download/1.4.0/octobuild-1.4.0-x86_64.msi --output "%TEMP%\octobuild.msi" && `
    msiexec /i "%TEMP%\octobuild.msi" /quiet && `
    del "%TEMP%\octobuild.msi"


COPY Install.ps1 C:\
RUN Powershell.exe -File C:\Install.ps1
