Fully removed 'rendering' library

This commit is contained in:
Michaël Lemaire 2013-12-11 10:17:36 +01:00 committed by Michael Lemaire
parent 5354087244
commit 84608a66a8
17 changed files with 12 additions and 172 deletions

View file

@ -1,6 +1,6 @@
BUILDMODE=release BUILDMODE=release
BUILDPATH=./build/${BUILDMODE} BUILDPATH=./build/${BUILDMODE}
LIBRARY_PATH=${BUILDPATH}/rendering:${BUILDPATH}/exploring:${BUILDPATH}/system:${BUILDPATH}/basics:${BUILDPATH}/definition:${BUILDPATH}/render/opengl:${BUILDPATH}/render/software:${BUILDPATH}/render/preview:${BUILDPATH}/tests/googletest LIBRARY_PATH=${BUILDPATH}/system:${BUILDPATH}/basics:${BUILDPATH}/definition:${BUILDPATH}/render/software:${BUILDPATH}/render/preview:${BUILDPATH}/render/opengl:${BUILDPATH}/tests/googletest
BUILD_SPEC=linux-g++ BUILD_SPEC=linux-g++
all:build all:build
@ -64,8 +64,8 @@ package:build
cp $(BUILDPATH)/basics/libpaysages_basics.so* paysages3d-linux/lib/ cp $(BUILDPATH)/basics/libpaysages_basics.so* paysages3d-linux/lib/
cp $(BUILDPATH)/definition/libpaysages_definition.so* paysages3d-linux/lib/ cp $(BUILDPATH)/definition/libpaysages_definition.so* paysages3d-linux/lib/
cp $(BUILDPATH)/render/software/libpaysages_render_software.so* paysages3d-linux/lib/ cp $(BUILDPATH)/render/software/libpaysages_render_software.so* paysages3d-linux/lib/
cp $(BUILDPATH)/render/preview/libpaysages_render_software.so* paysages3d-linux/lib/
cp $(BUILDPATH)/render/opengl/libpaysages_render_opengl.so* paysages3d-linux/lib/ cp $(BUILDPATH)/render/opengl/libpaysages_render_opengl.so* paysages3d-linux/lib/
cp $(BUILDPATH)/rendering/libpaysages_rendering.so* paysages3d-linux/lib/
cp $(BUILDPATH)/interface/desktop/paysages-gui paysages3d-linux/lib/ cp $(BUILDPATH)/interface/desktop/paysages-gui paysages3d-linux/lib/
chmod +x paysages3d-linux/lib/paysages-gui chmod +x paysages3d-linux/lib/paysages-gui
cp -r data paysages3d-linux/ cp -r data paysages3d-linux/

View file

@ -59,7 +59,7 @@ BaseDefinition* Layers::getLayer(int position) const
} }
else else
{ {
qWarning("Asked for a undefined layer %d on a total of %d", position, layers.size()); qWarning("Asked for a undefined layer %d on a total of %d", position, (int)layers.size());
return null_layer; return null_layer;
} }
} }
@ -75,7 +75,7 @@ int Layers::findLayer(BaseDefinition* layer) const
} }
i++; i++;
} }
qWarning("Layer %p not found, on a total of %d, returning %d", layer, layers.size(), -1); qWarning("Layer %p not found, on a total of %d, returning %d", layer, (int)layers.size(), -1);
return -1; return -1;
} }

View file

@ -27,12 +27,6 @@ else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition
INCLUDEPATH += $$PWD/../../definition INCLUDEPATH += $$PWD/../../definition
DEPENDPATH += $$PWD/../../definition DEPENDPATH += $$PWD/../../definition
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../rendering/release/ -lpaysages_rendering
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../rendering/debug/ -lpaysages_rendering
else:unix: LIBS += -L$$OUT_PWD/../../rendering/ -lpaysages_rendering
INCLUDEPATH += $$PWD/../../rendering
DEPENDPATH += $$PWD/../../rendering
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../render/software/release/ -lpaysages_render_software win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../render/software/release/ -lpaysages_render_software
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../render/software/debug/ -lpaysages_render_software else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../render/software/debug/ -lpaysages_render_software
else:unix: LIBS += -L$$OUT_PWD/../../render/software/ -lpaysages_render_software else:unix: LIBS += -L$$OUT_PWD/../../render/software/ -lpaysages_render_software

View file

