Skip to content

Commit

Permalink
Forgot part of the call structure, update the bat to be more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
CompulsiveComputing committed Jul 1, 2023
1 parent 12fa404 commit 3ea53d0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 21 deletions.
24 changes: 23 additions & 1 deletion BuildFSR2.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@echo off
+@echo off
setlocal
set "origin=%cd%\"
set "buildPath=..\external\FidelityFX-FSR2\build"
set "slnDX12=FSR2_Sample_DX12.sln"
set "slnVK=FSR2_Sample_VK.sln"

echo Script started on %date% %time%
echo Current working directory: %origin%

REM Clear old artifacts
Expand All @@ -13,16 +14,31 @@ cd /d "%origin%%buildPath%"
if exist "DX12" (
echo Removing old DX12 artifacts...
rd /s /q "DX12" > nul 2>&1
if errorlevel 1 (
echo Failed to remove old DX12 artifacts.
) else (
echo Successfully removed old DX12 artifacts.
)
)
if exist "VK" (
echo Removing old VK artifacts...
rd /s /q "VK" > nul 2>&1
if errorlevel 1 (
echo Failed to remove old VK artifacts.
) else (
echo Successfully removed old VK artifacts.
)
)

REM Regenerate artifacts
echo Regenerating artifacts...
cd /d "%origin%%buildPath%"
call GenerateSolutions.bat > nul 2>&1
if errorlevel 1 (
echo Failed to regenerate artifacts.
) else (
echo Successfully regenerated artifacts.
)

REM Build FSR2_Sample_DX12.sln
call :BuildSolution "%origin%%buildPath%\DX12\%slnDX12%" "Debug" "DX12"
Expand All @@ -43,10 +59,16 @@ if exist "%solutionPath%" (
echo Building %solutionPath%...
cd /d "%origin%%buildPath%\%~3"
MSBUILD.exe "%solutionPath%" /t:Build /p:Configuration=%configuration%
if errorlevel 1 (
echo Failed to build %solutionPath%.
) else (
echo Successfully built %solutionPath%.
)
) else (
echo %solutionPath% not found. Skipping build.
)
exit /b

:endofBuildFSR2
echo FSR2 build-script finished on %date% %time%
endlocal
42 changes: 22 additions & 20 deletions Build_FSR2/Build_FSR2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>

</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
Expand Down Expand Up @@ -53,27 +52,24 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared" >
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>

<PropertyGroup Label="UserMacros" />

<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -113,6 +109,12 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>call "..\BuildFSR2.bat"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Build / rebuild FSR2 artifacts</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand All @@ -130,9 +132,9 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>

<ItemGroup></ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

0 comments on commit 3ea53d0

Please sign in to comment.