forked from drakeshin/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b599070
commit 4fc3f82
Showing
20 changed files
with
307 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
var fs = require('fs-extra'); | ||
var bcommon = require("./BuildCommon"); | ||
var host = require("./Host"); | ||
|
||
var buildDir = bcommon.artifactsRoot + "Build/Linux/"; | ||
|
||
namespace('build', function() { | ||
|
||
task('linux_player', { | ||
async: true | ||
}, function() { | ||
|
||
var atomicTool = host.getAtomicToolBinary(); | ||
|
||
var playerBuildDir = buildDir + "AtomicPlayer/"; | ||
|
||
bcommon.cleanCreateDir(playerBuildDir); | ||
bcommon.cleanCreateDir(bcommon.getGenScriptRootDir("MACOSX")); | ||
|
||
process.chdir(playerBuildDir); | ||
|
||
var cmds = [ | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/Atomic/ LINUX", | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/AtomicPlayer/ LINUX", | ||
"cmake -DATOMIC_DEV_BUILD=0 -DLINUX=1 ../../../../", | ||
"make" | ||
]; | ||
|
||
jake.exec(cmds, function() { | ||
var macPlayerBinary = playerBuildDir + "Source/AtomicPlayer/Application/Release/Contents/Linux/AtomicPlayer"; | ||
fs.copySync(macPlayerBinary, buildDir + "Bin/AtomicPlayer"); | ||
console.log("Built Linux Player"); | ||
complete(); | ||
|
||
}, { | ||
printStdout: true | ||
}); | ||
|
||
}); | ||
|
||
task('linux_editor', { | ||
async: true | ||
}, function() { | ||
|
||
var atomicTool = host.getAtomicToolBinary(); | ||
|
||
var editorBuildDir = buildDir + "AtomicEditor/"; | ||
|
||
bcommon.cleanCreateDir(editorBuildDir); | ||
|
||
process.chdir(editorBuildDir); | ||
|
||
var cmds = [ | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/Atomic/ LINUX", | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/AtomicPlayer/ LINUX", | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/ToolCore/ LINUX", | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/Editor/ LINUX", | ||
atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/AtomicNET/ LINUX", | ||
"cmake -DATOMIC_DEV_BUILD=0 -DLINUX=1 ../../../../", | ||
"make" | ||
]; | ||
|
||
jake.exec(cmds, function() { | ||
var macEditorBinary = editorBuildDir + "Source/AtomicEditor/Release/Contents/Linux/AtomicEditor"; | ||
fs.copySync(macEditorBinary, buildDir + "Bin/AtomicEditor"); | ||
console.log("Built Linux Editor"); | ||
complete(); | ||
|
||
}, { | ||
printStdout: true | ||
}); | ||
|
||
}); | ||
|
||
}); // end of build namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
var fs = require('fs-extra'); | ||
var bcommon = require("./BuildCommon"); | ||
|
||
var buildDir = bcommon.artifactsRoot + "Build/Mac/"; | ||
var atomicToolBinary = buildDir + "Bin/AtomicTool"; | ||
|
||
function clean() { | ||
|
||
bcommon.testRemoveDir(buildDir); | ||
|
||
} | ||
|
||
function getAtomicToolBinary() { | ||
|
||
return atomicToolBinary; | ||
|
||
} | ||
|
||
namespace('build', function() { | ||
|
||
task('atomictool', { | ||
async: true | ||
}, function() { | ||
|
||
var toolBuildDir = buildDir + "AtomicTool/"; | ||
|
||
bcommon.cleanCreateDir(toolBuildDir); | ||
|
||
process.chdir(toolBuildDir); | ||
|
||
var cmds = [ | ||
'cmake ../../../../ -DATOMICTOOL_NOGEN=1 -G Xcode', | ||
'xcodebuild -target AtomicTool -configuration Release' | ||
] | ||
|
||
jake.exec(cmds, function() { | ||
|
||
var srcToolBinary = toolBuildDir + "Source/AtomicTool/Release/AtomicTool" | ||
fs.copySync(srcToolBinary, atomicToolBinary); | ||
console.log("Built MacOSX AtomicTool"); | ||
complete(); | ||
|
||
}, { | ||
printStdout: true | ||
}); | ||
|
||
}); | ||
|
||
}); // end of build namespace | ||
|
||
|
||
exports.clean = clean; | ||
exports.getAtomicToolBinary = getAtomicToolBinary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# create docs | ||
find_program(CLDOC cldoc) | ||
if(CLDOC) | ||
|
||
get_property(include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES) | ||
get_directory_property( DEFS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS ) | ||
|
||
FOREACH(infileName ${include_dirs}) | ||
LIST(APPEND DOC_INCLUDES "-I${infileName}") | ||
ENDFOREACH(infileName) | ||
|
||
FOREACH(DefName ${DEFS}) | ||
LIST(APPEND DOC_DEFINES "-D${DefName}") | ||
ENDFOREACH(DefName) | ||
|
||
string(REGEX MATCHALL "([^\ ]+)" CXX_LIST "${CMAKE_CXX_FLAGS}") | ||
string(REGEX MATCHALL "([^\ ]+)" C_LIST "${CMAKE_C_FLAGS}") | ||
|
||
get_filename_component(COMPNAME ${CMAKE_CURRENT_SOURCE_DIR} NAME ) | ||
SET(TARGETNAME ${COMPNAME}Docs) | ||
|
||
MESSAGE(STATUS "Enabling documentation for: " ${COMPNAME}) | ||
|
||
SET(doc_args generate ${CXX_LIST} ${C_LIST} -std=c++11 -DATOMIC_DEV_BUILD=1 ${DOC_DEFINES} ${DOC_INCLUDES} -- --type html --language c++ --output ${CMAKE_SOURCE_DIR}/Artifacts/Build/AtomicDocs ) | ||
|
||
LIST( APPEND doc_args ${SOURCE_FILES} ) | ||
|
||
add_custom_target(${TARGETNAME} COMMAND ${CLDOC} ${doc_args}) | ||
|
||
set_target_properties(${TARGETNAME} PROPERTIES | ||
EXCLUDE_FROM_ALL 1 | ||
EXCLUDE_FROM_DEFAULT_BUILD 1 | ||
) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# create target to generate docs with clang based doc tool | ||
# NB: pretty brute force ATM | ||
if(EXISTS "/usr/local/bin/cldoc") | ||
add_custom_target(AtomicEngineDocs | ||
DEPENDS AtomicEditorDocs AtomicDocs | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
var fs = require('fs-extra'); | ||
var path = require("path"); | ||
var host = require("./Host"); | ||
var atomicRoot = host.atomicRoot; | ||
|
||
var buildDir = host.artifactsRoot + "Build/Linux/"; | ||
var editorAppFolder = host.artifactsRoot + "AtomicEditor/"; | ||
|
||
namespace('build', function() { | ||
|
||
// Builds a standalone Atomic Editor, which can be distributed out of build tree | ||
task('atomiceditor', { | ||
async: true | ||
}, function() { | ||
|
||
// Clean build | ||
var cleanBuild = true; | ||
if (cleanBuild) { | ||
common.cleanCreateDir(buildDir); | ||
common.cleanCreateDir(editorAppFolder); | ||
common.cleanCreateDir(host.getGenScriptRootDir("LINUX")); | ||
} | ||
|
||
// create the generated script files, so they will be picked up by cmake | ||
host.createGenScriptFiles("LINUX"); | ||
|
||
process.chdir(buildDir); | ||
|
||
var cmds = []; | ||
|
||
cmds.push("cmake ../../../ -DATOMIC_DEV_BUILD=0 -DCMAKE_BUILD_TYPE=Release -DATOMIC_BUILD_2D=0 -DLINUX=1 "); | ||
cmds.push("make GenerateScriptBindings") | ||
cmds.push("make AtomicEditor AtomicPlayer") | ||
|
||
jake.exec(cmds, function() { | ||
|
||
// Copy the Editor binaries | ||
fs.copySync(buildDir + "Source/AtomicEditor/AtomicEditor", | ||
host.artifactsRoot + "AtomicEditor/AtomicEditor"); | ||
|
||
// We need some resources to run | ||
fs.copySync(atomicRoot + "Resources/CoreData", | ||
editorAppFolder + "Resources/CoreData"); | ||
|
||
fs.copySync(atomicRoot + "Resources/PlayerData", | ||
editorAppFolder + "Resources/PlayerData"); | ||
|
||
fs.copySync(atomicRoot + "Data/AtomicEditor", | ||
editorAppFolder + "Resources/ToolData"); | ||
|
||
fs.copySync(atomicRoot + "Resources/EditorData", | ||
editorAppFolder + "Resources/EditorData"); | ||
|
||
fs.copySync(atomicRoot + "Artifacts/Build/Resources/EditorData/AtomicEditor/EditorScripts", | ||
editorAppFolder + "Resources/EditorData/AtomicEditor/EditorScripts"); | ||
|
||
fs.copySync(buildDir + "Source/AtomicPlayer/Application/AtomicPlayer", | ||
editorAppFolder + "Resources/ToolData/Deployment/Linux/AtomicPlayer"); | ||
|
||
console.log("\n\nAtomic Editor build to " + editorAppFolder + "\n\n"); | ||
|
||
complete(); | ||
|
||
}, { | ||
printStdout: true | ||
}); | ||
|
||
}); | ||
|
||
});// end of build namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
common = require("./HostCommon"); | ||
|
||
// forward exports | ||
exports = module.exports = common; | ||
exports.atomicTool = exports.artifactsRoot + "Build/AtomicTool/AtomicTool"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
#!/bin/sh | ||
./Build/Mac/node/node ./Build/node_modules/jake/bin/cli.js -f ./Build/Scripts/Bootstrap.js build:atomiceditor | ||
#!/usr/bin/env sh | ||
|
||
if [ "$(uname)" = "Darwin" ]; then | ||
./Build/Mac/node/node ./Build/node_modules/jake/bin/cli.js -f ./Build/Scripts/Bootstrap.js build:atomiceditor | ||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then | ||
node ./Build/node_modules/jake/bin/cli.js -f ./Build/Scripts/Bootstrap.js build:atomiceditor | ||
elif [ "$(expr substr $(uname -s) 1 7)" = "MSYS_NT" ]; then | ||
./Build/Windows/node/node.exe ./Build/node_modules/jake/bin/cli.js -f ./Build/Scripts/Bootstrap.js build:atomiceditor | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,5 @@ GroupSources("UI") | |
GroupSources("Web") | ||
|
||
add_library(Atomic ${SOURCE_FILES}) | ||
|
||
include(AtomicDoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.