Просмотр исходного кода

Fixes for whitespace, general cleanup and abbreviation and update of AUTHORS.md as per feedback on #1193

darrylryan 9 лет назад
Родитель
Сommit
1511c3e7e5
4 измененных файлов с 33 добавлено и 38 удалено
  1. 2 0
      AUTHORS.md
  2. 17 15
      Build/Scripts/Bootstrap.js
  3. 3 8
      Build/Scripts/BuildWindows.js
  4. 11 15
      CMake_VS2015.bat

+ 2 - 0
AUTHORS.md

@@ -43,6 +43,8 @@
 
 - Isaac Burns (https://github.com/flyover)
 
+- Darryl Ryan (https://github.com/darrylryan)
+
 ### Contribution Copyright and Licensing
 
 Atomic Game Engine contribution copyrights are held by their authors.  Each author retains the copyright to their contribution and agrees to irrevocably license the contribution under the Atomic Game Engine Contribution License `CONTRIBUTION_LICENSE.md`.  Please see `CONTRIBUTING.md` for more details.

+ 17 - 15
Build/Scripts/Bootstrap.js

@@ -27,8 +27,10 @@ function printHelp() {
     console.log("--with-android  : Build with Android platform support");
     console.log("--with-ios      : Build with iOS platform support");
     console.log("--with-web      : Build with Web platform support");
-	console.log("--opengl        : Use OpenGL instead of DirectX 9 (only affects Windows builds)");
-	console.log("--d3d11         : Use DirectX 11 instead of DirectX 9 (only affects Windows builds)");
+if (os.platform() == "win32") {
+    console.log("--opengl        : Enable OpenGL renderer");
+    console.log("--d3d11         : Enable DirectX 11 renderer");
+}
     console.log("--debug         : Build debug version of the editor and associated platform runtimes");
     console.log("--noclean       : Do not clean before building, useful during development");
     console.log("--nonet         : Build without AtomicNET C# scripting support");
@@ -93,35 +95,35 @@ if (cmd == "buildeditor") {
             process.exit(1);
         }
     }
-	
-	if (config["d3d11"] && config["opengl"]) {
+
+    if (config["d3d11"] && config["opengl"]) {
 
         if (os.platform() == "win32") {
             console.log("\nBoth DirectX 11 and OpenGL flags specified. Please choose only one at a time.\nExiting...\n");
             process.exit(1);
         }
     }
-	
-	if (config["d3d11"]) {
+
+    if (config["d3d11"]) {
 
         if (os.platform() != "win32") {
             console.log("\nDirectX 11 build requires Windows, exiting\n");
             process.exit(1);
         }
-		else {
-			console.log("\nDirectX 11 build selected.\n");
-		}
+        else {
+            console.log("\nDirectX 11 build selected.\n");
+        }
     }
-	
-	
-	if (config["opengl"]) {
+
+
+    if (config["opengl"]) {
 
         if (os.platform() != "win32") {
             console.log("\nOpenGL flag ignored, OpenGL is default on non-Windows platforms anyway.\nContinuing...\n");
         }
-		else {
-			console.log("\nOpenGL build selected.\n");
-		}
+        else {
+            console.log("\nOpenGL build selected.\n");
+        }
     }
 
 

+ 3 - 8
Build/Scripts/BuildWindows.js

@@ -135,14 +135,9 @@ namespace('build', function() {
     }, function(devBuild) {
         if (devBuild === undefined)
         devBuild = 1;
-	
-	    var d3d11 = "OFF";
-		var opengl = "OFF";
-		
-	    if (config["opengl"])
-			opengl = "ON";
-		else if (config["d3d11"])
-			d3d11 = "ON";
+
+        var opengl = config["opengl"] ? "ON" : "OFF"; 
+        var d3d11 = config["d3d11"] ? "ON" : "OFF"; 
 
         var slnRoot = path.resolve(atomicRoot, "") + "-VS2015\\";
 

+ 11 - 15
CMake_VS2015.bat

@@ -27,7 +27,6 @@ IF DEFINED ARG (
 )
 IF %BUILDMODE%=="d3d9" (
   ECHO Direct3D 9 configuration selected by default (Use /opengl or /d3d11 switches to specify OpenGL or DirectX 11)
-
 )
 @echo: 
 call "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat"
@@ -38,20 +37,17 @@ set "cdir=%~dp0"
 :: for loop requires removing trailing backslash from %~dp0 output
 set "cdir=%cdir:~0,-1%"
 for %%i IN ("%cdir%") do set "foldername=%%~nxi"
-:: run cmake
-IF %BUILDMODE%=="d3d9" (
- cmake -E make_directory "..\%foldername%-VS2015" && cmake -E chdir "..\%foldername%-VS2015" cmake %~dp0 -G "Visual Studio 14 2015 Win64"
- @echo:
- ECHO Solution created in ..\%foldername%-VS2015
-)
-IF %BUILDMODE%=="d3d11" (
- cmake -E make_directory "..\%foldername%-VS2015-d3d11" && cmake -E chdir "..\%foldername%-VS2015-d3d11" cmake %~dp0 -G "Visual Studio 14 2015 Win64" -DATOMIC_D3D11=ON
- @echo:
- ECHO Solution created in ..\%foldername%-VS2015-d3d11
-)
+SET "DIRECTORY=..\%foldername%-VS2015" 
+IF %BUILDMODE%=="d3d11" ( 
+   SET "DIRECTORY=%DIRECTORY%_D3D11"
+   SET "RENDERERFLAG=-DATOMIC_D3D11=ON"
+) 
 IF %BUILDMODE%=="opengl" (
- cmake -E make_directory "..\%foldername%-VS2015-opengl" && cmake -E chdir "..\%foldername%-VS2015-opengl" cmake %~dp0 -G "Visual Studio 14 2015 Win64" -DATOMIC_OPENGL=ON
- @echo:
- ECHO Solution created in ..\%foldername%-VS2015-opengl
+	SET "DIRECTORY=%DIRECTORY%_OPENGL"
+	SET "RENDERERFLAG=-DATOMIC_OPENGL=ON"
 )
+:: run cmake
+cmake -E make_directory %DIRECTORY% && cmake -E chdir %DIRECTORY% cmake %~dp0 -G "Visual Studio 14 2015 Win64" %RENDERERFLAG%
+@echo:
+ECHO Solution created in %DIRECTORY%
 @echo: