merge
commit
1b1c621cb6
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,183 @@
|
||||
|
||||
|
||||
include "nel_utility.ms"
|
||||
|
||||
fn getAbsoluteSource t =
|
||||
(
|
||||
return (mapPaths.getFullFilePath ((getFilenameFile (filenameFromPath t)) + ".png"))
|
||||
)
|
||||
|
||||
fn getAbsoluteDestination t =
|
||||
(
|
||||
if ((findString t "\\\\Amiga") != undefined) then
|
||||
(
|
||||
return ("W:\\" + (substring (getFilenamePath t) 11 -1) + "\\" + (getFilenameFile (filenameFromPath t)) + ".png")
|
||||
)
|
||||
else if ((findString t "\\\\amiga") != undefined) then
|
||||
(
|
||||
return ("W:\\" + (substring (getFilenamePath t) 11 -1) + "\\" + (getFilenameFile (filenameFromPath t)) + ".png")
|
||||
)
|
||||
else if ((findString t "W:\\") != undefined) then
|
||||
(
|
||||
return ((getFilenamePath t) + "\\" + (getFilenameFile (filenameFromPath t)) + ".png")
|
||||
)
|
||||
else if ((findString t "\\tronc.") != undefined) then
|
||||
(
|
||||
return "W:\\database\\database_proto\\stuff\\fyros\\objects\\tronc.png"
|
||||
)
|
||||
else if ((findString t "\\trame.") != undefined) then
|
||||
(
|
||||
return "W:\\database\\stuff\\lod_actors\\texture_lod\\trame.png"
|
||||
)
|
||||
else if ((findString t "\\PR_MO_phytopsy_tete01_Boss.") != undefined) then
|
||||
(
|
||||
return "W:\\database\\Stuff\\Tryker\\Agents\\_textures\\monster\\PR_MO_phytopsy_tete01_Boss.png"
|
||||
)
|
||||
else
|
||||
(
|
||||
return t
|
||||
)
|
||||
)
|
||||
|
||||
fn getFixedTexturePath t =
|
||||
(
|
||||
if (doesFileExist (getAbsoluteSource t)) then
|
||||
(
|
||||
if not (doesFileExist (getAbsoluteDestination t)) then
|
||||
(
|
||||
makeDir (getFilenamePath (getAbsoluteDestination t)) all:true
|
||||
renameFile (getAbsoluteSource t) (getAbsoluteDestination t)
|
||||
)
|
||||
if (doesFileExist (getAbsoluteDestination t)) then
|
||||
(
|
||||
if (getAbsoluteDestination t) != (getAbsoluteSource t) then
|
||||
(
|
||||
deleteFile (getAbsoluteSource t)
|
||||
)
|
||||
)
|
||||
)
|
||||
return (getAbsoluteDestination t)
|
||||
)
|
||||
|
||||
fn renameTexture t =
|
||||
(
|
||||
try
|
||||
(
|
||||
if (t != undefined) then
|
||||
(
|
||||
if (classof t == NelBitmapTexture) then
|
||||
(
|
||||
if (t.bitmap1FileName != "") then (t.bitmap1FileName = getFixedTexturePath t.bitmap1FileName)
|
||||
if (t.bitmap2FileName != "") then (t.bitmap2FileName = getFixedTexturePath t.bitmap2FileName)
|
||||
if (t.bitmap3FileName != "") then (t.bitmap3FileName = getFixedTexturePath t.bitmap3FileName)
|
||||
if (t.bitmap4FileName != "") then (t.bitmap4FileName = getFixedTexturePath t.bitmap4FileName)
|
||||
if (t.bitmap5FileName != "") then (t.bitmap5FileName = getFixedTexturePath t.bitmap5FileName)
|
||||
if (t.bitmap6FileName != "") then (t.bitmap6FileName = getFixedTexturePath t.bitmap6FileName)
|
||||
if (t.bitmap7FileName != "") then (t.bitmap7FileName = getFixedTexturePath t.bitmap7FileName)
|
||||
if (t.bitmap8FileName != "") then (t.bitmap8FileName = getFixedTexturePath t.bitmap8FileName)
|
||||
renameTexture t.bitmap
|
||||
if (t.bitmap.fileName == undefined) then
|
||||
(
|
||||
if (doesFileExist (mapPaths.getFullFilePath t.bitmap1FileName)) then (t.bitmap.fileName = t.bitmap1FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap2FileName)) then (t.bitmap.fileName = t.bitmap2FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap3FileName)) then (t.bitmap.fileName = t.bitmap3FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap4FileName)) then (t.bitmap.fileName = t.bitmap4FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap5FileName)) then (t.bitmap.fileName = t.bitmap5FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap6FileName)) then (t.bitmap.fileName = t.bitmap6FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap7FileName)) then (t.bitmap.fileName = t.bitmap7FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap8FileName)) then (t.bitmap.fileName = t.bitmap8FileName)
|
||||
)
|
||||
else if not (doesFileExist (mapPaths.getFullFilePath t.bitmap.fileName)) then
|
||||
(
|
||||
if (doesFileExist (mapPaths.getFullFilePath t.bitmap1FileName)) then (t.bitmap.fileName = t.bitmap1FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap2FileName)) then (t.bitmap.fileName = t.bitmap2FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap3FileName)) then (t.bitmap.fileName = t.bitmap3FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap4FileName)) then (t.bitmap.fileName = t.bitmap4FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap5FileName)) then (t.bitmap.fileName = t.bitmap5FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap6FileName)) then (t.bitmap.fileName = t.bitmap6FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap7FileName)) then (t.bitmap.fileName = t.bitmap7FileName)
|
||||
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap8FileName)) then (t.bitmap.fileName = t.bitmap8FileName)
|
||||
)
|
||||
t.delegate.RGBOutput = 0
|
||||
t.delegate.monoOutput = 1
|
||||
t.delegate.alphasource = 2
|
||||
)
|
||||
else if (classof t == Reflect_Refract) then
|
||||
(
|
||||
if (t.bitmapName[1] != undefined) then (t.bitmapName[1] = getFixedTexturePath t.bitmapName[1])
|
||||
if (t.bitmapName[2] != undefined) then (t.bitmapName[2] = getFixedTexturePath t.bitmapName[2])
|
||||
if (t.bitmapName[3] != undefined) then (t.bitmapName[3] = getFixedTexturePath t.bitmapName[3])
|
||||
if (t.bitmapName[4] != undefined) then (t.bitmapName[4] = getFixedTexturePath t.bitmapName[4])
|
||||
if (t.bitmapName[5] != undefined) then (t.bitmapName[5] = getFixedTexturePath t.bitmapName[5])
|
||||
if (t.bitmapName[6] != undefined) then (t.bitmapName[6] = getFixedTexturePath t.bitmapName[6])
|
||||
if (t.outputname != undefined) then (t.outputname = getFixedTexturePath t.outputname)
|
||||
)
|
||||
else
|
||||
(
|
||||
if (t.fileName != undefined) then (t.fileName = getFixedTexturePath t.fileName)
|
||||
if (classof t == BitmapTexture) then
|
||||
(
|
||||
t.RGBOutput = 0
|
||||
t.monoOutput = 1
|
||||
t.alphasource = 2
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
catch
|
||||
(
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
rollout assets_png_rollout "Properties"
|
||||
(
|
||||
fn do_it =
|
||||
(
|
||||
for m in getClassInstances BitmapTexture do
|
||||
(
|
||||
renameTexture m
|
||||
)
|
||||
|
||||
for m in getClassInstances NelBitmapTexture do
|
||||
(
|
||||
renameTexture m
|
||||
)
|
||||
|
||||
for m in getClassInstances NelMaterial do
|
||||
(
|
||||
renameTexture m.tTexture_1
|
||||
renameTexture m.tTexture_2
|
||||
renameTexture m.tTexture_3
|
||||
renameTexture m.tTexture_4
|
||||
renameTexture m.tTexture_5
|
||||
renameTexture m.tTexture_6
|
||||
renameTexture m.tTexture_7
|
||||
renameTexture m.tTexture_8
|
||||
m.delegate.DiffuseMapEnable = m.bEnableSlot_1
|
||||
m.delegate.DiffuseMap = m.tTexture_1
|
||||
m.delegate.AmbientMapEnable = m.bEnableSlot_1
|
||||
m.delegate.AmbientMap = m.tTexture_1
|
||||
m.delegate.SpecularMapEnable = m.bEnableSlot_2
|
||||
m.delegate.SpecularMap = m.tTexture_2
|
||||
m.delegate.SelfIllumMap = undefined
|
||||
m.delegate.OpacityMap = undefined
|
||||
m.delegate.FilterMap = undefined
|
||||
m.delegate.BumpMap = undefined
|
||||
m.delegate.DisplacementMap = undefined
|
||||
m.delegate.ReflectionMap = undefined
|
||||
m.delegate.RefractionMap = undefined
|
||||
)
|
||||
actionMan.executeAction 0 "63508" -- Views: Standard Display with Maps
|
||||
actionMan.executeAction 0 "40021" -- Selection: Select All
|
||||
actionMan.executeAction 0 "311" -- Tools: Zoom Extents All Selected
|
||||
return 1
|
||||
)
|
||||
|
||||
include "nel_batched_mergesave.ms"
|
||||
)
|
||||
|
||||
assets_png_floater = newRolloutFloater "NeL Assets PNG Database" 550 874
|
||||
addrollout assets_png_rollout assets_png_floater rolledUp:false
|
||||
|
@ -0,0 +1,251 @@
|
||||
-- This script is a base script to include to add multiple functionality to your script
|
||||
|
||||
-- To use this script
|
||||
-- Include it in your script into the rollout at the begining.
|
||||
-- Implement a do_it function to do the job in your rollout.
|
||||
-- The function should retun -1 if an arror occured, else the count of modification done
|
||||
-- It the function returns <1, the project will not be overwritten
|
||||
|
||||
Group "Running properties"
|
||||
(
|
||||
RadioButtons SourceFiles "Source projects" labels:#("Current project", "All Projects in a folder") align:#left
|
||||
|
||||
Label DirectoryLabel "Source directory" align:#left
|
||||
EditText Directory "" width:500 align:#left enabled:false
|
||||
Button BrowseDirectory "Browse..." align:#left enabled:false
|
||||
|
||||
CheckBox Recurse "Look in subfolders" checked:false enabled:false
|
||||
CheckBox Test "Test only, do not save" checked:true enabled:false
|
||||
CheckBox BackupFiles "Backup files" checked:true enabled:false
|
||||
CheckBox StopOnError "Stop on error" checked:true enabled:false
|
||||
|
||||
Label ProgressText width:500 align:#left
|
||||
ProgressBar Progress width:500 align:#left
|
||||
|
||||
Button GoButton "Go" width:500 align:#left
|
||||
)
|
||||
local countModifications
|
||||
local countErrors
|
||||
local fileModified
|
||||
local fileParsed
|
||||
|
||||
fn UpdateData =
|
||||
(
|
||||
if SourceFiles.state == 2 then
|
||||
isSourceDir = true
|
||||
else
|
||||
isSourceDir = false
|
||||
if Test.checked == true then
|
||||
isTest = true
|
||||
else
|
||||
isTest = false
|
||||
|
||||
Directory.enabled = isSourceDir
|
||||
BrowseDirectory.enabled = isSourceDir
|
||||
Recurse.enabled = isSourceDir
|
||||
Test.enabled = isSourceDir
|
||||
BackupFiles.enabled = isSourceDir and (isTest == false)
|
||||
StopOnError.enabled = isSourceDir
|
||||
)
|
||||
|
||||
on SourceFiles changed state do
|
||||
(
|
||||
UpdateData ()
|
||||
)
|
||||
|
||||
on Test changed state do
|
||||
(
|
||||
UpdateData ()
|
||||
)
|
||||
|
||||
fn call_do_it =
|
||||
(
|
||||
local result
|
||||
|
||||
-- One more project
|
||||
fileParsed = fileParsed + 1
|
||||
|
||||
-- Call it
|
||||
result = do_it ()
|
||||
|
||||
-- Error ?
|
||||
if result < 0 then
|
||||
countErrors = countErrors + 1
|
||||
else
|
||||
countModifications = countModifications + result
|
||||
|
||||
-- Return result
|
||||
return result
|
||||
)
|
||||
|
||||
fn BackupFile file =
|
||||
(
|
||||
local i
|
||||
local newFilename
|
||||
|
||||
i = 0
|
||||
while true do
|
||||
(
|
||||
-- New file name
|
||||
newFilename = file + ".backup_" + (i as string)
|
||||
|
||||
-- File exist ?
|
||||
if (fileExist newFilename) == false then
|
||||
(
|
||||
if (copyFile file newFilename) == false then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
)
|
||||
i = i + 1
|
||||
)
|
||||
)
|
||||
|
||||
fn RecurseFolder currentDirectory =
|
||||
(
|
||||
local result
|
||||
local file
|
||||
local files
|
||||
|
||||
-- Parse files
|
||||
files = getFiles (currentDirectory+"/*.max")
|
||||
|
||||
-- For each files
|
||||
for i = 1 to files.count do
|
||||
(
|
||||
-- File name
|
||||
file = files[i]
|
||||
|
||||
-- Progress bar
|
||||
ProgressText.text = "In directory "+currentDirectory+", compute file \"" + (getFilenameFile file) + "\""
|
||||
Progress.value = i*100/files.count
|
||||
|
||||
resetMAXFile #noprompt
|
||||
|
||||
-- Open the max project
|
||||
if mergeMaxFile file quiet:true == true then
|
||||
(
|
||||
result = call_do_it ()
|
||||
|
||||
-- Error ?
|
||||
if result < 0 then
|
||||
(
|
||||
if StopOnError.checked == true then
|
||||
Messagebox ("Error in file " + file)
|
||||
)
|
||||
else
|
||||
(
|
||||
-- Save the max project ?
|
||||
if (Test.checked == false) and (result != 0) then
|
||||
(
|
||||
-- Backup the max project ?
|
||||
local ok
|
||||
ok = true
|
||||
if BackupFiles.checked == true then
|
||||
(
|
||||
-- Backup the file
|
||||
if (BackupFile file) == false then
|
||||
(
|
||||
-- Don't save the file because backup has failed
|
||||
ok = false
|
||||
|
||||
if StopOnError.checked == true then
|
||||
Messagebox ("Can't backup file " + file)
|
||||
|
||||
-- One more error
|
||||
countErrors = countErrors + 1
|
||||
)
|
||||
)
|
||||
|
||||
-- Save the max project ?
|
||||
if ok == true then
|
||||
(
|
||||
if (saveMaxFile file) == true then
|
||||
(
|
||||
fileModified = fileModified + 1
|
||||
)
|
||||
else
|
||||
(
|
||||
if StopOnError.checked == true then
|
||||
Messagebox ("Can't write file " + file)
|
||||
|
||||
-- One more error
|
||||
countErrors = countErrors + 1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
else
|
||||
(
|
||||
if StopOnError.checked == true then
|
||||
Messagebox ("Can't load file " + file)
|
||||
|
||||
-- One more error
|
||||
countErrors = countErrors + 1
|
||||
)
|
||||
)
|
||||
|
||||
-- Parse sub directory ?
|
||||
if (Recurse.checked == true) then
|
||||
(
|
||||
local directories
|
||||
|
||||
-- Get the directories
|
||||
directories = getDirectories (currentDirectory+"/*")
|
||||
|
||||
-- For each directories
|
||||
for dir in directories do
|
||||
(
|
||||
RecurseFolder dir
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
on BrowseDirectory pressed do
|
||||
(
|
||||
local dir
|
||||
try
|
||||
(
|
||||
dir = getSavePath () -- caption:"Select the projects directory"
|
||||
if dir != undefined then
|
||||
Directory.text = dir
|
||||
)
|
||||
catch
|
||||
(
|
||||
)
|
||||
)
|
||||
|
||||
on GoButton pressed do
|
||||
(
|
||||
-- Reset count
|
||||
countModifications = 0
|
||||
countErrors = 0
|
||||
fileModified = 0
|
||||
fileParsed = 0
|
||||
|
||||
-- Get files in the shape_source_directory
|
||||
if SourceFiles.state == 2 then
|
||||
(
|
||||
-- Should warning user ?
|
||||
if (SourceFiles.state == 2) and (Test.checked == false) then
|
||||
(
|
||||
-- Warning !
|
||||
if ((queryBox "Warning, all the files in the specified folders will be overwrited.\nYou should backup your files before executing this script.\nDo you want to continue executing this script ?" beep:true) == true) then
|
||||
RecurseFolder (adjustPathStringForScript Directory.text)
|
||||
)
|
||||
else
|
||||
(
|
||||
RecurseFolder (adjustPathStringForScript Directory.text)
|
||||
)
|
||||
)
|
||||
else
|
||||
(
|
||||
-- Just compute the current project
|
||||
call_do_it ()
|
||||
)
|
||||
|
||||
-- Show errors
|
||||
ProgressText.text = (fileParsed as string) + " project(s) opened, " + (countModifications as string) + " project modification(s), " + (fileModified as string) + " project(s) saved, " + (countErrors as string) + " error(s)."
|
||||
Progress.value = 100
|
||||
)
|
@ -0,0 +1,169 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Run all setup processes
|
||||
# \date 2009-02-18 15:28GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all setup processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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 tools import *
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Setup build site")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
printLog(log, "This script will set up the buildsite configuration, and create needed directories.")
|
||||
printLog(log, "To use the defaults, simply hit ENTER, else type in the new value.")
|
||||
printLog(log, "Use -- if you need to insert an empty value.")
|
||||
printLog(log, "")
|
||||
BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality)))
|
||||
ToolDirectories[0] = askVar(log, "Primary Tool Directory", ToolDirectories[0]).replace("\\", "/")
|
||||
ToolDirectories[1] = askVar(log, "Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/")
|
||||
ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix)
|
||||
ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/")
|
||||
WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/")
|
||||
DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/")
|
||||
ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/")
|
||||
ClientDataDirectory = askVar(log, "Client Data Directory", ClientDataDirectory).replace("\\", "/")
|
||||
LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/")
|
||||
LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/")
|
||||
LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/")
|
||||
MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable)))
|
||||
if MaxAvailable:
|
||||
MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/")
|
||||
MaxUserDirectory = askVar(log, "3dsMax User Directory", MaxUserDirectory).replace("\\", "/")
|
||||
MaxExecutable = askVar(log, "3dsMax Executable", MaxExecutable)
|
||||
if os.path.isfile("configuration/buildsite.py"):
|
||||
os.remove("configuration/buildsite.py")
|
||||
sf = open("configuration/buildsite.py", "w")
|
||||
sf.write("#!/usr/bin/python\n")
|
||||
sf.write("# \n")
|
||||
sf.write("# \\file site.py\n")
|
||||
sf.write("# \\brief Site configuration\n")
|
||||
sf.write("# \\date " + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "\n")
|
||||
sf.write("# \\author Jan Boon (Kaetemi)\n")
|
||||
sf.write("# Python port of game data build pipeline.\n")
|
||||
sf.write("# Site configuration.\n")
|
||||
sf.write("# \n")
|
||||
sf.write("# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>\n")
|
||||
sf.write("# Copyright (C) 2010 Winch Gate Property Limited\n")
|
||||
sf.write("# \n")
|
||||
sf.write("# This program is free software: you can redistribute it and/or modify\n")
|
||||
sf.write("# it under the terms of the GNU Affero General Public License as\n")
|
||||
sf.write("# published by the Free Software Foundation, either version 3 of the\n")
|
||||
sf.write("# License, or (at your option) any later version.\n")
|
||||
sf.write("# \n")
|
||||
sf.write("# This program is distributed in the hope that it will be useful,\n")
|
||||
sf.write("# but WITHOUT ANY WARRANTY; without even the implied warranty of\n")
|
||||
sf.write("# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n")
|
||||
sf.write("# GNU Affero General Public License for more details.\n")
|
||||
sf.write("# \n")
|
||||
sf.write("# You should have received a copy of the GNU Affero General Public License\n")
|
||||
sf.write("# along with this program. If not, see <http://www.gnu.org/licenses/>.\n")
|
||||
sf.write("# \n")
|
||||
sf.write("\n")
|
||||
sf.write("\n")
|
||||
sf.write("# *** SITE INSTALLATION ***\n")
|
||||
sf.write("\n")
|
||||
sf.write("# Use '/' in path name, not '\'\n")
|
||||
sf.write("# Don't put '/' at the end of a directory name\n")
|
||||
sf.write("\n")
|
||||
sf.write("\n")
|
||||
sf.write("# Quality option for this site (1 for BEST, 0 for DRAFT)\n")
|
||||
sf.write("BuildQuality = " + str(BuildQuality) + "\n")
|
||||
sf.write("\n")
|
||||
sf.write("ToolDirectories = " + str(ToolDirectories) + "\n")
|
||||
sf.write("ToolSuffix = \"" + str(ToolSuffix) + "\"\n")
|
||||
sf.write("\n")
|
||||
sf.write("# Build script directory\n")
|
||||
sf.write("ScriptDirectory = \"" + str(ScriptDirectory) + "\"\n")
|
||||
sf.write("WorkspaceDirectory = \"" + str(WorkspaceDirectory) + "\"\n")
|
||||
sf.write("\n")
|
||||
sf.write("# Data build directories\n")
|
||||
sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n")
|
||||
sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n")
|
||||
sf.write("\n")
|
||||
sf.write("# Client data install directory (client/data)\n")
|
||||
sf.write("ClientDataDirectory = \"" + str(ClientDataDirectory) + "\"\n")
|
||||
sf.write("\n")
|
||||
sf.write("# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)\n")
|
||||
sf.write("\n")
|
||||
sf.write("# Leveldesign directories\n")
|
||||
sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n")
|
||||
sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n")
|
||||
sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n")
|
||||
sf.write("\n")
|
||||
sf.write("# 3dsMax directives\n")
|
||||
sf.write("MaxAvailable = " + str(MaxAvailable) + "\n")
|
||||
sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n")
|
||||
sf.write("MaxUserDirectory = \"" + str(MaxUserDirectory) + "\"\n")
|
||||
sf.write("MaxExecutable = \"" + str(MaxExecutable) + "\"\n")
|
||||
sf.write("\n")
|
||||
sf.write("\n")
|
||||
sf.write("# end of file\n")
|
||||
sf.close()
|
||||
|
||||
sys.path.append(WorkspaceDirectory)
|
||||
from projects import *
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the setup projects")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
mkPath(log, "configuration/project")
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
# For each project
|
||||
for projectName in ProjectsToProcess:
|
||||
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
|
||||
os.chdir("processes")
|
||||
try:
|
||||
subprocess.call([ "python", "0_setup.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
projectLog = open("processes/log.log", "r")
|
||||
projectLogData = projectLog.read()
|
||||
projectLog.close()
|
||||
log.write(projectLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
|
||||
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("0_setup.log"):
|
||||
os.remove("0_setup.log")
|
||||
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_setup.log")
|
||||
shutil.move("log.log", "0_setup.log")
|
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Run all export processes
|
||||
# \date 2009-02-18 09:22GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all export processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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 tools import *
|
||||
|
||||
sys.path.append(WorkspaceDirectory)
|
||||
from projects import *
|
||||
|
||||
# Log error
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the export processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
mkPath(log, "configuration/project")
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
# For each project
|
||||
for projectName in ProjectsToProcess:
|
||||
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
|
||||
os.chdir("processes")
|
||||
try:
|
||||
subprocess.call([ "python", "1_export.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
projectLog = open("processes/log.log", "r")
|
||||
projectLogData = projectLog.read()
|
||||
projectLog.close()
|
||||
log.write(projectLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
|
||||
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("1_export.log"):
|
||||
os.remove("1_export.log")
|
||||
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_export.log")
|
||||
shutil.move("log.log", "1_export.log")
|
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Run all build processes
|
||||
# \date 2009-02-18 09:22GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all build processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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 tools import *
|
||||
|
||||
sys.path.append(WorkspaceDirectory)
|
||||
from projects import *
|
||||
|
||||
# Log error
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the build processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
mkPath(log, "configuration/project")
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
# For each project
|
||||
for projectName in ProjectsToProcess:
|
||||
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
|
||||
os.chdir("processes")
|
||||
try:
|
||||
subprocess.call([ "python", "2_build.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
projectLog = open("processes/log.log", "r")
|
||||
projectLogData = projectLog.read()
|
||||
projectLog.close()
|
||||
log.write(projectLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
|
||||
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("2_build.log"):
|
||||
os.remove("2_build.log")
|
||||
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_build.log")
|
||||
shutil.move("log.log", "2_build.log")
|
@ -0,0 +1,72 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Run all install processes
|
||||
# \date 2009-02-18 16:19GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all install processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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 tools import *
|
||||
|
||||
sys.path.append(WorkspaceDirectory)
|
||||
from projects import *
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the install processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
mkPath(log, "configuration/project")
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
# For each project
|
||||
for projectName in ProjectsToProcess:
|
||||
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
|
||||
os.chdir("processes")
|
||||
try:
|
||||
subprocess.call([ "python", "3_install.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
projectLog = open("processes/log.log", "r")
|
||||
projectLogData = projectLog.read()
|
||||
projectLog.close()
|
||||
log.write(projectLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + projectName + "> " + str(e))
|
||||
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
|
||||
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
|
||||
removeFilesRecursive(log, "configuration/project")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
if os.path.isfile("3_install.log"):
|
||||
os.remove("3_install.log")
|
||||
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_install.log")
|
||||
shutil.move("log.log", "3_install.log")
|
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file site.py
|
||||
# \brief Site configuration
|
||||
# \date 2010-06-04-21-25-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Site configuration.
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
|
||||
# *** SITE INSTALLATION ***
|
||||
|
||||
# Use '/' in path name, not ''
|
||||
# Don't put '/' at the end of a directory name
|
||||
|
||||
|
||||
# Quality option for this site (1 for BEST, 0 for DRAFT)
|
||||
BuildQuality = 1
|
||||
|
||||
ToolDirectories = ['R:/code/nel', 'R:/code/ryzom/tools']
|
||||
ToolSuffix = "_r.exe"
|
||||
|
||||
# Build script directory
|
||||
ScriptDirectory = "W:/build_gamedata"
|
||||
WorkspaceDirectory = "R:/code/ryzom/tools/build_gamedata/workspace"
|
||||
|
||||
# Data build directories
|
||||
DatabaseDirectory = "W:/database"
|
||||
ExportBuildDirectory = "W:/export"
|
||||
|
||||
# Client data install directory (client/data)
|
||||
ClientDataDirectory = "S:/ryzom_client_open/user"
|
||||
|
||||
# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)
|
||||
|
||||
# Leveldesign directories
|
||||
LeveldesignDirectory = "L:/leveldesign"
|
||||
LeveldesignDfnDirectory = "L:/leveldesign/dfn"
|
||||
LeveldesignWorldDirectory = "L:/leveldesign/world"
|
||||
|
||||
# 3dsMax directives
|
||||
MaxAvailable = 1
|
||||
MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010"
|
||||
MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu"
|
||||
MaxExecutable = "3dsmax.exe"
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,232 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file export.py
|
||||
# \brief Useful scripts
|
||||
# \date 2009-02-18 09:22GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Useful scripts
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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
|
||||
|
||||
def printLog(log, text):
|
||||
log.write(text + "\n")
|
||||
print text
|
||||
|
||||
def mkPath(log, path):
|
||||
printLog(log, "DIR " + path)
|
||||
distutils.dir_util.mkpath(path)
|
||||
|
||||
def needUpdate(log, source, dest):
|
||||
if (os.path.isfile(source)):
|
||||
if (os.path.isfile(dest)):
|
||||
if (os.stat(source).st_mtime > os.stat(dest).st_mtime):
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
return 1
|
||||
printLog(log, "needUpdate: source doest not exist?! " + source)
|
||||
return 0
|
||||
|
||||
def needUpdateRemoveDest(log, source, dest):
|
||||
if (os.path.isfile(source)):
|
||||
if (os.path.isfile(dest)):
|
||||
if (os.stat(source).st_mtime > os.stat(dest).st_mtime):
|
||||
os.remove(dest)
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
return 1
|
||||
printLog(log, "needUpdate: source doest not exist?! " + source)
|
||||
return 0
|
||||
|
||||
def needUpdateLogRemoveDest(log, source, dest):
|
||||
if (os.path.isfile(source)):
|
||||
if (os.path.isfile(dest)):
|
||||
if (os.stat(source).st_mtime > os.stat(dest).st_mtime):
|
||||
os.remove(dest)
|
||||
printLog(log, source + " -> " + dest)
|
||||
return 1
|
||||
else:
|
||||
printLog(log, "SKIP " + dest)
|
||||
return 0
|
||||
printLog(log, source + " -> " + dest)
|
||||
return 1
|
||||
printLog(log, "needUpdate: source doest not exist?! " + source)
|
||||
printLog(log, "SKIP " + dest)
|
||||
return 0
|
||||
|
||||
def copyFileList(log, dir_source, dir_target, files):
|
||||
for fileName in files:
|
||||
if fileName != ".svn":
|
||||
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
|
||||
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
|
||||
|
||||
def copyFileListNoTree(log, dir_source, dir_target, files):
|
||||
for fileName in files:
|
||||
if fileName != ".svn":
|
||||
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
|
||||
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName))
|
||||
|
||||
def copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files):
|
||||
for fileName in files:
|
||||
if fileName != ".svn" and fileName != "*.*":
|
||||
srcFile = dir_source + "/" + fileName
|
||||
destFile = dir_target + "/" + os.path.basename(fileName)
|
||||
if needUpdateLogRemoveDest(log, srcFile, destFile):
|
||||
shutil.copy(srcFile, destFile)
|
||||
|
||||
def removeFilesRecursive(log, dir_files):
|
||||
files = os.listdir(dir_files)
|
||||
for fileName in files:
|
||||
if (fileName != ".svn"):
|
||||
if os.path.isdir(dir_files + "/" + fileName):
|
||||
removeFilesRecursive(log, dir_files + "/" + fileName)
|
||||
else:
|
||||
printLog(log, "RM " + dir_files + "/" + fileName)
|
||||
os.remove(dir_files + "/" + fileName)
|
||||
|
||||
def copyFilesRecursive(log, dir_source, dir_target):
|
||||
files = os.listdir(dir_source)
|
||||
mkPath(log, dir_target)
|
||||
for fileName in files:
|
||||
if (fileName != ".svn"):
|
||||
if os.path.isdir(dir_source + "/" + fileName):
|
||||
copyFilesRecursive(log, dir_source + "/" + fileName, dir_target + "/" + fileName)
|
||||
else:
|
||||
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
|
||||
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
|
||||
|
||||
def copyFiles(log, dir_source, dir_target):
|
||||
copyFileList(log, dir_source, dir_target, os.listdir(dir_source))
|
||||
|
||||
def copyFilesExt(log, dir_source, dir_target, file_ext):
|
||||
files = os.listdir(dir_source)
|
||||
len_file_ext = len(file_ext)
|
||||
for fileName in files:
|
||||
if (fileName != ".svn") and (fileName[-len_file_ext:].lower() == file_ext.lower()):
|
||||
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
|
||||
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
|
||||
|
||||
def copyFilesExtNoTree(log, dir_source, dir_target, file_ext):
|
||||
files = findFiles(log, dir_source, "", file_ext)
|
||||
copyFileListNoTree(log, dir_source, dir_target, files)
|
||||
|
||||
def copyFilesExtNoTreeIfNeeded(log, dir_source, dir_target, file_ext):
|
||||
files = findFiles(log, dir_source, "", file_ext)
|
||||
copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files)
|
||||
|
||||
def copyFilesNoTreeIfNeeded(log, dir_source, dir_target):
|
||||
copyFileListNoTreeIfNeeded(log, dir_source, dir_target, os.listdir(dir_source))
|
||||
|
||||
def copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext):
|
||||
for fileName in files:
|
||||
if fileName != ".svn" and fileName != "*.*":
|
||||
srcFile = dir_source + "/" + fileName
|
||||
destFile = dir_target + "/" + os.path.basename(fileName)[0:-len(file_ext)] + target_ext
|
||||
if needUpdateLogRemoveDest(log, srcFile, destFile):
|
||||
shutil.copy(srcFile, destFile)
|
||||
|
||||
def copyFilesExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, file_ext, target_ext):
|
||||
files = findFiles(log, dir_source, "", file_ext)
|
||||
copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext)
|
||||
|
||||
def copyFileIfNeeded(log, srcFile, destFile):
|
||||
if needUpdateLogRemoveDest(log, srcFile, destFile):
|
||||
shutil.copy(srcFile, destFile)
|
||||
|
||||
def moveFileListNoTree(log, dir_source, dir_target, files):
|
||||
for fileName in files:
|
||||
if fileName != ".svn":
|
||||
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
|
||||
shutil.move(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName))
|
||||
|
||||
def moveFilesExtNoTree(log, dir_source, dir_target, file_ext):
|
||||
files = findFiles(log, dir_source, "", file_ext)
|
||||
moveFileListNoTree(log, dir_source, dir_target, files)
|
||||
|
||||
def findFiles(log, dir_where, dir_sub, file_ext):
|
||||
result = [ ]
|
||||
files = os.listdir(dir_where + "/" + dir_sub)
|
||||
len_file_ext = len(file_ext)
|
||||
for fileName in files:
|
||||
if fileName != ".svn" and fileName != "*.*":
|
||||
filePath = dir_sub + fileName
|
||||
fileFull = dir_where + "/" + dir_sub + fileName
|
||||
if os.path.isfile(fileFull):
|
||||
if fileName[-len_file_ext:].lower() == file_ext.lower():
|
||||
result += [ filePath ]
|
||||
elif os.path.isdir(fileFull):
|
||||
result += findFiles(log, dir_where, filePath + "/", file_ext)
|
||||
else:
|
||||
printLog(log, "findFiles: file not dir or file?!" + filePath)
|
||||
return result
|
||||
|
||||
def findFile(log, dir_where, file_name):
|
||||
files = os.listdir(dir_where)
|
||||
for fileName in files:
|
||||
if fileName != ".svn" and fileName != "*.*":
|
||||
filePath = dir_where + "/" + fileName
|
||||
if os.path.isfile(filePath):
|
||||
if fileName == file_name:
|
||||
return filePath
|
||||
elif os.path.isdir(filePath):
|
||||
result = findFile(log, filePath, file_name)
|
||||
if result != "":
|
||||
return result
|
||||
else:
|
||||
printLog(log, "findFile: file not dir or file?! " + filePath)
|
||||
return ""
|
||||
|
||||
def findTool(log, dirs_where, file_name, suffix):
|
||||
try:
|
||||
for dir in dirs_where:
|
||||
tool = findFile(log, dir, file_name + suffix)
|
||||
if tool != "":
|
||||
printLog(log, "TOOL " + tool)
|
||||
return tool
|
||||
except Exception, e:
|
||||
printLog(log, "EXCEPTION " + str(e))
|
||||
printLog(log, "TOOL NOT FOUND " + file_name + suffix)
|
||||
return ""
|
||||
|
||||
def findMax(log, dir, file):
|
||||
tool = dir + "/" + file
|
||||
if os.path.isfile(tool):
|
||||
printLog(log, "3DSMAX " + tool)
|
||||
return tool
|
||||
printLog(log, "3DSMAX NOT FOUND " + file)
|
||||
return ""
|
||||
|
||||
def toolLogFail(log, tool, suffix):
|
||||
printLog(log, "FAIL " + tool + suffix + " is not found")
|
||||
|
||||
def askVar(log, name, default):
|
||||
sys.stdout.write(name + " (" + default + "): ")
|
||||
line = sys.stdin.readline()
|
||||
linestrip = line.strip()
|
||||
if linestrip == "--":
|
||||
log.write(name + " (" + default + "): ''\n")
|
||||
return ""
|
||||
elif linestrip == "":
|
||||
log.write(name + " (" + default + "): '" + default + "'\n")
|
||||
return default
|
||||
else:
|
||||
log.write(name + " (" + default + "): '" + linestrip + "'\n")
|
||||
return linestrip
|
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file process.py
|
||||
# \brief Tools configuration
|
||||
# \date 2009-03-10 11:33GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Tools configuration.
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
# *** PROCESS TIMEOUT ***
|
||||
SkelExportTimeout = 600000
|
||||
SwtExportTimeout = 600000
|
||||
ShapeExportTimeout = 3600000
|
||||
ZoneExportTimeout = 1800000
|
||||
ZoneBuildDependTimeout = 1800000
|
||||
ZoneBuildWeldTimeout = 60000
|
||||
ZoneLightBuildTimeout = 600000
|
||||
ZoneIgLightBuildTimeout = 600000
|
||||
SmallbankBuildTimeout = 60000
|
||||
FarbankBuildTimeout = 180000
|
||||
AnimExportTimeout = 1800000
|
||||
IgExportTimeout = 600000
|
||||
MapsBuildTimeout = 10000
|
||||
CmbExportTimeout = 60000
|
||||
RbankBuildTesselTimeout = 6000000
|
||||
RbankBuildSmoothTimeout = 6000000
|
||||
RbankBuildProclocalTimeout = 6000000
|
||||
RbankBuildProcglobalTimeout = 18000000
|
||||
RbankBuildIndoorTimeout = 18000000
|
||||
# WmapBuildTimeout = 60000
|
||||
LigoExportTimeout = 3600000
|
||||
LigoBuildTimeout = 1800000
|
||||
PacsPrimExportTimeout = 600000
|
||||
|
||||
# *** TOOLS CONFIGURATION ***
|
||||
|
||||
TgaToDdsTool = "tga2dds"
|
||||
BuildInterfaceTool = "build_interface"
|
||||
ExecTimeoutTool = "exec_timeout"
|
||||
BuildSmallbankTool = "build_smallbank"
|
||||
BuildFarbankTool = "build_far_bank"
|
||||
ZoneDependenciesTool = "zone_dependencies"
|
||||
ZoneWelderTool = "zone_welder"
|
||||
BuildRbankTool = "build_rbank"
|
||||
BuildIndoorRbankTool = "build_indoor_rbank"
|
||||
BuildIgBoxesTool = "build_ig_boxes"
|
||||
AiBuildWmapTool = "ai_build_wmap"
|
||||
GetNeighborsTool = "get_neighbors"
|
||||
ZoneLighterTool = "zone_lighter"
|
||||
ZoneIgLighterTool = "zone_ig_lighter"
|
||||
IgLighterTool = "ig_lighter"
|
||||
AnimBuilderTool = "anim_builder"
|
||||
TileEditTool = "tile_edit"
|
||||
BuildImagesetTool = "th_build_imageset"
|
||||
MakeSheetIdTool = "make_sheet_id"
|
||||
BuildSheetsTool = "th_build_sheets"
|
||||
BuildSoundTool = "th_build_sound"
|
||||
BuildCoarseMeshTool = "build_coarse_mesh"
|
||||
LightmapOptimizerTool = "lightmap_optimizer"
|
||||
BuildClodtexTool = "build_clodtex"
|
||||
BuildShadowSkinTool = "build_shadow_skin"
|
||||
PanoplyMakerTool = "panoply_maker"
|
||||
HlsBankMakerTool = "hls_bank_maker"
|
||||
LandExportTool = "land_export"
|
@ -0,0 +1,80 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Run all setup processes
|
||||
# \date 2009-02-18 15:28GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all setup processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../configuration/project")
|
||||
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 project")
|
||||
#printLog(log, "-------")
|
||||
#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
#printLog(log, "")
|
||||
|
||||
#printLog(log, "")
|
||||
#printLog(log, "-------")
|
||||
#printLog(log, "--- Setup client directories")
|
||||
#printLog(log, "-------")
|
||||
#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
#printLog(log, "")
|
||||
#for dir in ClientSetupDirectories:
|
||||
# mkPath(log, ClientDataDirectory + "/" + dir)
|
||||
#printLog(log, "")
|
||||
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the setup processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
# For each process
|
||||
for processName in ProcessToComplete:
|
||||
os.chdir(processName)
|
||||
try:
|
||||
subprocess.call([ "python", "0_setup.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
processLog = open(processName + "/log.log", "r")
|
||||
processLogData = processLog.read()
|
||||
processLog.close()
|
||||
log.write(processLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
# subprocess.call("idle.bat")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
@ -0,0 +1,64 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Run all export processes
|
||||
# \date 2009-02-18 09:22GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all export processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../configuration/project")
|
||||
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 *
|
||||
|
||||
# Log error
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the export processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
# For each process
|
||||
for processName in ProcessToComplete:
|
||||
os.chdir(processName)
|
||||
try:
|
||||
subprocess.call([ "python", "1_export.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
processLog = open(processName + "/log.log", "r")
|
||||
processLogData = processLog.read()
|
||||
processLog.close()
|
||||
log.write(processLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
# subprocess.call("idle.bat")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
@ -0,0 +1,64 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Run all build processes
|
||||
# \date 2009-02-18 09:22GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all build processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../configuration/project")
|
||||
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 *
|
||||
|
||||
# Log error
|
||||
printLog(log, "")
|
||||
printLog(log, "-------")
|
||||
printLog(log, "--- Run the build processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
# For each process
|
||||
for processName in ProcessToComplete:
|
||||
os.chdir(processName)
|
||||
try:
|
||||
subprocess.call([ "python", "2_build.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
processLog = open(processName + "/log.log", "r")
|
||||
processLogData = processLog.read()
|
||||
processLog.close()
|
||||
log.write(processLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
# subprocess.call("idle.bat")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
@ -0,0 +1,63 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Run all install processes
|
||||
# \date 2009-02-18 16:19GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Run all install processes
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../configuration/project")
|
||||
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, "--- Run the install processes")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
# For each process
|
||||
for processName in ProcessToComplete:
|
||||
os.chdir(processName)
|
||||
try:
|
||||
subprocess.call([ "python", "3_install.py" ])
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
os.chdir("..")
|
||||
try:
|
||||
processLog = open(processName + "/log.log", "r")
|
||||
processLogData = processLog.read()
|
||||
processLog.close()
|
||||
log.write(processLogData)
|
||||
except Exception, e:
|
||||
printLog(log, "<" + processName + "> " + str(e))
|
||||
# subprocess.call("idle.bat")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
@ -0,0 +1,66 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Setup anim
|
||||
# \date 2009-03-10 14:56GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Setup anim
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 anim")
|
||||
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 <<<")
|
||||
for dir in AnimSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory)
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + AnimClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,63 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export anim
|
||||
# \date 2009-03-10 13:13GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Export anim
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 anim")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
Max = findMax(log, MaxDirectory, MaxExecutable)
|
||||
printLog(log, "")
|
||||
|
||||
# For each anim directory
|
||||
printLog(log, ">>> Export anim 3dsmax <<<")
|
||||
printLog(log, "********************************")
|
||||
printLog(log, "******** TODO ********")
|
||||
printLog(log, "********************************")
|
||||
mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory)
|
||||
for dir in AnimSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build anim
|
||||
# \date 2009-03-10 13:13GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Build anim
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 anim")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
AnimBuilder = findTool(log, ToolDirectories, AnimBuilderTool, ToolSuffix)
|
||||
printLog(log, "")
|
||||
|
||||
# For each anim directory
|
||||
printLog(log, ">>> Build anim <<<")
|
||||
if AnimBuilder == "":
|
||||
toolLogFail(log, AnimBuilderTool, ToolSuffix)
|
||||
else:
|
||||
srcDir = ExportBuildDirectory + "/" + AnimExportDirectory
|
||||
mkPath(log, srcDir)
|
||||
destDir = ExportBuildDirectory + "/" + AnimBuildDirectory
|
||||
mkPath(log, destDir)
|
||||
subprocess.call([ AnimBuilder, srcDir, destDir, ScriptDirectory + "/configuration/zone_lighter_properties.cfg" ])
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Install anim
|
||||
# \date 2009-03-10 13:13GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Install anim
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 anim")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, ">>> Install anim <<<")
|
||||
srcDir = ExportBuildDirectory + "/" + AnimBuildDirectory
|
||||
mkPath(log, srcDir)
|
||||
destDir = ClientDataDirectory + "/" + AnimClientDirectory
|
||||
mkPath(log, destDir)
|
||||
copyFilesNoTreeIfNeeded(log, srcDir, destDir)
|
||||
|
||||
printLog(log, "")
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Setup cegui
|
||||
# \date 2009-03-14-17-46-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Setup cegui
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 cegui")
|
||||
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 <<<")
|
||||
for dir in CeguiImagesetSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetExportDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory)
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + CeguiImagesetClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export cegui
|
||||
# \date 2009-03-14-17-46-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Export cegui
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 cegui")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# For each cegui imageset directory
|
||||
printLog(log, ">>> Export cegui imagesets <<<")
|
||||
destDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory
|
||||
mkPath(log, destDir)
|
||||
for dir in CeguiImagesetSourceDirectories:
|
||||
srcDir = DatabaseDirectory + "/" + dir
|
||||
mkPath(log, srcDir)
|
||||
imagesets = findFiles(log, srcDir, "", ".imageset")
|
||||
if (len(imagesets) != 1):
|
||||
printLog(log, "FAIL Cannot find *.imageset, folder must contain at least one and only one imageset xml file")
|
||||
else:
|
||||
niouname = dir.replace("/", "_")
|
||||
newpath = destDir + "/" + niouname
|
||||
mkPath(log, newpath)
|
||||
copyFileIfNeeded(log, srcDir + "/" + imagesets[0], newpath + ".imageset")
|
||||
copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".tga")
|
||||
copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".png")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build cegui
|
||||
# \date 2009-03-14-17-46-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Build cegui
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 cegui")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
BuildImageset = findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix)
|
||||
printLog(log, "")
|
||||
|
||||
# For each cegui imageset directory
|
||||
printLog(log, ">>> Build cegui imagesets <<<")
|
||||
if BuildImageset == "":
|
||||
toolLogFail(log, BuildImagesetTool, ToolSuffix)
|
||||
else:
|
||||
srcDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory
|
||||
mkPath(log, srcDir)
|
||||
destDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory
|
||||
mkPath(log, destDir)
|
||||
for dir in os.listdir(srcDir):
|
||||
if (os.path.isdir(srcDir + "/" + dir)) and dir != ".svn" and dir != "*.*":
|
||||
mkPath(log, srcDir + "/" + dir)
|
||||
subprocess.call([ BuildImageset, destDir + "/" + dir + ".tga", srcDir + "/" + dir ])
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Install cegui
|
||||
# \date 2009-03-14-17-46-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Install cegui
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 cegui")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, ">>> Install cegui imagesets <<<")
|
||||
srcDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory
|
||||
mkPath(log, srcDir)
|
||||
destDir = ClientDataDirectory + "/" + CeguiImagesetClientDirectory
|
||||
mkPath(log, destDir)
|
||||
copyFilesNoTreeIfNeeded(log, srcDir, destDir)
|
||||
|
||||
printLog(log, "")
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,269 @@
|
||||
-- Some globals
|
||||
|
||||
NEL3D_APPDATA_DONOTEXPORT = 1423062565 -- do not export me : "undefined" = export me
|
||||
-- "0" = export me
|
||||
-- "1" = DONT export me
|
||||
NEL3D_APPDATA_CHARACTER_LOD = 1423062618 -- "1": I am a character lod if "1". "0" or undefined: I am not.
|
||||
|
||||
|
||||
-- Allocate 20 Me for the script
|
||||
heapSize += 15000000
|
||||
|
||||
nlErrorFilename = "output_logfile"
|
||||
nlErrorStream = openFile nlErrorFilename mode:"a"
|
||||
if nlErrorStream == undefined then
|
||||
nlErrorStream = createFile nlErrorFilename
|
||||
|
||||
-- Unhide category
|
||||
fn unhidecategory =
|
||||
(
|
||||
if (geometry.count > 0) then
|
||||
(
|
||||
unhide geometry[1]
|
||||
if (geometry[1].ishidden == true) then
|
||||
max hide object toggle
|
||||
)
|
||||
if (shapes.count > 0) then
|
||||
(
|
||||
unhide shapes[1]
|
||||
if (shapes[1].ishidden == true) then
|
||||
max hide shape toggle
|
||||
)
|
||||
if (lights.count > 0) then
|
||||
(
|
||||
unhide lights[1]
|
||||
if (lights[1].ishidden == true) then
|
||||
max hide light toggle
|
||||
)
|
||||
if (cameras.count > 0) then
|
||||
(
|
||||
unhide cameras[1]
|
||||
if (cameras[1].ishidden == true) then
|
||||
max hide camera toggle
|
||||
)
|
||||
if (helpers.count > 0) then
|
||||
(
|
||||
unhide helpers[1]
|
||||
if (helpers[1].ishidden == true) then
|
||||
max hide helper toggle
|
||||
)
|
||||
)
|
||||
|
||||
-- Log a message
|
||||
fn nlerror message =
|
||||
(
|
||||
if nlErrorStream != undefined then
|
||||
(
|
||||
format "%\n" message to:nlErrorStream
|
||||
flush nlErrorStream
|
||||
)
|
||||
|
||||
-- To the console
|
||||
print message
|
||||
)
|
||||
|
||||
-- Must export this node ?
|
||||
fn isToBeExported node =
|
||||
(
|
||||
if ((classof node) == RklPatch) then
|
||||
return false
|
||||
|
||||
if ((classof node) == nel_ps) then
|
||||
return false
|
||||
|
||||
if ((classof node) == nel_pacs_cylinder) then
|
||||
return false
|
||||
|
||||
if ((classof node) == nel_pacs_box) then
|
||||
return false
|
||||
|
||||
doNotExport = getappdata node NEL3D_APPDATA_DONOTEXPORT
|
||||
if (doNotExport != undefined) then
|
||||
(
|
||||
if (doNotExport == "1") then
|
||||
return false
|
||||
)
|
||||
return true
|
||||
)
|
||||
|
||||
-- is this node flagged as a LodCharacter ??
|
||||
fn isLodCharacter node =
|
||||
(
|
||||
isCLod = getappdata node NEL3D_APPDATA_CHARACTER_LOD
|
||||
if (isCLod == undefined) then
|
||||
return false
|
||||
if (isCLod == "1") then
|
||||
return true
|
||||
return false
|
||||
)
|
||||
|
||||
fn goClodExport =
|
||||
(
|
||||
try
|
||||
(
|
||||
-- Get files in the shape_source_directory
|
||||
files = getFiles "shape_source_directory/*.max"
|
||||
|
||||
-- Sort files
|
||||
sort files
|
||||
|
||||
-- No file ?
|
||||
if files.count != 0 then
|
||||
(
|
||||
-- For each files
|
||||
for i = 1 to files.count do
|
||||
(
|
||||
try
|
||||
(
|
||||
-- Ok ?
|
||||
ok = false
|
||||
|
||||
-- Free memory and file handles
|
||||
gc ()
|
||||
|
||||
-- Reset 3dsmax
|
||||
resetMAXFile #noprompt
|
||||
|
||||
-- Get the tag file name
|
||||
tag = ("output_directory_tag/"+(getFilenameFile files[i])+(getFilenameType files[i])+".tag")
|
||||
|
||||
-- Compare date with the tag file
|
||||
if (NeLTestFileDate tag files[i]) == true then
|
||||
(
|
||||
-- Open the max project
|
||||
nlerror ("Scanning file "+files[i]+" ...")
|
||||
if loadMaxFile files[i] quiet:true == true then
|
||||
(
|
||||
-- Unhide category
|
||||
unhidecategory()
|
||||
|
||||
tagThisFile = true
|
||||
|
||||
-- Unhide
|
||||
max unhide all
|
||||
|
||||
-- unselect
|
||||
max select none
|
||||
|
||||
-- Exported object count
|
||||
exported = 0
|
||||
|
||||
-- For each node
|
||||
for node in geometry do
|
||||
(
|
||||
-- It is root ?
|
||||
if (node.parent == undefined) then
|
||||
(
|
||||
-- Can be exported ?
|
||||
if (isToBeExported node == true) then
|
||||
(
|
||||
-- Is a Lod character?
|
||||
if ((isLodCharacter node) == true) then
|
||||
(
|
||||
-- Output directory
|
||||
output = ("output_directory_clod/"+(node.name)+".clod")
|
||||
|
||||
-- Compare file date
|
||||
if (NeLTestFileDate output files[i]) == true then
|
||||
(
|
||||
try
|
||||
(
|
||||
-- Export the shape
|
||||
if (NelExportLodCharacter node output false) == true then
|
||||
(
|
||||
nlerror ("OK "+output)
|
||||
exported = exported+1
|
||||
)
|
||||
else
|
||||
(
|
||||
-- Error
|
||||
nlerror ("ERROR exporting .clod "+node.name+" in file "+files[i])
|
||||
tagThisFile = false
|
||||
)
|
||||
)
|
||||
catch
|
||||
(
|
||||
-- Error
|
||||
nlerror ("ERROR fatal error exporting .clod "+node.name+" in file "+files[i])
|
||||
tagThisFile = false
|
||||
return 0
|
||||
)
|
||||
)
|
||||
else
|
||||
(
|
||||
-- Error
|
||||
nlerror ("SKIPPED "+output)
|
||||
exported = exported+1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
-- Something exported
|
||||
if (exported == 0) then
|
||||
(
|
||||
-- Error
|
||||
nlerror ("WARNING no .clod exported from the file "+files[i])
|
||||
)
|
||||
|
||||
-- Write a tag file
|
||||
if tagThisFile == true then
|
||||
(
|
||||
tagFile = createFile tag
|
||||
if tagFile == undefined then
|
||||
(
|
||||
nlerror ("WARNING can't create tag file "+tag)
|
||||
)
|
||||
else
|
||||
(
|
||||
print "toto" to: tagFile
|
||||
close tagFile
|
||||
)
|
||||
)
|
||||
)
|
||||
else
|
||||
(
|
||||
-- Error
|
||||
nlerror ("ERROR exporting .clod: can't open the file "+files[i])
|
||||
)
|
||||
)
|
||||
else
|
||||
(
|
||||
-- Error
|
||||
nlerror ("SKIPPED BY TAG "+files[i])
|
||||
)
|
||||
|
||||
gc ()
|
||||
|
||||
-- Reset 3dsmax
|
||||
resetMAXFile #noprompt
|
||||
)
|
||||
catch
|
||||
(
|
||||
-- Error
|
||||
nlerror ("ERROR fatal error exporting .clod in file " + files[i])
|
||||
-- break
|
||||
)
|
||||
)
|
||||
)
|
||||
else
|
||||
(
|
||||
nlerror ("WARNING no max file in folder shape_source_directory")
|
||||
)
|
||||
)
|
||||
catch
|
||||
(
|
||||
-- Error
|
||||
nlerror ("ERROR fatal error exporting .clod in folder shape_source_directory")
|
||||
return 0
|
||||
)
|
||||
)
|
||||
|
||||
goClodExport()
|
||||
|
||||
nlerror ("BYE")
|
||||
|
||||
quitMAX #noPrompt
|
||||
quitMAX () #noPrompt
|
||||
|
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Setup displace
|
||||
# \date 2009-03-10-21-45-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Setup displace
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 displace")
|
||||
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 <<<")
|
||||
for dir in DisplaceSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + DisplaceClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export displace
|
||||
# \date 2009-03-10-21-45-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Export displace
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 displace")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
|
||||
for dir in DisplaceSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".tga")
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".png")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build displace
|
||||
# \date 2009-03-10-21-45-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Build displace
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 displace")
|
||||
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,57 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Install displace
|
||||
# \date 2009-03-10-21-45-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Install displace
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 displace")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, ">>> Install displace <<<")
|
||||
clientPath = ClientDataDirectory + "/" + DisplaceClientDirectory
|
||||
mkPath(log, clientPath)
|
||||
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, clientPath, ".tga")
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, clientPath, ".png")
|
||||
|
||||
printLog(log, "")
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,66 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief setup farbank
|
||||
# \date 2009-03-10-21-12-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Setup farbank
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 farbank")
|
||||
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 <<<")
|
||||
for postfix in MultipleTilesPostfix:
|
||||
mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + BankClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export farbank
|
||||
# \date 2009-03-10-21-12-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Export farbank
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 farbank")
|
||||
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,74 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build farbank
|
||||
# \date 2009-03-10-21-12-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Build farbank
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 farbank")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix)
|
||||
BuildFarbank = findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix)
|
||||
printLog(log, "")
|
||||
|
||||
# For each bank export farbank
|
||||
printLog(log, ">>> Build farbank <<<")
|
||||
if ExecTimeout == "":
|
||||
toolLogFail(log, ExecTimeoutTool, ToolSuffix)
|
||||
elif BuildFarbank == "":
|
||||
toolLogFail(log, BuildFarbankTool, ToolSuffix)
|
||||
else:
|
||||
mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
|
||||
files = findFiles(log, ExportBuildDirectory + "/" + SmallbankExportDirectory, "", ".smallbank")
|
||||
for file in files:
|
||||
sourceFile = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + file
|
||||
if os.path.isfile(sourceFile):
|
||||
for postfix in MultipleTilesPostfix:
|
||||
destFile = ExportBuildDirectory + "/" + FarbankBuildDirectory + "/" + file[0:-len(".smallbank")] + postfix + ".farbank"
|
||||
if (needUpdateLogRemoveDest(log, sourceFile, destFile)):
|
||||
mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix)
|
||||
subprocess.call([ ExecTimeout, str(FarbankBuildTimeout), BuildFarbank, sourceFile, destFile, "-d" + DatabaseDirectory + "/" + TileRootSourceDirectory + postfix + "/", "-p" + postfix ])
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Install farbank
|
||||
# \date 2009-03-10-21-12-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Install farbank
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 farbank")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, ">>> Install farbank <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
|
||||
mkPath(log, ClientDataDirectory + "/" + BankClientDirectory)
|
||||
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + FarbankBuildDirectory, ClientDataDirectory + "/" + BankClientDirectory, ".farbank")
|
||||
|
||||
printLog(log, "")
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,64 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief setup font
|
||||
# \date 2009-03-10-19-43-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# setup font
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 font")
|
||||
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 <<<")
|
||||
for dir in FontSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + FontClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export font
|
||||
# \date 2009-03-10-19-43-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Export font
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 font")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build font
|
||||
# \date 2009-03-10-19-43-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Build font
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 font")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Install font
|
||||
# \date 2009-03-10-19-43-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Install font
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 font")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
clientPath = ClientDataDirectory + "/" + FontClientDirectory
|
||||
mkPath(log, clientPath)
|
||||
|
||||
printLog(log, ">>> Install font <<<")
|
||||
for dir in FontSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".ttf")
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".afm")
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".pfb")
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".pfm")
|
||||
|
||||
printLog(log, "")
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Setup ig_light
|
||||
# \date 2009-03-11-15-16-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Setup ig_light
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 ig_light")
|
||||
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 <<<")
|
||||
#for dir in ig_lightSourceDirectories:
|
||||
# mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
#mkPath(log, ExportBuildDirectory + "/" + ig_lightExportDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + IgVillageBuildDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + IgLightVillageBuildDirectory)
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + IgClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export ig_light
|
||||
# \date 2009-03-11-15-16-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Export ig_light
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 ig_light")
|
||||
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,65 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build ig_light
|
||||
# \date 2009-03-11-15-16-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Build ig_light
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 ig_light")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
IgLighter = findTool(log, ToolDirectories, IgLighterTool, ToolSuffix)
|
||||
printLog(log, "")
|
||||
|
||||
# For each ig_light directory
|
||||
printLog(log, ">>> Build ig_light <<<")
|
||||
if IgLighter == "":
|
||||
toolLogFail(log, IgLighterTool, ToolSuffix)
|
||||
else:
|
||||
srcDir = ExportBuildDirectory + "/" + IgVillageBuildDirectory
|
||||
mkPath(log, srcDir)
|
||||
destDir = ExportBuildDirectory + "/" + IgLightVillageBuildDirectory
|
||||
mkPath(log, destDir)
|
||||
subprocess.call([ IgLighter, srcDir, destDir, ScriptDirectory + "/configuration/zone_lighter_properties.cfg" ])
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 3_install.py
|
||||
# \brief Install ig_light
|
||||
# \date 2009-03-11-15-16-GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Install ig_light
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 ig_light")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
printLog(log, ">>> Install ig_light <<<")
|
||||
srcDir = ExportBuildDirectory + "/" + IgLightVillageBuildDirectory
|
||||
mkPath(log, srcDir)
|
||||
destDir = ClientDataDirectory + "/" + IgClientDirectory
|
||||
mkPath(log, destDir)
|
||||
copyFilesNoTreeIfNeeded(log, srcDir, destDir)
|
||||
|
||||
printLog(log, "")
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 0_setup.py
|
||||
# \brief Setup interface
|
||||
# \date 2009-03-10 14:56GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Setup interface
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 interface")
|
||||
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 <<<")
|
||||
for dir in InterfaceSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
for dir in InterfaceDxtcSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
for dir in InterfaceFullscreenSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
for dir in Interface3DSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
|
||||
# Setup export directories
|
||||
printLog(log, ">>> Setup export directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory)
|
||||
|
||||
# Setup build directories
|
||||
printLog(log, ">>> Setup build directories <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory)
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory)
|
||||
|
||||
# Setup client directories
|
||||
printLog(log, ">>> Setup client directories <<<")
|
||||
mkPath(log, ClientDataDirectory + "/" + InterfaceClientDirectory)
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,96 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 1_export.py
|
||||
# \brief Export interface
|
||||
# \date 2009-03-10 13:13GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Export interface
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 interface")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix)
|
||||
printLog(log, "")
|
||||
|
||||
# For each interface directory
|
||||
printLog(log, ">>> Export interface <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory)
|
||||
for dir in InterfaceSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
niouname = dir.replace("/", "_")
|
||||
newpath = ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + niouname
|
||||
mkPath(log, newpath)
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".tga")
|
||||
printLog(log, "")
|
||||
|
||||
# For each interface directory to compress in one DXTC
|
||||
printLog(log, ">>> Export interface dxtc <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory)
|
||||
for dir in InterfaceDxtcSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".tga")
|
||||
printLog(log, "")
|
||||
|
||||
# For each interface fullscreen directory compress independently all in dds
|
||||
printLog(log, ">>> Export interface fullscreen <<<")
|
||||
if TgaToDds == "":
|
||||
toolLogFail(log, TgaToDdsTool, ToolSuffix)
|
||||
else:
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory)
|
||||
for dir in InterfaceFullscreenSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".tga")
|
||||
for file in files:
|
||||
sourceFile = DatabaseDirectory + "/" + dir + "/" + file
|
||||
destFile = ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds"
|
||||
if needUpdateLogRemoveDest(log, sourceFile, destFile):
|
||||
subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-a", "5" ])
|
||||
printLog(log, "")
|
||||
|
||||
# For each interface 3d directory
|
||||
printLog(log, ">>> Export interface 3d <<<")
|
||||
mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory)
|
||||
for dir in Interface3DSourceDirectories:
|
||||
mkPath(log, DatabaseDirectory + "/" + dir)
|
||||
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory, ".tga")
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# \file 2_build.py
|
||||
# \brief Build interface
|
||||
# \date 2009-03-10 13:13GMT
|
||||
# \author Jan Boon (Kaetemi)
|
||||
# Python port of game data build pipeline.
|
||||
# Build interface
|
||||
#
|
||||
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
# Copyright (C) 2010 Winch Gate Property Limited
|
||||
#
|
||||
# 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")
|
||||
sys.path.append("../../configuration/project")
|
||||
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 interface")
|
||||
printLog(log, "-------")
|
||||
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||
printLog(log, "")
|
||||
|
||||
# Find tools
|
||||
BuildInterface = findTool(log, ToolDirectories, BuildInterfaceTool, ToolSuffix)
|
||||
printLog(log, "")
|
||||
|
||||
# For each interface directory
|
||||
printLog(log, ">>> Build interface <<<")
|
||||
if BuildInterface == "":
|
||||
toolLogFail(log, BuildInterfaceTool, ToolSuffix)
|
||||
else:
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory)
|
||||
for dir in os.listdir(ExportBuildDirectory + "/" + InterfaceExportDirectory):
|
||||
if (os.path.isdir(ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + dir)) and dir != ".svn" and dir != "*.*":
|
||||
subprocess.call([ BuildInterface, ExportBuildDirectory + "/" + InterfaceBuildDirectory + "/texture_" + dir + ".tga", ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + dir ])
|
||||
printLog(log, "")
|
||||
|
||||
# For each interface directory to compress in one DXTC
|
||||
printLog(log, ">>> Build interface dxtc <<<")
|
||||
if BuildInterface == "":
|
||||
toolLogFail(log, BuildInterfaceTool, ToolSuffix)
|
||||
else:
|
||||
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory)
|
||||
subprocess.call([ BuildInterface, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory + "/texture_interfaces_dxtc.tga", ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory ])
|
||||
printLog(log, "")
|
||||
|
||||
log.close()
|
||||
|
||||
|
||||
# end of file
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue