From 440d0a5f311986683e994dddc10a56a59374167c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 23 Apr 2019 03:05:01 +0800 Subject: [PATCH] Update build settings --- .gitignore | 2 +- azure-pipelines.yml | 16 ++++-- code/CMakeModules/FindGOBJECT2.cmake | 51 +++++++++++++++++++ code/nel/tools/3d/pipeline_max/CMakeLists.txt | 7 +++ .../tools/3d/pipeline_max_dump/CMakeLists.txt | 7 +++ code/nel/tools/3d/pipeline_max_dump/main.cpp | 36 ++++++------- .../CMakeLists.txt | 7 +++ .../3d/pipeline_max_rewrite_assets/main.cpp | 36 ++++++------- 8 files changed, 120 insertions(+), 42 deletions(-) create mode 100644 code/CMakeModules/FindGOBJECT2.cmake diff --git a/.gitignore b/.gitignore index 1d7b8efd4..1f3f7abba 100644 --- a/.gitignore +++ b/.gitignore @@ -160,7 +160,7 @@ code/build/* code/build-2010/* build/* install/* -build_vc* +build_* code/nel/tools/build_gamedata/configuration/buildsite.py # Linux nel compile diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6e0f2b2a7..cfb8b4696 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,20 +12,26 @@ jobs: sudo apt-get install gcc-8 g++-8 -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 - sudo apt-get install libmysqlclient-dev -y sudo apt-get install bison autoconf automake -y - sudo apt-get install libpng12-dev libjpeg62-dev -y + sudo apt-get install libpng12-dev -y + sudo apt-get install libjpeg-dev -y + sudo apt-get install libgif-dev libfreetype6-dev -y + sudo apt-get install freeglut3-dev -y sudo apt-get install liblua5.1-dev libluabind-dev libcpptest-dev -y sudo apt-get install libogg-dev libvorbis-dev libopenal-dev -y - sudo apt-get install libgif-dev libfreetype6-dev -y + sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev -y + sudo apt-get install libmysqlclient-dev -y sudo apt-get install libxml2-dev -y - sudo apt-get install libcurl4-openssl-dev -y + sudo apt-get install libcurl4-openssl-dev libssl-dev -y + sudo apt-get install libsquish-dev -y + sudo apt-get install liblzma-dev -y + sudo apt-get install libgsf-1-dev -y displayName: 'Dependencies' - script: | mkdir build cmake --version cd build - cmake -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF ../code + cmake -DWITH_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=ON -DWITH_LIBGSF=ON ../code cat CMakeCache.txt displayName: 'CMake' - script: | diff --git a/code/CMakeModules/FindGOBJECT2.cmake b/code/CMakeModules/FindGOBJECT2.cmake new file mode 100644 index 000000000..d0d4cda0d --- /dev/null +++ b/code/CMakeModules/FindGOBJECT2.cmake @@ -0,0 +1,51 @@ +# - Try to find GObject2 +# Find GObject2 headers, libraries and the answer to all questions. +# +# GOBJECT2_FOUND True if GOBJECT2 got found +# GOBJECT2_INCLUDE_DIRS Location of GOBJECT2 headers +# GOBJECT2_LIBRARIES List of libraries to use GOBJECT2 +# +# Copyright (c) 2008 Bjoern Ricks +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +INCLUDE( FindPkgConfig ) + +IF ( GOBJECT2_FIND_REQUIRED ) + SET( _pkgconfig_REQUIRED "REQUIRED" ) +ELSE( GOBJECT2_FIND_REQUIRED ) + SET( _pkgconfig_REQUIRED "" ) +ENDIF ( GOBJECT2_FIND_REQUIRED ) + +IF ( GOBJECT2_MIN_VERSION ) + PKG_SEARCH_MODULE( GOBJECT2 ${_pkgconfig_REQUIRED} gobject-2.0>=${GOBJECT2_MIN_VERSION} ) +ELSE ( GOBJECT2_MIN_VERSION ) + PKG_SEARCH_MODULE( GOBJECT2 ${_pkgconfig_REQUIRED} gobject-2.0 ) +ENDIF ( GOBJECT2_MIN_VERSION ) + + +IF( NOT GOBJECT2_FOUND AND NOT PKG_CONFIG_FOUND ) + FIND_PATH( GOBJECT2_INCLUDE_DIRS gobject/gobject.h PATH_SUFFIXES glib-2.0) + FIND_LIBRARY( GOBJECT2_LIBRARIES gobject-2.0 ) + + # Report results + IF ( GOBJECT2_LIBRARIES AND GOBJECT2_INCLUDE_DIRS ) + SET( GOBJECT2_FOUND 1 ) + IF ( NOT GOBJECT2_FIND_QUIETLY ) + MESSAGE( STATUS "Found GOBJECT2: ${GOBJECT2_LIBRARIES}" ) + ENDIF ( NOT GOBJECT2_FIND_QUIETLY ) + ELSE ( GOBJECT2_LIBRARIES AND GOBJECT2_INCLUDE_DIRS ) + IF ( GOBJECT2_FIND_REQUIRED ) + MESSAGE( SEND_ERROR "Could NOT find GOBJECT2" ) + ELSE ( GOBJECT2_FIND_REQUIRED ) + IF ( NOT GOBJECT2_FIND_QUIETLY ) + MESSAGE( STATUS "Could NOT find GOBJECT2" ) + ENDIF ( NOT GOBJECT2_FIND_QUIETLY ) + ENDIF ( GOBJECT2_FIND_REQUIRED ) + ENDIF ( GOBJECT2_LIBRARIES AND GOBJECT2_INCLUDE_DIRS ) +ENDIF( NOT GOBJECT2_FOUND AND NOT PKG_CONFIG_FOUND ) + +MARK_AS_ADVANCED( GOBJECT2_LIBRARIES GOBJECT2_INCLUDE_DIRS ) diff --git a/code/nel/tools/3d/pipeline_max/CMakeLists.txt b/code/nel/tools/3d/pipeline_max/CMakeLists.txt index f80176150..9bc0086aa 100644 --- a/code/nel/tools/3d/pipeline_max/CMakeLists.txt +++ b/code/nel/tools/3d/pipeline_max/CMakeLists.txt @@ -5,6 +5,12 @@ IF (NOT (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)) MESSAGE(FATAL_ERROR "LIBGSF not found!") ENDIF (NOT (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)) +FIND_PACKAGE(GOBJECT2) + +if (NOT GOBJECT2_FOUND) + MESSAGE(FATAL_ERROR "GOBJECT2 not found!") +ENDIF (NOT GOBJECT2_FOUND) + FIND_PACKAGE(GLIB2) if (NOT GLIB2_FOUND) @@ -25,6 +31,7 @@ NL_TARGET_LIB(pipeline_max TARGET_LINK_LIBRARIES(pipeline_max ${LIBGSF_LIBRARIES} ${GLIB2_LIBRARIES} + ${GOBJECT2_LIBRARIES} nelmisc ) diff --git a/code/nel/tools/3d/pipeline_max_dump/CMakeLists.txt b/code/nel/tools/3d/pipeline_max_dump/CMakeLists.txt index d079d9000..5582079a1 100644 --- a/code/nel/tools/3d/pipeline_max_dump/CMakeLists.txt +++ b/code/nel/tools/3d/pipeline_max_dump/CMakeLists.txt @@ -5,6 +5,12 @@ IF (NOT (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)) MESSAGE(FATAL_ERROR "LIBGSF not found!") ENDIF (NOT (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)) +FIND_PACKAGE(GOBJECT2) + +if (NOT GOBJECT2_FOUND) + MESSAGE(FATAL_ERROR "GOBJECT2 not found!") +ENDIF (NOT GOBJECT2_FOUND) + FIND_PACKAGE(GLIB2) if (NOT GLIB2_FOUND) @@ -25,6 +31,7 @@ ADD_EXECUTABLE(pipeline_max_dump TARGET_LINK_LIBRARIES(pipeline_max_dump ${LIBGSF_LIBRARIES} ${GLIB2_LIBRARIES} + ${GOBJECT2_LIBRARIES} pipeline_max nelmisc ) diff --git a/code/nel/tools/3d/pipeline_max_dump/main.cpp b/code/nel/tools/3d/pipeline_max_dump/main.cpp index 58c366831..e74d0ec11 100644 --- a/code/nel/tools/3d/pipeline_max_dump/main.cpp +++ b/code/nel/tools/3d/pipeline_max_dump/main.cpp @@ -38,26 +38,26 @@ #include #include -#include "../max/storage_stream.h" -#include "../max/storage_object.h" -#include "../max/dll_directory.h" -#include "../max/class_directory_3.h" -#include "../max/class_data.h" -#include "../max/config.h" -#include "../max/scene.h" -#include "../max/scene_class_registry.h" +#include "../pipeline_max/storage_stream.h" +#include "../pipeline_max/storage_object.h" +#include "../pipeline_max/dll_directory.h" +#include "../pipeline_max/class_directory_3.h" +#include "../pipeline_max/class_data.h" +#include "../pipeline_max/config.h" +#include "../pipeline_max/scene.h" +#include "../pipeline_max/scene_class_registry.h" // Testing -#include "../max/builtin/builtin.h" -#include "../max/update1/update1.h" -#include "../max/epoly/epoly.h" +#include "../pipeline_max/builtin/builtin.h" +#include "../pipeline_max/update1/update1.h" +#include "../pipeline_max/epoly/epoly.h" -#include "../max/builtin/storage/app_data.h" -#include "../max/builtin/storage/geom_buffers.h" -#include "../max/builtin/scene_impl.h" -#include "../max/builtin/i_node.h" -#include "../max/update1/editable_mesh.h" -#include "../max/epoly/editable_poly.h" +#include "../pipeline_max/builtin/storage/app_data.h" +#include "../pipeline_max/builtin/storage/geom_buffers.h" +#include "../pipeline_max/builtin/scene_impl.h" +#include "../pipeline_max/builtin/i_node.h" +#include "../pipeline_max/update1/editable_mesh.h" +#include "../pipeline_max/epoly/editable_poly.h" using namespace PIPELINE::MAX; using namespace PIPELINE::MAX::BUILTIN; @@ -71,7 +71,7 @@ using namespace PIPELINE::MAX::EPOLY; //static const char *filename = "/home/kaetemi/3dsMax/scenes/teapot_test_scene.max"; //static const char *filename = "/home/kaetemi/3dsMax/scenes/testplane.max"; //static const char *filename = "/home/kaetemi/3dsMax/scenes/geomobjects.max"; -static const char *filename = "/mnt/tsurugi/ryzom-assets/database/landscape/ligo/desert/max/zonematerial-converted-165_eg.max"; +static const char *filename = "/mnt/tsurugi/ryzom-assets/database/landscape/ligo/desert/pipeline_max/zonematerial-converted-165_eg.max"; static const char *streamname = "Scene"; #define PBMS_GEOM_BUFFERS_POLY_A_VERTEX_CHUNK_ID 0x0100 diff --git a/code/nel/tools/3d/pipeline_max_rewrite_assets/CMakeLists.txt b/code/nel/tools/3d/pipeline_max_rewrite_assets/CMakeLists.txt index 4aa8a6652..556dde895 100644 --- a/code/nel/tools/3d/pipeline_max_rewrite_assets/CMakeLists.txt +++ b/code/nel/tools/3d/pipeline_max_rewrite_assets/CMakeLists.txt @@ -5,6 +5,12 @@ IF (NOT (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)) MESSAGE(FATAL_ERROR "LIBGSF not found!") ENDIF (NOT (LIBGSF_INCLUDE_DIR AND LIBGSF_LIBRARIES)) +FIND_PACKAGE(GOBJECT2) + +if (NOT GOBJECT2_FOUND) + MESSAGE(FATAL_ERROR "GOBJECT2 not found!") +ENDIF (NOT GOBJECT2_FOUND) + FIND_PACKAGE(GLIB2) if (NOT GLIB2_FOUND) @@ -25,6 +31,7 @@ ADD_EXECUTABLE(pipeline_max_rewrite_assets TARGET_LINK_LIBRARIES(pipeline_max_rewrite_assets ${LIBGSF_LIBRARIES} ${GLIB2_LIBRARIES} + ${GOBJECT2_LIBRARIES} pipeline_max nelmisc ) diff --git a/code/nel/tools/3d/pipeline_max_rewrite_assets/main.cpp b/code/nel/tools/3d/pipeline_max_rewrite_assets/main.cpp index 4a7aca040..fc07a0e18 100644 --- a/code/nel/tools/3d/pipeline_max_rewrite_assets/main.cpp +++ b/code/nel/tools/3d/pipeline_max_rewrite_assets/main.cpp @@ -47,26 +47,26 @@ #include "nel/misc/file.h" #include "nel/misc/mem_stream.h" -#include "../max/storage_stream.h" -#include "../max/storage_object.h" -#include "../max/dll_directory.h" -#include "../max/class_directory_3.h" -#include "../max/class_data.h" -#include "../max/config.h" -#include "../max/scene.h" -#include "../max/scene_class_registry.h" +#include "../pipeline_max/storage_stream.h" +#include "../pipeline_max/storage_object.h" +#include "../pipeline_max/dll_directory.h" +#include "../pipeline_max/class_directory_3.h" +#include "../pipeline_max/class_data.h" +#include "../pipeline_max/config.h" +#include "../pipeline_max/scene.h" +#include "../pipeline_max/scene_class_registry.h" // Testing -#include "../max/builtin/builtin.h" -#include "../max/update1/update1.h" -#include "../max/epoly/epoly.h" +#include "../pipeline_max/builtin/builtin.h" +#include "../pipeline_max/update1/update1.h" +#include "../pipeline_max/epoly/epoly.h" -#include "../max/builtin/storage/app_data.h" -#include "../max/builtin/storage/geom_buffers.h" -#include "../max/builtin/scene_impl.h" -#include "../max/builtin/i_node.h" -#include "../max/update1/editable_mesh.h" -#include "../max/epoly/editable_poly.h" +#include "../pipeline_max/builtin/storage/app_data.h" +#include "../pipeline_max/builtin/storage/geom_buffers.h" +#include "../pipeline_max/builtin/scene_impl.h" +#include "../pipeline_max/builtin/i_node.h" +#include "../pipeline_max/update1/editable_mesh.h" +#include "../pipeline_max/epoly/editable_poly.h" #include using namespace std; @@ -1506,7 +1506,7 @@ int main(int argc, char **argv) //handleFile(nativeDatabasePath("w:\\database\\stuff\\generique\\agents\\accessories\\ge_fy_wea_trib_grand_bouclier.max")); //handleFile(nativeDatabasePath("w:\\database\\stuff\\generique\\agents\\accessories\\ge_mission_entrepot.max")); //handleFile(nativeDatabasePath("w:\\database\\stuff\\generique\\agents\\accessories\\mesh_wip\\all_trib_weapons.max")); - //handleFile("/srv/work/database/landscape/ligo/jungle/max/zonematerial-foret-ruine_boss.max"); + //handleFile("/srv/work/database/landscape/ligo/jungle/pipeline_max/zonematerial-foret-ruine_boss.max"); //handleFile("/srv/work/database/stuff/fyros/agents/actors/male/animation/anims_non_utilisees/fy_hom_assis_boire_verre.max"); //handleFile("/home/kaetemi/3dsMax/scenes/test_clear_add_uvw.max"); //runScanner();