Skip to content

Commit 8b38b6d

Browse files
committed
GITechDemo changes:
* Implemented HDR rendering, tone mapping and bloom * Proper gamma correction is performed and all shading is done in linear space * Modified build script to give the option of creating a profile build (includes performance markers) * Added a Gaussian kernel generator * Light tuning LibRenderer changes: * Added support for sRGB textures and render targets * Various minor bug fixes
1 parent b88c5df commit 8b38b6d

33 files changed

+1569
-390
lines changed

GITechDemo/Build/build_win.py

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
import errno
55
import sys
66

7+
# Arguments:
8+
# 'rebuild' to force rebuilding the solution
9+
# 'profile' to build on the Profile configuration
10+
711
PROJECT_NAME = "GITechDemo"
812
DEFAULT_VSCOMNTOOLS = "VS120COMNTOOLS"
913
FORCE_REBUILD = False
14+
BUILD_CONFIGURATION = "Release"
1015

1116
def copyfiles(srcdir, dstdir, filepattern):
1217
def failed(exc):
@@ -50,9 +55,9 @@ def copytree(src, dst, symlinks = False, ignore = None):
5055
else:
5156
shutil.copy2(s, d)
5257

53-
def buildsln(pathToTools, platform):
58+
def buildsln(pathToTools, platform, buildConfig):
5459
cmd = "\"" + pathToTools + "VsDevCmd.bat\" && "
55-
cmd += "MSBuild.exe /maxcpucount /p:Configuration=Release /p:Platform=" + platform
60+
cmd += "MSBuild.exe /maxcpucount /p:Configuration=" + buildConfig + " /p:Platform=" + platform
5661
if(FORCE_REBUILD):
5762
cmd += " /t:rebuild "
5863
else:
@@ -66,8 +71,11 @@ def buildsln(pathToTools, platform):
6671
#os.system('reg delete "HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "12.0"')
6772
#os.system("reg add \"HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7\" /v \"12.0\" /t REG_SZ /d \"C:\Program Files (x86)\Microsoft Visual Studio 12.0\\\\\"")
6873

69-
if(len(sys.argv) > 1 and sys.argv[1] == "rebuild"):
70-
FORCE_REBUILD = True;
74+
for opt in sys.argv:
75+
if(opt == "rebuild"):
76+
FORCE_REBUILD = True
77+
if(opt == "profile"):
78+
BUILD_CONFIGURATION = "Profile"
7179

7280
print("\nStarting build process...\n")
7381

@@ -89,31 +97,32 @@ def buildsln(pathToTools, platform):
8997
print("No compatible version of Visual Studio found!\n")
9098

9199
if(pathToTools):
92-
buildsln(pathToTools, "x86")
93-
buildsln(pathToTools, "x64")
100+
buildsln(pathToTools, "x86", BUILD_CONFIGURATION)
101+
buildsln(pathToTools, "x64", BUILD_CONFIGURATION)
94102

95-
print("\nConfiguring build...\n");
103+
print("\nConfiguring build...\n")
96104

97105
# Create directory structure
106+
rootBuildDir = "Windows/" + BUILD_CONFIGURATION + "/" + PROJECT_NAME
98107
makedir("Windows")
99-
makedir("Windows/bin")
100-
makedir("Windows/bin/x64")
101-
makedir("Windows/bin/x86")
102-
makedir("Windows/data")
108+
makedir(rootBuildDir + "/bin")
109+
makedir(rootBuildDir + "/bin/x64")
110+
makedir(rootBuildDir + "/bin/x86")
111+
makedir(rootBuildDir + "/data")
103112

104113
# Copy 64bit binaries
105-
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", "./Windows/bin/x64", "*.exe")
106-
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", "./Windows/bin/x64", "*.dll")
114+
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.exe")
115+
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.dll")
107116

108117
# Copy 32bit binaries
109-
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", "./Windows/bin/x86", "*.exe")
110-
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", "./Windows/bin/x86", "*.dll")
118+
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.exe")
119+
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.dll")
111120

112121
# Copy data
113-
copytree("../Data/", "./Windows/data")
122+
copytree("../Data/", rootBuildDir + "/data")
114123

115124
# Create x64 batch files
116-
x64bat = open("./Windows/run_x64.bat", "w")
125+
x64bat = open(rootBuildDir + "/run_x64.bat", "w")
117126
x64bat.write("\
118127
@echo off\n\
119128
:A\n\
@@ -124,7 +133,7 @@ def buildsln(pathToTools, platform):
124133
x64bat.close()
125134

126135
# Create x86 batch files
127-
x86bat = open("./Windows/run_x86.bat", "w")
136+
x86bat = open(rootBuildDir + "/run_x86.bat", "w")
128137
x86bat.write("\
129138
@echo off\n\
130139
:A\n\
@@ -134,4 +143,4 @@ def buildsln(pathToTools, platform):
134143
exit")
135144
x86bat.close()
136145

137-
print("DONE!");
146+
print("DONE!")

0 commit comments

Comments
 (0)