@ -6,6 +6,7 @@
#include <QMenu> #include <QMenu>
#include <QIcon> #include <QIcon>
#include <QFileDialog> #include <QFileDialog>
#include <QFileInfo>
#include <QTabWidget> #include <QTabWidget>
#include <QTranslator> #include <QTranslator>
#include <QLocale> #include <QLocale>
@ -26,7 +27,6 @@
#include "dialogrender.h" #include "dialogrender.h"
#include "dialogexplorer.h" #include "dialogexplorer.h"
#include "main.h"
#include "DesktopScenery.h" #include "DesktopScenery.h"
#include "PackStream.h" #include "PackStream.h"
#include "tools.h" #include "tools.h"
@ -41,6 +41,12 @@ int main(int argc, char** argv)
QApplication app(argc, argv); QApplication app(argc, argv);
if (not QFileInfo("./data/.paysages_data").isReadable())
{
QMessageBox::critical(NULL, QObject::tr("Paysages 3D - Data error"), QObject::tr("Application data were not found. Please ensure the software is run from its original directory."));
return 1;
}
splash = new QSplashScreen(QPixmap(getDataPath("images/logo_256.png"))); splash = new QSplashScreen(QPixmap(getDataPath("images/logo_256.png")));
splash->show(); splash->show();
@ -63,7 +69,6 @@ int main(int argc, char** argv)
//splash->showMessage(app.tr("Preloading..."), Qt::AlignCenter, Qt::white); //splash->showMessage(app.tr("Preloading..."), Qt::AlignCenter, Qt::white);
app.processEvents(); app.processEvents();
paysagesInit();
BasePreview::initDrawers(); BasePreview::initDrawers();
window = new MainWindow(); window = new MainWindow();
@ -79,7 +84,6 @@ int main(int argc, char** argv)
delete window; delete window;
paysagesQuit();
return result; return result;
} }

View file

@ -133,12 +133,6 @@ else:unix: LIBS += -L$$OUT_PWD/../../basics/ -lpaysages_basics
INCLUDEPATH += $$PWD/../../basics INCLUDEPATH += $$PWD/../../basics
DEPENDPATH += $$PWD/../../basics DEPENDPATH += $$PWD/../../basics
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../rendering/release/ -lpaysages_rendering
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../rendering/debug/ -lpaysages_rendering
else:unix: LIBS += -L$$OUT_PWD/../../rendering/ -lpaysages_rendering
INCLUDEPATH += $$PWD/../../rendering
DEPENDPATH += $$PWD/../../rendering
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../definition/release/ -lpaysages_definition win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../definition/release/ -lpaysages_definition
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/debug/ -lpaysages_definition else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/debug/ -lpaysages_definition
else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition

View file

@ -5,7 +5,6 @@ SUBDIRS = \
system \ system \
basics \ basics \
definition \ definition \
rendering \
render/software \ render/software \
render/preview \ render/preview \
render/opengl \ render/opengl \

View file

@ -55,12 +55,6 @@ else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition
INCLUDEPATH += $$PWD/../../definition INCLUDEPATH += $$PWD/../../definition
DEPENDPATH += $$PWD/../../definition DEPENDPATH += $$PWD/../../definition
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../rendering/release/ -lpaysages_rendering
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../rendering/debug/ -lpaysages_rendering
else:unix: LIBS += -L$$OUT_PWD/../../rendering/ -lpaysages_rendering
INCLUDEPATH += $$PWD/../../rendering
DEPENDPATH += $$PWD/../../rendering
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../software/release/ -lpaysages_render_software win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../software/release/ -lpaysages_render_software
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../software/debug/ -lpaysages_render_software else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../software/debug/ -lpaysages_render_software
else:unix: LIBS += -L$$OUT_PWD/../software/ -lpaysages_render_software else:unix: LIBS += -L$$OUT_PWD/../software/ -lpaysages_render_software

View file

@ -66,12 +66,6 @@ else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition
INCLUDEPATH += $$PWD/../../definition INCLUDEPATH += $$PWD/../../definition
DEPENDPATH += $$PWD/../../definition DEPENDPATH += $$PWD/../../definition
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../rendering/release/ -lpaysages_rendering
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../rendering/debug/ -lpaysages_rendering
else:unix: LIBS += -L$$OUT_PWD/../../rendering/ -lpaysages_rendering
INCLUDEPATH += $$PWD/../../rendering
DEPENDPATH += $$PWD/../../rendering
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../software/release/ -lpaysages_render_software win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../software/release/ -lpaysages_render_software
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../software/debug/ -lpaysages_render_software else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../software/debug/ -lpaysages_render_software
else:unix: LIBS += -L$$OUT_PWD/../software/ -lpaysages_render_software else:unix: LIBS += -L$$OUT_PWD/../software/ -lpaysages_render_software

View file

@ -88,9 +88,3 @@ else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/de
else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition
INCLUDEPATH += $$PWD/../../definition INCLUDEPATH += $$PWD/../../definition
DEPENDPATH += $$PWD/../../definition DEPENDPATH += $$PWD/../../definition
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../rendering/release/ -lpaysages_rendering
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../rendering/debug/ -lpaysages_rendering
else:unix: LIBS += -L$$OUT_PWD/../../rendering/ -lpaysages_rendering
INCLUDEPATH += $$PWD/../../rendering
DEPENDPATH += $$PWD/../../rendering

