More clean up

Issue with duplicate include/define
This commit is contained in:
JackCarterSmith 2022-08-22 22:50:34 +02:00
parent c5e14436a2
commit 12d7409767
Signed by: JackCarterSmith
GPG Key ID: 832E52F4E23F8F24
9 changed files with 103 additions and 94 deletions

View File

@ -20,7 +20,7 @@ if(DEFINED ENV{CI}) # Jenkins CI integration mode
project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C) project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
set(RSE_MODEL_NAME $ENV{CI_OUTPUT_NAME}) set(RSE_MODEL_NAME $ENV{CI_OUTPUT_NAME})
else() # Standalone project mode, should not be used for release. else() # Standalone project mode, should not be used for release.
project(rse-model VERSION 2.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C) project(rse-model VERSION 2.1.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
set(RSE_MODEL_NAME RSEModel) set(RSE_MODEL_NAME RSEModel)
endif() endif()
set(RSP_MODEL_LIB_NAME RSPModel${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}) set(RSP_MODEL_LIB_NAME RSPModel${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR})

7
Jenkinsfile vendored
View File

@ -5,7 +5,7 @@ pipeline {
} }
environment { environment {
CI_OUTPUT_NAME = "RSEModel" CI_OUTPUT_NAME = "RSEModel"
CI_VERSION = "2.0.0" CI_VERSION = "2.1.0"
CI_BUILD_NUMBER = "$BUILD_NUMBER" CI_BUILD_NUMBER = "$BUILD_NUMBER"
} }
stages { stages {
@ -44,10 +44,10 @@ pipeline {
stage('Deploy') { stage('Deploy') {
steps { steps {
dir("zip_linux") { dir("zip_linux") {
sh 'cp -R ../linux/build/bin ../linux/build/lib ../linux/RSPModelLib/include .' sh 'cp -R ../linux/build/bin ../linux/build/lib ../linux/RSPTerrainLib/include .'
} }
dir("zip_win") { dir("zip_win") {
sh 'cp -R ../windows/build/bin ../windows/build/lib ../windows/RSPModelLib/include .' sh 'cp -R ../windows/build/bin ../windows/build/lib ../windows/RSPTerrainLib/include .'
} }
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'linux_x64.zip' zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'linux_x64.zip'
sh 'mv linux_x64.zip ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip' sh 'mv linux_x64.zip ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip'
@ -59,7 +59,6 @@ pipeline {
} }
stage('Sign') { stage('Sign') {
steps { steps {
sh 'ls -l'
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip' sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip'
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip' sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip'
archiveArtifacts(artifacts: '*.gpg') archiveArtifacts(artifacts: '*.gpg')

View File

@ -22,7 +22,7 @@ file(GLOB RSP_PUBLIC_HRDS ./include/*.h)
set(RSP_PUBLIC_HRDS ${RSP_PUBLIC_HRDS} PARENT_SCOPE) set(RSP_PUBLIC_HRDS ${RSP_PUBLIC_HRDS} PARENT_SCOPE)
# Building instructions for RSE-Model # Building instructions for RSP-Model library
if(DEFINED ENV{CI}) if(DEFINED ENV{CI})
set(CMAKE_BUILD_TYPE RELEASE) set(CMAKE_BUILD_TYPE RELEASE)
endif() endif()

View File

@ -10,8 +10,8 @@
#include "RSPModel_datatypes.h" #include "RSPModel_datatypes.h"
#ifndef RSPMODEL_H_ #ifndef RSPMODELLIB_H_
#define RSPMODEL_H_ #define RSPMODELLIB_H_
#if defined(_MSC_VER) #if defined(_MSC_VER)
@ -118,4 +118,4 @@ RSPMODEL_EXTERN unsigned short RSPModel_objectToD3D(
} }
#endif #endif
#endif /* RSPMODEL_H_ */ #endif /* RSPMODELLIB_H_ */

View File

@ -7,8 +7,8 @@
* *
*/ */
#ifndef RSPMODEL_DATATYPES_H_ #ifndef RSPMODELLIB_DATATYPES_H_
#define RSPMODEL_DATATYPES_H_ #define RSPMODELLIB_DATATYPES_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -34,15 +34,25 @@ typedef union u_rspmodel_parameters {
// Lib's structure definitions // Lib's structure definitions
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#ifndef MEMFILE
typedef char* MEMFILE; typedef char* MEMFILE;
#endif
#ifndef T_RGBA
typedef unsigned int T_RGBA; typedef unsigned int T_RGBA;
#endif
#ifndef T_VECTOR3
typedef struct vector3 { float x,y,z; } T_VECTOR3; typedef struct vector3 { float x,y,z; } T_VECTOR3;
#endif
#ifndef T_VERTEX
typedef struct vertex { short x,y,z,w; } T_VERTEX; typedef struct vertex { short x,y,z,w; } T_VERTEX;
#endif
#ifndef T_TEXCOORD
typedef struct tex_coord { unsigned short u,v; } T_TEXCOORD; typedef struct tex_coord { unsigned short u,v; } T_TEXCOORD;
#endif
typedef struct face_flags { typedef struct face_flags {
unsigned int fUnknown0:1; unsigned int fUnknown0:1;
@ -119,4 +129,4 @@ typedef struct rspmodel_hob {
} }
#endif #endif
#endif /* RSPMODEL_DATATYPES_H_ */ #endif /* RSPMODELLIB_DATATYPES_H_ */

View File

@ -10,8 +10,8 @@
#include <stdlib.h> #include <stdlib.h>
#ifndef RSPMODELLIB_ERRORS_H_ #ifndef RSPLIB_ERRORS_H_
#define RSPMODELLIB_ERRORS_H_ #define RSPLIB_ERRORS_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -42,4 +42,4 @@ extern "C" {
} }
#endif #endif
#endif /* RSPMODELLIB_ERRORS_H_ */ #endif /* RSPLIB_ERRORS_H_ */

View File

@ -10,8 +10,8 @@
#include "RSPModel_datatypes.h" #include "RSPModel_datatypes.h"
#ifndef SRC_HOB_PARSER_H_ #ifndef RSPMODELLIB_HOB_PARSER_H_
#define SRC_HOB_PARSER_H_ #define RSPMODELLIB_HOB_PARSER_H_
/** /**
* @brief Process HOB file stored in memory. * @brief Process HOB file stored in memory.
@ -48,4 +48,4 @@ unsigned char RSP_ModelLib_ParseHOBMemFile(const MEMFILE pMemFile,
unsigned char RSP_ModelLib_ParseHOBFile(const char* fileName, unsigned char RSP_ModelLib_ParseHOBFile(const char* fileName,
T_RSPMODEL_HOB* hobStruct, const RSPMODEL_PARAMETERS* pParams); T_RSPMODEL_HOB* hobStruct, const RSPMODEL_PARAMETERS* pParams);
#endif /* SRC_HOB_PARSER_H_ */ #endif /* RSPMODELLIB_HOB_PARSER_H_ */

View File

@ -38,7 +38,7 @@ PROJECT_NAME = RSE-Model
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = 1.0.0 PROJECT_NUMBER = 2.1.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a