diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 0f3ff1110..c7fd988bd 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -974,37 +974,6 @@ void CAudioMixerUser::buildSampleBankList() CPath::addSearchPath(sbp); } -/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. -std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) -{ - CGroupControllerRoot *tempRoot = NULL; - if (!CGroupControllerRoot::isInitialized()) - tempRoot = new CGroupControllerRoot(); - std::string dir = CPath::standardizePath(packedSheetDir, true); - CSoundBank *soundBank = new CSoundBank(); - soundBank->load(dir, true); - delete soundBank; - delete tempRoot; - return dir + "sounds.packed_sheets"; -} - -/// Build the cluster sound_group sheets. -std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) -{ - std::string dir = CPath::standardizePath(packedSheetDir, true); - CClusteredSound::buildSheets(dir); - return dir + "sound_groups.packed_sheets"; -} - -/// Build the user var binding sheets. -std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) -{ - std::string dir = CPath::standardizePath(packedSheetDir, true); - std::map container; - ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); - return dir + "user_var_binding.packed_sheets"; -} - void CAudioMixerUser::setBackgroundFlagName(uint flagIndex, const std::string &flagName) { if (flagIndex < TBackgroundFlags::NB_BACKGROUND_FLAGS) @@ -1144,6 +1113,37 @@ void CAudioMixerUser::initUserVar() } +/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file. +std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir) +{ + CGroupControllerRoot *tempRoot = NULL; + if (!CGroupControllerRoot::isInitialized()) + tempRoot = new CGroupControllerRoot(); + std::string dir = CPath::standardizePath(packedSheetDir, true); + CSoundBank *soundBank = new CSoundBank(); + soundBank->load(dir, true); + delete soundBank; + delete tempRoot; + return dir + "sounds.packed_sheets"; +} + +/// Build the cluster sound_group sheets. +std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + CClusteredSound::buildSheets(dir); + return dir + "sound_groups.packed_sheets"; +} + +/// Build the user var binding sheets. +std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir) +{ + std::string dir = CPath::standardizePath(packedSheetDir, true); + std::map container; + ::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false); + return dir + "user_var_binding.packed_sheets"; +} + // ****************************************************************** void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s) diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 42a9a409b..69d825fed 100755 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -187,6 +187,18 @@ if not args.noconf: PatchmanBridgeServerDirectory except NameError: PatchmanBridgeServerDirectory = "T:/bridge_server" + try: + SignToolExecutable + except NameError: + SignToolExecutable = "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Bin/signtool.exe" + try: + SignToolSha1 + except NameError: + SignToolSha1 = "" + try: + SignToolTimestamp + except NameError: + SignToolTimestamp = "http://timestamp.comodoca.com/authenticode" try: MaxAvailable except NameError: @@ -258,6 +270,9 @@ if not args.noconf: PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") + SignToolExecutable = askVar(log, "Sign Tool Executable", SignToolExecutable).replace("\\", "/") + SignToolSha1 = askVar(log, "Sign Tool Signature SHA1", SignToolSha1) + SignToolTimestamp = askVar(log, "Sign Tool Timestamp Authority", SignToolTimestamp) MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) if MaxAvailable: MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") @@ -346,6 +361,11 @@ if not args.noconf: sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") sf.write("PatchmanBridgeServerDirectory = \"" + str(PatchmanBridgeServerDirectory) + "\"\n") sf.write("\n") + sf.write("# Sign tool\n") + sf.write("SignToolExecutable = \"" + str(SignToolExecutable) + "\"\n") + sf.write("SignToolSha1 = \"" + str(SignToolSha1) + "\"\n") + sf.write("SignToolTimestamp = \"" + str(SignToolTimestamp) + "\"\n") + sf.write("\n") sf.write("# 3dsMax directives\n") sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n") diff --git a/code/nel/tools/build_gamedata/configuration/scripts.py b/code/nel/tools/build_gamedata/configuration/scripts.py index 9a815a2b9..5bbed497f 100755 --- a/code/nel/tools/build_gamedata/configuration/scripts.py +++ b/code/nel/tools/build_gamedata/configuration/scripts.py @@ -541,9 +541,10 @@ def needUpdateDirNoSubdirLogExtMultidir(log, all_dir_base, all_dir_source, dir_s def findFileMultiDir(log, dirs_where, file_name): try: for dir in dirs_where: - file = findFile(log, dir, file_name) - if file != "": - return file + if dir != "": + file = findFile(log, dir, file_name) + if file != "": + return file except Exception, e: printLog(log, "EXCEPTION " + str(e)) printLog(log, "FILE NOT FOUND " + file_name) @@ -552,10 +553,11 @@ def findFileMultiDir(log, dirs_where, file_name): 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 + if dir != "": + 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) diff --git a/code/nel/tools/build_gamedata/executables_dev.bat b/code/nel/tools/build_gamedata/executables_dev.bat index 2007016c4..bbca70ab7 100644 --- a/code/nel/tools/build_gamedata/executables_dev.bat +++ b/code/nel/tools/build_gamedata/executables_dev.bat @@ -1,3 +1,9 @@ +title Ryzom Core: 0_setup.py (EXECUTABLES) +0_setup.py --noconf -ipj common/gamedev common/exedll common/cfg common/data_common +title Ryzom Core: 1_export.py (EXECUTABLES) +1_export.py -ipj common/gamedev common/exedll common/cfg common/data_common +title Ryzom Core: 2_build.py (EXECUTABLES) +2_build.py -ipj common/gamedev common/exedll common/cfg common/data_common title Ryzom Core: 3_install.py (EXECUTABLES) 3_install.py -ipj common/gamedev common/exedll common/cfg common/data_common title Ryzom Core: b1_client_dev.py diff --git a/code/nel/tools/build_gamedata/processes/sign/0_setup.py b/code/nel/tools/build_gamedata/processes/sign/0_setup.py new file mode 100644 index 000000000..418fcb15e --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/0_setup.py @@ -0,0 +1,64 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sign") +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 <<<") + +# Setup build directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SignedExeDllDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SignInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/1_export.py b/code/nel/tools/build_gamedata/processes/sign/1_export.py new file mode 100644 index 000000000..352860bda --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/1_export.py @@ -0,0 +1,57 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +mkPath(log, ExportBuildDirectory + "/" + UnsignedExeDllDirectory) +for file in SignExeDllFiles: + printLog(log, str(WindowsExeDllCfgDirectories)) + printLog(log, file) + filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file) + if (filePath != ""): + copyFileIfNeeded(log, filePath, ExportBuildDirectory + "/" + UnsignedExeDllDirectory + "/" + os.path.basename(file)) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/2_build.py b/code/nel/tools/build_gamedata/processes/sign/2_build.py new file mode 100644 index 000000000..c08049538 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/2_build.py @@ -0,0 +1,61 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +if SignToolSha1 != "": + unsignedDirectory = ExportBuildDirectory + "/" + UnsignedExeDllDirectory + signedDirectory = ExportBuildDirectory + "/" + SignedExeDllDirectory + mkPath(log, unsignedDirectory) + mkPath(log, signedDirectory) + unsignedFiles = os.listdir(unsignedDirectory) + for fileName in unsignedFiles: + if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"): + if needUpdateLogRemoveDest(log, unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName): + shutil.copy(unsignedDirectory + "/" + fileName, signedDirectory + "/" + fileName) + subprocess.call([ SignToolExecutable, "sign", "/sha1", SignToolSha1, "/t", SignToolTimestamp, signedDirectory + "/" + fileName ]) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sign/3_install.py b/code/nel/tools/build_gamedata/processes/sign/3_install.py new file mode 100644 index 000000000..b537da92d --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sign/3_install.py @@ -0,0 +1,58 @@ +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sign +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sign +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sign") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +srcDir = ExportBuildDirectory + "/" + SignedExeDllDirectory +if SignToolSha1 == "": + srcDir = ExportBuildDirectory + "/" + UnsignedExeDllDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + SignInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/0_setup.py b/code/nel/tools/build_gamedata/processes/sound/0_setup.py new file mode 100644 index 000000000..7ce690d5d --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/0_setup.py @@ -0,0 +1,65 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief setup sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SoundInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/1_export.py b/code/nel/tools/build_gamedata/processes/sound/1_export.py new file mode 100644 index 000000000..066b2c256 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/1_export.py @@ -0,0 +1,65 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# For each sound directory +printLog(log, ">>> Export sound <<<") +mkPath(log, ExportBuildDirectory + "/" + SoundExportDirectory) +mkPath(log, SoundDirectory) +mkPath(log, SoundDfnDirectory) +copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".dfn") +copyFilesExtNoTreeIfNeeded(log, SoundDfnDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".typ") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mixer_config") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".mp3") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".ogg") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".flac") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".primitive") +copyFilesExtNoTreeIfNeeded(log, SoundDirectory, ExportBuildDirectory + "/" + SoundExportDirectory, ".sound_anim") + +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/2_build.py b/code/nel/tools/build_gamedata/processes/sound/2_build.py new file mode 100644 index 000000000..048f8f456 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/2_build.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sound/3_install.py b/code/nel/tools/build_gamedata/processes/sound/3_install.py new file mode 100644 index 000000000..b8078609f --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sound/3_install.py @@ -0,0 +1,57 @@ +#!/usr/bin/python +# +# \file 3_install.py +# \brief Install sound +# \date 2010-05-24 13:42GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install sound +# +# NeL - MMORPG Framework +# Copyright (C) 2009-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install sound") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +printLog(log, ">>> Install sound <<<") +srcDir = ExportBuildDirectory + "/" + SoundExportDirectory +mkPath(log, srcDir) +destDir = InstallDirectory + "/" + SoundInstallDirectory +mkPath(log, destDir) +copyFilesNoTreeIfNeeded(log, srcDir, destDir) + +printLog(log, "") +log.close() + + +# end of file diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 7431807cf..b99c5d154 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -39,14 +39,15 @@ Gamma_max = 1.0; // NETWORK // ///////////// -Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +Application = { "open", "./client_ryzom_r.exe", "./" }; BackgroundDownloader = 0; -StartupHost = "shard.ryzom.com:40916"; +StartupHost = "https://open.ryzom.dev"; StartupPage = "/login/r2_login.php"; +StartupVerify = 1; -ConditionsTermsURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148782=en#1"; -LoginSupportURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/22047/1&post149889=en#1"; -NamingPolicyURL = "http://app.ryzom.com/app_forum/index.php?page=topic/view/21885/1&post148784=en#3"; +ConditionsTermsURL = "http://www.gnu.org/licenses/agpl-3.0.html"; +LoginSupportURL = "https://open.ryzom.dev/ams/"; +NamingPolicyURL = "https://open.ryzom.dev/ams/"; // Full path and filename where cURL can find certificate bundle file // cacert.pem file can be downloaded from https://curl.haxx.se/docs/caextract.html @@ -84,11 +85,15 @@ XMLOutGameInterfaceFiles = { "out_v2_keys.xml", }; +TexturesInterface = "texture_interfaces_v3"; +TexturesInterfaceDXTC = "texture_interfaces_dxtc"; + // The ligo primitive class file LigoPrimitiveClass = "world_editor_classes.xml"; VerboseLog = 1; + /////////// // MOUSE // /////////// @@ -604,11 +609,11 @@ ChannelIgnoreFilter = // interval in minutes for webig notify thread to run WebIgNotifInterval = 10; -WebIgMainDomain = "app.ryzom.com"; +WebIgMainDomain = "https://open.ryzom.dev"; WebIgTrustedDomains = { - "api.ryzom.com", "app.ryzom.com" + "open.ryzom.dev" }; -PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; +PatchletUrl = "https://open.ryzom.dev/app_patchlet/index.php?patch=preload"; SelectedSlot = 0; diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 37cb36279..69559e0e8 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -317,6 +317,10 @@ int main(int argc, char **argv) LoginCustomParameters = "&steam_auth_session_ticket=" + steamClient.getAuthSessionTicket(); #endif +#if !FINAL_VERSION + LoginCustomParameters += "&dbg=1"; +#endif + // initialize patch manager and set the ryzom full path, before it's used CPatchManager *pPM = CPatchManager::getInstance(); pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName()); diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 7f0222088..bfd6452ee 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -330,9 +330,9 @@ CClientConfig::CClientConfig() TexturesLoginInterface.push_back("texture_interfaces_v3_login"); DisplayAccountButtons = true; - CreateAccountURL = "https://account.ryzom.com/signup/from_client.php"; - EditAccountURL = "https://account.ryzom.com/payment_profile/index.php"; - ForgetPwdURL = "https://account.ryzom.com/payment_profile/lost_secure_password.php"; + CreateAccountURL = "https://open.ryzom.dev/ams/"; + EditAccountURL = "https://open.ryzom.dev/ams/"; + ForgetPwdURL = "https://open.ryzom.dev/ams/"; Position = CVector(0.f, 0.f, 0.f); // Default Position. Heading = CVector(0.f, 1.f, 0.f); // Default Heading. EyesHeight = 1.5f; // Default User Eyes Height. @@ -428,15 +428,15 @@ CClientConfig::CClientConfig() PatchletUrl.clear(); PatchVersion.clear(); - WebIgMainDomain = "atys.ryzom.com"; - WebIgTrustedDomains.push_back(WebIgMainDomain); + WebIgMainDomain = "https://open.ryzom.dev"; + WebIgTrustedDomains.push_back("open.ryzom.dev"); WebIgNotifInterval = 10; // time in minutes CurlMaxConnections = 5; CurlCABundle.clear(); - RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php"; - ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php"; + RingReleaseNotePath = WebIgMainDomain + "/releasenotes_ring/index.php"; + ReleaseNotePath = WebIgMainDomain + "/releasenotes/index.php"; /////////////// @@ -452,7 +452,7 @@ CClientConfig::CClientConfig() SoundOn = true; // Default is with sound. DriverSound = SoundDrvAuto; SoundForceSoftwareBuffer = true; - SoundOutGameMusic = "Main Menu Loop.ogg"; + SoundOutGameMusic = "main menu loop.ogg"; SoundSFXVolume = 1.f; SoundGameMusicVolume = 1.f; SoundTPFade = 500; @@ -1093,6 +1093,9 @@ void CClientConfig::setValues() /////////// // WEBIG // READ_STRING_FV(WebIgMainDomain); + if (ClientCfg.WebIgMainDomain.find("http://") == std::string::npos + || ClientCfg.WebIgMainDomain.find("https://") == std::string::npos) + ClientCfg.WebIgMainDomain = "http://" + ClientCfg.WebIgMainDomain; READ_STRINGVECTOR_FV(WebIgTrustedDomains); READ_INT_FV(WebIgNotifInterval); READ_INT_FV(CurlMaxConnections); diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 16436516b..c27672489 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -63,7 +63,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p return true; } -static const std::string CAFilename = "ssl_ca_cert.pem"; // this is the certificate "Thawte Server CA" +static const std::string CAFilename = "cacert.pem"; // https://curl.haxx.se/docs/caextract.html // *************************************************************************** bool CCurlHttpClient::verifyServer(bool verify) diff --git a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp index 68b55076e..bf83ddce1 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_ui.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_ui.cpp @@ -416,7 +416,7 @@ class CAHUIShowHide : public IActionHandler nlwarning("%s is not a group html", window.c_str()); return; } - pGH->setURL("http://"+ClientCfg.WebIgMainDomain+"/index.php?app="+webapp); + pGH->setURL(ClientCfg.WebIgMainDomain + "/index.php?app=" + webapp); } } else diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index 8f5c6da01..11fe6c6c5 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -267,7 +267,7 @@ public: uint c = 0; while (_Running) { - string url = "https://"+domain+"/index.php?app=notif&format=lua&rnd="+randomString(); + string url = domain + "/index.php?app=notif&format=lua&rnd=" + randomString(); addWebIGParams(url, true); get(url); diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 1eb6ec867..79381d8f2 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -155,7 +155,8 @@ CLoginStateMachine LoginSM; bool CStartupHttpClient::connectToLogin() { - return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)); + return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0)) + && verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0)); } CStartupHttpClient HttpClient; @@ -2825,7 +2826,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 62)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res1: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 64)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -2878,7 +2908,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 4)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 65)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -2960,7 +3019,36 @@ string checkLogin(const string &login, const string &password, const string &cli if(res.empty()) return "Empty answer from server (error code 4)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 66)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); @@ -3065,7 +3153,36 @@ string selectShard(uint32 shardId, string &cookie, string &addr) if(res.empty()) return "Empty result (error code 13)"; - if(res[0] == '0') + size_t first = res.find("\n\n"); + if (first == std::string::npos) + { + first = res.find("\r\r"); + if (first == std::string::npos) + { + first = res.find("\r\n\r\n"); + if (first != std::string::npos) + { + res = res.substr(first + 4); + } + } + else + { + res = res.substr(first + 2); + } + } + else + { + res = res.substr(first + 2); + } + + nldebug("res2: %s", res.c_str()); + + if (res[0] == 'H') + { + nlwarning("missing response body: %s", res.c_str()); + return "missing response body (error code 66)"; + } + else if(res[0] == '0') { // server returns an error nlwarning("server error: %s", res.substr(2).c_str()); diff --git a/code/ryzom/client/src/login.h b/code/ryzom/client/src/login.h index 2c6e8c960..fa4f041c1 100644 --- a/code/ryzom/client/src/login.h +++ b/code/ryzom/client/src/login.h @@ -19,7 +19,7 @@ #define CL_LOGIN_H #include "nel/misc/types_nl.h" -#include "game_share/http_client.h" +#include "http_client_curl.h" #include #include @@ -74,7 +74,7 @@ extern sint32 ShardSelected; /* * HTTP client preconfigured to connect to the startup login host */ -class CStartupHttpClient : public CHttpClient +class CStartupHttpClient : public CCurlHttpClient { public: diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 7bdcfb5ed..d562e5ea4 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3292,7 +3292,7 @@ private: if(i != digitMaxEnd) { ucstring web_app = contentStr.substr(digitStart, i-digitStart); - contentStr = ucstring("http://"+ClientCfg.WebIgMainDomain+"/")+web_app+ucstring("/index.php?")+contentStr.substr(i+1); + contentStr = ucstring(ClientCfg.WebIgMainDomain + "/") + web_app + ucstring("/index.php?") + contentStr.substr((size_t)i + 1); } else {