TheSpectreZ/Nexus

Installing deps fails on Win11

Closed this issue · 3 comments

Got the following output when running the EngineBuild.bat with a VS developer shell.

PS C:\Users\jesse\work\Nexus\build>
PS C:\Users\jesse\work\Nexus\build> .\EngineBuild.bat
Python version 3.11.3 detected.
Correct Premake located at C:\Users\jesse\work\Nexus\Build\premake
Premake not found for Launcher. Would you like to Copy Premake 5.0.0-beta2? [Y/N]: Y
Traceback (most recent call last):
  File "C:\Users\jesse\work\Nexus\Build\Python\EngineSetup.py", line 11, in <module>
    premakeInstalled = ConfigPremake.Validate()
                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jesse\work\Nexus\Build\Python\premake.py", line 21, in Validate
    if(not cls.CheckIfPremakeCopied(f"{cls.premakeLauncherDirectory}/premake5.exe")):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jesse\work\Nexus\Build\Python\premake.py", line 63, in CheckIfPremakeCopied
    return cls.CopyPremake(directory)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jesse\work\Nexus\Build\Python\premake.py", line 81, in CopyPremake
    Utils.CopyFile(f"{cls.premakeDirectory}/premake5.exe",premakePath)
  File "C:\Users\jesse\work\Nexus\Build\Python\Utils.py", line 130, in CopyFile
    shutil.copy2(src, dst)
  File "C:\Users\jesse\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 436, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Users\jesse\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 256, in copyfile
    with open(src, 'rb') as fsrc:
         ^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: './Build/premake/premake5.exe'

I fixed a file-path Bug that I found but It seems Irrelevant to your Error,Make sure you remove the premake folder and Try Running it as Admin to ensure the script has the required permissions to Copy the File. If it doesn't work then Just Manually Paste the premake folder from Build to Source/NexusEditor/Sandbox/Binaries and you should be good to go for now.

Alright, I copied the directory manually after removing it and trying again.

Now, after installing the Vulkan SDK, the EngineBuild.bat script thinks I haven't installed the SDK. If I tell it to not install again, the script then barfs when trying to run premake.

I can spot at least one obvious problem in that output. Can you try to build from a fresh clone on your machine to see if you get the same behavior?

PS C:\Users\jesse\work\Nexus\Build>
PS C:\Users\jesse\work\Nexus\Build> .\EngineBuild.bat
Python version 3.11.3 detected.
Correct Premake located at C:\Users\jesse\work\Nexus\Build\premake
Correct Premake located at C:\Users\jesse\work\Nexus\Source\NexusEditor\Sandbox\Binaries\premake

You don't have the Vulkan SDK installed!
Would you like to install VulkanSDK 1.3.236.0? [Y/N]: Y
Downloading https://sdk.lunarg.com/sdk/download/1.3.236.0/windows/VulkanSDK-1.3.236.0-Installer.exe to ./Build/VulkanSDK/VulkanSDK-1.3.236.0-Installer.exe
[██████████████████████████████████████████████████] 100.00% (1.02 MB/s)
Running Vulkan SDK installer...
Re-run this script after installation!
Press any key to continue . . .
PS C:\Users\jesse\work\Nexus\Build> .\EngineBuild.bat
Python version 3.11.3 detected.
Correct Premake located at C:\Users\jesse\work\Nexus\Build\premake
Correct Premake located at C:\Users\jesse\work\Nexus\Source\NexusEditor\Sandbox\Binaries\premake

You don't have the Vulkan SDK installed!
Would you like to install VulkanSDK 1.3.236.0? [Y/N]: n
Vulkan SDK not installed correctly.

Updating submodules...

Running premake...
'Build\premake\premake5.exe' is not recognized as an internal or external command,
operable program or batch file.


'Binaries\premake\premake5.exe' is not recognized as an internal or external command,
operable program or batch file.

Setup completed!
Press any key to continue . . .

I fixed the entire Issue. Remove existing premake directories,Pull the latest changes and Try it again.