Add build process script for shard sheets

hg/feature/sse2
kaetemi 11 years ago
parent 2289285c14
commit b52230832e

@ -85,6 +85,7 @@ IgElevationTool = "ig_elevation"
IgAddTool = "ig_add" IgAddTool = "ig_add"
BuildClodBankTool = "build_clod_bank" BuildClodBankTool = "build_clod_bank"
SheetsPackerTool = "sheets_packer" SheetsPackerTool = "sheets_packer"
SheetsPackerShardTool = "sheets_packer_shard"
BnpMakeTool = "bnp_make" BnpMakeTool = "bnp_make"
AiBuildWmapTool = "ai_build_wmap" AiBuildWmapTool = "ai_build_wmap"
TgaCutTool = "tga_cut" TgaCutTool = "tga_cut"

@ -1,5 +1,5 @@
1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg 1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language
2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg 2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language
3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg 3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language
5_client_dev.py 5_client_dev.py
8_shard_data.py 8_shard_data.py

@ -54,7 +54,7 @@ if MakeSheetId == "":
else: else:
mkPath(log, LeveldesignDirectory) mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignWorldDirectory) mkPath(log, LeveldesignWorldDirectory)
subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "mirror_sheets" ]) subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "/mirror_sheets" ]) # FIXME: Hardcoded path mirror_sheets
printLog(log, "") printLog(log, "")
log.close() log.close()

@ -0,0 +1,67 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Setup sheets
# \date 2014-02-19 22:39GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup shard sheets
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010-2014 by authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup shard sheets")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignDfnDirectory)
mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory)
mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, InstallDirectory + "/" + SheetsShardInstallDirectory)
log.close()
# end of file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export sheets
# \date 2014-02-19 22:39GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export shard sheets
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010-2014 by authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export shard sheets")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

@ -0,0 +1,67 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build sheets
# \date 2014-02-19 22:39GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build shard sheets
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010-2014 by authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build sheets")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
SheetsPackerShard = findTool(log, ToolDirectories, SheetsPackerShardTool, ToolSuffix)
printLog(log, "")
# For each sheets directory
printLog(log, ">>> Build shard sheets <<<")
if SheetsPackerShard == "":
toolLogFail(log, SheetsPackerShardTool, ToolSuffix)
else:
mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignDfnDirectory)
mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory)
mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets
mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory)
# sheets_packer_shard <leveldesign> <dfn> <datasets> <tab> <build_packed_sheets>
subprocess.call([ SheetsPackerShard, LeveldesignDirectory, LeveldesignDfnDirectory, DataShardDirectory + "/mirror_sheets", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory, ExportBuildDirectory + "/" + SheetsShardBuildDirectory ])
printLog(log, "")
log.close()
# end of file

@ -0,0 +1,57 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install sheets
# \date 2014-02-19 22:39GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install shard sheets
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010-2014 by authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install shard sheets")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
installPath = InstallDirectory + "/" + SheetsShardInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install sheets <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory, installPath, ".packed_sheets")
printLog(log, "")
log.close()
# end of file
Loading…
Cancel
Save