Skip to content

Commit

Permalink
Falcor 5.1 (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV committed Apr 4, 2022
1 parent 64fa81b commit 056f7b7
Show file tree
Hide file tree
Showing 652 changed files with 27,995 additions and 6,849 deletions.
9 changes: 9 additions & 0 deletions Build/deploycommon.bat
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ if exist %RtxdiSDKDir% (
copy /y %RtxdiSDKDir%\RtxdiTypes.h %RtxdiSDKTargetDir% >nul
)

rem Copy RTXGI SDK shaders
set RtxgiApiDir=%ExtDir%\rtxgi\rtxgi-sdk
set RtxgiTargetDir=%OutDir%\Shaders\rtxgi
if exist %RtxgiApiDir% (
if not exist %RtxgiTargetDir% mkdir %RtxgiTargetDir% >nul
robocopy %RtxgiApiDir%\include\ %RtxgiTargetDir%\include\ /s /r:0 >nul
robocopy %RtxgiApiDir%\shaders\ %RtxgiTargetDir%\shaders\ /s /r:0 >nul
)

rem Copy Agility SDK Runtime
set AgilitySDKDir=%ExtDir%\agility-sdk
set AgilitySDKTargetDir=%OutDir%\D3D12
Expand Down
37 changes: 27 additions & 10 deletions Build/packman/bootstrap/configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:: See the License for the specific language governing permissions and
:: limitations under the License.

set PM_PACKMAN_VERSION=6.15
set PM_PACKMAN_VERSION=6.42

:: Specify where packman command is rooted
set PM_INSTALL_PATH=%~dp0..
Expand Down Expand Up @@ -48,7 +48,7 @@ echo.
:: that may be needed in the path
:ENSURE_DIR
if not exist "%PM_PACKAGES_ROOT%" (
echo Creating directory %PM_PACKAGES_ROOT%
echo Creating packman packages cache at %PM_PACKAGES_ROOT%
mkdir "%PM_PACKAGES_ROOT%"
)
if %errorlevel% neq 0 ( goto ERROR_MKDIR_PACKAGES_ROOT )
Expand All @@ -59,7 +59,7 @@ if defined PM_PYTHON_EXT (
goto PACKMAN
)

set PM_PYTHON_VERSION=3.7.4-windows-x86_64
set PM_PYTHON_VERSION=3.7.12-windows-x86_64
set PM_PYTHON_BASE_DIR=%PM_PACKAGES_ROOT%\python
set PM_PYTHON_DIR=%PM_PYTHON_BASE_DIR%\%PM_PYTHON_VERSION%
set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
Expand All @@ -70,15 +70,19 @@ if not exist "%PM_PYTHON_BASE_DIR%" call :CREATE_PYTHON_BASE_DIR
set PM_PYTHON_PACKAGE=python@%PM_PYTHON_VERSION%.cab
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do set TEMP_FILE_NAME=%%a
set TARGET=%TEMP_FILE_NAME%.zip
call "%~dp0fetch_file_from_s3.cmd" %PM_PYTHON_PACKAGE% "%TARGET%"
if %errorlevel% neq 0 ( goto ERROR )
call "%~dp0fetch_file_from_packman_bootstrap.cmd" %PM_PYTHON_PACKAGE% "%TARGET%"
if %errorlevel% neq 0 (
echo !!! Error fetching python from CDN !!!
goto ERROR
)

for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_folder.ps1" -parentPath "%PM_PYTHON_BASE_DIR%"') do set TEMP_FOLDER_NAME=%%a
echo Unpacking Python interpreter ...
"%SystemRoot%\system32\expand.exe" -F:* "%TARGET%" "%TEMP_FOLDER_NAME%" 1> nul
del "%TARGET%"
:: Failure during extraction to temp folder name, need to clean up and abort
if %errorlevel% neq 0 (
echo !!! Error unpacking python !!!
call :CLEAN_UP_TEMP_FOLDER
goto ERROR
)
Expand All @@ -95,6 +99,7 @@ if exist "%PM_PYTHON%" (
rename "%TEMP_FOLDER_NAME%" "%PM_PYTHON_VERSION%" 1> nul
:: Failure during move, need to clean up and abort
if %errorlevel% neq 0 (
echo !!! Error renaming python !!!
call :CLEAN_UP_TEMP_FOLDER
goto ERROR
)
Expand All @@ -107,19 +112,28 @@ if defined PM_MODULE_DIR_EXT (
set PM_MODULE_DIR=%PM_PACKAGES_ROOT%\packman-common\%PM_PACKMAN_VERSION%
)

set PM_MODULE=%PM_MODULE_DIR%\packman.py
set PM_MODULE=%PM_MODULE_DIR%\run.py

if exist "%PM_MODULE%" goto ENSURE_7ZA

:: Clean out broken PM_MODULE_DIR if it exists
if exist "%PM_MODULE_DIR%" ( rd /s /q "%PM_MODULE_DIR%" > nul )

set PM_MODULE_PACKAGE=packman-common@%PM_PACKMAN_VERSION%.zip
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do set TEMP_FILE_NAME=%%a
set TARGET=%TEMP_FILE_NAME%
call "%~dp0fetch_file_from_s3.cmd" %PM_MODULE_PACKAGE% "%TARGET%"
if %errorlevel% neq 0 ( goto ERROR )
call "%~dp0fetch_file_from_packman_bootstrap.cmd" %PM_MODULE_PACKAGE% "%TARGET%"
if %errorlevel% neq 0 (
echo !!! Error fetching packman from CDN !!!
goto ERROR
)

echo Unpacking ...
"%PM_PYTHON%" -S -s -u -E "%~dp0\install_package.py" "%TARGET%" "%PM_MODULE_DIR%"
if %errorlevel% neq 0 ( goto ERROR )
if %errorlevel% neq 0 (
echo !!! Error unpacking packman !!!
goto ERROR
)

del "%TARGET%"

Expand All @@ -131,7 +145,10 @@ set PM_7Za_PATH=%PM_PACKAGES_ROOT%\chk\7za\%PM_7ZA_VERSION%
if exist "%PM_7Za_PATH%" goto END

"%PM_PYTHON%" -S -s -u -E "%PM_MODULE%" pull "%PM_MODULE_DIR%\deps.packman.xml"
if %errorlevel% neq 0 ( goto ERROR )
if %errorlevel% neq 0 (
echo !!! Error fetching packman dependencies !!!
goto ERROR
)

goto END

Expand Down
53 changes: 53 additions & 0 deletions Build/packman/bootstrap/download_file_from_url.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<#
Copyright 2019 NVIDIA CORPORATION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#>

param(
[Parameter(Mandatory=$true)][string]$source=$null,
[string]$output="out.exe"
)
$filename = $output

$triesLeft = 4
$delay = 2
do
{
$triesLeft -= 1

try
{
Write-Host "Downloading from bootstrap.packman.nvidia.com ..."
$wc = New-Object net.webclient
$wc.Downloadfile($source, $fileName)
exit 0
}
catch
{
Write-Host "Error downloading $source!"
Write-Host $_.Exception|format-list -force
if ($triesLeft)
{
Write-Host "Retrying in $delay seconds ..."
Start-Sleep -seconds $delay
}
$delay = $delay * $delay
}
} while ($triesLeft -gt 0)
# We only get here if the retries have been exhausted, remove any left-overs:
if (Test-Path $fileName)
{
Remove-Item $fileName
}
exit 1
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@

@echo Fetching %PACKAGE_NAME% ...

@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0fetch_file_from_s3.ps1" -sourceName %PACKAGE_NAME% ^
-output %TARGET_PATH%
@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0download_file_from_url.ps1" ^
-source "http://bootstrap.packman.nvidia.com/%PACKAGE_NAME%" -output %TARGET_PATH%
:: A bug in powershell prevents the errorlevel code from being set when using the -File execution option
:: We must therefore do our own failure analysis, basically make sure the file exists and is larger than 0 bytes:
:: We must therefore do our own failure analysis, basically make sure the file exists:
@if not exist %TARGET_PATH% goto ERROR_DOWNLOAD_FAILED
@if %~z2==0 goto ERROR_DOWNLOAD_FAILED

@endlocal
@exit /b 0
Expand Down
76 changes: 0 additions & 76 deletions Build/packman/bootstrap/fetch_file_from_s3.ps1

This file was deleted.

53 changes: 0 additions & 53 deletions Build/packman/bootstrap/fetch_file_from_url.ps1

This file was deleted.

Loading

0 comments on commit 056f7b7

Please sign in to comment.