View file

@ -1,20 +0,0 @@
#include "main.h"
#include <cstdio>
#include <cstdlib>
#include "tools/data.h"
void paysagesInit()
{
if (!dataInit())
{
/* TODO Add error callback (for interface) */
fprintf(stderr, "ERROR : Can't locate data files.\n");
exit(1);
}
}
void paysagesQuit()
{
}

View file

@ -1,9 +0,0 @@
#ifndef _PAYSAGES_MAIN_H_
#define _PAYSAGES_MAIN_H_
#include "rendering_global.h"
RENDERINGSHARED_EXPORT void paysagesInit();
RENDERINGSHARED_EXPORT void paysagesQuit();
#endif

View file

@ -1,35 +0,0 @@
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = lib
TARGET = paysages_rendering
DEFINES += RENDERING_LIBRARY
include(../common.pri)
SOURCES += main.cpp \
tools/data.cpp
HEADERS += \
main.h \
tools/data.h \
rendering_global.h
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../system/release/ -lpaysages_system
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../system/debug/ -lpaysages_system
else:unix: LIBS += -L$$OUT_PWD/../system/ -lpaysages_system
INCLUDEPATH += $$PWD/../system
DEPENDPATH += $$PWD/../system
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../basics/release/ -lpaysages_basics
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../basics/debug/ -lpaysages_basics
else:unix: LIBS += -L$$OUT_PWD/../basics/ -lpaysages_basics
INCLUDEPATH += $$PWD/../basics
DEPENDPATH += $$PWD/../basics
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../definition/release/ -lpaysages_definition
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../definition/debug/ -lpaysages_definition
else:unix: LIBS += -L$$OUT_PWD/../definition/ -lpaysages_definition
INCLUDEPATH += $$PWD/../definition
DEPENDPATH += $$PWD/../definition

View file

@ -1,13 +0,0 @@
#ifndef RENDERING_GLOBAL_H
#define RENDERING_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(RENDERING_LIBRARY)
# define RENDERINGSHARED_EXPORT Q_DECL_EXPORT
#else
# define RENDERINGSHARED_EXPORT Q_DECL_IMPORT
#endif
#include "definition_global.h"
#endif // RENDERING_GLOBAL_H

View file

@ -1,34 +0,0 @@
#include "data.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static const char* _datapath = NULL;
static int _tryDataPath(const char* path)
{
char* buffer;
buffer = (char*)malloc(sizeof (char) * (strlen(path) + 30));
strcpy(buffer, path);
strcat(buffer, "/.paysages_data");
FILE* f = fopen(buffer, "r");
free(buffer);
if (f)
{
_datapath = path;
fclose(f);
return 1;
}
else
{
return 0;
}
}
int dataInit()
{
return _tryDataPath("./data") || _tryDataPath("/usr/share/paysages3d");
}

View file

@ -1,12 +0,0 @@
#ifndef _PAYSAGES_TOOLS_DATA_H_
#define _PAYSAGES_TOOLS_DATA_H_
#include "../rendering_global.h"
/*
* Data directory management.
*/
RENDERINGSHARED_EXPORT int dataInit();
#endif

View file

@ -1,6 +1,6 @@
#include "BaseTestCase.h" #include "BaseTestCase.h"
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include "../rendering/main.h"
void noMessageOutput(QtMsgType, const QMessageLogContext&, const QString&) void noMessageOutput(QtMsgType, const QMessageLogContext&, const QString&)
{ {
@ -10,15 +10,11 @@ int main(int argc, char **argv)
{ {
int result; int result;
paysagesInit();
qInstallMessageHandler(noMessageOutput); qInstallMessageHandler(noMessageOutput);
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
result = RUN_ALL_TESTS(); result = RUN_ALL_TESTS();
paysagesQuit();
return result; return result;
} }

View file

@ -46,12 +46,6 @@ else:unix: LIBS += -L$$OUT_PWD/../definition/ -lpaysages_definition
INCLUDEPATH += $$PWD/../definition INCLUDEPATH += $$PWD/../definition
DEPENDPATH += $$PWD/../definition DEPENDPATH += $$PWD/../definition
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../rendering/release/ -lpaysages_rendering
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../rendering/debug/ -lpaysages_rendering
else:unix: LIBS += -L$$OUT_PWD/../rendering/ -lpaysages_rendering
INCLUDEPATH += $$PWD/../rendering
DEPENDPATH += $$PWD/../rendering
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../render/software/release/ -lpaysages_render_software win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../render/software/release/ -lpaysages_render_software
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../render/software/debug/ -lpaysages_render_software else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../render/software/debug/ -lpaysages_render_software
else:unix: LIBS += -L$$OUT_PWD/../render/software/ -lpaysages_render_software else:unix: LIBS += -L$$OUT_PWD/../render/software/ -lpaysages_render_software