merged default into gsoc2011-translationovqt
--HG-- branch : gsoc2011-translationovqthg/feature/gsoc2012-fabien
commit
1f9113e781
@ -1,62 +0,0 @@
|
|||||||
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
|
||||||
// Copyright (C) 2010 Winch Gate Property Limited
|
|
||||||
// Copyright (C) 2011 Dzmitry Kamiahin <dnk-88@tut.by>
|
|
||||||
//
|
|
||||||
// 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/>.
|
|
||||||
|
|
||||||
#ifndef IMENU_MANAGER_H
|
|
||||||
#define IMENU_MANAGER_H
|
|
||||||
|
|
||||||
#include "core_global.h"
|
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtCore/QList>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QMenu;
|
|
||||||
class QAction;
|
|
||||||
class QString;
|
|
||||||
class QMenuBar;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace Core
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
@interface IMenuManager
|
|
||||||
@brief The IMenuManager is an interface for providing a registration of menus and menu item.
|
|
||||||
@details The IMenuManager provides centralized access to menus and menu items.
|
|
||||||
All menus and menu items should be registered in the IMenuManager.
|
|
||||||
*/
|
|
||||||
class CORE_EXPORT IMenuManager : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
IMenuManager(QObject *parent = 0): QObject(parent) {}
|
|
||||||
virtual ~IMenuManager() {}
|
|
||||||
|
|
||||||
virtual void registerMenu(QMenu *menu, const QString &id) = 0;
|
|
||||||
virtual void registerAction(QAction *action, const QString &id) = 0;
|
|
||||||
|
|
||||||
virtual QMenu *menu(const QString &id) const = 0;
|
|
||||||
virtual QAction *action(const QString &id) const = 0;
|
|
||||||
|
|
||||||
virtual void unregisterMenu(const QString &id) = 0;
|
|
||||||
virtual void unregisterAction(const QString &id) = 0;
|
|
||||||
|
|
||||||
virtual QMenuBar *menuBar() const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Core
|
|
||||||
|
|
||||||
#endif // IMENU_MANAGER_H
|
|
@ -0,0 +1,7 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_core</library-name>
|
||||||
|
<name>Core</name>
|
||||||
|
<version>0.8</version>
|
||||||
|
<vendor>Ryzom Core</vendor>
|
||||||
|
<description>Core plugin.</description>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_disp_sheet_id</library-name>
|
||||||
|
<name>DisplaySheetId</name>
|
||||||
|
<version>1.0</version>
|
||||||
|
<vendor>pemeon</vendor>
|
||||||
|
<description>Display sheet id.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,83 @@
|
|||||||
|
// Project includes
|
||||||
|
#include "example_plugin.h"
|
||||||
|
#include "example_settings_page.h"
|
||||||
|
#include "simple_viewer.h"
|
||||||
|
|
||||||
|
#include "../core/icore.h"
|
||||||
|
#include "../core/core_constants.h"
|
||||||
|
#include "../core/menu_manager.h"
|
||||||
|
|
||||||
|
#include "../../extension_system/iplugin_spec.h"
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include "nel/misc/debug.h"
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtCore/QObject>
|
||||||
|
#include <QtGui/QMessageBox>
|
||||||
|
#include <QtGui/QMainWindow>
|
||||||
|
#include <QtGui/QMenu>
|
||||||
|
#include <QtGui/QAction>
|
||||||
|
#include <QtGui/QMenuBar>
|
||||||
|
|
||||||
|
namespace Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
ExamplePlugin::ExamplePlugin()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ExamplePlugin::~ExamplePlugin()
|
||||||
|
{
|
||||||
|
Q_FOREACH(QObject *obj, m_autoReleaseObjects)
|
||||||
|
{
|
||||||
|
m_plugMan->removeObject(obj);
|
||||||
|
}
|
||||||
|
qDeleteAll(m_autoReleaseObjects);
|
||||||
|
m_autoReleaseObjects.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ExamplePlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
|
||||||
|
{
|
||||||
|
Q_UNUSED(errorString);
|
||||||
|
m_plugMan = pluginManager;
|
||||||
|
|
||||||
|
addAutoReleasedObject(new ExampleSettingsPage(this));
|
||||||
|
addAutoReleasedObject(new ExampleContext(this));
|
||||||
|
addAutoReleasedObject(new ExampleCoreListener(this));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExamplePlugin::extensionsInitialized()
|
||||||
|
{
|
||||||
|
Core::ICore *core = Core::ICore::instance();
|
||||||
|
Core::MenuManager *menuManager = core->menuManager();
|
||||||
|
QAction *exampleAction1 = new QAction("Example1", this);
|
||||||
|
QAction *exampleAction2 = new QAction("Example2", this);
|
||||||
|
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
|
||||||
|
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
|
||||||
|
helpMenu->insertAction(aboutQtAction, exampleAction1);
|
||||||
|
helpMenu->addSeparator();
|
||||||
|
helpMenu->addAction(exampleAction2);
|
||||||
|
menuManager->menuBar()->addMenu("ExampleMenu");
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExamplePlugin::setNelContext(NLMISC::INelContext *nelContext)
|
||||||
|
{
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
// Ensure that a context doesn't exist yet.
|
||||||
|
// This only applies to platforms without PIC, e.g. Windows.
|
||||||
|
nlassert(!NLMISC::INelContext::isContextInitialised());
|
||||||
|
#endif // NL_OS_WINDOWS
|
||||||
|
m_LibContext = new NLMISC::CLibraryContext(*nelContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExamplePlugin::addAutoReleasedObject(QObject *obj)
|
||||||
|
{
|
||||||
|
m_plugMan->addObject(obj);
|
||||||
|
m_autoReleaseObjects.prepend(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_EXPORT_PLUGIN(Plugin::ExamplePlugin)
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_example</library-name>
|
||||||
|
<name>ExamplePlugin</name>
|
||||||
|
<version>0.2</version>
|
||||||
|
<vendor>dnk-88</vendor>
|
||||||
|
<description>Example ovqt plugin.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -1,120 +0,0 @@
|
|||||||
// Project includes
|
|
||||||
#include "plugin1.h"
|
|
||||||
#include "example_settings_page.h"
|
|
||||||
#include "simple_viewer.h"
|
|
||||||
#include "../core/icore.h"
|
|
||||||
#include "../core/core_constants.h"
|
|
||||||
#include "../core/imenu_manager.h"
|
|
||||||
#include "../../extension_system/iplugin_spec.h"
|
|
||||||
|
|
||||||
// NeL includes
|
|
||||||
#include "nel/misc/debug.h"
|
|
||||||
|
|
||||||
// Qt includes
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtGui/QMessageBox>
|
|
||||||
#include <QtGui/QMainWindow>
|
|
||||||
#include <QtGui/QMenu>
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtGui/QMenuBar>
|
|
||||||
|
|
||||||
namespace Plugin
|
|
||||||
{
|
|
||||||
MyPlugin::~MyPlugin()
|
|
||||||
{
|
|
||||||
Q_FOREACH(QObject *obj, _autoReleaseObjects)
|
|
||||||
{
|
|
||||||
_plugMan->removeObject(obj);
|
|
||||||
}
|
|
||||||
qDeleteAll(_autoReleaseObjects);
|
|
||||||
_autoReleaseObjects.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MyPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
|
|
||||||
{
|
|
||||||
Q_UNUSED(errorString);
|
|
||||||
_plugMan = pluginManager;
|
|
||||||
|
|
||||||
addAutoReleasedObject(new CExampleSettingsPage(this));
|
|
||||||
addAutoReleasedObject(new CExampleContext(this));
|
|
||||||
addAutoReleasedObject(new CCoreListener(this));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyPlugin::extensionsInitialized()
|
|
||||||
{
|
|
||||||
Core::ICore *core = Core::ICore::instance();
|
|
||||||
Core::IMenuManager *menuManager = core->menuManager();
|
|
||||||
//menuManager = _plugMan->getObject<Core::IMenuManager>();
|
|
||||||
QAction *exampleAction1 = new QAction("Example1", this);
|
|
||||||
QAction *exampleAction2 = new QAction("Example2", this);
|
|
||||||
QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT);
|
|
||||||
QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP);
|
|
||||||
helpMenu->insertAction(aboutQtAction, exampleAction1);
|
|
||||||
helpMenu->addSeparator();
|
|
||||||
helpMenu->addAction(exampleAction2);
|
|
||||||
menuManager->menuBar()->addMenu("ExampleMenu");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyPlugin::setNelContext(NLMISC::INelContext *nelContext)
|
|
||||||
{
|
|
||||||
#ifdef NL_OS_WINDOWS
|
|
||||||
// Ensure that a context doesn't exist yet.
|
|
||||||
// This only applies to platforms without PIC, e.g. Windows.
|
|
||||||
nlassert(!NLMISC::INelContext::isContextInitialised());
|
|
||||||
#endif // NL_OS_WINDOWS
|
|
||||||
_LibContext = new NLMISC::CLibraryContext(*nelContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::name() const
|
|
||||||
{
|
|
||||||
return "ExamplePlugin";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::version() const
|
|
||||||
{
|
|
||||||
return "0.2";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::vendor() const
|
|
||||||
{
|
|
||||||
return "dnk-88";
|
|
||||||
}
|
|
||||||
|
|
||||||
QString MyPlugin::description() const
|
|
||||||
{
|
|
||||||
return "Example ovqt plugin.";
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList MyPlugin::dependencies() const
|
|
||||||
{
|
|
||||||
QStringList list;
|
|
||||||
list.append(Core::Constants::OVQT_CORE_PLUGIN);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyPlugin::addAutoReleasedObject(QObject *obj)
|
|
||||||
{
|
|
||||||
_plugMan->addObject(obj);
|
|
||||||
_autoReleaseObjects.prepend(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
QObject* MyPlugin::objectByName(const QString &name) const
|
|
||||||
{
|
|
||||||
Q_FOREACH (QObject *qobj, _plugMan->allObjects())
|
|
||||||
if (qobj->objectName() == name)
|
|
||||||
return qobj;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtensionSystem::IPluginSpec *MyPlugin::pluginByName(const QString &name) const
|
|
||||||
{
|
|
||||||
Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins())
|
|
||||||
if (spec->name() == name)
|
|
||||||
return spec;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(Plugin::MyPlugin)
|
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_georges_editor</library-name>
|
||||||
|
<name>GeorgesEditor</name>
|
||||||
|
<version>0.4</version>
|
||||||
|
<vendor>aquiles</vendor>
|
||||||
|
<description>Tool to create and edit sheets or forms.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_log</library-name>
|
||||||
|
<name>LogPlugin</name>
|
||||||
|
<version>1.1</version>
|
||||||
|
<vendor>aquiles</vendor>
|
||||||
|
<description>DockWidget to display all log messages from NeL.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_mission_compiler</library-name>
|
||||||
|
<name>MissionCompiler</name>
|
||||||
|
<version>0.1</version>
|
||||||
|
<vendor>Ryzom Core</vendor>
|
||||||
|
<description>Mission Compiler Plugin</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_object_viewer</library-name>
|
||||||
|
<name>ObjectViewer</name>
|
||||||
|
<version>0.8</version>
|
||||||
|
<vendor>Ryzom Core</vendor>
|
||||||
|
<description>Object Viewer plugin.</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_sheet_builder</library-name>
|
||||||
|
<name>SheetBuilder</name>
|
||||||
|
<version>1.0</version>
|
||||||
|
<vendor>kharvd</vendor>
|
||||||
|
<description>make_sheet_id equivalent</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,10 @@
|
|||||||
|
<plugin-spec>
|
||||||
|
<library-name>ovqt_plugin_zone_painter</library-name>
|
||||||
|
<name>ZonePainter</name>
|
||||||
|
<version>0.0</version>
|
||||||
|
<vendor>Ryzom Core</vendor>
|
||||||
|
<description>Zone Painter Plugin</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency plugin-name="Core" version="0.8"/>
|
||||||
|
</dependencies>
|
||||||
|
</plugin-spec>
|
@ -0,0 +1,177 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# \file 8_upload.py
|
||||||
|
# \brief Upload data to servers
|
||||||
|
# \date 2009-02-18 16:19GMT
|
||||||
|
# \author Jan Boon (Kaetemi)
|
||||||
|
# Game data build pipeline.
|
||||||
|
# Upload data to servers
|
||||||
|
#
|
||||||
|
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||||
|
# Copyright (C) 2011 Kaetemi
|
||||||
|
#
|
||||||
|
# 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 *
|
||||||
|
|
||||||
|
try:
|
||||||
|
from upload import *
|
||||||
|
except ImportError:
|
||||||
|
# Not documenting this. Because we can.
|
||||||
|
printLog(log, "ERROR Upload not configured, bye.")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
sys.path.append(WorkspaceDirectory)
|
||||||
|
from projects import *
|
||||||
|
|
||||||
|
# Log error
|
||||||
|
printLog(log, "")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, "--- Upload data to servers")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||||
|
printLog(log, "")
|
||||||
|
|
||||||
|
# Find tools
|
||||||
|
# Not documenting this. Because we can.
|
||||||
|
Psftp = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, UploadPsftpTool)
|
||||||
|
printLog(log, "PSFTP " + Psftp)
|
||||||
|
|
||||||
|
def downloadVersionTag(server, user, dir):
|
||||||
|
if os.path.isfile("upload.tag"):
|
||||||
|
os.remove("upload.tag")
|
||||||
|
if os.path.isfile("upload.batch"):
|
||||||
|
os.remove("upload.batch")
|
||||||
|
ub = open("upload.batch", "w")
|
||||||
|
ub.write("cd " + dir + "\n")
|
||||||
|
ub.write("get upload.tag upload.tag\n")
|
||||||
|
ub.write("quit\n")
|
||||||
|
ub.close()
|
||||||
|
subprocess.call([ Psftp, "-b", "upload.batch", user + "@" + server ])
|
||||||
|
os.remove("upload.batch")
|
||||||
|
if os.path.isfile("upload.tag"):
|
||||||
|
ft = open("upload.tag")
|
||||||
|
result = float(ft.read()) # float, really
|
||||||
|
ft.close()
|
||||||
|
os.remove("upload.tag")
|
||||||
|
printLog(log, "INFO Upload tag is " + str(result))
|
||||||
|
return result
|
||||||
|
else:
|
||||||
|
printLog(log, "WARNING Upload tag not found, uploading everything")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def isDirectoryNeeded(ft, dir):
|
||||||
|
files = os.listdir(dir)
|
||||||
|
for fileName in files:
|
||||||
|
if isLegalFileName(fileName):
|
||||||
|
fileFull = dir + "/" + fileName
|
||||||
|
if os.path.isfile(fileFull):
|
||||||
|
nftf = os.stat(fileFull).st_mtime
|
||||||
|
if nftf > ft:
|
||||||
|
return True
|
||||||
|
elif os.path.isdir(fileFull):
|
||||||
|
if isDirectoryNeeded(ft, fileFull):
|
||||||
|
return True
|
||||||
|
elif not os.path.isdir(fileFull):
|
||||||
|
printLog(log, "isDirectoryNeeded: file not dir or file?!" + fileFull)
|
||||||
|
return False
|
||||||
|
|
||||||
|
def listDirectoryUpload(ft, ub, udb, dir):
|
||||||
|
nft = 0
|
||||||
|
files = os.listdir(dir)
|
||||||
|
for fileName in files:
|
||||||
|
if isLegalFileName(fileName):
|
||||||
|
fileFull = dir + "/" + fileName
|
||||||
|
if os.path.isfile(fileFull):
|
||||||
|
nftf = os.stat(fileFull).st_mtime
|
||||||
|
if nftf > ft:
|
||||||
|
ub.write("put " + fileFull + " " + fileName + "\n")
|
||||||
|
if nftf > nft:
|
||||||
|
nft = nftf
|
||||||
|
elif os.path.isdir(fileFull):
|
||||||
|
if isDirectoryNeeded(ft, fileFull):
|
||||||
|
udb.write("mkdir " + fileName + "\n")
|
||||||
|
ub.write("cd " + fileName + "\n")
|
||||||
|
udb.write("cd " + fileName + "\n")
|
||||||
|
nft2 = listDirectoryUpload(ft, ub, udb, fileFull)
|
||||||
|
if (nft2 > nft):
|
||||||
|
nft = nft2
|
||||||
|
ub.write("cd ..\n")
|
||||||
|
udb.write("cd ..\n")
|
||||||
|
elif not os.path.isdir(fileFull):
|
||||||
|
printLog(log, "listDirectoryUpload: file not dir or file?!" + fileFull)
|
||||||
|
return nft
|
||||||
|
|
||||||
|
def uploadSftp(server, user, dir_to, dir_from, addcmd):
|
||||||
|
ft = downloadVersionTag(server, user, dir_to)
|
||||||
|
if isDirectoryNeeded(ft, dir_from):
|
||||||
|
if os.path.isfile("upload_dir.batch"):
|
||||||
|
os.remove("upload_dir.batch")
|
||||||
|
if os.path.isfile("upload.batch"):
|
||||||
|
os.remove("upload.batch")
|
||||||
|
udb = open("upload_dir.batch", "w")
|
||||||
|
udb.write("cd " + dir_to + "\n")
|
||||||
|
ub = open("upload.batch", "w")
|
||||||
|
ub.write("cd " + dir_to + "\n")
|
||||||
|
for ac in addcmd:
|
||||||
|
ub.write(ac + "\n")
|
||||||
|
ftn = listDirectoryUpload(ft, ub, udb, dir_from)
|
||||||
|
if (ft > ftn):
|
||||||
|
ftn = ft
|
||||||
|
nft = open("upload.tag", "w")
|
||||||
|
nft.write(str(ftn))
|
||||||
|
nft.close()
|
||||||
|
ub.write("put upload.tag upload.tag\n")
|
||||||
|
ub.write("quit\n")
|
||||||
|
ub.close()
|
||||||
|
udb.write("quit\n")
|
||||||
|
udb.close()
|
||||||
|
subprocess.call([ Psftp, "-be", "-b", "upload_dir.batch", user + "@" + server ])
|
||||||
|
subprocess.call([ Psftp, "-b", "upload.batch", user + "@" + server ])
|
||||||
|
os.remove("upload_dir.batch")
|
||||||
|
os.remove("upload.batch")
|
||||||
|
os.remove("upload.tag")
|
||||||
|
else:
|
||||||
|
printLog(log, "SKIP " + dir_to)
|
||||||
|
|
||||||
|
printLog(log, ">>> Upload patch <<<")
|
||||||
|
for target in UploadPatch:
|
||||||
|
uploadSftp(target[0], target[1], target[3], ClientPatchDirectory + "/patch", [ ])
|
||||||
|
|
||||||
|
printLog(log, ">>> Upload data_shard <<<")
|
||||||
|
for target in UploadShard:
|
||||||
|
uploadSftp(target[0], target[1], target[3], DataShardDirectory, [ "rm *.packed_sheets", "rm primitive_cache/*.binprim" ])
|
||||||
|
|
||||||
|
printLog(log, ">>> Upload data_common <<<")
|
||||||
|
for target in UploadCommon:
|
||||||
|
uploadSftp(target[0], target[1], target[3], DataCommonDirectory, [ ])
|
||||||
|
|
||||||
|
printLog(log, ">>> Upload data_leveldesign <<<")
|
||||||
|
for target in UploadLeveldesign:
|
||||||
|
uploadSftp(target[0], target[1], target[3], LeveldesignDirectory, [ ])
|
||||||
|
|
||||||
|
log.close()
|
||||||
|
if os.path.isfile("8_upload.log"):
|
||||||
|
os.remove("8_upload.log")
|
||||||
|
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_upload.log")
|
||||||
|
shutil.move("log.log", "8_upload.log")
|
@ -1,16 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
printLog(log, ">>> List %PreGenFileExtension% <<<")
|
# Remove bad file from previous script version
|
||||||
outDirPacsPrim = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%
|
|
||||||
mkPath(log, outDirPacsPrim)
|
|
||||||
listPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% + "/landscape_col_prim_pacs_list.txt"
|
listPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable% + "/landscape_col_prim_pacs_list.txt"
|
||||||
if os.path.isfile(listPath):
|
if os.path.isfile(listPath):
|
||||||
os.remove(listPath)
|
os.remove(listPath)
|
||||||
if WantLandscapeColPrimPacsList:
|
|
||||||
exportedPacsPrims = findFiles(log, outDirPacsPrim, "", ".%PreGenFileExtension%")
|
|
||||||
printLog(log, "WRITE " + listPath)
|
|
||||||
listFile = open(listPath, "w")
|
|
||||||
for exported in exportedPacsPrims:
|
|
||||||
listFile.write(exported + "\n")
|
|
||||||
listFile.close()
|
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
1_export.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||||
|
2_build.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||||
|
3_install.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||||
|
5_client_dev.py
|
@ -0,0 +1,4 @@
|
|||||||
|
1_export.py -ipj common/gamedev common/data_common common/leveldesign common/exedll common/cfg
|
||||||
|
2_build.py -ipj common/gamedev common/data_common common/leveldesign common/exedll common/cfg
|
||||||
|
3_install.py -ipj common/gamedev common/data_common common/leveldesign common/exedll common/cfg
|
||||||
|
5_client_dev.py
|
@ -0,0 +1,58 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# \file 0_setup.py
|
||||||
|
# \brief setup pacs_prim_list
|
||||||
|
# \date 2011-09-28 7:22GMT
|
||||||
|
# \author Jan Boon (Kaetemi)
|
||||||
|
# Python port of game data build pipeline.
|
||||||
|
# Setup pacs_prim_list
|
||||||
|
#
|
||||||
|
# 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 process import *
|
||||||
|
from tools import *
|
||||||
|
from directories import *
|
||||||
|
|
||||||
|
printLog(log, "")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, "--- Setup pacs_prim_list")
|
||||||
|
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 PacsPrimExportSourceDirectories:
|
||||||
|
mkPath(log, ExportBuildDirectory + "/" + dir)
|
||||||
|
|
||||||
|
# Setup build directories
|
||||||
|
printLog(log, ">>> Setup build directories <<<")
|
||||||
|
mkPath(log, DataCommonDirectory) # no choice
|
||||||
|
|
||||||
|
log.close()
|
||||||
|
|
||||||
|
|
||||||
|
# end of file
|
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# \file 1_export.py
|
||||||
|
# \brief Export pacs_prim_list
|
||||||
|
# \date 2011-09-28 7:22GMT
|
||||||
|
# \author Jan Boon (Kaetemi)
|
||||||
|
# Python port of game data build pipeline.
|
||||||
|
# Export pacs_prim_list
|
||||||
|
#
|
||||||
|
# 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 process import *
|
||||||
|
from tools import *
|
||||||
|
from directories import *
|
||||||
|
|
||||||
|
printLog(log, "")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, "--- Export pacs_prim_list")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||||
|
printLog(log, "")
|
||||||
|
|
||||||
|
printLog(log, ">>> Nothing to do! <<<")
|
||||||
|
|
||||||
|
printLog(log, "")
|
||||||
|
|
||||||
|
log.close()
|
||||||
|
|
||||||
|
|
||||||
|
# end of file
|
@ -0,0 +1,63 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# \file 2_build.py
|
||||||
|
# \brief Build pacs_prim_list
|
||||||
|
# \date 2011-09-28 7:22GMT
|
||||||
|
# \author Jan Boon (Kaetemi)
|
||||||
|
# Python port of game data build pipeline.
|
||||||
|
# Build pacs_prim_list
|
||||||
|
#
|
||||||
|
# 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 process import *
|
||||||
|
from tools import *
|
||||||
|
from directories import *
|
||||||
|
|
||||||
|
printLog(log, "")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, "--- Build pacs_prim_list")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||||
|
printLog(log, "")
|
||||||
|
|
||||||
|
printLog(log, ">>> List pacs_prim <<<")
|
||||||
|
listPath = DataCommonDirectory + "/landscape_col_prim_pacs_list.txt"
|
||||||
|
if os.path.isfile(listPath):
|
||||||
|
os.remove(listPath)
|
||||||
|
listFile = open(listPath, "w")
|
||||||
|
printLog(log, "WRITE " + listPath)
|
||||||
|
for dir in PacsPrimExportSourceDirectories:
|
||||||
|
outDirPacsPrim = ExportBuildDirectory + "/" + dir
|
||||||
|
mkPath(log, outDirPacsPrim)
|
||||||
|
exportedPacsPrims = findFiles(log, outDirPacsPrim, "", ".pacs_prim")
|
||||||
|
for exported in exportedPacsPrims:
|
||||||
|
listFile.write(exported + "\n")
|
||||||
|
listFile.close()
|
||||||
|
|
||||||
|
log.close()
|
||||||
|
|
||||||
|
|
||||||
|
# end of file
|
@ -0,0 +1,52 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# \file 3_install.py
|
||||||
|
# \brief Install pacs_prim_list
|
||||||
|
# \date 2011-09-28 7:22GMT
|
||||||
|
# \author Jan Boon (Kaetemi)
|
||||||
|
# Python port of game data build pipeline.
|
||||||
|
# Install pacs_prim_list
|
||||||
|
#
|
||||||
|
# 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 process import *
|
||||||
|
from tools import *
|
||||||
|
from directories import *
|
||||||
|
|
||||||
|
printLog(log, "")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, "--- Install pacs_prim_list")
|
||||||
|
printLog(log, "-------")
|
||||||
|
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
|
||||||
|
printLog(log, "")
|
||||||
|
|
||||||
|
printLog(log, ">>> Nothing to do! <<<")
|
||||||
|
|
||||||
|
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