From f05c52aa0bd40cc97cd19a32700d3854aac954fb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 19 Nov 2014 16:20:14 +0100 Subject: [PATCH 001/175] Remove PIC library --HG-- branch : develop --- code/nel/tools/3d/tile_edit/Browse.cpp | 6 +- code/nel/tools/3d/tile_edit/CMakeLists.txt | 2 +- .../nel/tools/3d/tile_edit/PIC/PIC_System.cpp | 126 ---- code/nel/tools/3d/tile_edit/PIC/Pic_BMP.cpp | 215 ------ code/nel/tools/3d/tile_edit/PIC/Pic_JPG.cpp | 160 ----- .../nel/tools/3d/tile_edit/PIC/Pic_Manage.cpp | 637 ------------------ code/nel/tools/3d/tile_edit/PIC/Pic_TGA.cpp | 215 ------ code/nel/tools/3d/tile_edit/PIC/pic.h | 58 -- code/nel/tools/3d/tile_edit/PIC/pic_private.h | 81 --- code/nel/tools/3d/tile_edit/PIC/readpic.cpp | 84 --- code/nel/tools/3d/tile_edit/PIC/readpic.h | 40 -- code/nel/tools/3d/tile_edit/View.cpp | 45 +- 12 files changed, 42 insertions(+), 1627 deletions(-) delete mode 100644 code/nel/tools/3d/tile_edit/PIC/PIC_System.cpp delete mode 100644 code/nel/tools/3d/tile_edit/PIC/Pic_BMP.cpp delete mode 100644 code/nel/tools/3d/tile_edit/PIC/Pic_JPG.cpp delete mode 100644 code/nel/tools/3d/tile_edit/PIC/Pic_Manage.cpp delete mode 100644 code/nel/tools/3d/tile_edit/PIC/Pic_TGA.cpp delete mode 100644 code/nel/tools/3d/tile_edit/PIC/pic.h delete mode 100644 code/nel/tools/3d/tile_edit/PIC/pic_private.h delete mode 100644 code/nel/tools/3d/tile_edit/PIC/readpic.cpp delete mode 100644 code/nel/tools/3d/tile_edit/PIC/readpic.h diff --git a/code/nel/tools/3d/tile_edit/Browse.cpp b/code/nel/tools/3d/tile_edit/Browse.cpp index 0d71ffad7..7c4f6d745 100644 --- a/code/nel/tools/3d/tile_edit/Browse.cpp +++ b/code/nel/tools/3d/tile_edit/Browse.cpp @@ -885,7 +885,7 @@ void Browse::OnChangeVariety() void Browse::OnBatchLoad () { CFileDialog sFile (true, NULL, NULL, OFN_ENABLESIZING, - "Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); + "PNG Bitmap (*.png)|*.png|Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); if (sFile.DoModal()==IDOK) { @@ -1365,7 +1365,7 @@ void Browse::OnExportBorder() { // Select a file CFileDialog sFile (false, NULL, NULL, OFN_ENABLESIZING, - "Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); + "PNG Bitmap (*.png)|*.png|Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); if (sFile.DoModal()==IDOK) { // Get the border of the bank @@ -1431,7 +1431,7 @@ void Browse::OnImportBorder() { // Select a file CFileDialog sFile (true, NULL, NULL, OFN_ENABLESIZING, - "Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); + "PNG Bitmap (*.png)|*.png|Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); if (sFile.DoModal()==IDOK) { // Get the border of the bank diff --git a/code/nel/tools/3d/tile_edit/CMakeLists.txt b/code/nel/tools/3d/tile_edit/CMakeLists.txt index ea7e1ac77..394359cd0 100644 --- a/code/nel/tools/3d/tile_edit/CMakeLists.txt +++ b/code/nel/tools/3d/tile_edit/CMakeLists.txt @@ -1,4 +1,4 @@ -FILE(GLOB SRC *.cpp *.h PIC/*.cpp PIC/*.h) +FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC2 cpu.cpp DllEntry.cpp Popup.* thread_win32.* TileCtrl.* TileList.* TileView.*) LIST(REMOVE_ITEM SRC ${SRC2}) diff --git a/code/nel/tools/3d/tile_edit/PIC/PIC_System.cpp b/code/nel/tools/3d/tile_edit/PIC/PIC_System.cpp deleted file mode 100644 index 439de9979..000000000 --- a/code/nel/tools/3d/tile_edit/PIC/PIC_System.cpp +++ /dev/null @@ -1,126 +0,0 @@ -#include -#include -#include -#include -#include - -#define PIC_ERRSIZE 256 - -static unsigned long PIC_Sys_MEM_Allocated; -static unsigned long PIC_Sys_MEM_NbAllocs; - -// ---------------------------------------------------------------------------------------------------------------------------------- - -void *Pic_malloc(unsigned long size) -{ - void *mem; - mem=malloc(size); - if (mem) - { - PIC_Sys_MEM_Allocated+=size; - PIC_Sys_MEM_NbAllocs++; - } - return(mem); -} -// ----- -void *Pic_calloc(unsigned long count, unsigned long size) -{ - void *mem; - mem=calloc(count,size); - if (mem) - { - PIC_Sys_MEM_Allocated+=(size*count); - PIC_Sys_MEM_NbAllocs++; - } - return(mem); -} -// ----- -void Pic_free(void *memblock) -{ - unsigned long size; - size=(unsigned long)_msize(memblock); - PIC_Sys_MEM_Allocated-=size; - PIC_Sys_MEM_NbAllocs--; - free(memblock); -} -// ----- -unsigned long Pic__msize(void *memblock) -{ - return(unsigned long)(_msize(memblock)); -} -// ----- -unsigned long PIC_GetMemNbAllocs(void) -{ - return(PIC_Sys_MEM_NbAllocs); -} -// ----- -unsigned long PIC_GetMemAllocated(void) -{ - return(PIC_Sys_MEM_Allocated); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -static char PIC_ErrorFlag; -static char PIC_ErrorString[PIC_ERRSIZE]; -static unsigned char PIC_Sys_FnctActive=0; -static void (*PIC_Sys_Fnct)(void); - -void Pic_SetError(const char *msg, ...) -{ - char curerr[PIC_ERRSIZE],olderr[PIC_ERRSIZE]; - va_list args; - - va_start(args,msg); - vsprintf(curerr,msg,args); - va_end(args); - if ( (strlen(curerr)+strlen(PIC_ErrorString))>PIC_ERRSIZE ) return; - - if (PIC_ErrorFlag) - { - strcpy(olderr,PIC_ErrorString); - sprintf(PIC_ErrorString,"--- [PIC#%03d] :\n%s",PIC_ErrorFlag,curerr); - strcat(PIC_ErrorString,"\n"); - strcat(PIC_ErrorString,olderr); - } - else - { - sprintf(PIC_ErrorString,"--- [PIC#%03d] :\n%s",PIC_ErrorFlag,curerr); - } - PIC_ErrorFlag++; - if (PIC_Sys_FnctActive) PIC_Sys_Fnct(); - return; -} -// ----- -char* PIC_GetError(void) -{ - return(PIC_ErrorString); -} -// ----- -unsigned char PIC_Error(void) -{ - return(PIC_ErrorFlag); -} -// ----- -void PIC_ResetError(void) -{ - strcpy(PIC_ErrorString,""); - PIC_ErrorFlag=0; -} -// ----- -unsigned char PIC_OnErrorCall( void pFnct(void) ) -{ - if (pFnct != NULL) - { - PIC_Sys_Fnct=pFnct; - PIC_Sys_FnctActive=1; - } - else - { - PIC_Sys_FnctActive=0; - } - return(1); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - diff --git a/code/nel/tools/3d/tile_edit/PIC/Pic_BMP.cpp b/code/nel/tools/3d/tile_edit/PIC/Pic_BMP.cpp deleted file mode 100644 index 9ea55e029..000000000 --- a/code/nel/tools/3d/tile_edit/PIC/Pic_BMP.cpp +++ /dev/null @@ -1,215 +0,0 @@ -#include -#include -#include - -#include "pic_private.h" -#include "pic.h" - -// ---------------------------------------------------------------------------------------------------------------------------------- - -#pragma pack(1) -typedef struct BMP_HEADER -{ - unsigned short bfType; - unsigned long bfSize; - unsigned short Res1; - unsigned short Res2; - unsigned long bfOffBits; - unsigned long biSize; - unsigned long biWidth; - unsigned long biHeight; - unsigned short biPlanes; - unsigned short biBitCount; - unsigned long biCompression; - unsigned long biSizeImage; - unsigned long biXPelsPerMeter; - unsigned long biYPelsPerMeter; - unsigned long biClrUsed; - unsigned long biClrImportant; -} BMP_HEADER; -#pragma pack() - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long Pic_BMP_Write( const char *FileName, - char *pPal, char *pDatas, - unsigned long w, unsigned long h, unsigned long d) - -{ - FILE *file; - BMP_HEADER bmph; - unsigned long slsize; - unsigned char *scanline; - unsigned long i; - long x,y,rest; - unsigned char r,g,b; - - file=fopen(FileName,"wb"); - if (!file) - { - return(0); - } - memset(&bmph,0,sizeof(BMP_HEADER)); - bmph.bfType=19778; - bmph.bfSize=sizeof(BMP_HEADER); - bmph.bfSize+=w*h*d/8; - if (pPal) - { - bmph.bfSize+=(256*4); - } - bmph.bfOffBits=sizeof(BMP_HEADER); - if (pPal) - { - bmph.bfOffBits+=(256*4); - } - bmph.biSize=40;//sizeof(BMP_HEADER); - bmph.biWidth=w; - bmph.biHeight=h; - bmph.biPlanes=1; - bmph.biBitCount=(unsigned short)d; - bmph.biCompression=0; - bmph.biSizeImage=w*h*d/8; - - fwrite(&bmph,1,sizeof(BMP_HEADER),file); - if (pPal) - { - for(i=0 ; i<256 ; i++) - { - fwrite(&pPal[i*3+0],1,1,file); - fwrite(&pPal[i*3+1],1,1,file); - fwrite(&pPal[i*3+2],1,1,file); - fwrite(&pPal[i*3+2],1,1,file); - } - } - slsize=w*d/8; - scanline=(unsigned char*)Pic_calloc(1,slsize); - if (!scanline) - { - Pic_SetError("BMP_Write, not enough memory for scanline"); - return(0); - } - for(rest=0 ; ((w*d/8)+rest)%4!=0 ; rest++); - for(y=0 ; y<(long)h ; y++) - { - memcpy(scanline,&pDatas[(h-y-1)*slsize],slsize); - if (d==24) - { - for(x=0 ; x<(long)w ; x++) - { - b=scanline[x*3+0]; - g=scanline[x*3+1]; - r=scanline[x*3+2]; - scanline[x*3+0]=b; - scanline[x*3+1]=g; - scanline[x*3+2]=r; - } - } - fwrite(scanline,1,slsize,file); - if (rest) - { - fwrite(scanline,1,rest,file); - } - } - Pic_free(scanline); - fclose(file); - return(1); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long Pic_BMP_Read( const char *FileName, - char **ppPal, char **ppDatas, - unsigned long *pWidth, unsigned long *pHeight, - unsigned long *pDepth) -{ - FILE *file; - BMP_HEADER bmph; - char *pPal; - char *pDatas; - unsigned char *scanline; - long w,h,d; - long i,x,y,rest; - unsigned char r,g,b; - unsigned char pad[4]; - - pPal=NULL; - pDatas=NULL; - file=fopen(FileName,"rb"); - if (!file) - { - Pic_SetError("BMP_Read, unable to open %s",FileName); - return(0); - } - fread(&bmph,1,sizeof(BMP_HEADER),file); - *pWidth=w=bmph.biWidth; - *pHeight=h=bmph.biHeight; - *pDepth=d=bmph.biBitCount; - if (d!=8 && d!=24) - { - Pic_SetError("BMP_Read, number of bits per pixel unsupported"); - return(0); - } - if (*pDepth==8) - { - pPal=(char*)Pic_calloc(1,256*3); - if (!pPal) - { - Pic_SetError("BMP_Read, not enough memory for palette"); - return(0); - } - for(i=0 ; i<256 ; i++) - { - fread(&pPal[i*3+2],1,1,file); - fread(&pPal[i*3+1],1,1,file); - fread(&pPal[i*3+0],1,1,file); - fread(&pad[0],1,1,file); - } - } - pDatas=(char*)Pic_calloc(1,w*h*d/8); - if (!pDatas) - { - if (pPal) - { - Pic_free(pPal); - } - Pic_SetError("BMP_Read, not enough memory for datas"); - return(0); - } - scanline=(unsigned char*)Pic_calloc(1,w*h*d/8); - if (!scanline) - { - if (pPal) - { - Pic_free(pPal); - } - Pic_free(pDatas); - Pic_SetError("BMP_Read, not enough memory for scanline"); - return(0); - } - for(rest=0 ; (w+rest)%4!=0 ; rest++); - for(y=0 ; y -#include -#include -#include - -#include -#include "pic_private.h" -#include "pic.h" - -// ---------------------------------------------------------------------------------------------------------------------------------- - -struct my_error_mgr -{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; -}; -typedef struct my_error_mgr * my_error_ptr; - -// ---------------------------------------------------------------------------------------------------------------------------------- - -static unsigned char error; - -// ---------------------------------------------------------------------------------------------------------------------------------- - -void my_error_exit(j_common_ptr cinfo) -{ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - error=1; - longjmp(myerr->setjmp_buffer, 1); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long Pic_JPG_Read(const char *FileName, char **ppPal, char **ppDatas, unsigned long *w, unsigned long *h) -{ - struct jpeg_decompress_struct cinfo; - struct my_error_mgr jerr; - FILE *file; - JSAMPARRAY buffer; - int row_stride,i; - char *pDatas,*pPal; - unsigned long ptr; - - error=0; - ptr=0; - file=fopen(FileName, "rb"); - if (!file) - { - Pic_SetError("JPG_Read, unable to open %s",FileName); - return(0); - } - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - setjmp(jerr.setjmp_buffer); - if (error) - { - Pic_SetError("JPG_Read, internal decompression error"); - jpeg_destroy_decompress(&cinfo); - return(0); - } - jpeg_create_decompress(&cinfo); - jpeg_stdio_src(&cinfo, file); - (void) jpeg_read_header(&cinfo, TRUE); - *w=cinfo.image_width; - *h=cinfo.image_height; - if (!ppPal) - { - pDatas=(char*)Pic_calloc(1,(*w)*(*h)*3); - } - else - { - pDatas=(char*)Pic_calloc(1,(*w)*(*h)); - pPal=(char*)Pic_calloc(1,256*3); - if (!pPal) - { - Pic_SetError("JPG_Read, not enough memory for palette"); - return(0); - } - cinfo.desired_number_of_colors = 256; - cinfo.quantize_colors = TRUE; - cinfo.dither_mode = JDITHER_ORDERED; - } - if (!pDatas) - { - Pic_SetError("JPG_Read, not enough memory for pic"); - return(0); - } - (void) jpeg_start_decompress(&cinfo); - row_stride = cinfo.output_width * cinfo.output_components; - buffer = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - while (cinfo.output_scanline < cinfo.output_height) - { - (void) jpeg_read_scanlines(&cinfo, buffer, 1); - memcpy(&pDatas[ptr],buffer[0],row_stride); - ptr+=row_stride; - } - *ppDatas=pDatas; - if (ppPal) - { - for(i=0 ; i<256 ; i++) - { - pPal[i*3+0]=cinfo.colormap[2][i]; - pPal[i*3+1]=cinfo.colormap[1][i]; - pPal[i*3+2]=cinfo.colormap[0][i]; - } - *ppPal=pPal; - } - (void) jpeg_finish_decompress(&cinfo); - jpeg_destroy_decompress(&cinfo); - fclose(file); - return(1); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long Pic_JPG_Write(const char *FileName, unsigned long Qual, char *pDatas, unsigned long w, unsigned long h) -{ - struct jpeg_compress_struct cinfo; - struct my_error_mgr jerr; - FILE *file; - JSAMPROW row_pointer[1]; - int row_stride; - - error=0; - file=fopen(FileName,"wb"); - if (!file) - { - Pic_SetError("JPG_Write, unable to open %s",FileName); - return(0); - } - jpeg_create_compress(&cinfo); - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - setjmp(jerr.setjmp_buffer); - if (error) - { - Pic_SetError("JPG_Write, internal compression error"); - jpeg_destroy_compress(&cinfo); - return(0); - } - jpeg_stdio_dest(&cinfo, file); - cinfo.image_width = w; - cinfo.image_height = h; - cinfo.input_components = 3; - cinfo.in_color_space = JCS_RGB; - jpeg_set_defaults(&cinfo); - jpeg_set_quality(&cinfo, Qual, TRUE); - jpeg_start_compress(&cinfo, TRUE); - row_stride = w * 3; - while(cinfo.next_scanline -#include "pic_private.h" -#include "pic.h" - -static unsigned long NbPics=0; -static PIC_PICTURE *HeadPic=NULL; - -// ---------------------------------------------------------------------------------------------------------------------------------- - -static PIC_PICTURE *GetPic(unsigned long id) -{ - PIC_PICTURE *pic; - - for(pic=HeadPic ; pic ; pic=pic->Next) - { - if (pic->ID==id) - { - return(pic); - } - } - return(NULL); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long PIC_Load(char* FileName, unsigned char Quantize) -{ - char ext[4]; - unsigned long type; - unsigned long i,taken,id; - PIC_PICTURE *pic; - char *pDatas; - char *pPal; - unsigned long w,h,Depth; - unsigned long ret; - - // --- Init - ret=0; - type=0; - id=0; - taken=0; - w=0; - h=0; - Depth=0; - pic=NULL; - pDatas=NULL; - pPal=NULL; - // --- Get 1st available ID - for(i=1 ; i<=NbPics+1 ; i++) - { - taken=0; - for(pic=HeadPic ; pic ; pic=pic->Next) - { - if (pic->ID==i) - { - taken=1; - break; - } - } - if (!taken) - { - id=i; - break; - } - } - if (!id) - { - Pic_SetError("Load, unable to create ID"); - return(0); - } - // --- Load pic - if (FileName) - { - ext[0]=FileName[strlen(FileName)-3]; - ext[1]=FileName[strlen(FileName)-2]; - ext[2]=FileName[strlen(FileName)-1]; - ext[3]=0; - strupr(ext); - if ( !strcmp(ext,"JPG") ) - { - type=1; - } - else if ( !strcmp(ext,"TGA") ) - { - type=2; - } - else if ( !strcmp(ext,"BMP") ) - { - type=3; - } - - switch(type) - { - // - JPG - case 1: - if (!Quantize) - { - Depth=24; - ret=Pic_JPG_Read(FileName,NULL,&pDatas,&w,&h); - } - else - { - Depth=8; - ret=Pic_JPG_Read(FileName,&pPal,&pDatas,&w,&h); - } - if (!ret) - { - Pic_SetError("Load, unable to load JPG file %s",FileName); - return(0); - } - break; - // - TGA - case 2: - ret=Pic_TGA_Read(FileName,&pPal,&pDatas,&w,&h,&Depth); - if (!ret) - { - Pic_SetError("Load, unable to load TGA file %s",FileName); - return(0); - } - break; - // - BMP - case 3: - ret=Pic_BMP_Read(FileName,&pPal,&pDatas,&w,&h,&Depth); - if (!ret) - { - Pic_SetError("Load, unable to load BMP file %s",FileName); - return(0); - } - break; - // - Unknown - default: - Pic_SetError("Load, unknown extension for %s",FileName); - return(0); - } - } - - // --- Create and place new pic struct - pic=(PIC_PICTURE *)Pic_calloc(1,sizeof(PIC_PICTURE)); - if (!pic) - { - Pic_SetError("Load, not enough memory for internal structure"); - return(0); - } - pic->Next=HeadPic; - HeadPic=pic; - NbPics++; - pic->ID=id; - pic->pDatas=pDatas; - pic->pPal=pPal; - pic->Width=w; - pic->Height=h; - pic->Depth=Depth; - return(id); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long PIC_Create(char* pPal, char* pDatas, unsigned long w, unsigned long h, unsigned long d) -{ - unsigned long i,taken,id; - PIC_PICTURE *pic; - - // --- Init - id=0; - taken=0; - pic=NULL; - // --- Get 1st available ID - for(i=1 ; i<=NbPics+1 ; i++) - { - taken=0; - for(pic=HeadPic ; pic ; pic=pic->Next) - { - if (pic->ID==i) - { - taken=1; - break; - } - } - if (!taken) - { - id=i; - break; - } - } - if (!id) - { - Pic_SetError("Create, unable to create ID"); - return(0); - } - // --- Create pic - if (!pDatas) - { - pDatas=(char *)Pic_calloc(1,w*h*d/8); - if (!pDatas) - { - Pic_SetError("Create, not enough memory for datas"); - return(0); - } - } - if (d==8) - { - if (!pPal) - { - pPal=(char *)Pic_calloc(1,256*3); - if (!pPal) - { - Pic_SetError("Create, not enough memory for palette"); - return(0); - } - } - } - else - { - pPal=NULL; - } - // --- Create and place new pic struct - pic=(PIC_PICTURE *)Pic_calloc(1,sizeof(PIC_PICTURE)); - if (!pic) - { - Pic_SetError("Create, not enough memory for internal structure"); - return(0); - } - pic->Next=HeadPic; - HeadPic=pic; - NbPics++; - pic->ID=id; - pic->pDatas=pDatas; - pic->pPal=pPal; - pic->Width=w; - pic->Height=h; - pic->Depth=d; - return(id); - -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long PIC_GetInfos( unsigned long id, - char **ppPal, char **ppDatas, - unsigned long *pW, unsigned long *pH, unsigned long *pD) -{ - PIC_PICTURE *pic; - - pic=GetPic(id); - if (!pic) - { - Pic_SetError("GetInfos, picture internal structure not found"); - return(0); - } - if (ppPal) - { - *ppPal=pic->pPal; - } - if (ppDatas) - { - *ppDatas=pic->pDatas; - } - if (pW) - { - *pW=pic->Width; - } - if (pH) - { - *pH=pic->Height; - } - if (pD) - { - *pD=pic->Depth; - } - return(id); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -static char* Conv8To24(unsigned long id) -{ - PIC_PICTURE *pic; - char *buf; - unsigned long i; - - pic=GetPic(id); - if (!pic) - { - Pic_SetError("Conv8To24, picture internal structure not found"); - return(NULL); - } - buf=(char *)Pic_malloc(pic->Width*pic->Height*3); - if (!buf) - { - Pic_SetError("Conv8To24, not enough memory for temporary buffer"); - return(NULL); - } - for(i=0 ; iWidth*pic->Height ; i++) - { - buf[i*3+0]=pic->pPal[pic->pDatas[i]*3+0]; - buf[i*3+1]=pic->pPal[pic->pDatas[i]*3+1]; - buf[i*3+2]=pic->pPal[pic->pDatas[i]*3+2]; - } - return(buf); -} - -// ---------------------------------------- -static char* Conv8To16(unsigned long id) -{ - PIC_PICTURE *pic; - unsigned short *buf; - unsigned long i; - unsigned short r,g,b,pix16; - - pic=GetPic(id); - if (!pic) - { - Pic_SetError("Conv8To24, picture internal structure not found"); - return(NULL); - } - buf=(unsigned short*)Pic_malloc(pic->Width*pic->Height*2); - if (!buf) - { - Pic_SetError("Conv8To24, not enough memory for temporary buffer"); - return(NULL); - } - for(i=0 ; iWidth*pic->Height ; i++) - { - b=pic->pPal[pic->pDatas[i]*3+0]; - g=pic->pPal[pic->pDatas[i]*3+1]; - r=pic->pPal[pic->pDatas[i]*3+2]; - r>>=3; - g>>=3; g&=0x3E; - b>>=3; - pix16=(r<<10)+(g<<5)+b; - buf[i]=pix16; - } - return (char*)buf; -} - -// ---------------------------------------- - -static char* Conv16To24(unsigned long id) -{ - PIC_PICTURE *pic; - unsigned short *pDatas; - unsigned char *buf; - unsigned long i; - unsigned short r,g,b; - - pic=GetPic(id); - if (!pic) - { - Pic_SetError("Conv16To24, picture internal structure not found"); - return(NULL); - } - buf=(unsigned char *)Pic_malloc(pic->Width*pic->Height*3); - if (!buf) - { - Pic_SetError("Conv16To24, not enough memory for temporary buffer"); - return(NULL); - } - pDatas=(unsigned short*)pic->pDatas; - for(i=0 ; iWidth*pic->Height ; i++) - { - r=(pDatas[i] & 0x7C00)>>(10-3); - g=(pDatas[i] & 0x03E0)>>(5-3); - b=(pDatas[i] & 0x001F)<<3; - buf[i*3+0]=(unsigned char)r; - buf[i*3+1]=(unsigned char)g; - buf[i*3+2]=(unsigned char)b; - } - return (char*)buf; -} - -// ---------------------------------------- - -static char* Conv24To16(unsigned long id) -{ - PIC_PICTURE *pic; - unsigned short *buf; - unsigned long i; - unsigned short r,g,b; - unsigned short pix16; - - pic=GetPic(id); - if (!pic) - { - Pic_SetError("Conv24To16, picture internal structure not found"); - return(NULL); - } - buf=(unsigned short*)Pic_malloc(pic->Width*pic->Height*2); - if (!buf) - { - Pic_SetError("Conv24To16, not enough memory for temporary buffer"); - return(NULL); - } - for(i=0 ; iWidth*pic->Height ; i++) - { - r=pic->pDatas[i*3+0]; - g=pic->pDatas[i*3+1]; - b=pic->pDatas[i*3+2]; - // r : 5 bits forts (0x7C) - // g : 5 bits (6e zapped) (0x3E) - // b : 5 bits faibles (0x1F) - r>>=3; - g>>=3; g&=0x3E; - b>>=3; - pix16=(r<<10)+(g<<5)+b; - buf[i]=pix16; - } - return (char*)buf; -} - -// ---------------------------------------- - -static char* ConvPic(PIC_PICTURE *pic, unsigned long type, char* pErr) -{ - char *buf; - unsigned long src,dst; - - *pErr=0; - buf=NULL; - src=pic->Depth; - if (type==PIC_TYPE_TGA8 || type==PIC_TYPE_BMP8) - { - dst=8; - } - if (type==PIC_TYPE_TGA16) - { - dst=16; - } - if (type==PIC_TYPE_JPG || type==PIC_TYPE_TGA24 || type==PIC_TYPE_BMP24) - { - dst=24; - } - // --- - if (src==dst) - { - return(NULL); - } - // --- - if (src==8 && dst==24) - { - buf=Conv8To24(pic->ID); - if (!buf) - { - *pErr=1; - } - return(buf); - } - if (src==8 && dst==16) - { - buf=Conv8To16(pic->ID); - if (!buf) - { - *pErr=1; - } - return(buf); - } - // --- - if (src==16 && dst==24) - { - buf=Conv16To24(pic->ID); - if (!buf) - { - *pErr=1; - } - return(buf); - } - // --- - if (src==24 && dst==16) - { - buf=Conv24To16(pic->ID); - if (!buf) - { - *pErr=1; - } - return buf; - } - // --- - if (src==24 && dst==8) - { - Pic_SetError("ConvPic, downsampling 24 to 8 bits unsupported"); - *pErr=1; - return(NULL); - } - Pic_SetError("ConvPic, conversion %d to %d unsupported",src,dst); - *pErr=1; - return(NULL); -} - -// ---------------------------------------- - -unsigned long PIC_Save(unsigned long id, char* FileName, unsigned long type, unsigned long qual) -{ - PIC_PICTURE *pic; - char err; - char *buf; - char *freeit; - unsigned long depth; - - freeit=NULL; - pic=GetPic(id); - if (!pic) - { - Pic_SetError("Save %s, picture internal structure not found",FileName); - return(0); - } - freeit = ConvPic(pic,type,&err); - if (err) - { - Pic_SetError("Save %s, error while converting picture",FileName); - return(0); - } - if (!freeit) - { - buf=pic->pDatas; - } - else - { - buf=freeit; - } - err=0; - switch(type) - { - // --- - case PIC_TYPE_JPG: - if ( !Pic_JPG_Write(FileName,qual,buf,pic->Width,pic->Height) ) - { - if (freeit) - { - Pic_free(buf); - } - Pic_SetError("Save %s, error while saving JPG file",FileName); - err=1; - } - break; - // --- - case PIC_TYPE_TGA8: - case PIC_TYPE_TGA16: - case PIC_TYPE_TGA24: - if (type==PIC_TYPE_TGA8) - { - depth=8; - } - if (type==PIC_TYPE_TGA16) - { - depth=16; - } - if (type==PIC_TYPE_TGA24) - { - depth=24; - } - if ( !Pic_TGA_Write(FileName,pic->pPal,buf,pic->Width,pic->Height,depth) ) - { - if (freeit) - { - Pic_free(freeit); - } - Pic_SetError("Save %s, error while saving TGA file",FileName); - err=1; - } - break; - // --- - case PIC_TYPE_BMP8: - case PIC_TYPE_BMP24: - if (type==PIC_TYPE_BMP8) - { - depth=8; - } - if (type==PIC_TYPE_BMP24) - { - depth=24; - } - if ( !Pic_BMP_Write(FileName,pic->pPal,buf,pic->Width,pic->Height,depth) ) - { - if (freeit) - { - Pic_free(freeit); - } - Pic_SetError("Save %s, error while saving BMP file",FileName); - err=1; - } - break; - // --- - default: - Pic_SetError("Save %s, unknow save format/type",FileName); - err=1; - break; - } - if (freeit) - { - Pic_free(freeit); - } - return(err-1); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long PIC_Destroy(unsigned long id) -{ - PIC_PICTURE *prevpic,*pic; - unsigned long found; - - prevpic=NULL; - found=0; - for(pic=HeadPic ; pic ; pic=pic->Next) - { - if (pic->ID==id) - { - found=1; - break; - } - prevpic=pic; - } - if (!found) - { - Pic_SetError("Destroy, picture internal structure not found"); - return(0); - } - if (prevpic) - { - prevpic->Next=pic->Next; - } - if (pic->pDatas) - { - Pic_free(pic->pDatas); - } - if (pic->pPal) - { - Pic_free(pic->pPal); - } - if (pic==HeadPic) - { - HeadPic=pic->Next; - } - Pic_free(pic); - return(1); -} - -// ---------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/code/nel/tools/3d/tile_edit/PIC/Pic_TGA.cpp b/code/nel/tools/3d/tile_edit/PIC/Pic_TGA.cpp deleted file mode 100644 index 6d69b914e..000000000 --- a/code/nel/tools/3d/tile_edit/PIC/Pic_TGA.cpp +++ /dev/null @@ -1,215 +0,0 @@ -#include -#include -#include - -#include "pic_private.h" -#include "pic.h" - -// ---------------------------------------------------------------------------------------------------------------------------------- - -#pragma pack(1) -typedef struct TGA_HEADER -{ - unsigned char LengthID; - unsigned char CMapType; - unsigned char ImageType; - unsigned short Origin; - unsigned short Length; - unsigned char Depth; - unsigned short XOrg; - unsigned short YOrg; - unsigned short Width; - unsigned short Height; - unsigned char ImageDepth; - unsigned char Desc; -} TGA_HEADER; -#pragma pack() - -// ---------------------------------------------------------------------------------------------------------------------------------- - -unsigned long Pic_TGA_Read( const char *FileName, - char **ppPal, char **ppDatas, - unsigned long *pWidth, unsigned long *pHeight, - unsigned long *pDepth) -{ - FILE *file; - TGA_HEADER tgah; - long w,h,d; - unsigned long size; - char *pDatas; - char *pPal; - long x,y; - long slsize; - unsigned char *scanline; - unsigned char r,g,b; - long i; - int upSideDown; - - pDatas=NULL; - pPal=NULL; - file=fopen(FileName,"rb"); - if (!file) - { - Pic_SetError("TGA_Read, unable to open %s",FileName); - return(0); - } - fread(&tgah,1,sizeof(TGA_HEADER),file); - if (tgah.ImageType>3) - { - Pic_SetError("TGA_Read, unsupported TGA format"); - return(0); - } - *pWidth=w=tgah.Width; - *pHeight=h=tgah.Height; - *pDepth=d=tgah.ImageDepth; - upSideDown = ((tgah.Desc & (1 << 5))==0); - - size=tgah.Width*tgah.Height*(tgah.ImageDepth/8); - pDatas=(char*)Pic_malloc(size); - if (!pDatas) - { - Pic_SetError("TGA_Read, not enough memory"); - return(0); - } - if (*pDepth==8) - { - if (!ppPal) - { - Pic_free(pDatas); - Pic_SetError("TGA_Read, need a pointer to palette"); - return(0); - } - pPal=(char*)Pic_calloc(1,256*3); - if (!pPal) - { - Pic_SetError("TGA_Read, not enough memory for palette"); - return(0); - } - if (tgah.ImageType==1) - { - for(i=0 ; i<256*3 ; i+=3) - { - fread(&pPal[i+2],1,1,file); - fread(&pPal[i+1],1,1,file); - fread(&pPal[i+0],1,1,file); - } - } - *ppPal=pPal; - } - - slsize=w*d/8; - scanline=(unsigned char*)Pic_calloc(1,slsize); - if (!scanline) - { - if (pPal) - { - Pic_free(pPal); - } - Pic_free(pDatas); - Pic_SetError("TGA_Read, not enough memory for scanline"); - return(0); - } - for(y=0 ; y8) - { - tgah.CMapType=0; - tgah.ImageType=2; - tgah.Length=0; - tgah.Depth=0; - } - else - { - tgah.CMapType=1; - tgah.ImageType=1; - tgah.Length=256; - tgah.Depth=24; - } - tgah.Origin=0; - tgah.XOrg=0; - tgah.YOrg=0; - tgah.Width=(unsigned short)w; - tgah.Height=(unsigned short)h; - tgah.ImageDepth=(unsigned char)d; - tgah.Desc=0; - fwrite(&tgah,1,sizeof(TGA_HEADER),file); - if (d==8) - { - fwrite(pPal,1,256*3,file); - } - slsize=w*d/8; - scanline=(unsigned char*)Pic_calloc(1,slsize); - if (!scanline) - { - Pic_SetError("TGA_Write, not enough memory for scanline"); - return(0); - } - for(y=0 ; y<(long)h ; y++) - { - memcpy(scanline,&pDatas[(h-y-1)*slsize],slsize); - if (d==24) - { - for(x=0 ; x<(long)w ; x++) - { - r=scanline[x*3+0]; - g=scanline[x*3+1]; - b=scanline[x*3+2]; - scanline[x*3+0]=b; - scanline[x*3+1]=g; - scanline[x*3+2]=r; - } - } - fwrite(scanline,1,slsize,file); - } - Pic_free(scanline); - fclose(file); - return(1); -} diff --git a/code/nel/tools/3d/tile_edit/PIC/pic.h b/code/nel/tools/3d/tile_edit/PIC/pic.h deleted file mode 100644 index ec6582c6b..000000000 --- a/code/nel/tools/3d/tile_edit/PIC/pic.h +++ /dev/null @@ -1,58 +0,0 @@ -// Ryzom - MMORPG Framework -// 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 . - -#ifndef _PIC_H_ -#define _PIC_H_ - -// ---------------------------------------------------------------------------------------------------------------------------------- - -#define PIC_TYPE_JPG 1 -#define PIC_TYPE_TGA8 2 -#define PIC_TYPE_TGA16 3 -#define PIC_TYPE_TGA24 4 -#define PIC_TYPE_BMP8 5 -#define PIC_TYPE_BMP24 6 - -// ---------------------------------------------------------------------------------------------------------------------------------- - -// -// Basic API -// -extern unsigned long PIC_Load(char* FileName, unsigned char Quantize); - -extern unsigned long PIC_Create(char* pPal, char* pDatas, unsigned long w, unsigned long h, unsigned long d); - -extern unsigned long PIC_Save(unsigned long id, char* FileName, unsigned long type, unsigned long qual); - -extern unsigned long PIC_GetInfos( unsigned long id, - char **ppPal, char **ppDatas, - unsigned long *pW, unsigned long *pH, unsigned long *pD); - - -extern unsigned long PIC_Destroy(unsigned long id); -// -// System -// -extern unsigned long PIC_GetMemNbAllocs(void); -extern unsigned long PIC_GetMemAllocated(void); -extern char* PIC_GetError(void); -extern unsigned char PIC_Error(void); -extern void PIC_ResetError(void); -extern unsigned char PIC_OnErrorCall( void pFnct(void) ); - -// ---------------------------------------------------------------------------------------------------------------------------------- - -#endif diff --git a/code/nel/tools/3d/tile_edit/PIC/pic_private.h b/code/nel/tools/3d/tile_edit/PIC/pic_private.h deleted file mode 100644 index 4a67bbc9c..000000000 --- a/code/nel/tools/3d/tile_edit/PIC/pic_private.h +++ /dev/null @@ -1,81 +0,0 @@ -// Ryzom - MMORPG Framework -// 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 . - -#ifndef _PIC_PRIVATE_H_ -#define _PIC_PRIVATE_H_ - -// ---------------------------------------------------------------------------------------------------------------------------------- - -typedef struct PIC_PICTURE -{ - unsigned long ID; - unsigned long Width; - unsigned long Height; - unsigned long Depth; - char *pDatas; - char *pPal; - struct PIC_PICTURE *Next; -} PIC_PICTURE; - -// ---------------------------------------------------------------------------------------------------------------------------------- - - -// -// JPG -// - - -extern unsigned long Pic_JPG_Read( const char *FileName, - char **ppPal, char **ppDatas, - unsigned long *w, unsigned long *h); - -extern unsigned long Pic_JPG_Write( const char *FileName, - unsigned long Qual, - char *pDatas, - unsigned long w, unsigned long h); -// -// TGA -// -extern unsigned long Pic_TGA_Read( const char *FileName, - char **ppPal, char **ppDatas, - unsigned long *pWidth, unsigned long *pHeight, - unsigned long *pDepth); -extern unsigned long Pic_TGA_Write( const char *FileName, - char *pPal, char *pDatas, - unsigned long w, unsigned long h, unsigned long d); -// -// BMP -// -extern unsigned long Pic_BMP_Read( const char *FileName, - char **ppPal, char **ppDatas, - unsigned long *pWidth, unsigned long *pHeight, - unsigned long *pDepth); - -extern unsigned long Pic_BMP_Write( const char *FileName, - char *pPal, char *pDatas, - unsigned long w, unsigned long h, unsigned long d); -// -// System -// -extern void* Pic_malloc(unsigned long size); -extern void* Pic_calloc(unsigned long count, unsigned long size); -extern void Pic_free(void *memblock); -extern unsigned long Pic__msize(void *memblock); -extern void Pic_SetError(const char *msg, ...); - -// ---------------------------------------------------------------------------------------------------------------------------------- - -#endif \ No newline at end of file diff --git a/code/nel/tools/3d/tile_edit/PIC/readpic.cpp b/code/nel/tools/3d/tile_edit/PIC/readpic.cpp deleted file mode 100644 index 8afac2b45..000000000 --- a/code/nel/tools/3d/tile_edit/PIC/readpic.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// Ryzom - MMORPG Framework -// 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 . - - -#include -#include -#include "readpic.h" -#include "pic.h" -#include - -using namespace std; - -//============================================================ -// Image API. -//============================================================ - - -bool PIC_LoadPic(string path, vector &tampon, uint &Width, uint &Height) -{ - uint32 id; - char *pal, *data; - unsigned long w,h,depth; - uint i; - - - // Loadons l'image. - id= PIC_Load((char*)path.c_str(), 0); - if(id==0) - return false; - PIC_GetInfos( id, &pal, &data, &w, &h, &depth); - Width=w; - Height=h; - - // On traduit en RGBA. - tampon.resize(w*h); - switch(depth) - { - case 8: - for(i=0;i -// 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 . - -#ifndef _READPIC_H_ -#define _READPIC_H_ - -#ifdef _MSC_VER -#pragma warning(disable:4786) -#endif - - -#include -#include - -#include -#include - -//============================================================ -// API. -//============================================================ - - -bool PIC_LoadPic(std::string Path, std::vector &Tampon, uint &Width, uint &Height); - - - -#endif \ No newline at end of file diff --git a/code/nel/tools/3d/tile_edit/View.cpp b/code/nel/tools/3d/tile_edit/View.cpp index 2ac9bdeb3..81f5fe784 100644 --- a/code/nel/tools/3d/tile_edit/View.cpp +++ b/code/nel/tools/3d/tile_edit/View.cpp @@ -24,7 +24,7 @@ #include //#include "ListGroup.h" //#include "ViewPopup.h" -#include "pic/readpic.h" +//#include "pic/readpic.h" using namespace std; using namespace NL3D; @@ -74,6 +74,37 @@ void rotateBuffer (uint &Width, uint &Height, std::vector& Tampon Height=tmp; } +static bool loadPic(const string &path, std::vector &tampon, uint &width, uint &height) +{ + try + { + NLMISC::CIFile file; + if (file.open(path.c_str())) + { + NLMISC::CBitmap bitmap; + bitmap.load(file); + width = bitmap.getWidth(); + height = bitmap.getHeight(); + tampon.resize(width * height); + bitmap.convertToType(NLMISC::CBitmap::RGBA); + for (uint y = 0; y < height; ++y) + { + for (uint x = 0; x < width; ++x) + { + NLMISC::CRGBA c = bitmap.getPixelColor(x, y, 0); + c.R = (c.R * c.A) / 255; + c.G = (c.G * c.A) / 255; + c.B = (c.B * c.A) / 255; + tampon[(y * width) + x] = c; + } + } + return true; + } + } + catch (NLMISC::Exception& ) { } + return false; +} + ///////////////////////////////////////////////////////////////////////////// // CTView //Attention : windows veut que le buffer image commence du bas vers le haut @@ -82,7 +113,7 @@ int _LoadBitmap(const std::string& path,LPBITMAPINFO BitmapInfo, std::vector Tampon; uint Width; uint Height; - if (PIC_LoadPic(path, Tampon, Width, Height)) + if (loadPic(path, Tampon, Width, Height)) { BitmapInfo->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); BitmapInfo->bmiHeader.biWidth=Width; @@ -207,7 +238,7 @@ int TileList::setTile128 (int tile, const std::string& name, NL3D::CTile::TBitma vector tampon; uint Width; uint Height; - if (!PIC_LoadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) + if (!loadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) { return (int)(MessageBox (NULL, ((tileBank2.getAbsPath ()+troncated)+"\nContinue ?").c_str(), "Can't load bitmap.", MB_YESNO|MB_ICONEXCLAMATION)==IDYES); } @@ -272,7 +303,7 @@ int TileList::setTile256 (int tile, const std::string& name, NL3D::CTile::TBitma vector tampon; uint Width; uint Height; - if (!PIC_LoadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) + if (!loadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) { return (int)(MessageBox (NULL, ((tileBank2.getAbsPath ()+troncated)+"\nContinue ?").c_str(), "Can't load bitmap.", MB_YESNO|MB_ICONEXCLAMATION)==IDYES); } @@ -338,7 +369,7 @@ int TileList::setTileTransition (int tile, const std::string& name, NL3D::CTile: vector tampon; uint Width; uint Height; - if (!PIC_LoadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) + if (!loadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) { return (int)(MessageBox (NULL, ((tileBank2.getAbsPath ()+troncated)+"\nContinue ?").c_str(), "Can't load bitmap.", MB_YESNO|MB_ICONEXCLAMATION)==IDYES); } @@ -451,7 +482,7 @@ int TileList::setTileTransitionAlpha (int tile, const std::string& name, int rot vector tampon; uint Width; uint Height; - if (!PIC_LoadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) + if (!loadPic(tileBank2.getAbsPath ()+troncated, tampon, Width, Height)) { return MessageBox (NULL, ((tileBank2.getAbsPath ()+troncated)+"\nContinue ?").c_str(), "Can't load bitmap.", MB_YESNO|MB_ICONEXCLAMATION)==IDYES; } @@ -1490,7 +1521,7 @@ LRESULT CTView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { _chdir (LastPath.c_str()); CFileDialog load(true, NULL, LastPath.c_str(), OFN_ENABLESIZING | OFN_ALLOWMULTISELECT, - "Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); + "PNG Bitmap (*.png)|*.png|Targa bitmap (*.tga)|*.tga|All files (*.*)|*.*||",NULL); load.m_ofn.lpstrFile = new char[10000]; // buffer contains filenames list load.m_ofn.lpstrFile[0] = 0; // with 10 KB we should be large enough... From fef6543e0c1c366a89281e8a6258038f6cd32e6f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 19 Nov 2014 16:30:14 +0100 Subject: [PATCH 002/175] Fix bug causing patch painter fail to open more than once --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 5bea65771..9df2a53f9 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -463,6 +463,7 @@ bool CDriverGL::unInit() { nlwarning("Can't unregister NLClass"); } + _Registered = 0; // Restaure monitor color parameters if (_NeedToRestaureGammaRamp) From 7bdf719cb99ca2ddde9c96c4071cb0390079661f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 24 Nov 2014 15:04:53 +0100 Subject: [PATCH 003/175] Adjust version --HG-- branch : develop --- code/ryzom/common/src/game_share/ryzom_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/ryzom_version.h b/code/ryzom/common/src/game_share/ryzom_version.h index de4524626..b47cff50b 100644 --- a/code/ryzom/common/src/game_share/ryzom_version.h +++ b/code/ryzom/common/src/game_share/ryzom_version.h @@ -17,7 +17,7 @@ #ifndef RYZOM_VERSION_H #define RYZOM_VERSION_H -#define RYZOM_VERSION "ryzomcore/v0.11.1" +#define RYZOM_VERSION "ryzomcore/v0.11.1-dev" #endif // RYZOM_VERSION_H From dfe0b2977aa2952156fe99408bc2a0049f7ea7a3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 24 Nov 2014 16:07:17 +0100 Subject: [PATCH 004/175] Separate version string --HG-- branch : develop --- code/ryzom/common/src/game_share/ryzom_version.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/ryzom_version.h b/code/ryzom/common/src/game_share/ryzom_version.h index b47cff50b..f398c989f 100644 --- a/code/ryzom/common/src/game_share/ryzom_version.h +++ b/code/ryzom/common/src/game_share/ryzom_version.h @@ -17,7 +17,9 @@ #ifndef RYZOM_VERSION_H #define RYZOM_VERSION_H -#define RYZOM_VERSION "ryzomcore/v0.11.1-dev" +#define RYZOM_VERSION "ryzomcore/" \ + "v0.11.1" \ + "-dev" #endif // RYZOM_VERSION_H From ff283f5070995bd2a5decfe371b39b04ee0d80b7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 3 Dec 2014 15:16:39 +0100 Subject: [PATCH 005/175] Increase patch painter distance --HG-- branch : develop --- code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp index 3fd00f000..0f615b5ed 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp @@ -4095,7 +4095,7 @@ DWORD WINAPI myThread (LPVOID vData) // Create a Landscape. CLandscapeModel *TheLand= (CLandscapeModel*)CNELU::Scene->createModel(LandscapeModelId); - TheLand->Landscape.setTileNear (1000.f); + TheLand->Landscape.setTileNear (10000.f); TheLand->Landscape.TileBank=bank; // Enbable automatique lighting @@ -4192,7 +4192,7 @@ DWORD WINAPI myThread (LPVOID vData) mat.setPos(P); CNELU::Camera->setTransformMode (ITransformable::DirectMatrix); CNELU::Camera->setMatrix (mat); - CNELU::Camera->setPerspective( 75.f*(float)Pi/180.f/*vp->GetFOV()*/, 1.33f, 0.1f, 1000.f); + CNELU::Camera->setPerspective( 75.f*(float)Pi/180.f/*vp->GetFOV()*/, 1.33f, 0.1f, 10000.f); // Resize the sym vector symVector.resize (pData->VectMesh.size()); From 39c776ec30731e151d3d9231ef227d34c242ad32 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 3 Dec 2014 15:16:39 +0100 Subject: [PATCH 006/175] Add script to orient zone patches automatically --HG-- branch : develop --- .../plugin_max/nel_patch_converter/script.cpp | 30 +++++ .../3d/plugin_max/nel_patch_edit/editpat.h | 1 + .../tools/3d/plugin_max/nel_patch_edit/np.cpp | 89 +++++++++++++++ .../nel_patch_edit/np_epm_selection.cpp | 44 +++++++ .../3d/plugin_max/scripts/nel_orient_zones.ms | 108 ++++++++++++++++++ 5 files changed, 272 insertions(+) create mode 100644 code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp index 8acae94bd..80e715f21 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp @@ -338,6 +338,8 @@ get_selected_tile_cf(Value** arg_list, int count) if (tri->rpatch->tileSel[i]) array->append(Integer::intern(i+1)); } + if (os.obj != tri) + delete tri; } } @@ -383,6 +385,8 @@ get_selected_patch_cf(Value** arg_list, int count) if (tri->patch.patchSel[i]) array->append(Integer::intern(i+1)); } + if (os.obj != tri) + delete tri; } } @@ -428,6 +432,8 @@ get_selected_vertex_cf(Value** arg_list, int count) if (tri->patch.vertSel[i]) array->append(Integer::intern(i+1)); } + if (os.obj != tri) + delete tri; } } @@ -617,6 +623,8 @@ set_vertex_count_cf(Value** arg_list, int count) { nRet=tri->patch.numVerts; } + if (os.obj != tri) + delete tri; } return Integer::intern(nRet); @@ -655,6 +663,8 @@ set_vector_count_cf(Value** arg_list, int count) { nRet=tri->patch.numVecs; } + if (os.obj != tri) + delete tri; } return Integer::intern(nRet); @@ -702,6 +712,8 @@ set_vertex_pos_cf(Value** arg_list, int count) node->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); ip->RedrawViews(ip->GetTime()); } + if (os.obj != tri) + delete tri; } } @@ -750,6 +762,8 @@ set_vector_pos_cf(Value** arg_list, int count) node->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); ip->RedrawViews(ip->GetTime()); } + if (os.obj != tri) + delete tri; } } @@ -792,6 +806,8 @@ get_vertex_pos_cf(Value** arg_list, int count) { vRet=new Point3Value (tri->patch.verts[nVertex].p); } + if (os.obj != tri) + delete tri; } } @@ -834,6 +850,8 @@ get_vector_pos_cf(Value** arg_list, int count) { vRet=new Point3Value (tri->patch.vecs[nVertex].p); } + if (os.obj != tri) + delete tri; } } @@ -877,6 +895,8 @@ get_edge_vect1_cf(Value** arg_list, int count) { nVert=tri->patch.edges[nEdge].vec12; } + if (os.obj != tri) + delete tri; } } @@ -919,6 +939,8 @@ get_edge_vect2_cf(Value** arg_list, int count) { nVert=tri->patch.edges[nEdge].vec21; } + if (os.obj != tri) + delete tri; } } @@ -961,6 +983,8 @@ get_edge_vert1_cf(Value** arg_list, int count) { nVert=tri->patch.edges[nEdge].v1; } + if (os.obj != tri) + delete tri; } } @@ -1004,6 +1028,8 @@ get_edge_vert2_cf(Value** arg_list, int count) { nVert=tri->patch.edges[nEdge].v2; } + if (os.obj != tri) + delete tri; } } @@ -1050,6 +1076,8 @@ get_sel_edge_cf(Value** arg_list, int count) array->append(Integer::intern(i+1)); //array->data[j++]=; } + if (os.obj != tri) + delete tri; } } @@ -1158,6 +1186,8 @@ set_tile_steps_cf(Value** arg_list, int count) nTess=5; tri->rpatch->rTess.TileTesselLevel=nTess; tri->rpatch->InvalidateChannels (PART_ALL); + if (os.obj != tri) + delete tri; } if (bRet) { diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/editpat.h b/code/nel/tools/3d/plugin_max/nel_patch_edit/editpat.h index d0bfd1773..ec8947571 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/editpat.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/editpat.h @@ -755,6 +755,7 @@ class EditPatchMod : public Modifier, IPatchOps, IPatchSelect, ISubMtlAPI, Attac TCHAR *GetObjectName() { return GetString(IDS_TH_EDITPATCH); } void ActivateSubobjSel(int level, XFormModes& modes ); int NeedUseSubselButton() { return 0; } + void SelectSubPatch(int index); void SelectSubComponent( HitRecord *hitRec, BOOL selected, BOOL all, BOOL invert ); void ClearSelection(int selLevel); void SelectAll(int selLevel); diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np.cpp index 7b1c9c644..133d0b4d6 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np.cpp @@ -84,6 +84,31 @@ *> Copyright(c) 1994, All Rights Reserved. **********************************************************************/ #include "stdafx.h" + +#if MAX_VERSION_MAJOR >= 14 +# include +# include +# include +# include +# include +# include +# include +# include +# include +#else +# include +# include +// Various MAX and MXS includes +# include +# include +# include +# include +# include +# include +// define the new primitives using macros from SDK +# include +#endif + #include "editpat.h" #include "../nel_patch_lib/vertex_neighborhood.h" @@ -855,3 +880,67 @@ void ResetVert (PatchMesh *patch) patch->computeInteriors(); patch->InvalidateGeomCache (); } + +def_visible_primitive(turn_patch, "RykolTurnPatch"); + +Value *turn_patch_cf (Value** arg_list, int count) +{ + // Make sure we have the correct number of arguments (2) + check_arg_count(RykolTurnPatch, 3, count); + + // Check to see if the arguments match up to what we expect + // We want to use 'TurnAllTexturesOn ' + type_check(arg_list[0], MAXNode, "RykolTurnPatch [Node] [Modifier] [Patch]"); + type_check(arg_list[1], MAXModifier, "RykolTurnPatch [Node] [Modifier] [Patch]"); + type_check(arg_list[2], Integer, "RykolTurnPatch [Node] [Modifier] [Patch]"); + + // Get a good interface pointer + Interface *ip = MAXScript_interface; + + // Get a INode pointer from the argument passed to us + INode *node = arg_list[0]->to_node(); + nlassert (node); + + // Get a Object pointer + ObjectState os = node->EvalWorldState(ip->GetTime()); + + // ok ? + bool bRet=false; + + if (os.obj) + { + // Get class id + if (os.obj->CanConvertToType(RYKOLPATCHOBJ_CLASS_ID)) + { + bRet = true; + RPO *tri = (RPO *)os.obj->ConvertToType(ip->GetTime(), RYKOLPATCHOBJ_CLASS_ID); + if (tri) + { + Modifier *mod = arg_list[1]->to_modifier(); + if (mod) + { + EditPatchMod *epmod = (EditPatchMod *)mod; + epmod->ClearSelection(EP_PATCH); + epmod->SelectSubPatch(arg_list[2]->to_int() - 1); + epmod->DoPatchTurn(true); + epmod->ClearSelection(EP_PATCH); + } + else + { + bRet = false; + } + } + // Note that the TriObject should only be deleted + // if the pointer to it is not equal to the object + // pointer that called ConvertToType() + if (os.obj != tri) + delete tri; + + // redraw and update + node->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); + ip->RedrawViews(ip->GetTime()); + } + } + + return bRet?&true_value:&false_value; +} \ No newline at end of file diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_selection.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_selection.cpp index 3814a2df9..0b15b63e7 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_selection.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_selection.cpp @@ -236,6 +236,50 @@ void EditPatchMod::SetSelLevel(DWORD level) // ------------------------------------------------------------------------------------------------------------------------------------------------------ +void EditPatchMod::SelectSubPatch(int index) +{ + if (!ip) + return; + TimeValue t = ip->GetTime(); + + ip->ClearCurNamedSelSet(); + + ModContextList mcList; + INodeTab nodes; + ip->GetModContexts(mcList, nodes); + + for (int i = 0; i < mcList.Count(); i++) + { + EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; + + if (!patchData) + return; + + RPatchMesh *rpatch; + PatchMesh *patch = patchData->TempData(this)->GetPatch(t, rpatch); + if (!patch) + return; + + patchData->BeginEdit(t); + if (theHold.Holding()) + theHold.Put(new PatchRestore(patchData, this, patch, rpatch, "SelectSubComponent")); + + patch->patchSel.Set(index); + + patchData->UpdateChanges(patch, rpatch, FALSE); + if (patchData->tempData) + { + patchData->tempData->Invalidate(PART_SELECT); + } + } + PatchSelChanged(); + + UpdateSelectDisplay(); + NotifyDependents(FOREVER, PART_SELECT, REFMSG_CHANGE); +} + +// ------------------------------------------------------------------------------------------------------------------------------------------------------ + // Select a subcomponent within our object(s). WARNING! Because the HitRecord list can // indicate any of the objects contained within the group of patches being edited, we need // to watch for control breaks in the patchData pointer within the HitRecord! diff --git a/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms b/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms new file mode 100644 index 000000000..fb5ba2862 --- /dev/null +++ b/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms @@ -0,0 +1,108 @@ + +gc() +nodes = getCurrentSelection() +max select none +clearselection() + +undo off +( + for cnode in nodes do + ( + if (classof cnode) == Editable_Patch or (classof cnode) == RklPatch then + ( + print cnode.name + selectmore cnode + if (classof cnode) == Editable_Patch and (classof cnode) != RklPatch then + ( + modPanel.addModToSelection (NeL_Convert ()) ui:on + ) + modPanel.addModToSelection (NeL_Edit ()) ui:on + setCommandPanelTaskMode #modify + cmod = modpanel.getCurrentObject() + pcount = (GetRykolPatchCount cnode) + print pcount + for p = 1 to pcount do + ( + --print p + vbegin = (NeLGetPatchVertex cnode p 1) + vend = (NeLGetPatchVertex cnode p 2) + vref = (NeLGetPatchVertex cnode p 3) + begin = (GetRykolVertexPos cnode vbegin) + end = (GetRykolVertexPos cnode vend) + ref = (GetRykolVertexPos cnode vref) + normal = (cross (end - begin) (ref - begin)) + normal = (normalize normal) + + rotnormal = (normal * (rotateZMatrix -90)) + if (normal.z > 0.9) then + ( + -- print "x normal" + rotnormal = (normal * (rotateXMatrix -90)) + ) + -- print rotnormal + + -- print normal + -- print rotnormal + -- print begin + -- print end + dir = (normalize (end - begin)) + -- print dir + score1 = (dot dir rotnormal) + + RykolTurnPatch cnode cmod (p) + vbegin = (NeLGetPatchVertex cnode p 1) + vend = (NeLGetPatchVertex cnode p 2) + begin = (GetRykolVertexPos cnode vbegin) + end = (GetRykolVertexPos cnode vend) + dir = (normalize (end - begin)) + score2 = (dot dir rotnormal) + + RykolTurnPatch cnode cmod (p) + vbegin = (NeLGetPatchVertex cnode p 1) + vend = (NeLGetPatchVertex cnode p 2) + begin = (GetRykolVertexPos cnode vbegin) + end = (GetRykolVertexPos cnode vend) + dir = (normalize (end - begin)) + score3 = (dot dir rotnormal) + + RykolTurnPatch cnode cmod (p) + vbegin = (NeLGetPatchVertex cnode p 1) + vend = (NeLGetPatchVertex cnode p 2) + begin = (GetRykolVertexPos cnode vbegin) + end = (GetRykolVertexPos cnode vend) + dir = (normalize (end - begin)) + score4 = (dot dir rotnormal) + + -- print score1 + -- print score2 + -- print score3 + -- print score4 + + if (score1 > score2 and score1 > score3 and score1 > score4) then + ( + -- print "score 1" + RykolTurnPatch cnode cmod (p) + ) + else if (score2 > score3 and score2 > score4) then + ( + -- print "score 2" + RykolTurnPatch cnode cmod (p) + RykolTurnPatch cnode cmod (p) + ) + else if (score3 > score4) then + ( + -- print "score 3" + RykolTurnPatch cnode cmod (p) + RykolTurnPatch cnode cmod (p) + RykolTurnPatch cnode cmod (p) + ) + else + ( + -- print "score 4" + ) + ) + maxOps.CollapseNode cnode off + max select none + ) + ) +) From 90f1234ed028d0b6a5f6ad4377b4728e2b26af50 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 4 Dec 2014 13:21:45 +0100 Subject: [PATCH 007/175] Add key in patch painter to reset a patch mesh --HG-- branch : develop --- .../3d/plugin_max/nel_patch_paint/keys.cfg | 1 + .../3d/plugin_max/nel_patch_paint/paint.cpp | 34 +++++++++++++++++-- .../plugin_max/nel_patch_paint/paint_ui.cpp | 2 ++ .../3d/plugin_max/nel_patch_paint/paint_ui.h | 1 + 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/keys.cfg b/code/nel/tools/3d/plugin_max/nel_patch_paint/keys.cfg index a94996500..4f1013dae 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/keys.cfg +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/keys.cfg @@ -176,6 +176,7 @@ LockBorders = KeyL; ZoomIn = Key1; ZoomOut = Key2; GetState = Key3; +ResetPatch = KeyF10; /*************** *This is the the light settings diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp index 0f615b5ed..fb99978da 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp @@ -145,7 +145,7 @@ std::vector symVector; // Painter modes enum TModePaint { ModeTile, ModeColor, ModeDisplace}; -enum TModeMouse { ModePaint, ModeSelect, ModePick, ModeFill, ModeGetState }; +enum TModeMouse { ModePaint, ModeSelect, ModePick, ModeFill, ModeGetState, ModeResetPatch }; /*-------------------------------------------------------------------*/ @@ -2585,6 +2585,13 @@ void mainproc(CScene& scene, CEventListenerAsync& AsyncListener, CEvent3dMouseLi // Set mode modeSelect=ModeGetState; + // Mode reset zone + if (AsyncListener.isKeyDown ((TKey)PainterKeys[ResetPatch])) + { + // Set mode + modeSelect=ModeResetPatch; + } + // Mode picking if (AsyncListener.isKeyDown ((TKey)PainterKeys[Fill0])) { @@ -2891,6 +2898,8 @@ void mainproc(CScene& scene, CEventListenerAsync& AsyncListener, CEvent3dMouseLi SetCursor (bankCont->HFill); else if (pData->pobj->TileTrick) SetCursor (bankCont->HTrick); + else if (modeSelect==ModeResetPatch) + SetCursor (LoadCursor (NULL, IDC_NO)); else SetCursor (LoadCursor (NULL, IDC_ARROW)); @@ -3140,9 +3149,30 @@ private: _FillTile.fillColor (mesh1, patch, _VectMesh, maxToNel (color1), (uint16)(256.f*opa1), PaintColor); else if (nModeTexture==ModeDisplace) - // Fill this patch with the current color + // Fill this patch with the current displace _FillTile.fillDisplace (mesh1, patch, _VectMesh, bank); } + else if (modeSelect==ModeResetPatch) + { + int np = _VectMesh[mesh1].PMesh->numPatches; + for (int pp = 0; pp < np; ++pp) + { + // Fill default tile + _FillTile.fillTile (mesh1, pp, _VectMesh, -1, 0, 0, true, bank); + + // Fill default color + _FillTile.fillColor (mesh1, pp, _VectMesh, CRGBA(255, 255, 255), 256, PaintColor); + + // Backup current displace, fill default, restore + int bkdt = _Pobj->DisplaceTile; + int bkdts = _Pobj->DisplaceTileSet; + _Pobj->DisplaceTile = 0; + _Pobj->DisplaceTileSet = -1; + _FillTile.fillDisplace (mesh1, pp, _VectMesh, bank); + _Pobj->DisplaceTile = bkdt; + _Pobj->DisplaceTileSet = bkdts; + } + } } } // Pick with right mouse diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp index 1c756e0c8..b8503c137 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp @@ -43,6 +43,7 @@ uint PainterKeys[KeyCounter]= Key1, Key2, KeyI, + KeyF10, }; // Keys @@ -77,6 +78,7 @@ const char* PainterKeysName[KeyCounter]= "ZoomIn", "ZoomOut", "GetState", + "ResetPatch", }; // Light settings diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.h b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.h index aa56b06ba..13d1708ef 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.h @@ -122,6 +122,7 @@ enum PainterKeysType ZoomIn, ZoomOut, GetState, + ResetPatch, KeyCounter }; From 07286c14d19d846891d8f05ea893a93fb526ac17 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 4 Dec 2014 13:28:30 +0100 Subject: [PATCH 008/175] Adjust patch orientation script --HG-- branch : develop --- .../3d/plugin_max/scripts/nel_orient_zones.ms | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms b/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms index fb5ba2862..26fd67171 100644 --- a/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms +++ b/code/nel/tools/3d/plugin_max/scripts/nel_orient_zones.ms @@ -33,13 +33,19 @@ undo off normal = (cross (end - begin) (ref - begin)) normal = (normalize normal) - rotnormal = (normal * (rotateZMatrix -90)) + rotnormal = (point3 0 0 0) if (normal.z > 0.9) then ( - -- print "x normal" + --print "x normal" rotnormal = (normal * (rotateXMatrix -90)) ) - -- print rotnormal + else + ( + normal.z = 0 + normal = (normalize normal) + rotnormal = (normal * (rotateZMatrix -90)) + ) + --print rotnormal -- print normal -- print rotnormal @@ -106,3 +112,13 @@ undo off ) ) ) + +max select none +clearselection() +undo off +( + for cnode in nodes do + ( + selectmore cnode + ) +) From a79e1411939e2bf123942d150299734d7dac8a23 Mon Sep 17 00:00:00 2001 From: botanicvelious Date: Sun, 7 Dec 2014 05:01:05 -0800 Subject: [PATCH 009/175] Update with added Domain_Auto_Add settings --HG-- branch : develop --- code/web/private_php/setup/sql/nel_ams_lib_00007.sql | 2 ++ code/web/public_php/setup/database.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 code/web/private_php/setup/sql/nel_ams_lib_00007.sql diff --git a/code/web/private_php/setup/sql/nel_ams_lib_00007.sql b/code/web/private_php/setup/sql/nel_ams_lib_00007.sql new file mode 100644 index 000000000..748793e66 --- /dev/null +++ b/code/web/private_php/setup/sql/nel_ams_lib_00007.sql @@ -0,0 +1,2 @@ +INSERT INTO `settings` (`idSettings`, `Setting`, `Value`) VALUES +(2, 'Domain_Auto_Add', '1'); \ No newline at end of file diff --git a/code/web/public_php/setup/database.php b/code/web/public_php/setup/database.php index 3e195f2b8..6137cb00f 100644 --- a/code/web/public_php/setup/database.php +++ b/code/web/public_php/setup/database.php @@ -6,7 +6,7 @@ $db_nel_tool = 2; // Support $db_nel_ams = 2; -$db_nel_ams_lib = 6; +$db_nel_ams_lib = 7; // Domain $db_ring_domain = 1; From 1df52a45ad68db3ecfd49d2a98fabbac35500495 Mon Sep 17 00:00:00 2001 From: botanicvelious Date: Sun, 7 Dec 2014 06:42:57 -0800 Subject: [PATCH 010/175] add some additional checking for database errors --HG-- branch : develop --- code/web/private_php/ams/autoload/ticket_user.php | 14 ++++++++++++-- code/web/public_php/setup/install.php | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/code/web/private_php/ams/autoload/ticket_user.php b/code/web/private_php/ams/autoload/ticket_user.php index 6de69ccdd..a52ffaec8 100644 --- a/code/web/private_php/ams/autoload/ticket_user.php +++ b/code/web/private_php/ams/autoload/ticket_user.php @@ -20,8 +20,18 @@ class Ticket_User{ * @param $permission the permission that will be given to the user. 1=user, 2=mod, 3=admin */ public static function createTicketUser( $extern_id, $permission) { - $dbl = new DBLayer("lib"); - $dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id)); + try { + //make connection with and put into db + $dbl = new DBLayer("lib"); + $dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id)); + } + catch (PDOException $e) { + //oh noooz... + //error_log(print_r($e, true)); + //print_r($e); + echo "Problem creating user in database!"; + } + } diff --git a/code/web/public_php/setup/install.php b/code/web/public_php/setup/install.php index 49fc0b3a7..438a5c332 100644 --- a/code/web/public_php/setup/install.php +++ b/code/web/public_php/setup/install.php @@ -42,6 +42,20 @@ require_once('setup/version.php'); $continue = false; } } + + if ($continue) { + try { + if (!in_array("mysql",PDO::getAvailableDrivers(),TRUE)) + { + throw new PDOException ("Cannot work without a proper database setting up"); + } + } + catch (PDOException $pdoEx) + { + printalert("danger", "PHP PDO seems to be missing the mysql driver"); + $continue = false; + } + } // Validate basics if ($continue) { From 56339c6f936d1b07076fec86966e72cee7eb085a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 9 Dec 2014 23:06:07 +0100 Subject: [PATCH 011/175] Handle window close message in painter --HG-- branch : develop --- code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp index fb99978da..73bb142b1 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp @@ -3043,7 +3043,7 @@ private: // Callback on mouse events virtual void operator ()(const CEvent& event) { - if (event==EventDestroyWindowId) + if (event==EventDestroyWindowId || event==EventCloseWindowId) { WindowActive=false; } @@ -4287,6 +4287,7 @@ DWORD WINAPI myThread (LPVOID vData) CNELU::EventServer.addListener (EventMouseUpId, &listener); CNELU::EventServer.addListener (EventMouseDblClkId, &listener); CNELU::EventServer.addListener (EventDestroyWindowId, &listener); + CNELU::EventServer.addListener (EventCloseWindowId, &listener); CNELU::EventServer.addListener (EventKeyDownId, &listener); // Camera position @@ -4356,6 +4357,7 @@ DWORD WINAPI myThread (LPVOID vData) CNELU::EventServer.removeListener (EventMouseDblClkId, &listener); CNELU::EventServer.removeListener (EventKeyDownId, &listener); CNELU::EventServer.removeListener (EventDestroyWindowId, &listener); + CNELU::EventServer.removeListener (EventCloseWindowId, &listener); // End. //======== From 6db29c375aacac39509ee393846367016e587110 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 9 Dec 2014 23:06:07 +0100 Subject: [PATCH 012/175] Add script to generate zone names --HG-- branch : develop --- .../3d/plugin_max/scripts/nel_zone_namer.ms | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 code/nel/tools/3d/plugin_max/scripts/nel_zone_namer.ms diff --git a/code/nel/tools/3d/plugin_max/scripts/nel_zone_namer.ms b/code/nel/tools/3d/plugin_max/scripts/nel_zone_namer.ms new file mode 100644 index 000000000..e651dd76a --- /dev/null +++ b/code/nel/tools/3d/plugin_max/scripts/nel_zone_namer.ms @@ -0,0 +1,68 @@ +-- This script sets proper centered zone positions and generates their names +-- Use after cutting the zone into 160m by 160m pieces + +cell_size = 160.0 +offset_x = 7680 / 2 +offset_y = -(20480 + (5120 / 2)) + +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + +-- http://proofofprogress.blogspot.be/2011/03/solution-align-pivot-to-world-without.html +Function alignPivotToWorld &theObject = ( + --VLM = Visible Local Matrix. + --The matrix/pivot you see when selecting object and "Local" axis is selected as viewable. + VLM = theObject.Transform; + IP_LocalRot = theObject.objectOffsetRot; --Rotation to be used later. + IP_LOCAL = theObject.objectOffsetPos; --Invisible Pivot Local coordinates + --In relation to VLM matrix. + IP_WORLD = IP_LOCAL * VLM; --World Coordinates of Invisible Pivot. [Local To World Transform] + VLM_0 = matrix3 1; --Reset Visible Local matrix coordinates. + + NEW_IP_LOCAL = IP_WORLD * inverse(VLM_0); --[World To local Transform] + + theObject.Transform = VLM_0; + theObject.objectOffsetPos = NEW_IP_LOCAL; + + --Now Handle Rotation: + --Since rotation of visible local matrix has been zeroed out, + --You must add that loss to the invisible pivot rotation. + GeomWorldRot = VLM.RotationPart + IP_LocalRot; + theObject.objectOffsetRot = GeomWorldRot; +) + +-- Convert a coordinate in a name +-- name = coordToName #(x, y) +fn coordToName coord = +( + up = floor(coord[1] / 26) + 1 + down = floor(coord[1] - ((up-1) * 26)) + 1 + return (((-coord[2] + 1) as integer) as string) + "_" + alphabet[up] + alphabet[down] +) + +fn realCoordToName coord = +( + return coordToName(#(((coord[1] + offset_x) / cell_size) + 0.5, ((coord[2] + offset_y) / cell_size) + 0.5)) +) + +fn roundedCoord coord = +( + return #(ceil(coord[1] / cell_size) * cell_size - (cell_size / 2), ceil(coord[2] / cell_size) * cell_size - (cell_size / 2)) +) + +max select none +clearselection() + +for node in geometry do +( + if (classof node) == RklPatch or (classof node) == Editable_Patch then + ( + newcoords = roundedCoord(#(node.center.x, node.center.y)) + newname = realCoordToName(newcoords) + node.name = newname + alignPivotToWorld &node + node.pivot.x = newcoords[1] + node.pivot.y = newcoords[2] + resetxform node + maxOps.CollapseNode node off + ) +) From 58590a9e7e1912b7bc33a48fd5cfbb56463c16e7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 9 Dec 2014 23:06:08 +0100 Subject: [PATCH 013/175] Fix offscreen rendering mode --HG-- branch : develop --- .../3d/driver/opengl/driver_opengl_window.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 9df2a53f9..8307f885e 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -627,9 +627,11 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re // Offscreen mode ? if (_CurrentMode.OffScreen) { -#if 0 if (!createWindow(mode)) return false; + HWND tmpHWND = _win; + int width = mode.Width; + int height = mode.Height; // resize the window RECT rc; @@ -908,7 +910,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re _hDC = NULL; return false; } -#endif } else { @@ -1437,8 +1438,17 @@ bool CDriverGL::createWindow(const GfxMode &mode) #ifdef NL_OS_WINDOWS // create the OpenGL window - window = CreateWindowW(L"NLClass", L"NeL Window", WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, - CW_USEDEFAULT, CW_USEDEFAULT, mode.Width, mode.Height, HWND_DESKTOP, NULL, GetModuleHandle(NULL), NULL); + DWORD dwStyle = WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS; + int pos = CW_USEDEFAULT; + HWND hwndParent = HWND_DESKTOP; + if (mode.OffScreen) + { + dwStyle &= ~WS_VISIBLE; + pos = 0; + hwndParent = NULL; + } + window = CreateWindowW(L"NLClass", L"NeL Window", dwStyle, + pos, pos, mode.Width, mode.Height, hwndParent, NULL, GetModuleHandle(NULL), NULL); if (window == EmptyWindow) { From 4c4b96bcfd6720d22c210aaf150f073891e35597 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 9 Dec 2014 23:06:08 +0100 Subject: [PATCH 014/175] Fix NeLLigoMakeSnapShot --HG-- branch : develop --- code/nel/tools/3d/ligo/plugin_max/script.cpp | 33 +++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/code/nel/tools/3d/ligo/plugin_max/script.cpp b/code/nel/tools/3d/ligo/plugin_max/script.cpp index 41740bcbe..8a88136c5 100644 --- a/code/nel/tools/3d/ligo/plugin_max/script.cpp +++ b/code/nel/tools/3d/ligo/plugin_max/script.cpp @@ -1739,14 +1739,14 @@ bool MakeSnapShot (NLMISC::CBitmap &snapshot, const NL3D::CTileBank &tileBank, c float posY = config.CellSize * (float)ymin; // Use NELU - if (CNELU::init (oversampledWidth, oversampledHeight, CViewport(), 32, true, NULL, true)) + if (CNELU::init (oversampledWidth, oversampledHeight, CViewport(), 32, true, NULL, false, true)) // FIXME: OpenGL not working correctly, offscreen not available in Direct3D { // Setup the camera CNELU::Camera->setTransformMode (ITransformable::DirectMatrix); CMatrix view; view.setPos (CVector (width/2 + posX, height/2 + posY, width)); view.setRot (CVector::I, -CVector::K, CVector::J); - CNELU::Camera->setFrustum (width, height, 0.1f, 1000.f, false); + CNELU::Camera->setFrustum (width, height, 0.1f, 10000.f, false); CNELU::Camera->setMatrix (view); // Create a Landscape. @@ -1766,12 +1766,17 @@ bool MakeSnapShot (NLMISC::CBitmap &snapshot, const NL3D::CTileBank &tileBank, c theLand->enableAdditive (true); theLand->Landscape.setRefineMode (true); + // theLand->Landscape.setupStaticLight(CRGBA(255, 255, 255), CRGBA(0, 0, 0), 1.0f); + // theLand->Landscape.setThreshold(0.0005); + // Enbable automatique lighting #ifndef NL_DEBUG - theLand->Landscape.enableAutomaticLighting (true); - theLand->Landscape.setupAutomaticLightDir (CVector (0, 0, -1)); + // theLand->Landscape.enableAutomaticLighting (true); + // theLand->Landscape.setupAutomaticLightDir (CVector (0, 0, -1)); #endif // NL_DEBUG + // theLand->Landscape.updateLightingAll(); + // Clear the backbuffer and the alpha CNELU::clearBuffers(CRGBA(255,0,255,0)); @@ -1851,7 +1856,7 @@ bool MakeSnapShot (NLMISC::CBitmap &snapshot, const NL3D::CTileBank &tileBank, c Value* make_snapshot_cf (Value** arg_list, int count) { // Make sure we have the correct number of arguments (7) - check_arg_count(check_zone_with_template, 7, count); + check_arg_count(NeLLigoMakeSnapShot, 7, count); // Check to see if the arguments match up to what we expect char *message = "NeLLigoMakeSnapShot [Object] [Snapshot filename] [xMin] [xMax] [yMin] [yMax] [Error in dialog]"; @@ -1903,11 +1908,11 @@ Value* make_snapshot_cf (Value** arg_list, int count) else { // Build a filename - char drive[512]; - char path[512]; - char name[512]; - char ext[512]; - _splitpath (fileName.c_str(), drive, path, name, ext); + char drivetga[512]; + char pathtga[512]; + char nametga[512]; + char exttga[512]; + _splitpath (fileName.c_str(), drivetga, pathtga, nametga, exttga); // Build the zone CZone zone; @@ -1970,7 +1975,7 @@ Value* make_snapshot_cf (Value** arg_list, int count) { // Build the snap shot filename char outputFilenameSnapShot[512]; - _makepath (outputFilenameSnapShot, drive, path, name, ".tga"); + _makepath (outputFilenameSnapShot, drivetga, pathtga, nametga, ".tga"); // Output the snap shot COFile outputSnapShot; @@ -2011,10 +2016,10 @@ Value* make_snapshot_cf (Value** arg_list, int count) // Write the zone COFile outputLigoZone; - _makepath (outputFilenameSnapShot, drive, path, name, ".ligozone"); + _makepath (outputFilenameSnapShot, drivetga, pathtga, nametga, ".ligozone"); // Catch exception - try + /*try { // Open the selected zone file if (outputLigoZone.open (outputFilenameSnapShot)) @@ -2043,7 +2048,7 @@ Value* make_snapshot_cf (Value** arg_list, int count) char tmp[512]; smprintf (tmp, 512, "Error while loading the file %s : %s", fileName, e.what()); CMaxToLigo::errorMessage (tmp, "NeL Ligo export zone", *MAXScript_interface, errorInDialog); - } + }*/ } else { From da166c81db73e95b7561b0604a732026c22ec59c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 9 Dec 2014 23:06:08 +0100 Subject: [PATCH 015/175] Add zone snapshot script example --HG-- branch : develop --- .../plugin_max/scripts/nel_zone_snapshot.ms | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 code/nel/tools/3d/plugin_max/scripts/nel_zone_snapshot.ms diff --git a/code/nel/tools/3d/plugin_max/scripts/nel_zone_snapshot.ms b/code/nel/tools/3d/plugin_max/scripts/nel_zone_snapshot.ms new file mode 100644 index 000000000..edab4f35d --- /dev/null +++ b/code/nel/tools/3d/plugin_max/scripts/nel_zone_snapshot.ms @@ -0,0 +1,162 @@ +-- Use to take the snapshots of a large manually created zone + +from_x = 160 +size_x = 7680-320 +from_y = -25600+160 +size_y = 5120-320 + +targetdir = "W:/database/landscape/ligo/asteroids/max" +snapshotdir = "W:/database/landscape/ligo/asteroids/zonebitmaps" +zonename = "anne" +resumeonly = true + +cell_size = 160.0 + +alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + +fn lowercase instring = -- beginning of function definition +( + local upper, lower, outstring -- declare variables as local + upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" -- set variables to literals + lower="abcdefghijklmnopqrstuvwxyz" + outstring=copy instring + for i=1 to outstring.count do + ( + j=findString upper outstring[i] + if (j != undefined) do outstring[i]=lower[j] + ) + return outstring -- value of outstring will be returned as function result +) + +fn existFile fname = (getfiles fname).count != 0 + +-- Convert a coordinate in a name +-- name = coordToName #(x, y) +fn coordToName coord = +( + up = floor(coord[1] / 26) + 1 + down = floor(coord[1] - ((up-1) * 26)) + 1 + return (((-coord[2] + 1) as integer) as string) + "_" + alphabet[up] + alphabet[down] +) + +fn roundedCoord coord = +( + return #(ceil(coord[1] / cell_size) * cell_size - (cell_size / 2), ceil(coord[2] / cell_size) * cell_size - (cell_size / 2)) +) + +fn coordId coord = +( + coordr = (roundedCoord coord) + return #(((coordr[1]) / cell_size) + 0.5, ((coordr[2]) / cell_size) + 0.5) +) + +from_coord = (coordId #(from_x, from_y)) +to_coord = (coordId #(from_x + size_x, from_y + size_y)) + +print from_coord +print to_coord + +print (coordToName from_coord) + +undo off +( + for x=from_coord[1] to to_coord[1] do + ( + for y=from_coord[2] to to_coord[2] do + ( + ny=y+1 + sy=y-1 + ex=x+1 + wx=x-1 + zc = coordToName #(x, y) + zn = coordToName #(x, ny) + zne = coordToName #(ex, ny) + ze = coordToName #(ex, y) + zse = coordToName #(ex, sy) + zs = coordToName #(x, sy) + zsw = coordToName #(wx, sy) + zw = coordToName #(wx, y) + znw = coordToName #(wx, ny) + maxc = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zc) + ".max" + csnapfile = snapshotdir + "/" + zonename + "-" + (lowercase zc) + ".tga" + if existFile maxc and (not resumeonly or not (existFile csnapfile)) then + ( + print zc + resetMAXFile #noprompt + gc() + mergeMAXFile maxc #(zc) + ccenter = getnodebyname zc + maxn = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zn) + ".max" + if existFile maxn then + ( + mergeMAXFile maxn #(zn) + cnode = getnodebyname zn + cnode.position.y = cnode.position.y + 160 + NeLAttachPatchMesh cnode ccenter + ) + maxne = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zne) + ".max" + if existFile maxne then + ( + mergeMAXFile maxne #(zne) + cnode = getnodebyname zne + cnode.position.x = cnode.position.x + 160 + cnode.position.y = cnode.position.y + 160 + NeLAttachPatchMesh cnode ccenter + ) + maxe = targetdir + "/zonematerial-" + zonename + "-" + (lowercase ze) + ".max" + if existFile maxe then + ( + mergeMAXFile maxe #(ze) + cnode = getnodebyname ze + cnode.position.x = cnode.position.x + 160 + NeLAttachPatchMesh cnode ccenter + ) + maxse = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zse) + ".max" + if existFile maxse then + ( + mergeMAXFile maxse #(zse) + cnode = getnodebyname zse + cnode.position.x = cnode.position.x + 160 + cnode.position.y = cnode.position.y - 160 + NeLAttachPatchMesh cnode ccenter + ) + maxs = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zs) + ".max" + if existFile maxs then + ( + mergeMAXFile maxs #(zs) + cnode = getnodebyname zs + cnode.position.y = cnode.position.y - 160 + NeLAttachPatchMesh cnode ccenter + ) + maxsw = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zsw) + ".max" + if existFile maxsw then + ( + mergeMAXFile maxsw #(zsw) + cnode = getnodebyname zsw + cnode.position.x = cnode.position.x - 160 + cnode.position.y = cnode.position.y - 160 + --NeLAttachPatchMesh cnode ccenter + ) + maxw = targetdir + "/zonematerial-" + zonename + "-" + (lowercase zw) + ".max" + if existFile maxw then + ( + mergeMAXFile maxw #(zw) + cnode = getnodebyname zw + cnode.position.x = cnode.position.x - 160 + NeLAttachPatchMesh cnode ccenter + ) + maxnw = targetdir + "/zonematerial-" + zonename + "-" + (lowercase znw) + ".max" + if existFile maxnw then + ( + mergeMAXFile maxnw #(znw) + cnode = getnodebyname znw + cnode.position.x = cnode.position.x - 160 + cnode.position.y = cnode.position.y + 160 + NeLAttachPatchMesh cnode ccenter + ) + NeLWeldPatchMesh ccenter 1.0 + NeLLigoMakeSnapShot ccenter csnapfile 0 1 0 1 false + ) + ) + ) +) From f411d2b2302dc44d5558c2346ece42ba55f60bfb Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:18 +0100 Subject: [PATCH 016/175] Fix choppy sky animation --HG-- branch : develop --- code/ryzom/client/src/main_loop_debug.cpp | 3 +++ code/ryzom/client/src/sky.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/main_loop_debug.cpp b/code/ryzom/client/src/main_loop_debug.cpp index 19ea38414..992325c54 100644 --- a/code/ryzom/client/src/main_loop_debug.cpp +++ b/code/ryzom/client/src/main_loop_debug.cpp @@ -371,6 +371,9 @@ void displayDebug() // Current GameCycle TextContext->printfAt(1.f, line, "Ms per Cycle : %d", NetMngr.getMsPerTick()); line += lineStep; + // Smoothed Client Date + TextContext->printfAt(1.f, line, "Smoothed Client Date : %u %f", SmoothedClientDate.Day, SmoothedClientDate.Hour); + line += lineStep; // Packet Loss TextContext->printfAt(1.f, line, "Packet Loss : %.1f %%", NetMngr.getMeanPacketLoss()*100.0f); line += lineStep; diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index d5a9216ce..855ab3387 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -235,7 +235,7 @@ uint CSky::setup(const CClientDate &date, const CClientDate &animationDate, floa // animate objects if (_PlayListManager) { - double globalDate = ((double) _NumHourInDay * date.Day + (double) date.Hour) / _NumHourInDay; + double globalDate = (double)date.Hour / (double)_NumHourInDay; //nlinfo("global date = %f", (float) globalDate); _PlayListManager->animate(_AnimLengthInSeconds * globalDate); } From 44286f7adeefcd18af42bfbebda6b0c2b925c308 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:18 +0100 Subject: [PATCH 017/175] Add sky batch script --HG-- branch : develop --- code/nel/tools/build_gamedata/sky_dev.bat | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 code/nel/tools/build_gamedata/sky_dev.bat diff --git a/code/nel/tools/build_gamedata/sky_dev.bat b/code/nel/tools/build_gamedata/sky_dev.bat new file mode 100644 index 000000000..590400640 --- /dev/null +++ b/code/nel/tools/build_gamedata/sky_dev.bat @@ -0,0 +1,11 @@ +title Ryzom Core: 1_export.py (LEVELDESIGN) +1_export.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 2_build.py (LEVELDESIGN) +2_build.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 3_install.py (LEVELDESIGN) +3_install.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: b1_client_dev.py (LEVELDESIGN) +b1_client_dev.py +title Ryzom Core: b2_shard_data.py (LEVELDESIGN) +b2_shard_data.py +title Ryzom Core: Ready From c3df884b133a9785246b9ed30c4c9f343aad4f97 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:19 +0100 Subject: [PATCH 018/175] Allow different light cycle for different continents [breaks packed sheets] --HG-- branch : develop --- code/ryzom/client/src/client_sheets/continent_sheet.cpp | 5 +++++ code/ryzom/client/src/client_sheets/continent_sheet.h | 5 ++++- code/ryzom/client/src/continent.cpp | 5 +++++ code/ryzom/client/src/continent_manager.cpp | 2 +- code/ryzom/client/src/init_main_loop.cpp | 2 +- .../client/src/interface_v3/action_handler_debug.cpp | 2 +- code/ryzom/client/src/weather.cpp | 9 +++++++-- code/ryzom/client/src/weather.h | 3 ++- 8 files changed, 26 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/continent_sheet.cpp b/code/ryzom/client/src/client_sheets/continent_sheet.cpp index 17868866c..6cd46b15c 100644 --- a/code/ryzom/client/src/client_sheets/continent_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/continent_sheet.cpp @@ -300,6 +300,9 @@ void CContinentParameters::build(const NLGEORGES::UFormElm &item) if(readSeasontype() != CEntitySheet::LIGHT_CYCLE) { diff --git a/code/ryzom/client/src/weather.h b/code/ryzom/client/src/weather.h index 954b7f2c8..02a70a5a2 100644 --- a/code/ryzom/client/src/weather.h +++ b/code/ryzom/client/src/weather.h @@ -20,6 +20,7 @@ #define CL_WORLD_LIGHT_CYCLE_H +#include #include "game_share/season.h" struct CLightCycleDesc; @@ -47,7 +48,7 @@ extern EGSPD::CSeason::TSeason StartupSeason; extern CWeatherFunctionParamsSheet *WeatherFunctionParams; // load the world light cycle from a sheet -void loadWorldLightCycle(); +void loadWorldLightCycle(NLMISC::CSheetId lightCycleSheet); // load the weather function params void loadWeatherFunctionParams(); From 0c77c91e95585f5def67fec4e65a44d22de79d06 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:19 +0100 Subject: [PATCH 019/175] Adjust sky batch --HG-- branch : develop --- code/nel/tools/build_gamedata/sky_dev.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/build_gamedata/sky_dev.bat b/code/nel/tools/build_gamedata/sky_dev.bat index 590400640..ac80d591e 100644 --- a/code/nel/tools/build_gamedata/sky_dev.bat +++ b/code/nel/tools/build_gamedata/sky_dev.bat @@ -1,9 +1,9 @@ title Ryzom Core: 1_export.py (LEVELDESIGN) -1_export.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +1_export.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: 2_build.py (LEVELDESIGN) -2_build.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +2_build.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: 3_install.py (LEVELDESIGN) -3_install.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +3_install.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: b1_client_dev.py (LEVELDESIGN) b1_client_dev.py title Ryzom Core: b2_shard_data.py (LEVELDESIGN) From eb2f4555b182bd4a4335f95b9b7d1ceea5bd5317 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 21:17:13 +0100 Subject: [PATCH 020/175] Also export non-root shapes --HG-- branch : develop --- .../generators/max_exporter_scripts/shape.ms | 66 +++++++++---------- .../processes/shape/maxscript/shape_export.ms | 66 +++++++++---------- 2 files changed, 64 insertions(+), 68 deletions(-) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms index d8d6c8d9d..2a52947ec 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms @@ -187,6 +187,8 @@ fn haveCoarseMesh node = return false ) +fn getRoot node = if isvalidnode node.parent then getRoot node.parent else node + fn runNelMaxExportSub inputMaxFile retryCount = ( tagThisFile = false @@ -273,55 +275,51 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- For each node for node in array_node do ( - -- It is root ? - if (node.parent == undefined) then + -- Is not a skeleton ? + if (((substring node.name 1 3) != "Bip") and ((substring (getRoot node).name 1 3) != "Bip")) then ( - -- Is not a skeleton ? - if (node.name != "Bip01") then + -- Can be exported ? + if (isToBeExported node == true) then ( - -- Can be exported ? - if (isToBeExported node == true) then + -- Not a lod ? + if ((isLod node) == false) then ( - -- Not a lod ? - if ((isLod node) == false) then + -- Output directory + if (haveCoarseMesh node) == true then + output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + else + output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + + -- Compare file date + if (NeLTestFileDate output inputMaxFile) == true then ( - -- Output directory - if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") - else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") - - -- Compare file date - if (NeLTestFileDate output inputMaxFile) == true then + try ( - try + -- Export the shape + if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then ( - -- Export the shape - if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then - ( - nlerror("OK "+output) - exported = exported +1 - ) - else - ( - -- Error - nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) - tagThisFile = false - ) + nlerror("OK "+output) + exported = exported +1 ) - catch + else ( -- Error - nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) tagThisFile = false ) ) - else + catch ( - nlerror("SKIPPED " + output) - exported = exported + 1 + -- Error + nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + tagThisFile = false ) ) + else + ( + nlerror("SKIPPED " + output) + exported = exported + 1 + ) ) ) ) diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms index 16c6dcec9..5bece0c50 100755 --- a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms +++ b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms @@ -253,6 +253,8 @@ fn haveCoarseMesh node = return false ) +fn getRoot node = if isvalidnode node.parent then getRoot node.parent else node + fn runNelMaxExportSub inputMaxFile retryCount = ( tagThisFile = false @@ -339,55 +341,51 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- For each node for node in array_node do ( - -- It is root ? - if (node.parent == undefined) then + -- Is not a skeleton ? + if (((substring node.name 1 3) != "Bip") and ((substring (getRoot node).name 1 3) != "Bip")) then ( - -- Is not a skeleton ? - if (node.name != "Bip01") then + -- Can be exported ? + if (isToBeExported node == true) then ( - -- Can be exported ? - if (isToBeExported node == true) then + -- Not a lod ? + if ((isLod node) == false) then ( - -- Not a lod ? - if ((isLod node) == false) then + -- Output directory + if (haveCoarseMesh node) == true then + output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + else + output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + + -- Compare file date + if (NeLTestFileDate output inputMaxFile) == true then ( - -- Output directory - if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") - else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") - - -- Compare file date - if (NeLTestFileDate output inputMaxFile) == true then + try ( - try + -- Export the shape + if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then ( - -- Export the shape - if (NelExportShapeEx node output %ShapeExportOptShadow% %ShapeExportOptExportLighting% "%OutputDirectoryLightmap%" %ShapeExportOptLightingLimit% %ShapeExportOptLumelSize% %ShapeExportOptOversampling% true false %ShapeExportOptLightmapLog%) == true then - ( - nlerror("OK "+output) - exported = exported +1 - ) - else - ( - -- Error - nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) - tagThisFile = false - ) + nlerror("OK "+output) + exported = exported +1 ) - catch + else ( -- Error - nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + nlerror("ERROR exporting shape " + node.name + " in file " + inputMaxFile) tagThisFile = false ) ) - else + catch ( - nlerror("SKIPPED " + output) - exported = exported + 1 + -- Error + nlerror("ERROR fatal error exporting shape " + node.name + " in file " + inputMaxFile) + tagThisFile = false ) ) + else + ( + nlerror("SKIPPED " + output) + exported = exported + 1 + ) ) ) ) From 93d5ffddb6bbe9469a265db944dc03da1bd6028f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 21:17:13 +0100 Subject: [PATCH 021/175] Override sun direction from sky dome [breaks packed sheets] --HG-- branch : develop --- .../client/src/client_sheets/sky_sheet.cpp | 5 +++ .../client/src/client_sheets/sky_sheet.h | 3 ++ code/ryzom/client/src/light_cycle_manager.cpp | 10 +++++- code/ryzom/client/src/sky.cpp | 35 +++++++++++++++++++ code/ryzom/client/src/sky.h | 4 +++ 5 files changed, 56 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/client_sheets/sky_sheet.cpp b/code/ryzom/client/src/client_sheets/sky_sheet.cpp index 4d3c35caf..e47aac582 100644 --- a/code/ryzom/client/src/client_sheets/sky_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/sky_sheet.cpp @@ -24,6 +24,7 @@ CSkySheet::CSkySheet() Type = SKY; WaterEnvMapCameraHeight = 0.f; WaterEnvMapAlpha = 255; + SunClipZ = -1.0f; } // ***************************************************************************************************** @@ -53,6 +54,8 @@ void CSkySheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix item.getValueByName(FogColorBitmap, (prefix + "FogColorBitmap").c_str()); item.getValueByName(WaterEnvMapCameraHeight, (prefix + "WaterEnvMapCameraHeight").c_str()); item.getValueByName(WaterEnvMapAlpha, (prefix + "WaterEnvMapAlpha").c_str()); + item.getValueByName(SunSource, (prefix + "SunSource").c_str()); + item.getValueByName(SunClipZ, (prefix + "SunClipZ").c_str()); } // ***************************************************************************************************** @@ -67,6 +70,8 @@ void CSkySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream) f.serial(FogColorBitmap); f.serial(WaterEnvMapCameraHeight); f.serial(WaterEnvMapAlpha); + f.serial(SunSource); + f.serial(SunClipZ); } // ***************************************************************************************************** diff --git a/code/ryzom/client/src/client_sheets/sky_sheet.h b/code/ryzom/client/src/client_sheets/sky_sheet.h index 3ec207f27..319992847 100644 --- a/code/ryzom/client/src/client_sheets/sky_sheet.h +++ b/code/ryzom/client/src/client_sheets/sky_sheet.h @@ -39,6 +39,9 @@ public: // Water env map (computed from sky scene) float WaterEnvMapCameraHeight; uint8 WaterEnvMapAlpha; + // Sun direction override + std::string SunSource; + float SunClipZ; public: // ctor CSkySheet(); diff --git a/code/ryzom/client/src/light_cycle_manager.cpp b/code/ryzom/client/src/light_cycle_manager.cpp index 1f7175dba..2bf664130 100644 --- a/code/ryzom/client/src/light_cycle_manager.cpp +++ b/code/ryzom/client/src/light_cycle_manager.cpp @@ -477,7 +477,15 @@ void CLightCycleManager::setDirLight(const CDirLightSetup &setup0, const CDirLig scene.setSunAmbient (resultSetup.Ambiant); scene.setSunDiffuse (resultSetup.Diffuse); scene.setSunSpecular (resultSetup.Specular); - scene.setSunDirection(resultSetup.Direction); + CSky &sky = ContinentMngr.cur()->CurrentSky; + if (sky.overrideSunDirection()) + { + scene.setSunDirection(sky.calculateSunDirection()); + } + else + { + scene.setSunDirection(resultSetup.Direction); + } } //----------------------------------------------- diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index 855ab3387..d086bad60 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -48,6 +48,8 @@ CSky::CSky() _FogColor = NULL; _WaterEnvMapCameraHeight = 0.f; _WaterEnvMapAlpha = 255; + _SunSource = -1; + _SunClipZ = -1.0f; } // ************************************************************************************************* @@ -217,6 +219,39 @@ void CSky::init(UDriver *drv, const CSkySheet &sheet, bool forceFallbackVersion _NumHourInDay = numHourInDay; _WaterEnvMapCameraHeight = sheet.WaterEnvMapCameraHeight; _WaterEnvMapAlpha= sheet.WaterEnvMapAlpha; + // + // Find sun source + std::string sunSource = NLMISC::toLower(sheet.SunSource); + _SunSource = -1; + if (sunSource.size()) + { + uint numObjects = (uint)_Objects.size(); + for (uint k = 0; k < numObjects; ++k) + { + if (NLMISC::toLower(_Objects[k].Name) == sunSource) + { + nldebug("Found sun source: '%s'", sunSource.c_str()); + _SunSource = k; + } + } + } + _SunClipZ = sheet.SunClipZ; +} + +// ************************************************************************************************* +bool CSky::overrideSunDirection() const +{ + return (_SunSource >= 0) + && (_Objects[_SunSource].Instance.getLastClippedState()); +} + +// ************************************************************************************************* +NLMISC::CVector CSky::calculateSunDirection() const +{ + CVector sunPos = _Objects[_SunSource].Instance.getLastWorldMatrixComputed().getPos(); + CVector baseDir = (-sunPos).normed(); + baseDir.z = std::max(_SunClipZ, baseDir.z); + return baseDir.normed(); } // ************************************************************************************************* diff --git a/code/ryzom/client/src/sky.h b/code/ryzom/client/src/sky.h index 9c9f56d1f..07797c3e4 100644 --- a/code/ryzom/client/src/sky.h +++ b/code/ryzom/client/src/sky.h @@ -63,6 +63,8 @@ public: NLMISC::CRGBA computeFogColor(const CClientDate &date, float weatherLevel) const; float getWaterEnvMapCameraHeight() const { return _WaterEnvMapCameraHeight; } uint8 getWaterEnvMapAlpha() const { return _WaterEnvMapAlpha; } + bool overrideSunDirection() const; + NLMISC::CVector calculateSunDirection() const; private: std::vector _Objects; // all the object in the sky std::vector _Bitmaps; // all the bitmaps for the color lookups @@ -80,6 +82,8 @@ private: NLMISC::CBitmap *_FogColor; float _WaterEnvMapCameraHeight; uint8 _WaterEnvMapAlpha; + sint _SunSource; + float _SunClipZ; }; From f189a98422e7f99601b5d0e56d83c619a3d5878d Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 22 Dec 2014 01:26:04 +0100 Subject: [PATCH 022/175] Ported changeset 9878ab4: CCtrlTextbutton checkcoords should call it's text's checkcoords method. Fix #219. --HG-- branch : develop --- code/nel/include/nel/gui/ctrl_text_button.h | 1 + code/nel/src/gui/ctrl_text_button.cpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index d2b49ffa9..4f5251a8b 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -51,6 +51,7 @@ namespace NLGUI // Init part virtual bool parse (xmlNodePtr cur,CInterfaceGroup * parentGroup); + virtual void checkCoords(); virtual void updateCoords(); virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); } diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index cdf9ea0d2..2fb19a9fc 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -868,6 +868,15 @@ namespace NLGUI } } + // *************************************************************************** + void CCtrlTextButton::checkCoords() + { + if( _ViewText != NULL ) + _ViewText->checkCoords(); + + CCtrlBaseButton::checkCoords(); + } + // *************************************************************************** void CCtrlTextButton::updateCoords() From a43fb4dba84cb6e81d69001c675fb7a8d11345c3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 22 Dec 2014 14:08:29 +0100 Subject: [PATCH 023/175] Move to hotfix: 287c1142e5ea --HG-- branch : develop --- code/nel/include/nel/gui/ctrl_text_button.h | 1 - code/nel/src/gui/ctrl_text_button.cpp | 9 --------- 2 files changed, 10 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index 4f5251a8b..d2b49ffa9 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -51,7 +51,6 @@ namespace NLGUI // Init part virtual bool parse (xmlNodePtr cur,CInterfaceGroup * parentGroup); - virtual void checkCoords(); virtual void updateCoords(); virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); } diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index 2fb19a9fc..cdf9ea0d2 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -868,15 +868,6 @@ namespace NLGUI } } - // *************************************************************************** - void CCtrlTextButton::checkCoords() - { - if( _ViewText != NULL ) - _ViewText->checkCoords(); - - CCtrlBaseButton::checkCoords(); - } - // *************************************************************************** void CCtrlTextButton::updateCoords() From b9d372b14434c32758bd0ea524b3f55e58bb3a45 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 22 Dec 2014 14:08:54 +0100 Subject: [PATCH 024/175] Backed out changeset: 3694176c26bf --HG-- branch : develop --- .../client/src/client_sheets/sky_sheet.cpp | 5 --- .../client/src/client_sheets/sky_sheet.h | 3 -- code/ryzom/client/src/light_cycle_manager.cpp | 10 +----- code/ryzom/client/src/sky.cpp | 35 ------------------- code/ryzom/client/src/sky.h | 4 --- 5 files changed, 1 insertion(+), 56 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/sky_sheet.cpp b/code/ryzom/client/src/client_sheets/sky_sheet.cpp index e47aac582..4d3c35caf 100644 --- a/code/ryzom/client/src/client_sheets/sky_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/sky_sheet.cpp @@ -24,7 +24,6 @@ CSkySheet::CSkySheet() Type = SKY; WaterEnvMapCameraHeight = 0.f; WaterEnvMapAlpha = 255; - SunClipZ = -1.0f; } // ***************************************************************************************************** @@ -54,8 +53,6 @@ void CSkySheet::build(const NLGEORGES::UFormElm &item, const std::string &prefix item.getValueByName(FogColorBitmap, (prefix + "FogColorBitmap").c_str()); item.getValueByName(WaterEnvMapCameraHeight, (prefix + "WaterEnvMapCameraHeight").c_str()); item.getValueByName(WaterEnvMapAlpha, (prefix + "WaterEnvMapAlpha").c_str()); - item.getValueByName(SunSource, (prefix + "SunSource").c_str()); - item.getValueByName(SunClipZ, (prefix + "SunClipZ").c_str()); } // ***************************************************************************************************** @@ -70,8 +67,6 @@ void CSkySheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream) f.serial(FogColorBitmap); f.serial(WaterEnvMapCameraHeight); f.serial(WaterEnvMapAlpha); - f.serial(SunSource); - f.serial(SunClipZ); } // ***************************************************************************************************** diff --git a/code/ryzom/client/src/client_sheets/sky_sheet.h b/code/ryzom/client/src/client_sheets/sky_sheet.h index 319992847..3ec207f27 100644 --- a/code/ryzom/client/src/client_sheets/sky_sheet.h +++ b/code/ryzom/client/src/client_sheets/sky_sheet.h @@ -39,9 +39,6 @@ public: // Water env map (computed from sky scene) float WaterEnvMapCameraHeight; uint8 WaterEnvMapAlpha; - // Sun direction override - std::string SunSource; - float SunClipZ; public: // ctor CSkySheet(); diff --git a/code/ryzom/client/src/light_cycle_manager.cpp b/code/ryzom/client/src/light_cycle_manager.cpp index 2bf664130..1f7175dba 100644 --- a/code/ryzom/client/src/light_cycle_manager.cpp +++ b/code/ryzom/client/src/light_cycle_manager.cpp @@ -477,15 +477,7 @@ void CLightCycleManager::setDirLight(const CDirLightSetup &setup0, const CDirLig scene.setSunAmbient (resultSetup.Ambiant); scene.setSunDiffuse (resultSetup.Diffuse); scene.setSunSpecular (resultSetup.Specular); - CSky &sky = ContinentMngr.cur()->CurrentSky; - if (sky.overrideSunDirection()) - { - scene.setSunDirection(sky.calculateSunDirection()); - } - else - { - scene.setSunDirection(resultSetup.Direction); - } + scene.setSunDirection(resultSetup.Direction); } //----------------------------------------------- diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index d086bad60..855ab3387 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -48,8 +48,6 @@ CSky::CSky() _FogColor = NULL; _WaterEnvMapCameraHeight = 0.f; _WaterEnvMapAlpha = 255; - _SunSource = -1; - _SunClipZ = -1.0f; } // ************************************************************************************************* @@ -219,39 +217,6 @@ void CSky::init(UDriver *drv, const CSkySheet &sheet, bool forceFallbackVersion _NumHourInDay = numHourInDay; _WaterEnvMapCameraHeight = sheet.WaterEnvMapCameraHeight; _WaterEnvMapAlpha= sheet.WaterEnvMapAlpha; - // - // Find sun source - std::string sunSource = NLMISC::toLower(sheet.SunSource); - _SunSource = -1; - if (sunSource.size()) - { - uint numObjects = (uint)_Objects.size(); - for (uint k = 0; k < numObjects; ++k) - { - if (NLMISC::toLower(_Objects[k].Name) == sunSource) - { - nldebug("Found sun source: '%s'", sunSource.c_str()); - _SunSource = k; - } - } - } - _SunClipZ = sheet.SunClipZ; -} - -// ************************************************************************************************* -bool CSky::overrideSunDirection() const -{ - return (_SunSource >= 0) - && (_Objects[_SunSource].Instance.getLastClippedState()); -} - -// ************************************************************************************************* -NLMISC::CVector CSky::calculateSunDirection() const -{ - CVector sunPos = _Objects[_SunSource].Instance.getLastWorldMatrixComputed().getPos(); - CVector baseDir = (-sunPos).normed(); - baseDir.z = std::max(_SunClipZ, baseDir.z); - return baseDir.normed(); } // ************************************************************************************************* diff --git a/code/ryzom/client/src/sky.h b/code/ryzom/client/src/sky.h index 07797c3e4..9c9f56d1f 100644 --- a/code/ryzom/client/src/sky.h +++ b/code/ryzom/client/src/sky.h @@ -63,8 +63,6 @@ public: NLMISC::CRGBA computeFogColor(const CClientDate &date, float weatherLevel) const; float getWaterEnvMapCameraHeight() const { return _WaterEnvMapCameraHeight; } uint8 getWaterEnvMapAlpha() const { return _WaterEnvMapAlpha; } - bool overrideSunDirection() const; - NLMISC::CVector calculateSunDirection() const; private: std::vector _Objects; // all the object in the sky std::vector _Bitmaps; // all the bitmaps for the color lookups @@ -82,8 +80,6 @@ private: NLMISC::CBitmap *_FogColor; float _WaterEnvMapCameraHeight; uint8 _WaterEnvMapAlpha; - sint _SunSource; - float _SunClipZ; }; From 11ae94ab212c6c4b49e757506889b113b7cf9f46 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 22 Dec 2014 14:10:37 +0100 Subject: [PATCH 025/175] Move to feature-light_cycle: c5207e1f862a --HG-- branch : develop --- code/ryzom/client/src/client_sheets/continent_sheet.cpp | 5 ----- code/ryzom/client/src/client_sheets/continent_sheet.h | 5 +---- code/ryzom/client/src/continent.cpp | 5 ----- code/ryzom/client/src/continent_manager.cpp | 2 +- code/ryzom/client/src/init_main_loop.cpp | 2 +- .../client/src/interface_v3/action_handler_debug.cpp | 2 +- code/ryzom/client/src/weather.cpp | 9 ++------- code/ryzom/client/src/weather.h | 3 +-- 8 files changed, 7 insertions(+), 26 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/continent_sheet.cpp b/code/ryzom/client/src/client_sheets/continent_sheet.cpp index 6cd46b15c..17868866c 100644 --- a/code/ryzom/client/src/client_sheets/continent_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/continent_sheet.cpp @@ -300,9 +300,6 @@ void CContinentParameters::build(const NLGEORGES::UFormElm &item) if(readSeasontype() != CEntitySheet::LIGHT_CYCLE) { diff --git a/code/ryzom/client/src/weather.h b/code/ryzom/client/src/weather.h index 02a70a5a2..954b7f2c8 100644 --- a/code/ryzom/client/src/weather.h +++ b/code/ryzom/client/src/weather.h @@ -20,7 +20,6 @@ #define CL_WORLD_LIGHT_CYCLE_H -#include #include "game_share/season.h" struct CLightCycleDesc; @@ -48,7 +47,7 @@ extern EGSPD::CSeason::TSeason StartupSeason; extern CWeatherFunctionParamsSheet *WeatherFunctionParams; // load the world light cycle from a sheet -void loadWorldLightCycle(NLMISC::CSheetId lightCycleSheet); +void loadWorldLightCycle(); // load the weather function params void loadWeatherFunctionParams(); From 3bfcd8644daf84ff8c6c8e545b95b8c7455b4f75 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 26 Dec 2014 13:12:56 +0100 Subject: [PATCH 026/175] Changed: Minor changes --HG-- branch : develop --- code/ryzom/server/src/CMakeLists.txt | 1 - .../src/entities_game_service/admin.cpp | 15 +- .../entities_game_service/database_plr.cpp | 20 +- .../src/entities_game_service/database_plr.h | 47 ++- .../guild_manager/guild_member_module.cpp | 5 +- .../mission_client_callbacks.cpp | 1 + .../mission_manager/mission_action.cpp | 18 +- .../mission_manager/mission_step_template.cpp | 1 - .../phrase_manager/faber_action.cpp | 2 +- .../character_version_adapter.cpp | 4 +- .../src/input_output_service/chat_manager.cpp | 269 +++++++++--------- .../src/input_output_service/chat_manager.h | 18 +- .../src/server_share/continent_container.h | 2 +- .../server/src/server_share/mysql_wrapper.cpp | 2 +- .../nel_database_mapping.cpp | 23 +- .../nel_database_mapping.h | 16 +- code/ryzom/tools/client/CMakeLists.txt | 15 +- .../screenshot_islands.cpp | 3 +- code/ryzom/tools/leveldesign/CMakeLists.txt | 1 - code/ryzom/tools/server/CMakeLists.txt | 1 - .../brick_param_extractor.cpp | 2 +- 21 files changed, 254 insertions(+), 212 deletions(-) diff --git a/code/ryzom/server/src/CMakeLists.txt b/code/ryzom/server/src/CMakeLists.txt index 29c11be09..08731a4ca 100644 --- a/code/ryzom/server/src/CMakeLists.txt +++ b/code/ryzom/server/src/CMakeLists.txt @@ -1,4 +1,3 @@ - # Supporting modules and libraries. # Need servershare for build packed collision tool # Need aishare for build wmap tool diff --git a/code/ryzom/server/src/entities_game_service/admin.cpp b/code/ryzom/server/src/entities_game_service/admin.cpp index 20941e77f..080dc16bb 100644 --- a/code/ryzom/server/src/entities_game_service/admin.cpp +++ b/code/ryzom/server/src/entities_game_service/admin.cpp @@ -4821,9 +4821,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getSlotCount(); ++ i) { const CGameItemPtr itemPtr = inventory->getItem(i); - if( itemPtr != NULL ) + if ( itemPtr != NULL ) { - if( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) + if ( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) { numberItem += itemPtr->getStackSize(); } @@ -4841,9 +4841,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getSlotCount(); ++ i) { const CGameItemPtr itemPtr = inventory->getItem(i); - if( itemPtr != NULL ) + if ( itemPtr != NULL ) { - if( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) + if ( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) ) { numberItem -= inventory->deleteStackItem(i, quantity); if(numberItem == 0) @@ -5053,7 +5053,8 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getType()) + + if (creature == NULL || creatureSheetId == CSheetId::Unknown || creatureSheetId != creature->getType()) { if (send_url) c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=bad_sheet", getSalt()); @@ -5686,7 +5687,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getHomeMainlandSessionId(), value)); - if (entityBase == 0) + if (entityBase == NULL) { // try to find the bot name vector aliases; @@ -5711,7 +5712,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", " getState().X + sint32 (cos (entityBase->getState ().Heading) * 2000); y = entityBase->getState().Y + sint32 (sin (entityBase->getState ().Heading) * 2000); diff --git a/code/ryzom/server/src/entities_game_service/database_plr.cpp b/code/ryzom/server/src/entities_game_service/database_plr.cpp index 7cf0d2108..4b5fa84fd 100644 --- a/code/ryzom/server/src/entities_game_service/database_plr.cpp +++ b/code/ryzom/server/src/entities_game_service/database_plr.cpp @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -347,7 +362,7 @@ void CBankAccessor_PLR::TUSER::init(ICDBStructNode *parent) node = parent->getNode( ICDBStructNode::CTextId("IS_INVISIBLE"), false ); nlassert(node != NULL); _IS_INVISIBLE = node; - + node = parent->getNode( ICDBStructNode::CTextId("COUNTER"), false ); nlassert(node != NULL); _COUNTER = node; @@ -3124,11 +3139,10 @@ void CBankAccessor_PLR::TPACK_ANIMAL::TBEAST::init(ICDBStructNode *parent, uint node = parent->getNode( ICDBStructNode::CTextId("DESPAWN"), false ); nlassert(node != NULL); _DESPAWN = node; - + node = parent->getNode( ICDBStructNode::CTextId("NAME"), false ); nlassert(node != NULL); _NAME = node; - // branch init diff --git a/code/ryzom/server/src/entities_game_service/database_plr.h b/code/ryzom/server/src/entities_game_service/database_plr.h index 38a394c88..67e0f7798 100644 --- a/code/ryzom/server/src/entities_game_service/database_plr.h +++ b/code/ryzom/server/src/entities_game_service/database_plr.h @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . #ifndef INCLUDED_DATABASE_PLR_H @@ -941,8 +956,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false) { - - _setProp(dbGroup, _IS_INVISIBLE, value, forceSending); } @@ -958,7 +971,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _IS_INVISIBLE; } - + void setCOUNTER(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false) { @@ -1300,13 +1313,14 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _DODGE; } - TBRICK_TICK_RANGE &getBRICK_TICK_RANGE() + + TBRICK_TICK_RANGE &getBRICK_TICK_RANGE() { return _BRICK_TICK_RANGE; } - + }; - + class TTARGET { public: @@ -3457,8 +3471,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY, value, forceSending); } @@ -4560,8 +4572,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY, value, forceSending); } @@ -4572,14 +4582,12 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return value; } - + ICDBStructNode *getMONEYCDBNode() { return _MONEY; } - }; - private: ICDBStructNode *_BranchNode; @@ -4602,11 +4610,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return _BranchNode; } - void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY, value, forceSending); } @@ -6000,8 +6005,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C void setMONEY_SHEET(CCDBSynchronised &dbGroup, NLMISC::CSheetId value, bool forceSending = false) { - - _setProp(dbGroup, _MONEY_SHEET, value, forceSending); } @@ -8858,7 +8861,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C ICDBStructNode *_HUNGER; ICDBStructNode *_DESPAWN; ICDBStructNode *_NAME; - public: void init(ICDBStructNode *parent, uint index); @@ -9047,11 +9049,9 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C { return _DESPAWN; } - + void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false) { - - _setProp(dbGroup, _NAME, value, forceSending); } @@ -9062,12 +9062,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C return value; } - + ICDBStructNode *getNAMECDBNode() { return _NAME; } - }; diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp b/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp index 03a105445..c04347c08 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_member_module.cpp @@ -559,7 +559,8 @@ void CGuildMemberModule::kickMember( uint16 index,uint8 session )const } // if the user is online reset its guild id CGuildMemberModule * module = NULL; - if ( member->getReferencingModule( module ) ) + + if (member->getReferencingModule(module)) { module->clearOnlineGuildProperties(); } @@ -568,7 +569,7 @@ void CGuildMemberModule::kickMember( uint16 index,uint8 session )const params[0].setEIdAIAlias( proxy.getId(), CAIAliasTranslator::getInstance()->getAIAlias(proxy.getId()) ); params[1].StringId = CEntityIdTranslator::getInstance()->getEntityNameStringId(member->getIngameEId()); sendMessageToGuildMembers("GUILD_KICK_MEMBER",params); - + guild->deleteMember( member ); } diff --git a/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp b/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp index 7cc0bf32a..98d784e11 100644 --- a/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_client_callbacks.cpp @@ -236,6 +236,7 @@ void cbClientGroupAbandonMission( NLNET::CMessage& msgin, const std::string &ser MISLOG("user:%s cbClientGroupAbandonMission : Invalid team", userId.toString().c_str()); return; } + if ( team->getLeader() != userId ) { CCharacter::sendDynamicSystemMessage( user->getEntityRowId(), "REQ_LEADER_TO_ABANDON_MISSION" ); diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp index 941b31afa..d967e6971 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_action.cpp @@ -767,7 +767,7 @@ class CMissionActionRecvItem : public IMissionAction freeSlotcount -= invTemp->getUsedSlotCount(); maxBulk -= invTemp->getInventoryBulk(); } - + if( (neededSlotCount <= freeSlotcount) && ( neededBulk + invBag->getInventoryBulk() <= maxBulk) ) { fail = false; @@ -862,7 +862,7 @@ class CMissionActionRecvItem : public IMissionAction } params[2].Int = _Item.getQuality(); } - + params[0].SheetId = _SheetId; params[1].Int = _Quantity; PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_RECV_ITEM", params); @@ -1050,7 +1050,7 @@ class CMissionActionRecvNamedItem : public IMissionAction sint16 neededSlotCount = (sint16) ceil( (float)_Quantity / itemTmp->getMaxStackSize() ); uint32 neededBulk = _Quantity * itemTmp->getStackBulk(); itemTmp.deleteItem(); - + bool fail = true; for ( uint i = 0; i < entities.size(); i++ ) { @@ -1067,15 +1067,15 @@ class CMissionActionRecvNamedItem : public IMissionAction freeSlotcount -= invTemp->getUsedSlotCount(); maxBulk -= invTemp->getInventoryBulk(); } - + if( (neededSlotCount <= freeSlotcount) && ( neededBulk + invBag->getInventoryBulk() <= maxBulk) ) { fail = false; break; } } - } + if( fail ) { CMissionTemplate * templ = CMissionManager::getInstance()->getTemplate( instance->getTemplateId() ); @@ -1274,7 +1274,6 @@ class CMissionActionDestroyItem : // If the "guild" parameter is not set, we destroy the items for the users if (!_Guild) { - for ( uint i = 0; i < entities.size(); i++ ) { CCharacter * user = PlayerManager.getChar( entities[i] ); @@ -1303,7 +1302,6 @@ class CMissionActionDestroyItem : PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_DESTROY_ITEM", params); } } - } // We destroy the item in the guild else @@ -1909,7 +1907,6 @@ class CMissionActionRecvMoney : public IMissionAction // If the guild parameter is not set we just divide the money and give it to each entity if (!_Guild) { - uint amount = _Amount / (uint)entities.size(); if ( amount == 0 || _Amount % entities.size() ) amount++; @@ -1924,7 +1921,6 @@ class CMissionActionRecvMoney : public IMissionAction PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_RECV_MONEY",params); } } - } // Else we give the money to the guild else @@ -2026,7 +2022,6 @@ class CMissionActionRecvFame : public IMissionAction // If there is no "guild" parameter we give the fame to every user if (!_Guild) { - for ( uint i = 0; i < entities.size(); i++ ) { CEntityId eid = TheDataset.getEntityId(entities[i]); @@ -2037,12 +2032,10 @@ class CMissionActionRecvFame : public IMissionAction if (character) character->sendEventForMissionAvailabilityCheck(); } - } // Else we just give it to the guild else { - if (entities.size() == 0) return; @@ -2072,7 +2065,6 @@ class CMissionActionRecvFame : public IMissionAction if (character) character->sendEventForMissionAvailabilityCheck(); } - } }; diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp index 7e99059b9..1caefb340 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_step_template.cpp @@ -170,7 +170,6 @@ uint32 IMissionStepTemplate::sendStepText(CCharacter * user,const std::vectorgetLowerRmQuality(),(uint16)phrase->getRecommendedSkill()) * successFactor) ); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp index 1cf7940c6..adc281dda 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character_version_adapter.cpp @@ -652,7 +652,9 @@ void CCharacterVersionAdapter::adaptToVersion11(CCharacter &character) const case EGSPD::CPeople::Zorai : mission = CAIAliasTranslator::getInstance()->getMissionUniqueIdFromName( "ZORAI_NEWB_WELCOME_SHENG_WO_1" ); CAIAliasTranslator::getInstance()->getNPCAliasesFromName("welcomer_sheng_wo_1", bots); - break; + break; + default: + break; } } // other give him a rite intro mission diff --git a/code/ryzom/server/src/input_output_service/chat_manager.cpp b/code/ryzom/server/src/input_output_service/chat_manager.cpp index fbc38ead5..aedfa063f 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.cpp +++ b/code/ryzom/server/src/input_output_service/chat_manager.cpp @@ -94,21 +94,21 @@ void CChatManager::onServiceDown(const std::string &serviceShortName) switch (cg.Type) { - case CChatGroup::universe: - case CChatGroup::say: - case CChatGroup::shout: - continue; - case CChatGroup::team: - case CChatGroup::guild: - case CChatGroup::civilization: - case CChatGroup::territory: - case CChatGroup::tell: - case CChatGroup::arround: - case CChatGroup::system: - case CChatGroup::region: - case CChatGroup::dyn_chat: - groupToRemove.push_back(gid); - break; + case CChatGroup::universe: + case CChatGroup::say: + case CChatGroup::shout: + continue; + case CChatGroup::team: + case CChatGroup::guild: + case CChatGroup::civilization: + case CChatGroup::territory: + case CChatGroup::tell: + case CChatGroup::arround: + case CChatGroup::system: + case CChatGroup::region: + case CChatGroup::dyn_chat: + groupToRemove.push_back(gid); + break; } } @@ -121,7 +121,7 @@ void CChatManager::onServiceDown(const std::string &serviceShortName) // clear muted players table _MutedUsers.clear(); - + // clear the dyn chats _DynChat.removeAllChannels(); } @@ -151,9 +151,11 @@ bool CChatManager::checkClient( const TDataSetRow& id ) void CChatManager::addClient( const TDataSetRow& id ) { if (VerboseChatManagement) - nldebug("IOSCM: addClient : adding client %s:%x into chat manager and universe group.", + { + nldebug("IOSCM: addClient : adding client %s:%x into chat manager and universe group.", TheDataset.getEntityId(id).toString().c_str(), id.getIndex()); + } if(id.getIndex() == 0xffffff) { @@ -197,10 +199,11 @@ void CChatManager::addClient( const TDataSetRow& id ) void CChatManager::removeClient( const TDataSetRow& id ) { if (VerboseChatManagement) - nldebug("IOSCM: removeClient : removing the client %s:%x from chat manager !", + { + nldebug("IOSCM: removeClient : removing the client %s:%x from chat manager !", TheDataset.getEntityId(id).toString().c_str(), id.getIndex()); - + } TClientInfoCont::iterator itCl = _Clients.find( id ); if( itCl != _Clients.end() ) @@ -214,7 +217,7 @@ void CChatManager::removeClient( const TDataSetRow& id ) } else { - nlwarning("CChatManager::removeClient : The client %s:%x is unknown !", + nlwarning("CChatManager::removeClient : The client %s:%x is unknown !", TheDataset.getEntityId(id).toString().c_str(), id.getIndex()); } @@ -233,7 +236,7 @@ CChatClient& CChatManager::getClient( const TDataSetRow& id ) TClientInfoCont::iterator itCl = _Clients.find( id ); if( itCl != _Clients.end() ) { - return *(itCl->second); + return *(itCl->second); } else { @@ -259,15 +262,15 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s { if (!groupName.empty()) nldebug("IOSCM: addGroup : adding %s named chat group %s as '%s'", - CChatGroup::groupTypeToString(gType).c_str(), + CChatGroup::groupTypeToString(gType).c_str(), gId.toString().c_str(), groupName.c_str()); else nldebug("IOSCM: addGroup : adding %s anonymous chat group %s", - CChatGroup::groupTypeToString(gType).c_str(), + CChatGroup::groupTypeToString(gType).c_str(), gId.toString().c_str()); } - + map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp == _Groups.end() ) { @@ -290,7 +293,7 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s { nlwarning("CChatManager::addGroup : the group %s already exists", gId.toString().c_str()); } - + } // addGroup // @@ -302,8 +305,10 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s void CChatManager::removeGroup( TGroupId gId ) { if (VerboseChatManagement) + { nldebug("IOSCM: removeGroup : removing group %s", gId.toString().c_str()); + } map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp != _Groups.end() ) @@ -338,10 +343,12 @@ void CChatManager::removeGroup( TGroupId gId ) void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId ) { if (VerboseChatManagement) + { nldebug("IOSCM: addtoGroup : adding player %s:%x to group %s", TheDataset.getEntityId(charId).toString().c_str(), charId.getIndex(), gId.toString().c_str()); + } map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp != _Groups.end() ) @@ -372,7 +379,7 @@ void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId ) } else { - nlwarning("CChatManager::addToGroup : client %s:%x is unknown", + nlwarning("CChatManager::addToGroup : client %s:%x is unknown", TheDataset.getEntityId(charId).toString().c_str(), charId.getIndex()); // remove it from the group (don't leave bad client...) @@ -396,10 +403,12 @@ void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId ) void CChatManager::removeFromGroup( TGroupId gId, const TDataSetRow &charId ) { if (VerboseChatManagement) + { nldebug("IOSCM: removeFromGroup : removing player %s:%x from group %s", TheDataset.getEntityId(charId).toString().c_str(), - charId.getIndex(), + charId.getIndex(), gId.toString().c_str()); + } map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId ); if( itGrp != _Groups.end() ) @@ -443,7 +452,7 @@ void CChatManager::removeFromGroup( TGroupId gId, const TDataSetRow &charId ) } // removeFromGroup // - + //----------------------------------------------- @@ -486,7 +495,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) } // CEntityId eid = TheDataset.getEntityId(sender); - // Get the char info + // Get the char info //WARNING: can be NULL CCharacterInfos *ci = IOS->getCharInfos(eid); @@ -525,7 +534,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // clean up container _DestUsers.clear(); - + switch( itCl->second->getChatMode() ) { // dynamic group @@ -533,7 +542,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) case CChatGroup::say : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -566,7 +575,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // so even after teleporting in a remote region the previous around people were still receiving // the messages. - TGroupId grpId = itCl->second->getRegionChatGroup(); + TGroupId grpId = itCl->second->getRegionChatGroup(); _DestUsers.push_back(grpId); _Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() ); @@ -599,7 +608,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // } // } - TGroupId grpId = CEntityId(RYZOMID::chatGroup,0); + TGroupId grpId = CEntityId(RYZOMID::chatGroup, 0); _Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() ); _DestUsers.push_back(grpId); @@ -621,15 +630,15 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) TGroupId grpId = itCl->second->getGuildChatGroup(); _DestUsers.push_back(grpId); - _Log.displayNL("'%s' (%s) : \t\"%s\"", - senderName.c_str(), - groupNames[itCl->second->getChatMode()], + _Log.displayNL("'%s' (%s) : \t\"%s\"", + senderName.c_str(), + groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() ); chatInGroup( grpId, ucstr, sender ); } break; case CChatGroup::dyn_chat: - { + { TChanID chanID = itCl->second->getDynChatChan(); CDynChatSession *session = _DynChat.getSession(chanID, sender); if (session) // player must have a session in that channel @@ -650,7 +659,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) if (!session->getChan()->getDontBroadcastPlayerInputs()) { - // add msg to the historic + // add msg to the historic CDynChatChan::CHistoricEntry entry; entry.String = ucstr; if (ci != NULL) @@ -671,15 +680,15 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) ucstring tmp("{no_bubble}"); if (ucstr.find(tmp) == ucstring::npos) { - tmp += ucstr; + tmp += ucstr; content.swap(tmp); } else { content = ucstr; } - } - + } + // broadcast to other client in the channel CDynChatSession *dcc = session->getChan()->getFirstSession(); @@ -687,7 +696,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) { sendChat(itCl->second->getChatMode(), dcc->getClient()->getID(), content, sender, chanID); dcc = dcc->getNextChannelSession(); // next session in this channel - } + } } else { @@ -702,11 +711,11 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) TPlayerInputForward pif; pif.ChanID = chanID; pif.Sender = sender; - pif.Content = ucstr; + pif.Content = ucstr; CMessage msgout( "DYN_CHAT:FORWARD"); msgout.serial(pif); - + CUnifiedNetwork::getInstance()->send(serviceId, msgout); } if (session->getChan()->getUnifiedChannel()) @@ -716,19 +725,19 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) IChatUnifierClient::getInstance()->sendUnifiedDynChat(session->getChan()->getID(), senderName, ucstr); } } - } + } } break; // static group default : nlwarning(" client %u chat in %s ! don't know how to handle it.", - sender.getIndex(), + sender.getIndex(), groupNames[itCl->second->getChatMode()]); /* { TGroupId grpId = itCl->second.getChatGroup(); _Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second.getChatMode()], ucstr.toString().c_str() ); - + chatInGroup( grpId, ucstr, sender ); } */ } @@ -736,8 +745,8 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr ) // log chat to PDS system // IOSPD::logChat(ucstr, itCl->second->getId(), _DestUsers); log_Chat_Chat(CChatGroup::groupTypeToString(itCl->second->getChatMode()), - TheDataset.getEntityId(sender), - ucstr.toUtf8(), + TheDataset.getEntityId(sender), + ucstr.toUtf8(), _DestUsers); } @@ -770,7 +779,7 @@ void CChatManager::chatInGroup( TGroupId& grpId, const ucstring& ucstr, const TD CMirrorPropValueRO instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE ); // check the ai instance for region chat - if (chatGrp.Type != CChatGroup::region + if (chatGrp.Type != CChatGroup::region || instanceId == senderInstanceId) { // check homeSessionId for universe @@ -795,7 +804,7 @@ void CChatManager::chatInGroup( TGroupId& grpId, const ucstring& ucstr, const TD _DestUsers.push_back(TheDataset.getEntityId(*itM)); } } - } + } if (chatGrp.Type == CChatGroup::guild) { @@ -855,7 +864,7 @@ void CChatManager::farChatInGroup(TGroupId &grpId, uint32 homeSessionId, const u continue; } sendFarChat( itGrp->second.Type, *itM, text, senderName ); - } + } } else { @@ -885,7 +894,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId case CChatGroup::shout : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -900,7 +909,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId chatInGroup2( grpId, phraseId, sender ); } break; - + case CChatGroup::universe: { @@ -937,7 +946,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId { nlwarning(" client %s:%x chat in mode %u ! don't know how to handle it.", TheDataset.getEntityId(sender).toString().c_str(), - sender.getIndex(), + sender.getIndex(), itCl->second->getChatMode()); } } @@ -973,7 +982,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra case CChatGroup::shout : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -988,7 +997,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra chatParamInGroup( grpId, phraseId, params, sender ); } break; - + case CChatGroup::universe: { @@ -1025,7 +1034,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra { nlwarning(" client %s:%x chat in mode %u ! don't know how to handle it.", TheDataset.getEntityId(sender).toString().c_str(), - sender.getIndex(), + sender.getIndex(), itCl->second->getChatMode()); } } @@ -1049,7 +1058,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) CEntityId eid = TheDataset.getEntityId(sender); if(_MutedUsers.find( eid ) != _MutedUsers.end()) { - nldebug("IOSCM: chat2Ex The player %s:%x is muted", + nldebug("IOSCM: chat2Ex The player %s:%x is muted", TheDataset.getEntityId(sender).toString().c_str(), sender.getIndex()); return; @@ -1061,7 +1070,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) case CChatGroup::shout : { CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -1076,7 +1085,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) chatInGroup2Ex( grpId, phraseId, sender ); } break; - + case CChatGroup::universe: { CEntityId eid = TheDataset.getEntityId(sender); @@ -1098,21 +1107,21 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId) chatInGroup2Ex( grpId, phraseId, sender ); } break; - + case CChatGroup::guild: { TGroupId grpId = itCl->second->getGuildChatGroup(); chatInGroup2Ex( grpId, phraseId, sender ); } break; - - + + // static group default : { nlwarning(" client %s:%x chat in mode %u ! don't know how to handle it.", TheDataset.getEntityId(sender).toString().c_str(), - sender.getIndex(), + sender.getIndex(), itCl->second->getChatMode()); // TGroupId grpId = (*itCl).second.getChatGroup(); // chatInGroup2( grpId, phraseId, sender ); @@ -1141,7 +1150,7 @@ void CChatManager::chatInGroup2Ex( TGroupId& grpId, uint32 phraseId, const TData { CMirrorPropValueRO instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE ); - if (chatGrp.Type != CChatGroup::region + if (chatGrp.Type != CChatGroup::region || instanceId == senderInstanceId) { const CEntityId &eid = TheDataset.getEntityId(*itM); @@ -1184,14 +1193,14 @@ void CChatManager::chatInGroup2( TGroupId& grpId, const std::string & phraseId, CMirrorPropValueRO instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE ); // check the ai instance for region chat - if (chatGrp.Type != CChatGroup::region + if (chatGrp.Type != CChatGroup::region || instanceId == senderInstanceId) { const CEntityId &eid = TheDataset.getEntityId(*itM); if (eid.getType() == RYZOMID::player && std::find( excluded.begin(), excluded.end(), *itM ) == excluded.end() ) sendChat2( (*itGrp ).second.Type, *itM, phraseId, sender ); } - } + } if (chatGrp.Type == CChatGroup::guild) { CCharacterInfos *charInfos = IOS->getCharInfos(TheDataset.getEntityId(sender)); @@ -1232,7 +1241,7 @@ void CChatManager::chatParamInGroup( TGroupId& grpId, const std::string & phrase if (eid.getType() == RYZOMID::player && std::find( excluded.begin(), excluded.end(), *itM ) == excluded.end() ) sendChat2( (*itGrp ).second.Type, *itM, phraseId, sender ); } - } + } if (chatGrp.Type == CChatGroup::guild) { CCharacterInfos *charInfos = IOS->getCharInfos(TheDataset.getEntityId(sender)); @@ -1278,10 +1287,10 @@ void CChatManager::sendEmoteTextToAudience( const TDataSetRow& sender,const std TChanID oldChan = itCl->second->getDynChatChan(); itCl->second->setChatMode(CChatGroup::say); itCl->second->updateAudience(); - + // get audience around the emoting player CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -1329,10 +1338,10 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc TChanID oldChan = itCl->second->getDynChatChan(); itCl->second->setChatMode(CChatGroup::say); itCl->second->updateAudience(); - + // get audience around the emoting player CChatGroup::TMemberCont::iterator itA; - for( itA = itCl->second->getAudience().Members.begin(); + for( itA = itCl->second->getAudience().Members.begin(); itA != itCl->second->getAudience().Members.end(); ++itA ) { @@ -1347,7 +1356,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc TheDataset.getEntityId(sender).toString().c_str(), sender.getIndex()); } - + } @@ -1386,7 +1395,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc // bms.serial( index ); // bms.serial( infos->Str ); // } -// +// //// nldebug(" sending association [%s,%d] to %s",infos->Str.c_str(),index,receiver.toString().c_str()); // msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); // sendMessageViaMirror(frontendId, msgout); @@ -1406,7 +1415,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc // //----------------------------------------------- void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataSetRow &receiver, const ucstring& ucstr, const TDataSetRow &sender, TChanID chanID, const ucstring &senderName) -{ +{ //if( receiver != sender ) { CCharacterInfos * charInfos = NULL; @@ -1440,14 +1449,14 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS } uint32 senderNameIndex; - // if the sender exists + // if the sender exists if( charInfos ) { senderNameIndex = charInfos->NameIndex; } else { - // if no sender, we use a special name + // if no sender, we use a special name ucstring senderName(""); senderNameIndex = SM->storeString( senderName ); } @@ -1466,14 +1475,14 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms ); - + CChatMsg chatMsg; chatMsg.CompressedIndex = sender.getCompressedIndex(); chatMsg.SenderNameId = senderNameIndex; chatMsg.ChatMode = (uint8) senderChatMode; if (senderChatMode == CChatGroup::dyn_chat) - { - chatMsg.DynChatChanID = chanID; + { + chatMsg.DynChatChanID = chanID; } chatMsg.Content = ucstr; bms.serial( chatMsg ); @@ -1483,7 +1492,7 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS chatMsg.Sender, receiver.toString().c_str(), chatMsg.ChatMode); - */ + */ msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); } @@ -1500,7 +1509,7 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS nlwarning(" The character %s:%x is unknown, no chat msg sent", TheDataset.getEntityId(receiver).toString().c_str(), receiver.getIndex()); - } + } } } // sendChat // @@ -1526,14 +1535,14 @@ void CChatManager::sendFarChat( CChatGroup::TGroupType senderChatMode, const TDa msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms ); - + CChatMsg chatMsg; chatMsg.CompressedIndex = 0xFFFFF; chatMsg.SenderNameId = senderNameIndex; chatMsg.ChatMode = (uint8) senderChatMode; if (senderChatMode == CChatGroup::dyn_chat) - { - chatMsg.DynChatChanID = chanID; + { + chatMsg.DynChatChanID = chanID; } chatMsg.Content = ucstr; bms.serial( chatMsg ); @@ -1554,7 +1563,7 @@ void CChatManager::sendFarChat( CChatGroup::TGroupType senderChatMode, const TDa nlwarning(" The character %s:%x is unknown, no chat msg sent", TheDataset.getEntityId(receiver).toString().c_str(), receiver.getIndex()); - } + } } @@ -1584,7 +1593,7 @@ void CChatManager::sendChatParam( CChatGroup::TGroupType senderChatMode, const T { TVectorParamCheck params2; params2.resize( params.size() + 1); - // send the chat phrase to the client + // send the chat phrase to the client params2[0].Type = STRING_MANAGER::bot; params2[0].setEId( TheDataset.getEntityId(sender) ); uint32 first = 0, last = (uint32)params.size(); @@ -1643,7 +1652,7 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT2", bms ); - + CChatMsg2 chatMsg; chatMsg.CompressedIndex = sender.getCompressedIndex(); chatMsg.SenderNameId = charInfos ? charInfos->NameIndex : 0; // empty string if there is no sender @@ -1651,7 +1660,7 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa chatMsg.PhraseId = phraseId; chatMsg.CustomTxt = customTxt; bms.serial( chatMsg ); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); CUnifiedNetwork::getInstance()->send(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); } @@ -1677,9 +1686,9 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa // //----------------------------------------------- void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSetRow &receiver, const ucstring& ucstr ) -{ +{ TDataSetRow senderFake = TDataSetRow::createFromRawIndex( INVALID_DATASET_ROW ); - + CCharacterInfos * receiverInfos = IOS->getCharInfos( TheDataset.getEntityId(receiver) ); CCharacterInfos * senderInfos = IOS->getCharInfos( TheDataset.getEntityId(sender) ); if( receiverInfos ) @@ -1698,7 +1707,7 @@ void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSe { return; } - + // send the string to FE CMessage msgout( "IMPULS_CH_ID" ); uint8 channel = 1; @@ -1707,7 +1716,7 @@ void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSe msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms ); - + CChatMsg chatMsg; chatMsg.CompressedIndex = senderFake.getCompressedIndex(); chatMsg.SenderNameId = 0; @@ -1785,7 +1794,7 @@ void CChatManager::tell2( const TDataSetRow& sender, const TDataSetRow& receiver TheDataset.getEntityId(receiver).toString().c_str() ); return; } - + // check if the sender is CSR or is not in the ignore list of the receiver if(senderInfos->HavePrivilege || !itCl->second->isInIgnoreList(sender) ) { @@ -1802,10 +1811,10 @@ void CChatManager::tell2( const TDataSetRow& sender, const TDataSetRow& receiver msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:TELL2", bms); - + bms.serial( senderInfos->NameIndex ); bms.serial( id); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); CUnifiedNetwork::getInstance()->send(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); } @@ -1938,8 +1947,8 @@ void CChatManager::tell( const TDataSetRow& sender, const string& receiverIn, co */ _Log.displayNL("'%s' to '%s' (%s) : \t\"%s\"", senderName.c_str(), receiverName.c_str(), "tell", ucstr.toString().c_str() ); - - + + // if the client doesn't know this dynamic string(name of sender), we send it to him // send the string to FE CMessage msgout( "IMPULS_CH_ID" ); @@ -1948,12 +1957,12 @@ void CChatManager::tell( const TDataSetRow& sender, const string& receiverIn, co msgout.serial( channel ); CBitMemStream bms; GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:TELL", bms); - + TDataSetIndex dsi = senderInfos->DataSetIndex.getCompressedIndex(); bms.serial( dsi ); bms.serial( senderInfos->NameIndex ); bms.serial( const_cast(ucstr) ); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); @@ -2088,8 +2097,8 @@ void CChatManager::farTell( const NLMISC::CEntityId &senderCharId, const ucstrin string receiverName = receiverInfos->Name.toString(); _Log.displayNL("'%s' to '%s' (%s) : \t\"%s\"", senderName.toUtf8().c_str(), receiverName.c_str(), "tell", ucstr.toString().c_str() ); - - + + // if the client doesn't know this dynamic string(name of sender), we send it to him // send the string to FE CMessage msgout( "IMPULS_CH_ID" ); @@ -2103,7 +2112,7 @@ void CChatManager::farTell( const NLMISC::CEntityId &senderCharId, const ucstrin ftm.SenderName = senderName; ftm.Text = ucstr; ftm.serial(bms); - + msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length()); sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout); @@ -2134,19 +2143,19 @@ void CChatManager::displayChatClients(NLMISC::CLog &log) if (ci != NULL) { if (ci->EntityId.getType() == RYZOMID::player) - log.displayNL("'%s' %s:%x %s mode '%s'", - ci->Name.toString().c_str(), - ci->EntityId.toString().c_str(), - im->first.getIndex(), - im->second->isMuted()?"(muted)":"", + log.displayNL("'%s' %s:%x %s mode '%s'", + ci->Name.toString().c_str(), + ci->EntityId.toString().c_str(), + im->first.getIndex(), + im->second->isMuted()?"(muted)":"", CChatGroup::groupTypeToString(im->second->getChatMode()).c_str() ); } else { - log.displayNL("*no name* %s:%x %s mode '%s'", - ci->EntityId.toString().c_str(), - im->first.getIndex(), - im->second->isMuted()?"(muted)":"", + log.displayNL("*no name* %s:%x %s mode '%s'", + ci->EntityId.toString().c_str(), + im->first.getIndex(), + im->second->isMuted()?"(muted)":"", CChatGroup::groupTypeToString(im->second->getChatMode()).c_str() ); } } @@ -2157,17 +2166,17 @@ void CChatManager::displayChatGroup(NLMISC::CLog &log, TGroupId gid, CChatGroup { if (chatGroup.GroupName == CStringMapper::emptyId()) { - log.displayNL("Group : anonym (%s), %s : %u clients :", + log.displayNL("Group : anonym (%s), %s : %u clients :", gid.toString().c_str(), - CChatGroup::groupTypeToString(chatGroup.Type).c_str(), + CChatGroup::groupTypeToString(chatGroup.Type).c_str(), chatGroup.Members.size()); } else { - log.displayNL("Group : '%s' (%s), %s : %u clients :", + log.displayNL("Group : '%s' (%s), %s : %u clients :", CStringMapper::unmap(chatGroup.GroupName).c_str(), - gid.toString().c_str(), - CChatGroup::groupTypeToString(chatGroup.Type).c_str(), + gid.toString().c_str(), + CChatGroup::groupTypeToString(chatGroup.Type).c_str(), chatGroup.Members.size()); } @@ -2179,12 +2188,12 @@ void CChatManager::displayChatGroup(NLMISC::CLog &log, TGroupId gid, CChatGroup { CCharacterInfos *ci = IOS->getCharInfos(TheDataset.getEntityId(*first)); if (ci != NULL) - log.displayNL(" '%s' %s:%x", - ci->Name.toString().c_str(), + log.displayNL(" '%s' %s:%x", + ci->Name.toString().c_str(), ci->EntityId.toString().c_str(), first->getIndex()); else - log.displayNL(" *unknow* %s:%x", + log.displayNL(" *unknow* %s:%x", eid.toString().c_str(), first->getIndex()); } @@ -2262,13 +2271,13 @@ void CChatManager::displayChatAudience(NLMISC::CLog &log, const CEntityId &eid, { CCharacterInfos *ci = IOS->getCharInfos(TheDataset.getEntityId(*first)); if (ci != NULL) - log.displayNL(" '%s' %s:%x", - ci->Name.toString().c_str(), + log.displayNL(" '%s' %s:%x", + ci->Name.toString().c_str(), TheDataset.getEntityId(*first).toString().c_str(), first->getIndex()); - + else - log.displayNL(" *unknow* %s:%x", + log.displayNL(" *unknow* %s:%x", TheDataset.getEntityId(*first).toString().c_str(), first->getIndex()); } @@ -2301,9 +2310,9 @@ ucstring CChatManager::filterClientInputColorCode(ucstring &text) { ucstring result; result.reserve(text.size()); - + ucstring::size_type pos = 0; - + for (; pos < text.size(); ++pos) { if (text[pos] == '@' && pos < text.size()-1 && text[pos+1] == '{') @@ -2316,7 +2325,7 @@ ucstring CChatManager::filterClientInputColorCode(ucstring &text) result += text[pos]; } } - + return result; } @@ -2340,7 +2349,7 @@ ucstring CChatManager::filterClientInput(ucstring &text) bool lastIsWhite = false; for (; pos < text.size(); ++pos) { - bool currentIsWhite = (text[pos] == ' ' || text[pos] == '\t'); + bool currentIsWhite = (text[pos] == ' ' || text[pos] == '\t'); if (!(lastIsWhite && currentIsWhite)) { // any double white skipped @@ -2353,7 +2362,7 @@ ucstring CChatManager::filterClientInput(ucstring &text) hasBrackets = (text[pos-1] == '>') && (text[pos-5] == '<'); } - // Filter out '&' at the first non-whitespace position to remove + // Filter out '&' at the first non-whitespace position to remove // system color code (like '&SYS&' ) bool disallowAmpersand = (result.size() == 0) || hasBrackets; if (disallowAmpersand) diff --git a/code/ryzom/server/src/input_output_service/chat_manager.h b/code/ryzom/server/src/input_output_service/chat_manager.h index 9e2d20e8c..544dbfa2c 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.h +++ b/code/ryzom/server/src/input_output_service/chat_manager.h @@ -42,14 +42,14 @@ - + /** * CChatManager * \author Stephane Coutelas * \author Nevrax France * \date 2002 */ -class CChatManager +class CChatManager { public : @@ -72,7 +72,7 @@ public : */ void init( /*const std::string& staticDBFileName, const std::string& dynDBFileName*/ ); - /** A service has gone down + /** A service has gone down */ void onServiceDown(const std::string &serviceShortName); @@ -80,7 +80,7 @@ public : * Reset ChatLog management */ void resetChatLog(); - + /** * Check if the client is already registered in the chat manager. */ @@ -102,7 +102,7 @@ public : * \param id is the client character id */ CChatClient& getClient( const TDataSetRow& id ); //throw (EChatClient); - + /** * Return a reference on the static database */ @@ -195,7 +195,7 @@ public : void chat2( const TDataSetRow& sender, const std::string &phraseId ); - + /** * Transmit a chat message * \param sender is the id of the talking char @@ -334,7 +334,7 @@ public : private : - + typedef std::map< TDataSetRow, CChatClient*> TClientInfoCont; /// client infos TClientInfoCont _Clients; @@ -377,7 +377,7 @@ protected: friend void cbNpcTellEx( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId ); friend void cbDynChatServiceChat( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId ); friend void cbDynChatServiceTell( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId ); - + public: /** * Send a chat message @@ -389,7 +389,7 @@ public: * \param senderName Can be used to replace the sender name with a specific string */ void sendChat( CChatGroup::TGroupType senderChatMode, const TDataSetRow &receiver, const ucstring& ucstr, const TDataSetRow &sender = TDataSetRow(), TChanID chanID = NLMISC::CEntityId::Unknown, const ucstring &senderName = ucstring()); - + /** * Send a far chat message diff --git a/code/ryzom/server/src/server_share/continent_container.h b/code/ryzom/server/src/server_share/continent_container.h index 7edfb0c96..6e65b3dc4 100644 --- a/code/ryzom/server/src/server_share/continent_container.h +++ b/code/ryzom/server/src/server_share/continent_container.h @@ -162,7 +162,7 @@ public: /// Init whole continent container void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string &packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true); - + /// Build sheets void buildSheets(const std::string &packedSheetsDirectory); diff --git a/code/ryzom/server/src/server_share/mysql_wrapper.cpp b/code/ryzom/server/src/server_share/mysql_wrapper.cpp index 5b993b56e..3bb343314 100644 --- a/code/ryzom/server/src/server_share/mysql_wrapper.cpp +++ b/code/ryzom/server/src/server_share/mysql_wrapper.cpp @@ -116,7 +116,7 @@ namespace MSW if (MSWAutoReconnect) { addOption(MYSQL_OPT_RECONNECT, "1"); - } + } return _connect(); } diff --git a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.cpp b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.cpp index 9e81798dc..238b2b49e 100644 --- a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.cpp +++ b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.cpp @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -303,7 +318,7 @@ namespace RSMGR } else if (cmd == NOPE::cc_instance_count) { - return _ObjectCache.size(); + return (uint32)_ObjectCache.size(); } // default return value @@ -321,7 +336,7 @@ namespace RSMGR TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end()); for (; first != last; ++first) { - nbReleased += first->second.size(); + nbReleased += (uint32)first->second.size(); } nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased); @@ -781,7 +796,7 @@ namespace RSMGR } else if (cmd == NOPE::cc_instance_count) { - return _ObjectCache.size(); + return (uint32)_ObjectCache.size(); } // default return value @@ -799,7 +814,7 @@ namespace RSMGR TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end()); for (; first != last; ++first) { - nbReleased += first->second.size(); + nbReleased += (uint32)first->second.size(); } nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased); diff --git a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h index 50ef8e823..685386bfc 100644 --- a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h +++ b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h @@ -1,3 +1,18 @@ +// Ryzom - MMORPG Framework +// 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 . ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! @@ -661,7 +676,6 @@ namespace RSMGR setPersistentState(NOPE::os_dirty); _DomainId = value; - } } diff --git a/code/ryzom/tools/client/CMakeLists.txt b/code/ryzom/tools/client/CMakeLists.txt index aabc3142c..0c42233cb 100644 --- a/code/ryzom/tools/client/CMakeLists.txt +++ b/code/ryzom/tools/client/CMakeLists.txt @@ -1,10 +1,9 @@ - IF(WITH_RYZOM_CLIENT) - ADD_SUBDIRECTORY( client_patcher ) - - IF( WITH_QT ) - ADD_SUBDIRECTORY( client_config_qt ) - ENDIF( WITH_QT ) -ENDIF(WITH_RYZOM_CLIENT) + ADD_SUBDIRECTORY(client_patcher) + + IF(WITH_QT) + ADD_SUBDIRECTORY(client_config_qt) + ENDIF() +ENDIF() -ADD_SUBDIRECTORY( r2_islands_textures ) +ADD_SUBDIRECTORY(r2_islands_textures) diff --git a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index 4f167ea9c..69f701054 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp @@ -1540,7 +1540,6 @@ void CScreenshotIslands::buildIslandsTextures() CIFile proxFS(proxFileName.c_str()); proxBitmap.load(proxFS); - // resize proximity bitmap CBitmap tempBitmap; int newWidth = islandBitmap.getWidth(); @@ -1568,7 +1567,7 @@ void CScreenshotIslands::buildIslandsTextures() // swap them proxBitmap.resize(newWidth, newHeight, proxBitmap.PixelFormat); proxBitmap.swap(tempBitmap); - + //proxBitmap.resample(newWidth, newHeight); diff --git a/code/ryzom/tools/leveldesign/CMakeLists.txt b/code/ryzom/tools/leveldesign/CMakeLists.txt index 9a56a2fac..399a71deb 100644 --- a/code/ryzom/tools/leveldesign/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/CMakeLists.txt @@ -1,4 +1,3 @@ - ADD_SUBDIRECTORY(uni_conv) ADD_SUBDIRECTORY(csv_transform) ADD_SUBDIRECTORY(icon_search) diff --git a/code/ryzom/tools/server/CMakeLists.txt b/code/ryzom/tools/server/CMakeLists.txt index 982c47718..1f215ae94 100644 --- a/code/ryzom/tools/server/CMakeLists.txt +++ b/code/ryzom/tools/server/CMakeLists.txt @@ -1,4 +1,3 @@ - IF(WITH_LIGO) ADD_SUBDIRECTORY(ai_build_wmap) ENDIF(WITH_LIGO) diff --git a/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp b/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp index 1a4257a99..170aa0c90 100644 --- a/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp +++ b/code/ryzom/tools/server/brick_param_extractor/brick_param_extractor.cpp @@ -508,7 +508,7 @@ void COutputFile::generateOutput() const } outbuff+="#endif\n\n"; - + // read in the previous version of the output file char *inbuff=NULL; FILE *inf=fopen(_FileName.c_str(),"rb"); From 6596af9682b2c50e5c59f82d90e48a7b166f996a Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 26 Dec 2014 13:38:02 +0100 Subject: [PATCH 027/175] Changed: Minor changes --HG-- branch : develop --- code/nel/include/nel/3d/driver.h | 3 +-- code/nel/include/nel/misc/p_thread.h | 6 ++--- .../nel/samples/3d/nel_qt/qtcolorpicker_cpp.h | 4 ++-- .../3d/driver/direct3d/driver_direct3d.cpp | 3 --- .../src/3d/driver/opengl/driver_opengl.cpp | 2 +- .../driver/opengl/driver_opengl_material.cpp | 2 +- .../3d/driver/opengl/driver_opengl_states.cpp | 4 ++-- code/nel/src/3d/meshvp_wind_tree.cpp | 3 +-- code/nel/src/3d/scene.cpp | 4 +--- code/nel/src/3d/shadow_map_manager.cpp | 2 +- code/nel/src/3d/transform.cpp | 2 +- code/nel/src/georges/form_dfn.cpp | 2 +- code/nel/src/misc/p_thread.cpp | 4 ++-- code/nel/src/misc/sheet_id.cpp | 12 +++++----- code/nel/src/misc/win_thread.cpp | 2 +- .../src/sound/driver/dsound/source_dsound.h | 4 ++-- .../nel/src/sound/driver/fmod/source_fmod.cpp | 2 +- .../nel/src/sound/driver/openal/buffer_al.cpp | 4 ++-- code/nel/src/sound/simple_source.cpp | 2 +- code/nel/tools/CMakeLists.txt | 1 - code/ryzom/client/src/actions.h | 2 +- code/ryzom/client/src/cdb_synchronised.cpp | 2 +- code/ryzom/client/src/character_cl.cpp | 2 +- code/ryzom/client/src/client.cpp | 1 - code/ryzom/client/src/client_chat_manager.cpp | 4 ---- code/ryzom/client/src/entities.cpp | 2 +- code/ryzom/client/src/entity_cl.cpp | 5 ++-- code/ryzom/client/src/far_tp.cpp | 1 - code/ryzom/client/src/init.cpp | 6 ++--- .../src/interface_v3/action_handler_game.cpp | 3 ++- .../src/interface_v3/action_handler_help.cpp | 2 +- .../src/interface_v3/action_handler_misc.cpp | 2 +- .../interface_v3/action_handler_phrase.cpp | 3 +-- .../client/src/interface_v3/chat_displayer.h | 1 - .../src/interface_v3/chat_text_manager.cpp | 3 +-- .../interface_v3/group_in_scene_user_info.cpp | 9 +++---- .../client/src/interface_v3/group_map.cpp | 2 +- .../client/src/interface_v3/group_skills.cpp | 2 +- .../client/src/interface_v3/guild_manager.cpp | 5 ++-- .../src/interface_v3/interface_manager.cpp | 2 -- .../src/interface_v3/interface_observer.h | 2 +- .../src/interface_v3/people_interraction.cpp | 1 - .../client/src/interface_v3/people_list.cpp | 2 +- .../src/interface_v3/sphrase_manager.cpp | 24 +++++++++---------- code/ryzom/client/src/sound_manager.cpp | 8 +++---- code/ryzom/client/src/user_entity.cpp | 2 +- code/ryzom/common/data_common/r2/r2_misc.lua | 2 +- .../world_editor_classes.xml | 10 ++++---- 48 files changed, 78 insertions(+), 100 deletions(-) diff --git a/code/nel/include/nel/3d/driver.h b/code/nel/include/nel/3d/driver.h index 8738a7dda..39cafc2de 100644 --- a/code/nel/include/nel/3d/driver.h +++ b/code/nel/include/nel/3d/driver.h @@ -493,7 +493,7 @@ public: * * NB: you must setupViewMatrix() BEFORE setupModelMatrix(), or else undefined results. */ - virtual void setupViewMatrix(const CMatrix &mtx)=0; + virtual void setupViewMatrix(const CMatrix &mtx) = 0; /** setup the view matrix (inverse of camera matrix). * Extended: give a cameraPos (mtx.Pos() is not taken into account but for getViewMatrix()), @@ -1422,7 +1422,6 @@ protected: private: bool _StaticMemoryToVRAM; - }; // -------------------------------------------------- diff --git a/code/nel/include/nel/misc/p_thread.h b/code/nel/include/nel/misc/p_thread.h index 4f0a9aa63..01f476d7b 100644 --- a/code/nel/include/nel/misc/p_thread.h +++ b/code/nel/include/nel/misc/p_thread.h @@ -39,9 +39,9 @@ class CPThread : public IThread public: enum TThreadState { - ThreadStateNone, - ThreadStateRunning, - ThreadStateFinished, + ThreadStateNone, + ThreadStateRunning, + ThreadStateFinished, }; /// Constructor diff --git a/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h b/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h index 0701a803f..2386ff939 100644 --- a/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h +++ b/code/nel/samples/3d/nel_qt/qtcolorpicker_cpp.h @@ -543,14 +543,14 @@ ColorPickerPopup::ColorPickerPopup(int width, bool withColorDialog, setMouseTracking(true); cols = width; - if (withColorDialog) + if (withColorDialog) { moreButton = new ColorPickerButton(this); moreButton->setFixedWidth(24); moreButton->setFixedHeight(21); moreButton->setFrameRect(QRect(2, 2, 20, 17)); connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog())); - } + } else { moreButton = 0; diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 916cafe49..2ce747105 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1509,9 +1509,6 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r } } - -// _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, ¶meters, &_DeviceInterface); - // Check some caps D3DCAPS9 caps; if (_DeviceInterface->GetDeviceCaps(&caps) == D3D_OK) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index ce60d7f42..d129f3aa2 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -2178,7 +2178,7 @@ void CDriverGL::flush() // *************************************************************************** void CDriverGL::setSwapVBLInterval(uint interval) { - H_AUTO_OGL(CDriverGL_setSwapVBLInterval) + H_AUTO_OGL(CDriverGL_setSwapVBLInterval); if (!_Initialized) return; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp index 986dd6303..95c8e61f2 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_material.cpp @@ -403,7 +403,7 @@ bool CDriverGL::setupMaterial(CMaterial& mat) // Must setup textures each frame. (need to test if touched). // Must separate texture setup and texture activation in 2 "for"... // because setupTexture() may disable all stage. - if (matShader != CMaterial::Water + if (matShader != CMaterial::Water && ((matShader != CMaterial::Program) || (_LastSetuppedPP->features().MaterialFlags & CProgramFeatures::TextureStages)) ) { diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp index 60a0609dc..9bf53592f 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp @@ -767,7 +767,7 @@ void CDriverGLStates::setTextureMode(TTextureMode texMode) { glDisable(GL_TEXTURE_2D); } - else if(oldTexMode == TextureRect) + else if (oldTexMode == TextureRect) { #ifndef USE_OPENGLES if(_TextureRectangleSupported) @@ -780,7 +780,7 @@ void CDriverGLStates::setTextureMode(TTextureMode texMode) glDisable(GL_TEXTURE_2D); } } - else if(oldTexMode == TextureCubeMap) + else if (oldTexMode == TextureCubeMap) { if(_TextureCubeMapSupported) { diff --git a/code/nel/src/3d/meshvp_wind_tree.cpp b/code/nel/src/3d/meshvp_wind_tree.cpp index 0d2e91363..1e3d215a3 100644 --- a/code/nel/src/3d/meshvp_wind_tree.cpp +++ b/code/nel/src/3d/meshvp_wind_tree.cpp @@ -392,7 +392,6 @@ bool CMeshVPWindTree::begin(IDriver *driver, CScene *scene, CMeshBaseInstance *m sint numPls= renderTrav->getNumVPLights()-1; clamp(numPls, 0, CRenderTrav::MaxVPLight-1); - // Enable normalize only if requested by user. Because lighting don't manage correct "scale lighting" uint idVP= (SpecularLighting?2:0) + (driver->isForceNormalize()?1:0) ; // correct VP id for correct unmber of pls. @@ -523,7 +522,7 @@ void CMeshVPWindTree::beginMBRInstance(IDriver *driver, CScene *scene, CMeshBase idVP = numPls*4 + idVP; // re-activate VP if idVP different from last setup - if(idVP != _LastMBRIdVP) + if (idVP != _LastMBRIdVP) { _LastMBRIdVP= idVP; driver->activeVertexProgram(_VertexProgram[_LastMBRIdVP]); diff --git a/code/nel/src/3d/scene.cpp b/code/nel/src/3d/scene.cpp index 67465eb8c..7c552efd4 100644 --- a/code/nel/src/3d/scene.cpp +++ b/code/nel/src/3d/scene.cpp @@ -158,7 +158,7 @@ CScene::CScene(bool bSmallScene) : LightTrav(bSmallScene) _MaxSkeletonsInNotCLodForm= 20; - _FilterRenderFlags= std::numeric_limits::max(); + _FilterRenderFlags = std::numeric_limits::max(); _NextRenderProfile= false; @@ -592,11 +592,9 @@ void CScene::renderPart(UScene::TRenderPart rp, bool doHrcPass, bool doTrav, boo // nlassert(CurrentCamera); - // update models. updateModels(); - // Use the camera to setup Clip / Render pass. float left, right, bottom, top, znear, zfar; CurrentCamera->getFrustum(left, right, bottom, top, znear, zfar); diff --git a/code/nel/src/3d/shadow_map_manager.cpp b/code/nel/src/3d/shadow_map_manager.cpp index 383a28184..0c9f7ba8b 100644 --- a/code/nel/src/3d/shadow_map_manager.cpp +++ b/code/nel/src/3d/shadow_map_manager.cpp @@ -244,7 +244,7 @@ void CShadowMapManager::addShadowReceiver(CTransform *model) void CShadowMapManager::renderGenerate(CScene *scene) { H_AUTO( NL3D_ShadowManager_Generate ); - + // Each frame, do a small garbage collector for unused free textures. garbageShadowTextures(scene); diff --git a/code/nel/src/3d/transform.cpp b/code/nel/src/3d/transform.cpp index c12754c57..0ec65360d 100644 --- a/code/nel/src/3d/transform.cpp +++ b/code/nel/src/3d/transform.cpp @@ -113,7 +113,7 @@ CTransform::CTransform() _StateFlags= IsOpaque | IsUserLightable; // By default, always allow rendering of Transform Models. - _RenderFilterType= std::numeric_limits::max(); + _RenderFilterType = std::numeric_limits::max(); // By default, don't suport fast intersection detection _SupportFastIntersect= false; diff --git a/code/nel/src/georges/form_dfn.cpp b/code/nel/src/georges/form_dfn.cpp index d4a16bb50..16ee74d5b 100644 --- a/code/nel/src/georges/form_dfn.cpp +++ b/code/nel/src/georges/form_dfn.cpp @@ -707,7 +707,7 @@ bool CFormDfn::getEntryIndexByName (uint &entry, const std::string &name) const } entryIndex++; } - entry=std::numeric_limits::max(); + entry = std::numeric_limits::max(); return false; } diff --git a/code/nel/src/misc/p_thread.cpp b/code/nel/src/misc/p_thread.cpp index a24029b3c..e71f56611 100644 --- a/code/nel/src/misc/p_thread.cpp +++ b/code/nel/src/misc/p_thread.cpp @@ -17,8 +17,8 @@ #include "stdmisc.h" -#include -#include +#include "nel/misc/types_nl.h" +#include "nel/misc/debug.h" #ifdef NL_OS_UNIX diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index 83dd4be89..690d09ab1 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -217,7 +217,7 @@ bool CSheetId::buildSheetId(const std::string& sheetName) return true; } } - + #ifdef NL_TEMP_YUBO_NO_SOUND_SHEET_ID if (a_NoSoundSheetId && sheetName.find(".sound") != std::string::npos) { @@ -236,7 +236,7 @@ bool CSheetId::buildSheetId(const std::string& sheetName) return true; } #endif - + return false; } @@ -417,10 +417,10 @@ void CSheetId::initWithoutSheet() nlassert(_DontHaveSheetKnowledge); return; } - + _Initialised = true; _DontHaveSheetKnowledge = true; - + // Initialize id 0,0 as unknown.unknown CSheetId unknownunknown = CSheetId("unknown.unknown"); nlassert(unknownunknown == CSheetId::Unknown); @@ -525,7 +525,7 @@ bool CSheetId::operator < (const CSheetId& sheetRef ) const string CSheetId::toString(bool ifNotFoundUseNumericId) const { if (!_Initialised) init(false); - + if (_DontHaveSheetKnowledge) { // FIXME: When someone punches in a fake sheet id this will @@ -564,7 +564,7 @@ string CSheetId::toString(bool ifNotFoundUseNumericId) const void CSheetId::serial(NLMISC::IStream &f) throw(NLMISC::EStream) { nlassert(!_DontHaveSheetKnowledge); - + f.serial( _Id.Id ); #ifdef NL_DEBUG_SHEET_ID diff --git a/code/nel/src/misc/win_thread.cpp b/code/nel/src/misc/win_thread.cpp index f556779ba..4178b7a58 100644 --- a/code/nel/src/misc/win_thread.cpp +++ b/code/nel/src/misc/win_thread.cpp @@ -198,7 +198,7 @@ void CWinThread::start () { if (isRunning()) throw EThread("Starting a thread that is already started, existing thread will continue running, this should not happen"); - + // ThreadHandle = (void *) ::CreateThread (NULL, _StackSize, ProxyFunc, this, 0, (DWORD *)&ThreadId); ThreadHandle = (void *) ::CreateThread (NULL, 0, ProxyFunc, this, 0, (DWORD *)&ThreadId); // nldebug("NLMISC: thread %x started for runnable '%x'", typeid( Runnable ).name()); diff --git a/code/nel/src/sound/driver/dsound/source_dsound.h b/code/nel/src/sound/driver/dsound/source_dsound.h index 81174c1a0..1aa2d5625 100644 --- a/code/nel/src/sound/driver/dsound/source_dsound.h +++ b/code/nel/src/sound/driver/dsound/source_dsound.h @@ -80,7 +80,7 @@ enum TSourceDSoundEndState class CSourceDSound : public ISource { friend class CSoundDriverDSound; - + public: /// Constructor CSourceDSound(uint sourcename = 0); @@ -446,7 +446,7 @@ private: // Set the 'used' state of the source. Managed by the driver. void setUsed(bool v) { _IsUsed = v; } - + // Return the 'used' state of the source bool isUsed() { return _IsUsed; } */ diff --git a/code/nel/src/sound/driver/fmod/source_fmod.cpp b/code/nel/src/sound/driver/fmod/source_fmod.cpp index c5c6e8266..6026ce2f5 100644 --- a/code/nel/src/sound/driver/fmod/source_fmod.cpp +++ b/code/nel/src/sound/driver/fmod/source_fmod.cpp @@ -419,7 +419,7 @@ void CSourceFMod::setMinMaxDistances( float mindist, float maxdist, bool /* defe nlwarning("SOUND_DEV (FMod): Ridiculously high max distance set on source"); maxdist = maxSqrt; } - + _MinDist= mindist; _MaxDist= maxdist; if(_FModChannel!=-1) diff --git a/code/nel/src/sound/driver/openal/buffer_al.cpp b/code/nel/src/sound/driver/openal/buffer_al.cpp index b63e39fa2..352128c3e 100644 --- a/code/nel/src/sound/driver/openal/buffer_al.cpp +++ b/code/nel/src/sound/driver/openal/buffer_al.cpp @@ -121,7 +121,7 @@ bool CBufferAL::unlock(uint size) // Error handling if (alGetError() == AL_NO_ERROR) _IsLoaded = true; // ->lock() set it to false - + return _IsLoaded; } @@ -162,7 +162,7 @@ bool CBufferAL::fill(const uint8 *src, uint size) // Error handling _IsLoaded = (alGetError() == AL_NO_ERROR); - + return _IsLoaded; } diff --git a/code/nel/src/sound/simple_source.cpp b/code/nel/src/sound/simple_source.cpp index 2c9dda86c..9b9ee5950 100644 --- a/code/nel/src/sound/simple_source.cpp +++ b/code/nel/src/sound/simple_source.cpp @@ -176,7 +176,7 @@ void CSimpleSource::play() // and play the sound bool play = pSource->play(); - + #ifdef NL_DEBUG nlassert(play); #else diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index 2c1f641a0..0e1c5709d 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -1,4 +1,3 @@ - # Don't add other subdirectories if only max plugins are selected. IF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(misc) diff --git a/code/ryzom/client/src/actions.h b/code/ryzom/client/src/actions.h index e9b9d53e0..cdc3f200a 100644 --- a/code/ryzom/client/src/actions.h +++ b/code/ryzom/client/src/actions.h @@ -30,8 +30,8 @@ /////////// // CLASS // class CCombo; -class CActionsManager; class CAction; +class CActionsManager; /** * The goal of CCombo is to gather together Inputs that will validate an Action. diff --git a/code/ryzom/client/src/cdb_synchronised.cpp b/code/ryzom/client/src/cdb_synchronised.cpp index 45c57dd55..2ad3022cf 100644 --- a/code/ryzom/client/src/cdb_synchronised.cpp +++ b/code/ryzom/client/src/cdb_synchronised.cpp @@ -41,7 +41,7 @@ #include -#include "../../common/src/game_share/ryzom_database_banks.h" +#include "game_share/ryzom_database_banks.h" //////////////// diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 23fdb78e2..89c9b805b 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -4537,7 +4537,7 @@ void CCharacterCL::applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MB { if(behaviour.DeltaHP != 0) { - CRGBA deltaHPColor( 0, 0, 0 ); + CRGBA deltaHPColor(0, 0, 0); // if it's a hit if( behaviour.DeltaHP < 0 ) { diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 19af0545d..fb6e2dca5 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -26,7 +26,6 @@ #include "nel/misc/types_nl.h" #ifdef NL_OS_WINDOWS -#include #include #else #include diff --git a/code/ryzom/client/src/client_chat_manager.cpp b/code/ryzom/client/src/client_chat_manager.cpp index 09f874b96..bac2abf1e 100644 --- a/code/ryzom/client/src/client_chat_manager.cpp +++ b/code/ryzom/client/src/client_chat_manager.cpp @@ -969,8 +969,6 @@ void CClientChatManager::buildTellSentence(const ucstring &sender, const ucstrin name = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(name), bWoman); } } - - } else { @@ -1052,8 +1050,6 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde senderName = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(senderName), bWoman); } } - - } switch(type) diff --git a/code/ryzom/client/src/entities.cpp b/code/ryzom/client/src/entities.cpp index 7bc478ce7..516232108 100644 --- a/code/ryzom/client/src/entities.cpp +++ b/code/ryzom/client/src/entities.cpp @@ -426,7 +426,7 @@ void CEntityManager::initialize(uint nbMaxEntity) _Entities.resize(_NbMaxEntity, 0); _EntityGroundFXHandle.resize(_NbMaxEntity); } - + ICDBNode::CTextId textId; // Add an observer on the mission database diff --git a/code/ryzom/client/src/entity_cl.cpp b/code/ryzom/client/src/entity_cl.cpp index 0063c93f4..6a14d6400 100644 --- a/code/ryzom/client/src/entity_cl.cpp +++ b/code/ryzom/client/src/entity_cl.cpp @@ -2296,6 +2296,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value) } ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle)); + // Sometimes translation contains another title { ucstring::size_type pos = replacement.find('$'); @@ -2308,7 +2309,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value) replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle); } } - + _Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw, womanTitle); if (!replacement.empty() || !ClientCfg.DebugStringManager) @@ -2949,7 +2950,7 @@ void CEntityCL::dataSetId(CLFECOMMON::TClientDataSetIndex dataSet) { _DataSetId = dataSet; - if (_Primitive && _Primitive->UserData == UserDataEntity) + if (_Primitive && _Primitive->UserData == UserDataEntity) _Primitive->UserData |= (((uint64)_DataSetId)<<16); // additionaly, on a UID change, must check the IsInTeam and IsAniml flags diff --git a/code/ryzom/client/src/far_tp.cpp b/code/ryzom/client/src/far_tp.cpp index 4f48d2ff5..5b9b0c836 100644 --- a/code/ryzom/client/src/far_tp.cpp +++ b/code/ryzom/client/src/far_tp.cpp @@ -188,7 +188,6 @@ const std::string& CLoginStateMachine::toString(CLoginStateMachine::TEvent event _CurrentState = stateId; \ break; \ } \ - extern std::string LoginLogin, LoginPassword; extern bool noUserChar; diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 1644f7e2d..4de65491a 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -759,7 +759,7 @@ void prelogInit() NLMISC::CTime::probeTimerInfo(timerInfo); if (timerInfo.RequiresSingleCore) // TODO: Also have a FV configuration value to force single core. setCPUMask(); - + FPU_CHECKER_ONCE NLMISC::TTime initStart = ryzomGetLocalTime (); @@ -949,7 +949,7 @@ void prelogInit() Driver->setSwapVBLInterval(1); else Driver->setSwapVBLInterval(0); - + if (StereoDisplay) // VR_CONFIG // VR_DRIVER { // override mode TODO @@ -1077,7 +1077,7 @@ void prelogInit() // Set the monitor color properties CMonitorColorProperties monitorColor; - for ( uint i=0; i<3; i++) + for (uint i=0; i<3; i++) { monitorColor.Contrast[i] = ClientCfg.Contrast; monitorColor.Luminosity[i] = ClientCfg.Luminosity; diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 63d2c93b7..b76bbce21 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -1950,13 +1950,14 @@ public: womanTitle = pChar->getGender() == GSGENDER::female; STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle); - + // Sometimes translation contains another title ucstring::size_type pos = copyInout.find('$'); if (pos != ucstring::npos) { copyInout = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle); } + CStringPostProcessRemoveTitle::cbIDStringReceived(copyInout); inout = copyInout; } diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index e519bb2d0..a8d1059ea 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -3613,7 +3613,7 @@ public: uint8 index; fromString(Params, index); --index; // Param is 1-based so subtract 1 - if ( index >= MAX_INVENTORY_ANIMAL) + if (index >= MAX_INVENTORY_ANIMAL) { return; } diff --git a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp index 688c27635..4e8966e16 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp @@ -520,7 +520,7 @@ CCameraBackup setupCameraForScreenshot(UScene &scene, uint left, uint right, uin // Build a viewport CViewport viewport; NL3D::UDriver *Driver = CViewRenderer::getInstance()->getDriver(); - viewport.init (0, 0, (float)(right-left)/Driver->getWindowWidth(),(float)(bottom-top)/Driver->getWindowHeight()); + viewport.init (0, 0, (float)(right-left)/Driver->getWindowWidth(), (float)(bottom-top)/Driver->getWindowHeight()); // Activate all this scene.getCam().setFrustum (frustumPart); diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index efd19fe45..67f798cb8 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -777,7 +777,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P sint32 dstPhraseId= pCSDst->getSPhraseId(); sint32 dstMacroId= pCSDst->getMacroId(); - if ((src.empty()) && (CHandlerPhraseMemoryCopy::haveLastPhraseElement)) + if (src.empty() && (CHandlerPhraseMemoryCopy::haveLastPhraseElement)) { // get the slot ids from save srcIsMacro= CHandlerPhraseMemoryCopy::isMacro; @@ -1600,7 +1600,6 @@ public: } } }; - REGISTER_ACTION_HANDLER(CHandlerPhraseSelectMemory2, "phrase_select_memory_2"); // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/chat_displayer.h b/code/ryzom/client/src/interface_v3/chat_displayer.h index e84179f94..e2afc7207 100644 --- a/code/ryzom/client/src/interface_v3/chat_displayer.h +++ b/code/ryzom/client/src/interface_v3/chat_displayer.h @@ -30,7 +30,6 @@ #undef LOG_WARNING #endif - /** * class used to display console text commands in the chat window * \author Nicolas Brigand diff --git a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp index faaf86092..83ef7474e 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -47,7 +47,6 @@ CChatTextManager::~CChatTextManager() _TextShadowed = NULL; delete _ShowTimestamps; _ShowTimestamps = NULL; - } //================================================================================= uint CChatTextManager::getTextFontSize() const @@ -96,6 +95,7 @@ bool CChatTextManager::showTimestamps() const } return _ShowTimestamps->getValueBool(); } + //================================================================================= static CInterfaceGroup *parseCommandTag(ucstring &line) { @@ -186,7 +186,6 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA msg = cur_time + msg; } - vt->setTextFormatTaged(msg); vt->setColor(NLMISC::CRGBA::White); } diff --git a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp index 76d97c519..53cddc93b 100644 --- a/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp +++ b/code/ryzom/client/src/interface_v3/group_in_scene_user_info.cpp @@ -198,7 +198,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) ucstring theTribeName; ucstring entityName = entity->getDisplayName(); ucstring entityTitle = entity->getTitle(); - + // For some NPC's the name is empty and only a title is given, // in that case, treat the title as the name. if (entityName.empty()) @@ -652,7 +652,6 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) if (pPlayer == NULL) needPvPLogo = false; - if (pPlayer != NULL && needPvPLogo) { if (pvpFactionLogo) @@ -756,7 +755,6 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) view = leftGroup->getView ("win_jauge_bot"); if (view) leftGroup->delView (view); - } // Delete remaining strings @@ -771,8 +769,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity) CViewBase *win_mid = leftGroup->getView ("win_mid"); if (win_mid) { - win_mid->setH (win_mid->getH() - spaceBar/2 ); - + win_mid->setH (win_mid->getH() - spaceBar/2); } // Set player name @@ -963,7 +960,7 @@ void CGroupInSceneUserInfo::updateDynamicData () if (pPlayer != NULL) if (pPlayer->isAFK()) - entityName += CI18N::get("uiAFK"); + entityName += CI18N::get("uiAFK"); _Name->setText(entityName); // Title color get the PVP color diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 558ab960c..371673a00 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -3213,7 +3213,7 @@ class CAHValidateUserLandMarkName : public IActionHandler CGroupEditBox *eb = dynamic_cast(ig->getGroup("eb")); if (!eb) return; ig->setActive(false); - + CGroupContainer *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(WIN_LANDMARK_NAME)); if (!gc) return; // Retrieve ComboBox to get the position(ordered landmark type) of the selected item diff --git a/code/ryzom/client/src/interface_v3/group_skills.cpp b/code/ryzom/client/src/interface_v3/group_skills.cpp index e414ab4e4..b5e5c5d34 100644 --- a/code/ryzom/client/src/interface_v3/group_skills.cpp +++ b/code/ryzom/client/src/interface_v3/group_skills.cpp @@ -87,7 +87,7 @@ bool CGroupSkills::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) string sTmp; ICDBNode::CTextId textId; - + for (uint k = 0; k < SKILLS::NUM_SKILLS; ++k) { sTmp = string(DB_SKILLS)+":"+NLMISC::toString((sint32)k)+":BaseSKILL"; diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index 9edf86c56..2e0e4e3e7 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -378,13 +378,13 @@ void CGuildManager::update() // Online status not changed for this member continue; } - + if ( (*it).second.Online != ccs_offline && _GuildMembers[i].Online != ccs_offline) { // Not from offline, or to offline, so don't show anything continue; } - + ucstring msg = (_GuildMembers[i].Online != ccs_offline) ? onlineMessage : offlineMessage; strFindReplace(msg, "%s", _GuildMembers[i].Name); string cat = getStringCategory(msg, msg); @@ -398,7 +398,6 @@ void CGuildManager::update() bool dummy; PeopleInterraction.ChatInput.Guild.displayMessage(msg, col, 2, &dummy); break; - } } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index b89566ecd..541cb853a 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -3982,5 +3982,3 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr) ucstr = str; return true;; } - - diff --git a/code/ryzom/client/src/interface_v3/interface_observer.h b/code/ryzom/client/src/interface_v3/interface_observer.h index 4261f10a4..6da93637e 100644 --- a/code/ryzom/client/src/interface_v3/interface_observer.h +++ b/code/ryzom/client/src/interface_v3/interface_observer.h @@ -119,7 +119,7 @@ public: char * end = ptr.getDatas() + strlen( ptr.getDatas() ); char * dataTok = strtok( ptr.getDatas()," ,"); NLMISC::ICDBNode::CTextId textId; - + while(dataTok) { std::string data (dataTok); diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 332bcac57..c2eb972dd 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -2193,7 +2193,6 @@ class CHandlerTellContact : public IActionHandler CInterfaceGroup *ig = pCaller->getParent(); if (!ig) return; CGroupContainer *gc = static_cast< CGroupContainer* >( ig->getEnclosingContainer() ); - if (!gc) return; CPeopleList *list; uint peopleIndex; diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index a2ee04808..4dc451ea3 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -895,7 +895,7 @@ class CHandlerContactEntry : public IActionHandler // it is simpler to keep it as it and to just use this action handler to manage user input. if (!pCaller || !pCaller->getParent()) return; CGroupContainer *gc = static_cast< CGroupContainer* >( pCaller->getParent()->getEnclosingContainer() ); - + // title gives the name of the player ucstring playerName = gc->getUCTitle(); diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 790657e2e..d214d1150 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -474,16 +474,16 @@ void CSPhraseManager::memorizePhrase(uint32 memoryLine, uint32 memorySlot, ui } } -void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine) +// *************************************************************************** +void CSPhraseManager::selectMemoryLineDB(sint32 memoryLine) { if(memoryLine<0) memoryLine= -1; - - if(_SelectedMemoryDBalt!=memoryLine) + + if(_SelectedMemoryDB!=memoryLine) { - _SelectedMemoryDBalt= memoryLine; + _SelectedMemoryDB= memoryLine; // since memory selection changes then must update all the DB and the Ctrl states - updateMemoryDBAll(); updateAllMemoryCtrlState(); updateAllMemoryCtrlRegenTickRange(); @@ -492,14 +492,14 @@ void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine) } } -// *************************************************************************** -void CSPhraseManager::selectMemoryLineDB(sint32 memoryLine) +void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine) { if(memoryLine<0) memoryLine= -1; - if(_SelectedMemoryDB!=memoryLine) + + if(_SelectedMemoryDBalt!=memoryLine) { - _SelectedMemoryDB= memoryLine; + _SelectedMemoryDBalt= memoryLine; // since memory selection changes then must update all the DB and the Ctrl states updateMemoryDBAll(); updateAllMemoryCtrlState(); @@ -573,7 +573,7 @@ void CSPhraseManager::updateMemoryDBSlot(uint32 memorySlot) _MemoryDbLeaves[memorySlot]->setValue32(0); else _MemoryDbLeaves[memorySlot]->setValue32(slot.Id); - + CMemorySlot &slotAlt= _Memories[_SelectedMemoryDBalt].Slot[memorySlot]; if(!slotAlt.isPhrase()) @@ -1126,7 +1126,7 @@ void CSPhraseManager::buildPhraseDesc(ucstring &text, const CSPhraseCom &phrase, uint32 totalActionMalus= 0; CCDBNodeLeaf *actMalus = _TotalMalusEquipLeaf ? &*_TotalMalusEquipLeaf : &*(_TotalMalusEquipLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TOTAL_MALUS_EQUIP", false)); - + // root brick must not be Power or aura, because Action malus don't apply to them // (ie leave 0 ActionMalus for Aura or Powers if(actMalus && !rootBrick->isSpecialPower()) @@ -4519,7 +4519,7 @@ uint32 CSPhraseManager::getTotalActionMalus(const CSPhraseCom &phrase) const if (!rootBrick) nlerror("Invalid root sbrick in sphrase_com '%s'", phrase.Name.toUtf8().c_str()); else if (actMalus && !rootBrick->isSpecialPower()) - totalActionMalus = actMalus->getValue32(); + totalActionMalus = actMalus->getValue32(); } return totalActionMalus; } diff --git a/code/ryzom/client/src/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index f87c6cdee..4a981366d 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -106,11 +106,11 @@ enum TFilterMapping // constructor //----------------------------------------------- CSoundManager::CSoundManager(IProgressCallback * /* progressCallBack */) -: _AudioMixer(NULL), +: _AudioMixer(NULL), _GroupControllerEffects(NULL), - _GroupControllerEffectsGame(NULL), - _EnvSoundRoot(NULL), - _Sources(NULL), + _GroupControllerEffectsGame(NULL), + _EnvSoundRoot(NULL), + _Sources(NULL), _UserEntitySoundLevel(1.0f) { _EnableBackgroundMusicAtTime= 0; diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index bb632cf4e..62d45f330 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -518,7 +518,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle, html->browse("home"); } } -*/ +*/ }// updateVisualPropertyName // //----------------------------------------------- diff --git a/code/ryzom/common/data_common/r2/r2_misc.lua b/code/ryzom/common/data_common/r2/r2_misc.lua index 827e91579..d85744bd0 100644 --- a/code/ryzom/common/data_common/r2/r2_misc.lua +++ b/code/ryzom/common/data_common/r2/r2_misc.lua @@ -187,7 +187,7 @@ end function strify(str) return [["]] .. tostring(str) .. [["]] end - + ------------------------------------------------------------------------------------------------- -- enclose a string by double quotes function strifyXml(str) diff --git a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml index de424f76f..d9aae794a 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml +++ b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml @@ -1112,7 +1112,7 @@ - + @@ -1126,7 +1126,7 @@ - + @@ -5023,13 +5023,13 @@ - + - + - + From f745f82455943a46b1b18ed0d1881f01b650679c Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 26 Dec 2014 13:43:20 +0100 Subject: [PATCH 028/175] Changed: Give priority to Luabind library filenames with specific Lua version --HG-- branch : develop --- code/CMakeModules/FindLuabind.cmake | 42 ++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/code/CMakeModules/FindLuabind.cmake b/code/CMakeModules/FindLuabind.cmake index 14f67ce44..73255077a 100644 --- a/code/CMakeModules/FindLuabind.cmake +++ b/code/CMakeModules/FindLuabind.cmake @@ -69,14 +69,48 @@ FIND_PATH(LUABIND_INCLUDE_DIR /opt/include ) -SET(LIBRARY_NAME_RELEASE luabind libluabind) -SET(LIBRARY_NAME_DEBUG luabind_d luabindd libluabind_d libluabindd) +SET(LIBRARY_NAME_RELEASE) +SET(LIBRARY_NAME_DEBUG) + +IF(WITH_LUA52) + IF(WITH_STLPORT) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua52) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua52d) + ENDIF(WITH_STLPORT) + + LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua52) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua52d) +ENDIF() + +IF(WITH_LUA51) + IF(WITH_STLPORT) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d) + ENDIF(WITH_STLPORT) + + LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d) +ENDIF() + +IF(WITH_LUA50) + IF(WITH_STLPORT) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d) + ENDIF(WITH_STLPORT) + + LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d) +ENDIF() IF(WITH_STLPORT) - SET(LIBRARY_NAME_RELEASE luabind_stlport ${LIBRARY_NAME_RELEASE}) - SET(LIBRARY_NAME_DEBUG luabind_stlportd ${LIBRARY_NAME_DEBUG}) + LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport) + LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd) ENDIF(WITH_STLPORT) +# generic libraries names +LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind) +LIST(APPEND LIBRARY_NAME_DEBUG luabind_d luabindd libluabind_d libluabindd) + FIND_LIBRARY(LUABIND_LIBRARY_RELEASE NAMES ${LIBRARY_NAME_RELEASE} PATHS From ec12e6a75e6267baa0d5ca7343a97fc292e08bdb Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 26 Dec 2014 13:44:03 +0100 Subject: [PATCH 029/175] Changed: Allow to enable UAC for Windows client --HG-- branch : develop --- code/CMakeModules/nel.cmake | 1 + code/ryzom/client/src/CMakeLists.txt | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 0474c7d7b..b18b8f279 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -360,6 +360,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) ### OPTION(WITH_LUA51 "Build Ryzom Core using Lua 5.1" ON ) OPTION(WITH_LUA52 "Build Ryzom Core using Lua 5.2" OFF) + OPTION(WITH_RYZOM_CLIENT_UAC "Ask to run as Administrator" OFF) ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index c20d9d0dc..d06af95c8 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -121,6 +121,14 @@ NL_ADD_RUNTIME_FLAGS(ryzom_client) NL_ADD_LIB_SUFFIX(ryzom_client) +IF(WITH_RYZOM_CLIENT_UAC) + IF(CMAKE_GENERATOR MATCHES "Visual Studio") + SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/level='requireAdministrator'") + ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles") + SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"") + ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio") +ENDIF(WITH_RYZOM_CLIENT_UAC) + IF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS)) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS)) From 4fc639671c29ae08c4de85e3e6bec26ff911a54b Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 26 Dec 2014 13:44:35 +0100 Subject: [PATCH 030/175] Changed: Check for string length --HG-- branch : develop --- code/ryzom/common/src/game_share/crypt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/crypt.cpp b/code/ryzom/common/src/game_share/crypt.cpp index 9a46281f7..1750d5d20 100644 --- a/code/ryzom/common/src/game_share/crypt.cpp +++ b/code/ryzom/common/src/game_share/crypt.cpp @@ -520,7 +520,7 @@ char * rz_crypt(register const char *key, register const char *setting, char *bu return buff; #endif - if (setting[0] == '$' && setting[1] == '6') { + if (strlen(setting) >= 2 && setting[0] == '$' && setting[1] == '6') { return __crypt_sha512(key, setting, buf); } From fbea1d2173b5ab3fa3c7d91bf824940e249bc66d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 9 Jan 2015 12:59:53 +0200 Subject: [PATCH 031/175] CGroupEditBox: ignore enter key when ctrl is pressed (ctrl+m combo) (issue #225) --HG-- branch : fix-issue-225 --- code/nel/src/gui/group_editbox.cpp | 11 ++++++----- code/nel/src/gui/widget_manager.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/nel/src/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index 92ae46703..565cc1549 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -999,7 +999,8 @@ namespace NLGUI break; // OTHER default: - if ((rEDK.getChar() == KeyRETURN) && !_WantReturn) + bool isKeyRETURN = !rEDK.getKeyCtrl() && rEDK.getChar() == KeyRETURN; + if (isKeyRETURN && !_WantReturn) { // update historic. if(_MaxHistoric) @@ -1030,9 +1031,9 @@ namespace NLGUI // If the char is not alphanumeric -> return. // if(!isalnum(ec.Char)) // return - if( (rEDK.getChar()>=32) || (rEDK.getChar() == KeyRETURN) ) + if( (rEDK.getChar()>=32) || isKeyRETURN ) { - if (rEDK.getChar() == KeyRETURN) + if (isKeyRETURN) { ucstring copyStr= _InputString; if ((uint) std::count(copyStr.begin(), copyStr.end(), '\n') >= _MaxNumReturn) @@ -1049,7 +1050,7 @@ namespace NLGUI cutSelection(); } - ucchar c = (rEDK.getChar() == KeyRETURN)?'\n':rEDK.getChar(); + ucchar c = isKeyRETURN ? '\n' : rEDK.getChar(); if (isFiltered(c)) return; switch(_EntryType) { @@ -1128,7 +1129,7 @@ namespace NLGUI ++ _CursorPos; triggerOnChangeAH(); } - if (rEDK.getChar() == KeyRETURN) + if (isKeyRETURN) { CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams); } diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 81fbaf28b..2ac06f797 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -2207,7 +2207,7 @@ namespace NLGUI } // Manage complex "Enter" - if (eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyRETURN) + if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyRETURN && !eventDesc.getKeyCtrl() ) { // If the top window has Enter AH CInterfaceGroup *tw= getTopWindow(); From 85f63b7db32576839899c137a8663159ec1e8240 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 9 Jan 2015 13:11:20 +0200 Subject: [PATCH 032/175] Fix html submit button value that is included with form data (issue #226) --HG-- branch : fix-issue-226 --- code/nel/include/nel/gui/ctrl_base.h | 8 ++++ code/nel/include/nel/gui/group_html.h | 6 ++- code/nel/src/gui/ctrl_base_button.cpp | 5 +++ code/nel/src/gui/group_html.cpp | 37 ++++++++++++++++--- .../src/interface_v3/action_handler_help.cpp | 7 +++- 5 files changed, 55 insertions(+), 8 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_base.h b/code/nel/include/nel/gui/ctrl_base.h index 71e6cad56..3b522e114 100644 --- a/code/nel/include/nel/gui/ctrl_base.h +++ b/code/nel/include/nel/gui/ctrl_base.h @@ -50,6 +50,8 @@ namespace NLGUI // see interface.txt for meaning of auto _ToolTipParentPosRef= Hotspot_TTAuto; _ToolTipPosRef= Hotspot_TTAuto; + _EventX = 0; + _EventY = 0; resizer = false; } @@ -70,6 +72,9 @@ namespace NLGUI bool handleEvent (const NLGUI::CEventDescriptor &event); + sint32 getEventX() { return _EventX; } + sint32 getEventY() { return _EventY; } + virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; } /// Debug @@ -181,6 +186,9 @@ namespace NLGUI static std::map< std::string, std::map< std::string, std::string > > AHCache; bool resizer; + + sint32 _EventX; + sint32 _EventY; }; } diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 21d609af3..333800760 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -107,7 +107,7 @@ namespace NLGUI void refresh(); // submit form - void submitForm (uint formId, const char *submitButtonName); + void submitForm (uint formId, const char *submitButtonType, const char *submitButtonName, const char *submitButtonValue, sint32 x, sint32 y); // Browse error void browseError (const char *msg); @@ -328,7 +328,11 @@ namespace NLGUI bool _BrowseNextTime; bool _PostNextTime; uint _PostFormId; + std::string _PostFormSubmitType; std::string _PostFormSubmitButton; + std::string _PostFormSubmitValue; + sint32 _PostFormSubmitX; + sint32 _PostFormSubmitY; // Browsing.. bool _Browsing; diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp index 4f118cd51..673ea906d 100644 --- a/code/nel/src/gui/ctrl_base_button.cpp +++ b/code/nel/src/gui/ctrl_base_button.cpp @@ -701,6 +701,11 @@ namespace NLGUI //pIM->submitEvent ("button_click:"+getId()); } */ + + // top-right corner is EventX=0, EventY=0 + _EventX = eventDesc.getX() - _XReal; + _EventY = (_YReal + _HReal) - eventDesc.getY(); + runLeftClickAction(); if (CWidgetManager::getInstance()->getCapturePointerLeft() == NULL) return true; // event handler may release cpature from this object (if it is removed for example) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index dd7eebdef..656e36ca8 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1217,7 +1217,7 @@ namespace NLGUI normal = value[MY_HTML_INPUT_SRC]; // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name; + string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name + "|submit_button_type=image"; // Add the ctrl button addButton (CCtrlButton::PushButton, name, normal, pushed.empty()?normal:pushed, over, @@ -1241,7 +1241,15 @@ namespace NLGUI text = value[MY_HTML_INPUT_VALUE]; // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name; + string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name + "|submit_button_type=submit"; + if (text.size() > 0) + { + // escape AH param separator + string tmp = text; + while(NLMISC::strFindReplace(tmp, "|", "|")) + ; + param = param + "|submit_button_value=" + tmp; + } // Add the ctrl button if (!_Paragraph) @@ -3638,14 +3646,18 @@ namespace NLGUI // *************************************************************************** - void CGroupHTML::submitForm (uint formId, const char *submitButtonName) + void CGroupHTML::submitForm (uint formId, const char *submitButtonType, const char *submitButtonName, const char *submitButtonValue, sint32 x, sint32 y) { // Form id valid ? if (formId < _Forms.size()) { _PostNextTime = true; _PostFormId = formId; + _PostFormSubmitType = submitButtonType; _PostFormSubmitButton = submitButtonName; + _PostFormSubmitValue = submitButtonValue; + _PostFormSubmitX = x; + _PostFormSubmitY = y; } } @@ -3918,9 +3930,22 @@ namespace NLGUI } } - // Add the button coordinates - HTParseFormInput(formfields, (_PostFormSubmitButton + "_x=0").c_str()); - HTParseFormInput(formfields, (_PostFormSubmitButton + "_y=0").c_str()); + if (_PostFormSubmitType == "image") + { + // Add the button coordinates + if (_PostFormSubmitButton.find_first_of("[") == string::npos) + { + HTParseFormInput(formfields, (_PostFormSubmitButton + "_x=" + NLMISC::toString(_PostFormSubmitX)).c_str()); + HTParseFormInput(formfields, (_PostFormSubmitButton + "_y=" + NLMISC::toString(_PostFormSubmitY)).c_str()); + } + else + { + HTParseFormInput(formfields, (_PostFormSubmitButton + "=" + NLMISC::toString(_PostFormSubmitX)).c_str()); + HTParseFormInput(formfields, (_PostFormSubmitButton + "=" + NLMISC::toString(_PostFormSubmitY)).c_str()); + } + } + else + HTParseFormInput(formfields, (_PostFormSubmitButton + "=" + _PostFormSubmitValue).c_str()); // Add custom params addHTTPPostParams(formfields, _TrustedDomain); diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index a8d1059ea..ed2b34ce3 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1117,6 +1117,11 @@ class CHandlerHTMLSubmitForm : public IActionHandler fromString(getParam (sParams, "form"), form); string submit_button = getParam (sParams, "submit_button"); + string type = getParam (sParams, "submit_button_type"); + string value = getParam (sParams, "submit_button_value"); + + sint32 x = pCaller->getEventX(); + sint32 y = pCaller->getEventY(); CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container); { @@ -1125,7 +1130,7 @@ class CHandlerHTMLSubmitForm : public IActionHandler if (groupHtml) { // Submit the form the url - groupHtml->submitForm (form, submit_button.c_str ()); + groupHtml->submitForm (form, type.c_str(), submit_button.c_str(), value.c_str(), x, y); } } } From 0f22ea7777a3d9acf5161c4f774dc7d6d312970b Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jan 2015 18:41:18 +0100 Subject: [PATCH 033/175] Changed: More aliases for OpenGL ES functions and defines to simplify code --HG-- branch : develop --- .../src/3d/driver/opengl/driver_opengl.cpp | 8 --- .../opengl/driver_opengl_extension_def.h | 43 +++++++++++++++ .../3d/driver/opengl/driver_opengl_matrix.cpp | 8 --- .../3d/driver/opengl/driver_opengl_states.cpp | 29 ---------- .../driver/opengl/driver_opengl_texture.cpp | 54 ++----------------- .../driver_opengl_vertex_buffer_hard.cpp | 49 +++-------------- 6 files changed, 53 insertions(+), 138 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index d129f3aa2..35cf9c094 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -435,11 +435,7 @@ bool CDriverGL::setupDisplay() glViewport(0,0,_CurrentMode.Width,_CurrentMode.Height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); -#ifdef USE_OPENGLES - glOrthof(0.f,_CurrentMode.Width,_CurrentMode.Height,0.f,-1.0f,1.0f); -#else glOrtho(0,_CurrentMode.Width,_CurrentMode.Height,0,-1.0f,1.0f); -#endif glMatrixMode(GL_MODELVIEW); glLoadIdentity(); #ifndef USE_OPENGLES @@ -725,11 +721,7 @@ bool CDriverGL::activeFrameBufferObject(ITexture * tex) } else { -#ifdef USE_OPENGLES - nglBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); -#else nglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); -#endif return true; } } diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index 41d2c1366..31ca00961 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -40,6 +40,24 @@ extern "C" { #define GL_ADD_SIGNED_EXT GL_ADD_SIGNED #define GL_INTERPOLATE_EXT GL_INTERPOLATE #define GL_BUMP_ENVMAP_ATI GL_INTERPOLATE +#define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES +#define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES +#define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES +#define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES +#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0_OES +#define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT_OES +#define GL_STENCIL_ATTACHMENT_EXT GL_STENCIL_ATTACHMENT_OES +#define GL_ARRAY_BUFFER_ARB GL_ARRAY_BUFFER +#define GL_TEXTURE0_ARB GL_TEXTURE0 + +#define GL_ALPHA8 GL_ALPHA +#define GL_LUMINANCE8_ALPHA8 GL_LUMINANCE_ALPHA +#define GL_LUMINANCE8 GL_LUMINANCE +#define GL_RGBA8 GL_RGBA +#define GL_RGB8 GL_RGB + +#define GL_STATIC_DRAW_ARB GL_STATIC_DRAW +#define GL_DYNAMIC_DRAW_ARB GL_DYNAMIC_DRAW #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES @@ -48,6 +66,31 @@ extern "C" { #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES +#define nglGenRenderbuffersEXT nglGenRenderbuffersOES +#define nglBindRenderbufferEXT nglBindRenderbufferOES +#define nglDeleteRenderbuffersEXT nglDeleteRenderbuffersOES +#define nglRenderbufferStorageEXT nglRenderbufferStorageOES +#define nglGenFramebuffersEXT nglGenFramebuffersOES +#define nglBindFramebufferEXT nglBindFramebufferOES +#define nglFramebufferTexture2DEXT nglFramebufferTexture2DOES +#define nglFramebufferRenderbufferEXT nglFramebufferRenderbufferOES +#define nglCheckFramebufferStatusEXT nglCheckFramebufferStatusOES +#define nglDeleteBuffersARB glDeleteBuffers +#define nglIsBufferARB glIsBuffer +#define nglDeleteRenderbuffersEXT nglDeleteRenderbuffersOES +#define nglBindFramebufferEXT nglBindFramebufferOES +#define nglDeleteFramebuffersEXT nglDeleteFramebuffersOES +#define nglUnmapBufferARB nglUnmapBufferOES +#define nglActiveTextureARB glActiveTexture +#define nglClientActiveTextureARB glClientActiveTexture +#define nglBindBufferARB glBindBuffer +#define nglGenBuffersARB glGenBuffers +#define nglBufferDataARB glBufferData + +#define glFrustum glFrustumf +#define glOrtho glOrthof +#define glDepthRange glDepthRangef + #else #if defined(NL_OS_MAC) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp index 855c10c21..41575024c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_matrix.cpp @@ -37,19 +37,11 @@ void CDriverGL::setFrustum(float left, float right, float bottom, float top, flo if (perspective) { -#ifdef USE_OPENGLES - glFrustumf(left,right,bottom,top,znear,zfar); -#else glFrustum(left,right,bottom,top,znear,zfar); -#endif } else { -#ifdef USE_OPENGLES - glOrthof(left,right,bottom,top,znear,zfar); -#else glOrtho(left,right,bottom,top,znear,zfar); -#endif } _ProjMatDirty = true; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp index 9bf53592f..8ec7a6bc8 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_states.cpp @@ -155,11 +155,7 @@ void CDriverGLStates::forceDefaults(uint nbStages) for(stage=0;stage_DriverGLStates.forceBindARBVertexBuffer(vertexBufferID); @@ -1259,11 +1255,7 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff } if (glGetError() != GL_NO_ERROR) { -#ifdef USE_OPENGLES - glDeleteBuffers(1, &vertexBufferID); -#else nglDeleteBuffersARB(1, &vertexBufferID); -#endif return NULL; } @@ -1306,13 +1298,10 @@ void CVertexArrayRangeARB::updateLostBuffers() { nlassert((*it)->_VertexObjectId); GLuint id = (GLuint) (*it)->_VertexObjectId; -#ifdef USE_OPENGLES - nlassert(glIsBuffer(id)); - glDeleteBuffers(1, &id); -#else + nlassert(nglIsBufferARB(id)); nglDeleteBuffersARB(1, &id); -#endif + (*it)->_VertexObjectId = 0; (*it)->VB->setLocation(CVertexBuffer::NotResident); } @@ -1361,13 +1350,8 @@ CVertexBufferHardARB::~CVertexBufferHardARB() if (_VertexObjectId) { GLuint id = (GLuint) _VertexObjectId; -#ifdef USE_OPENGLES - nlassert(glIsBuffer(id)); - glDeleteBuffers(1, &id); -#else nlassert(nglIsBufferARB(id)); nglDeleteBuffersARB(1, &id); -#endif } if (_VertexArrayRange) { @@ -1412,12 +1396,7 @@ void *CVertexBufferHardARB::lock() } // recreate a vb GLuint vertexBufferID; - -#ifdef USE_OPENGLES - glGenBuffers(1, &vertexBufferID); -#else nglGenBuffersARB(1, &vertexBufferID); -#endif if (glGetError() != GL_NO_ERROR) { @@ -1436,35 +1415,23 @@ void *CVertexBufferHardARB::lock() break; case CVertexBuffer::StaticPreferred: if (_Driver->getStaticMemoryToVRAM()) -#ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STATIC_DRAW); -#else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB); -#endif else -#ifdef USE_OPENGLES glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); -#else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); -#endif break; // case CVertexBuffer::AGPPreferred: default: -#ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); -#else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); -#endif + break; } if (glGetError() != GL_NO_ERROR) { _Driver->incrementResetCounter(); -#ifdef USE_OPENGLES - glDeleteBuffers(1, &vertexBufferID); -#else + nglDeleteBuffersARB(1, &vertexBufferID); -#endif + return &_DummyVB[0];; } _VertexObjectId = vertexBufferID; @@ -1567,12 +1534,10 @@ void CVertexBufferHardARB::unlock() #ifdef USE_OPENGLES if (_Driver->_Extensions.OESMapBuffer) +#endif { - unmapOk = nglUnmapBufferOES(GL_ARRAY_BUFFER); + unmapOk = nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); } -#else - unmapOk = nglUnmapBufferARB(GL_ARRAY_BUFFER_ARB); -#endif #ifdef NL_DEBUG _Unmapping = false; From 2869d5f1ac39479719760c0b33545d88c72cd4ba Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jan 2015 18:41:54 +0100 Subject: [PATCH 034/175] Fixed: OpenGL ES driver compilation --HG-- branch : develop --- .../driver/opengl/driver_opengl_texture.cpp | 61 ------------------- .../driver_opengl_vertex_buffer_hard.cpp | 6 +- .../3d/driver/opengl/driver_opengl_window.cpp | 4 ++ 3 files changed, 8 insertions(+), 63 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp index 696d30635..3aa1f7e25 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp @@ -93,19 +93,6 @@ CTextureDrvInfosGL::~CTextureDrvInfosGL() { _Driver->_TextureUsed[TextureUsedIdx] = NULL; } - -#ifdef USE_OPENGLES - if (InitFBO) - { - nglDeleteFramebuffersOES(1, &FBOId); - if(AttachDepthStencil) - { - nglDeleteRenderbuffersOES(1, &DepthFBOId); - if(!UsePackedDepthStencil) - nglDeleteRenderbuffersOES(1, &StencilFBOId); - } - } -#endif } CDepthStencilFBO::CDepthStencilFBO(CDriverGL *driver, uint width, uint height) @@ -175,53 +162,6 @@ bool CTextureDrvInfosGL::initFrameBufferObject(ITexture * tex) AttachDepthStencil = !((CTextureBloom*)tex)->isMode2D(); } -#ifdef USE_OPENGLES - // generate IDs - nglGenFramebuffersOES(1, &FBOId); - if(AttachDepthStencil) - { - nglGenRenderbuffersOES(1, &DepthFBOId); - if(UsePackedDepthStencil) - StencilFBOId = DepthFBOId; - else - nglGenRenderbuffersOES(1, &StencilFBOId); - } - - //nldebug("3D: using depth %d and stencil %d", DepthFBOId, StencilFBOId); - - // initialize FBO - nglBindFramebufferOES(GL_FRAMEBUFFER_OES, FBOId); - nglFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, TextureMode, ID, 0); - - // attach depth/stencil render to FBO - // note: for some still unkown reason it's impossible to add - // a stencil buffer as shown in the respective docs (see - // opengl.org extension registry). Until a safe approach to add - // them is found, there will be no attached stencil for the time - // being, aside of using packed depth+stencil buffers. - if(AttachDepthStencil) - { - if(UsePackedDepthStencil) - { - //nldebug("3D: using packed depth stencil"); - nglBindRenderbufferOES(GL_RENDERBUFFER_OES, StencilFBOId); - nglRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH24_STENCIL8_OES, tex->getWidth(), tex->getHeight()); - } - else - { - nglBindRenderbufferOES(GL_RENDERBUFFER_OES, DepthFBOId); - nglRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT24_OES, tex->getWidth(), tex->getHeight()); - /* - nglBindRenderbufferEXT(GL_RENDERBUFFER_OES, StencilFBOId); - nglRenderbufferStorageEXT(GL_RENDERBUFFER_OES, GL_STENCIL_INDEX8_EXT, tex->getWidth(), tex->getHeight()); - */ - } - nglFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, DepthFBOId); - nldebug("3D: glFramebufferRenderbufferExt(depth:24) = %X", nglCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - nglFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_STENCIL_ATTACHMENT_OES, GL_RENDERBUFFER_OES, StencilFBOId); - nldebug("3D: glFramebufferRenderbufferExt(stencil:8) = %X", nglCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - } -#else // generate IDs nglGenFramebuffersEXT(1, &FBOId); @@ -253,7 +193,6 @@ bool CTextureDrvInfosGL::initFrameBufferObject(ITexture * tex) GL_RENDERBUFFER_EXT, DepthStencilFBO->StencilFBOId); nldebug("3D: glFramebufferRenderbufferExt(stencil:8) = %X", nglCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)); } -#endif // check status GLenum status = (GLenum) nglCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp index 3a75afe8d..6ed74f78e 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp @@ -1225,7 +1225,8 @@ IVertexBufferHardGL *CVertexArrayRangeARB::createVBHardGL(uint size, CVertexBuff { case CVertexBuffer::AGPVolatile: #ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW); + // TODO: GL_STREAM_DRAW doesn't exist in OpenGL ES 1.x + glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); #else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB); #endif @@ -1408,7 +1409,8 @@ void *CVertexBufferHardARB::lock() { case CVertexBuffer::AGPVolatile: #ifdef USE_OPENGLES - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_STREAM_DRAW); + // TODO: GL_STREAM_DRAW doesn't exist in OpenGL ES 1.x + glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); #else nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STREAM_DRAW_ARB); #endif diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 8307f885e..172b0e451 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -633,6 +633,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re int width = mode.Width; int height = mode.Height; +#ifdef USE_OPENGLES + // TODO: implement for OpenGL ES 1.x +#else // resize the window RECT rc; SetRect (&rc, 0, 0, width, height); @@ -910,6 +913,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re _hDC = NULL; return false; } +#endif } else { From 99c88bd515e917dafb46b79235a9453dc154e47e Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jan 2015 18:45:14 +0100 Subject: [PATCH 035/175] Changed: Minor changes --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp | 2 +- .../nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp | 1 - code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 4 ++-- code/ryzom/server/src/ai_service/ai_vector_mirror.h | 2 +- code/ryzom/server/src/dynamic_scenario_service/service.cpp | 2 -- .../src/entities_game_service/progression/progression_pve.h | 1 - .../server/src/shard_unifier_service/nel_database_mapping.h | 2 +- 7 files changed, 5 insertions(+), 9 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp index 3aa1f7e25..7b49e20a0 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_texture.cpp @@ -164,7 +164,7 @@ bool CTextureDrvInfosGL::initFrameBufferObject(ITexture * tex) // generate IDs nglGenFramebuffersEXT(1, &FBOId); - + //nldebug("3D: using depth %d and stencil %d", DepthFBOId, StencilFBOId); // initialize FBO diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index 5470ec5c5..22bc5ff5a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -453,7 +453,6 @@ bool CDriverGL::setupEXTVertexShader(const CVPParser::TProgram &program, GLuint // clear last error GLenum glError = glGetError(); - //variants[EVSSecondaryColorVariant] = nglGenSymbolsEXT(GL_VECTOR_EXT, GL_VARIANT_EXT, GL_NORMALIZED_RANGE_EXT, 1); //variants[EVSSecondaryColorVariant] = nglGenSymbolsEXT(GL_VECTOR_EXT, GL_VARIANT_EXT, GL_NORMALIZED_RANGE_EXT, 1); // allocate the symbols diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 172b0e451..4db3f550b 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -627,8 +627,8 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re // Offscreen mode ? if (_CurrentMode.OffScreen) { - if (!createWindow(mode)) - return false; + if (!createWindow(mode)) return false; + HWND tmpHWND = _win; int width = mode.Width; int height = mode.Height; diff --git a/code/ryzom/server/src/ai_service/ai_vector_mirror.h b/code/ryzom/server/src/ai_service/ai_vector_mirror.h index 0464de4fb..da229b4c3 100644 --- a/code/ryzom/server/src/ai_service/ai_vector_mirror.h +++ b/code/ryzom/server/src/ai_service/ai_vector_mirror.h @@ -95,7 +95,7 @@ public: // Methods. inline double distTo(const CAIVectorMirror &dest) const; inline double distSqTo(const CAIVectorMirror &dest) const; inline double quickDistTo(const CAIVectorMirror &dest) const; - + protected: inline void setX(const CAICoord &x) { _x=x; } inline void setY(const CAICoord &y) { _y=y; } diff --git a/code/ryzom/server/src/dynamic_scenario_service/service.cpp b/code/ryzom/server/src/dynamic_scenario_service/service.cpp index 342a05c23..07c454566 100644 --- a/code/ryzom/server/src/dynamic_scenario_service/service.cpp +++ b/code/ryzom/server/src/dynamic_scenario_service/service.cpp @@ -56,8 +56,6 @@ namespace R2 // The ligo config NLLIGO::CLigoConfig* LigoConfigPtr; CR2LigoConfig R2LigoConfig; - - } diff --git a/code/ryzom/server/src/entities_game_service/progression/progression_pve.h b/code/ryzom/server/src/entities_game_service/progression/progression_pve.h index 11d538ea4..2c9e9aba2 100644 --- a/code/ryzom/server/src/entities_game_service/progression/progression_pve.h +++ b/code/ryzom/server/src/entities_game_service/progression/progression_pve.h @@ -279,7 +279,6 @@ struct CCreatureTakenDamage { if ( PlayerInflictedDamage[i].TotalDamage > maxDmg ) { - nlinfo("set damage by player"); maxDmg = PlayerInflictedDamage[i].TotalDamage; index = (sint16)i; } diff --git a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h index 685386bfc..c33e4fe15 100644 --- a/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h +++ b/code/ryzom/server/src/shard_unifier_service/nel_database_mapping.h @@ -625,7 +625,7 @@ namespace RSMGR }; - ///////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////// // WARNING : this is a generated file, don't change it ! ///////////////////////////////////////////////////////////////// class CNelPermission From 5b9ac59f495da17e9973eb7faeac646d2aa8a5b4 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jan 2015 19:53:27 +0100 Subject: [PATCH 036/175] Fixed: OpenGL driver compilation --HG-- branch : develop --- .../src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp index 6ed74f78e..25c7da614 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.cpp @@ -1419,7 +1419,6 @@ void *CVertexBufferHardARB::lock() if (_Driver->getStaticMemoryToVRAM()) nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB); else - glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW); nglBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_DYNAMIC_DRAW_ARB); break; // case CVertexBuffer::AGPPreferred: From e8ff07fe7dff49a57c5ce810652baf0c950fe6c3 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jan 2015 19:55:05 +0100 Subject: [PATCH 037/175] Fixed: Removed raw mouse mode for OS X too --HG-- branch : develop --- .../driver/opengl/mac/cocoa_event_emitter.cpp | 67 ++----------------- .../driver/opengl/mac/cocoa_event_emitter.h | 4 -- .../src/3d/driver/opengl/unix_event_emitter.h | 1 - 3 files changed, 5 insertions(+), 67 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp index d290e0cee..6206d94c3 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp @@ -270,28 +270,14 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) return false; } - // first event about mouse movement after setting to emulateRawMode - if(_setToEmulateRawMode && - (event.type == NSMouseMoved || - event.type == NSLeftMouseDragged || - event.type == NSRightMouseDragged)) - { - // do not report because it reflects wrapping pointer to 0.5/0.5 - _setToEmulateRawMode = false; - return false; - } - // convert the modifiers for nel to pass them with the events - NLMISC::TKeyButton modifiers = - modifierFlagsToNelKeyButton([event modifierFlags]); + NLMISC::TKeyButton modifiers = modifierFlagsToNelKeyButton([event modifierFlags]); switch(event.type) { case NSLeftMouseDown: { - server->postEvent(new NLMISC::CEventMouseDown( - mousePos.x, mousePos.y, - (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this)); + server->postEvent(new NLMISC::CEventMouseDown(mousePos.x, mousePos.y, (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this)); } break; case NSLeftMouseUp: @@ -319,15 +305,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) { NLMISC::CEvent* nelEvent; - // when emulating raw mode, send the delta in a CGDMouseMove event - if(_emulateRawMode) - nelEvent = new NLMISC::CGDMouseMove( - this, NULL /* no mouse device */, event.deltaX, -event.deltaY); - - // normally send position in a CEventMouseMove - else - nelEvent = new NLMISC::CEventMouseMove( - mousePos.x, mousePos.y, (NLMISC::TMouseButton)modifiers, this); + nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, (NLMISC::TMouseButton)modifiers, this); server->postEvent(nelEvent); break; @@ -336,15 +314,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) { NLMISC::CEvent* nelEvent; - // when emulating raw mode, send the delta in a CGDMouseMove event - if(_emulateRawMode) - nelEvent = new NLMISC::CGDMouseMove( - this, NULL /* no mouse device */, event.deltaX, -event.deltaY); - - // normally send position in a CEventMouseMove - else - nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, - (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this); + nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, (NLMISC::TMouseButton)(NLMISC::leftButton | modifiers), this); server->postEvent(nelEvent); break; @@ -353,15 +323,7 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) { NLMISC::CEvent* nelEvent; - // when emulating raw mode, send the delta in a CGDMouseMove event - if(_emulateRawMode) - nelEvent = new NLMISC::CGDMouseMove( - this, NULL /* no mouse device */, event.deltaX, -event.deltaY); - - // normally send position in a CEventMouseMove - else - nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, - (NLMISC::TMouseButton)(NLMISC::rightButton | modifiers), this); + nelEvent = new NLMISC::CEventMouseMove(mousePos.x, mousePos.y, (NLMISC::TMouseButton)(NLMISC::rightButton | modifiers), this); server->postEvent(nelEvent); break; @@ -434,12 +396,6 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server) } } - if(_emulateRawMode && _driver && (event.type == NSMouseMoved || - event.type == NSLeftMouseDragged || event.type == NSRightMouseDragged)) - { - _driver->setMousePos(0.5, 0.5); - } - return true; } @@ -492,17 +448,4 @@ void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */) _server = &server; } -void CCocoaEventEmitter::emulateMouseRawMode(bool enable) -{ - _emulateRawMode = enable; - - if(_emulateRawMode) - { - _setToEmulateRawMode = true; - - if(_driver) - _driver->setMousePos(0.5, 0.5); - } -} - } diff --git a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h index aa7d591fd..960614ef4 100644 --- a/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h +++ b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h @@ -31,8 +31,6 @@ namespace NLMISC class CCocoaEventEmitter : public IEventEmitter { - bool _emulateRawMode; - bool _setToEmulateRawMode; bool _eventLoop; NL3D::IDriver* _driver; CocoaOpenGLView* _glView; @@ -42,8 +40,6 @@ class CCocoaEventEmitter : public IEventEmitter public: CCocoaEventEmitter() : - _emulateRawMode(false), - _setToEmulateRawMode(false), _driver(NULL), _glView(nil), _server(NULL) { } diff --git a/code/nel/src/3d/driver/opengl/unix_event_emitter.h b/code/nel/src/3d/driver/opengl/unix_event_emitter.h index 7eeef970e..493c4ad35 100644 --- a/code/nel/src/3d/driver/opengl/unix_event_emitter.h +++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.h @@ -100,7 +100,6 @@ private: std::map _PressedKeys; XIM _im; XIC _ic; - bool _emulateRawMode; NL3D::IDriver* _driver; CUnixEventServer _InternalServer; ucstring _CopiedString; From fad0e9af4edc609fd62b5f308b9988311d9f87e1 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jan 2015 20:33:02 +0100 Subject: [PATCH 038/175] Fixed: Compilation with OS X SDK 10.10 --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 4db3f550b..5c6cecab9 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1483,7 +1483,7 @@ bool CDriverGL::createWindow(const GfxMode &mode) [[CocoaApplicationDelegate alloc] initWithDriver:this]; // set the application delegate, this will handle window/app close events - [NSApp setDelegate:appDelegate]; + [NSApp setDelegate:(id)appDelegate]; // bind the close button of the window to applicationShouldTerminate id closeButton = [cocoa_window standardWindowButton:NSWindowCloseButton]; From 3bca3f41cc3b7ab30a1790a88bce955cdb520c78 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 14:56:51 +0100 Subject: [PATCH 039/175] Changed: Typo --HG-- branch : develop --- code/nel/include/nel/misc/path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index f3120c907..d8c24758c 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -343,7 +343,7 @@ public: /** Adds a search path. * The path is a directory "c:/temp" all files in the directory will be included (and recursively if asked) * - * Alternative directories are not pre-cached (instead of non Alternative files) and will used when a file is not found in the standard directories. + * Alternative directories are not pre-cached (instead of non Alternative files) and will be used when a file is not found in the standard directories. * For example, local data will be in the cached directories and server repository files will be in the Alternative files. If a new file is not * found in the local data, we'll try to find it on the repository. * From acf677e63570f82fdc1f8d91ac3d26ec54befa8d Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 14:57:40 +0100 Subject: [PATCH 040/175] Changed: Don't use replaceApplicationDirToken anymore --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 4de65491a..704260a64 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -554,27 +554,6 @@ void checkDriverDepth () } } -static std::string replaceApplicationDirToken(const std::string &dir) -{ - -#ifdef NL_OS_MAC - // if client_default.cfg is not in current directory, and it's not an absolute path, use application default directory - if (!CFile::isExists("client_default.cfg") && dir.size()>0 && dir[0]!='/') - { - return getAppBundlePath() + "/Contents/Resources/" + dir; - } -#else - static const std::string token = ""; - std::string::size_type pos = dir.find(token); - if (pos != std::string::npos) - return dir.substr(0, pos) + getAppBundlePath() + dir.substr(pos + token.length()); -#endif - -// preDataPath = getAppBundlePath() + "/Contents/Resources/" + preDataPath; - - return dir; -} - void listStereoDisplayDevices(std::vector &devices) { bool cache = VRDeviceCache.empty(); @@ -678,7 +657,7 @@ void addSearchPaths(IProgressCallback &progress) progress.progress ((float)i/(float)ClientCfg.DataPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.DataPath.size(), (float)(i+1)/(float)ClientCfg.DataPath.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.DataPath[i]), true, false, &progress); + CPath::addSearchPath(ClientCfg.DataPath[i], true, false, &progress); progress.popCropedValues (); } @@ -690,13 +669,12 @@ void addSearchPaths(IProgressCallback &progress) progress.progress ((float)i/(float)ClientCfg.DataPathNoRecurse.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.DataPathNoRecurse.size(), (float)(i+1)/(float)ClientCfg.DataPathNoRecurse.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.DataPathNoRecurse[i]), false, false, &progress); + CPath::addSearchPath(ClientCfg.DataPathNoRecurse[i], false, false, &progress); progress.popCropedValues (); } } - void addPreDataPaths(NLMISC::IProgressCallback &progress) { NLMISC::TTime initPaths = ryzomGetLocalTime (); @@ -706,7 +684,7 @@ void addPreDataPaths(NLMISC::IProgressCallback &progress) progress.progress ((float)i/(float)ClientCfg.PreDataPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.PreDataPath.size(), (float)(i+1)/(float)ClientCfg.PreDataPath.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.PreDataPath[i]), true, false, &progress); + CPath::addSearchPath(ClientCfg.PreDataPath[i], true, false, &progress); progress.popCropedValues (); } @@ -719,7 +697,7 @@ static void addPackedSheetUpdatePaths(NLMISC::IProgressCallback &progress) { progress.progress((float)i/(float)ClientCfg.UpdatePackedSheetPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.UpdatePackedSheetPath.size(), (float)(i+1)/(float)ClientCfg.UpdatePackedSheetPath.size()); - CPath::addSearchPath(replaceApplicationDirToken(ClientCfg.UpdatePackedSheetPath[i]), true, false, &progress); + CPath::addSearchPath(ClientCfg.UpdatePackedSheetPath[i], true, false, &progress); progress.popCropedValues(); } } From 3367eb3205ba4f99a0f6011a86e2b8fecdcbff75 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 14:59:15 +0100 Subject: [PATCH 041/175] Changed: Append getAppBundlePath() to search paths under OS X --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 704260a64..07ac27b62 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -664,6 +664,7 @@ void addSearchPaths(IProgressCallback &progress) CPath::loadRemappedFiles("remap_files.csv"); } + for (uint i = 0; i < ClientCfg.DataPathNoRecurse.size(); i++) { progress.progress ((float)i/(float)ClientCfg.DataPathNoRecurse.size()); @@ -673,6 +674,17 @@ void addSearchPaths(IProgressCallback &progress) progress.popCropedValues (); } + + // add in last position, a specific possibly read only directory + std::string defaultDirectory; + +#ifdef NL_OS_MAC + defaultDirectory = getAppBundlePath() + "/Contents/Resources/data"; +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + defaultDirectory = std::string(RYZOM_SHARE_PREFIX) + "/data"; +#endif + + if (!defaultDirectory.empty()) CPath::addSearchPath(defaultDirectory, true, false); } void addPreDataPaths(NLMISC::IProgressCallback &progress) From 08c557ae76d1110b39edc24ac1c33018a5ae1676 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 15:06:02 +0100 Subject: [PATCH 042/175] Changed: Allow to use a readable and writable data path for IG patch (usefull when data are read only) --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 107 +++++++++++++++++++------- code/ryzom/client/src/login_patch.h | 5 +- 2 files changed, 82 insertions(+), 30 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 5b9a83c83..297f7fddf 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -207,9 +207,23 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st // **************************************************************************** void CPatchManager::setClientRootPath(const std::string& clientRootPath) { - ClientRootPath = clientRootPath; - ClientPatchPath = ClientRootPath + "unpack/"; - ClientDataPath = ClientRootPath + "data/"; + ClientRootPath = CPath::standardizePath(clientRootPath); + ClientPatchPath = CPath::standardizePath(ClientRootPath + "unpack"); + ReadableClientDataPath = CPath::standardizePath(ClientRootPath + "data"); + + std::string writableTest = ReadableClientDataPath + "writableTest"; + + // if succeeded to create a delete a temporary file in data directory + if (CFile::createEmptyFile(writableTest) && CFile::deleteFile(writableTest)) + { + // use it to patch data files + WritableClientDataPath = ReadableClientDataPath; + } + else + { + // use system user profile to patch data files + WritableClientDataPath = CPath::standardizePath(CPath::getApplicationDirectory("Ryzom") + "data"); + } } // **************************************************************************** @@ -253,7 +267,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s DisplayedServerPath = ServerPath; NLMISC::CFile::createDirectory(ClientPatchPath); - NLMISC::CFile::createDirectory(ClientDataPath); + NLMISC::CFile::createDirectory(WritableClientDataPath); // try to read the version file from the server (that will replace the version number) @@ -787,7 +801,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (!result) { -//:TODO: handle exception? + // TODO: handle exception? string err = toString("Error unpacking %s", rFilename.c_str()); if (useBatchFile) @@ -913,7 +927,6 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool throw NLMISC::EWriteError(UpdateBatchFilename.c_str()); } } - } // **************************************************************************** @@ -1616,9 +1629,25 @@ void CPatchManager::getPatchFromDesc(SFileToPatch &ftpOut, const CBNPFile &fIn, // Only look in data path if the file should not be unpack (otherwise it should only remains in the "unpack" directory) if (!needUnpack) { - if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientDataPath + rFilename)) sFilePath = ClientDataPath + rFilename; + if (sFilePath.empty()) + { + if (NLMISC::CFile::fileExists(WritableClientDataPath + rFilename)) + { + // if file exists in writable directory, use it + sFilePath = WritableClientDataPath + rFilename; + } + else if (NLMISC::CFile::fileExists(ReadableClientDataPath + rFilename)) + { + // if file exists in readable directory, use it + sFilePath = ReadableClientDataPath + rFilename; + } + } + } + + if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientPatchPath + rFilename)) + { + sFilePath = ClientPatchPath + rFilename; } - if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientPatchPath + rFilename)) sFilePath = ClientPatchPath + rFilename; // following lines removed by Sadge to ensure that the correct file is patched // string sFilePath = CPath::lookup(rFilename, false, false); @@ -2039,7 +2068,8 @@ uint CPatchManager::applyScanDataResult() if(ScanDataThread) return 0; - uint numError= 0; + uint numError= 0; + { TSyncDataScanState::CAccessor ac(&DataScanState); CDataScanState &val= ac.value(); @@ -2057,7 +2087,8 @@ uint CPatchManager::applyScanDataResult() // get file path // following lines added by Sadge to ensure that the correct file gets patched string sFilePath; - if (NLMISC::CFile::fileExists(ClientDataPath + ftp.FileName)) sFilePath = ClientDataPath + ftp.FileName; + if (NLMISC::CFile::fileExists(WritableClientDataPath + ftp.FileName)) sFilePath = WritableClientDataPath + ftp.FileName; + if (sFilePath.empty() && NLMISC::CFile::fileExists(ReadableClientDataPath + ftp.FileName)) sFilePath = ReadableClientDataPath + ftp.FileName; if (sFilePath.empty() && NLMISC::CFile::fileExists(ClientPatchPath + ftp.FileName)) sFilePath = ClientPatchPath + ftp.FileName; // following lines removed by Sadge to ensure that the correct file gets patched @@ -2768,15 +2799,31 @@ public: void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) { CPatchManager *pPM = CPatchManager::getInstance(); - // Source File Name + + // Source File Name (in writable or readable directory) string SourceName; + + // Destination File Name (in writable directory) + string DestinationName; + if (rFTP.ExtractPath.empty()) { + DestinationName = pPM->WritableClientDataPath + rFTP.FileName; + if (rFTP.LocalFileExists) { // following lines added by Sadge to ensure that the correct file gets patched SourceName.clear(); - if (NLMISC::CFile::fileExists(pPM->ClientDataPath + rFTP.FileName)) SourceName = pPM->ClientDataPath + rFTP.FileName; + + if (NLMISC::CFile::fileExists(pPM->WritableClientDataPath + rFTP.FileName)) + { + SourceName = pPM->WritableClientDataPath + rFTP.FileName; + } + else if (NLMISC::CFile::fileExists(pPM->ReadableClientDataPath + rFTP.FileName)) + { + SourceName = pPM->ReadableClientDataPath + rFTP.FileName; + } + // version from previous download if (SourceName.empty()) throw Exception (std::string("ERROR: Failed to find file: ")+rFTP.FileName); @@ -2788,12 +2835,13 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) // note : if file was background downloaded, we have : // rFTP.LocalFileExists = false // rFTP.SrcFileName = "unpack/filename.bnp.tmp" - SourceName = pPM->ClientDataPath + rFTP.FileName; + SourceName = DestinationName; } } else { SourceName = pPM->ClientPatchPath + rFTP.FileName; + DestinationName = SourceName; } if (rFTP.LocalFileToDelete) @@ -2838,7 +2886,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) for (uint i=0; ideleteFile(SourceName, false, false); // File can exists if bad BNP loading if (_CommitPatch) { - pPM->renameFile(OutFilename+".tmp", SourceName); + pPM->renameFile(OutFilename+".tmp", DestinationName); } } } - if (usePatchFile && !rFTP.Patches.empty()) + if (usePatchFile) { uint32 currentPatchedSize = 0; for (uint32 j = 0; j < rFTP.Patches.size(); ++j) @@ -2987,21 +3035,14 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) SourceNameXD = SourceNameXD.substr(0, SourceNameXD.rfind('.')); SourceNameXD += "_.ref"; - std::string refPath; - if (_CommitPatch) - { - refPath = pPM->ClientDataPath; - } - else + if (!_CommitPatch) { // works - refPath = pPM->ClientPatchPath; std::string tmpRefFile = SourceNameXD + ".tmp"; if (!NLMISC::CFile::fileExists(pPM->ClientPatchPath + tmpRefFile)) { // Not found in the patch directory -> version in data directory should be good, or would have been // detected by the check thread else. - refPath = pPM->ClientDataPath; } else { @@ -3018,7 +3059,14 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) // if (SourceNameXDFull.empty()) // SourceNameXDFull = pPM->ClientDataPath + SourceNameXD; // SourceNameXD = SourceNameXDFull; - SourceNameXD = pPM->ClientDataPath + SourceNameXD; + if (CFile::fileExists(pPM->WritableClientDataPath + SourceNameXD)) + { + SourceNameXD = pPM->WritableClientDataPath + SourceNameXD; + } + else if (CFile::fileExists(pPM->ReadableClientDataPath + SourceNameXD)) + { + SourceNameXD = pPM->ReadableClientDataPath + SourceNameXD; + } } PatchName = pPM->ClientPatchPath + PatchName; @@ -3042,7 +3090,8 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) PatchSizeProgress += rFTP.PatcheSizes[j]; currentPatchedSize += rFTP.PatcheSizes[j]; } - if (tmpSourceName != SourceName) + + if (tmpSourceName != DestinationName) { pPM->deleteFile(SourceName, false, false); // File can exists if bad BNP loading if (!_CommitPatch) @@ -3052,7 +3101,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) } else { - pPM->renameFile(tmpSourceName, SourceName); + pPM->renameFile(tmpSourceName, DestinationName); } } } @@ -3060,9 +3109,10 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP) { PatchSizeProgress += totalPatchSize; } + // If all patches applied with success so file size should be ok // We just have to change file date to match the last patch applied - pPM->applyDate(SourceName, rFTP.LastFileDate); + pPM->applyDate(DestinationName, rFTP.LastFileDate); //progress.progress(1.f); } @@ -3413,6 +3463,7 @@ bool CPatchManager::extract(const std::string& patchPath, string err = toString("Can't open file '%s' for writing: code=%d %s (error code 29)", updateBatchFilename.c_str(), errno, strerror(errno)); throw Exception (err); } + fprintf(fp, "@echo off\n"); fprintf(fp, "ping 127.0.0.1 -n 7 -w 1000 > nul\n"); // wait diff --git a/code/ryzom/client/src/login_patch.h b/code/ryzom/client/src/login_patch.h index de7351775..cd4fad0ff 100644 --- a/code/ryzom/client/src/login_patch.h +++ b/code/ryzom/client/src/login_patch.h @@ -447,8 +447,9 @@ private: std::string UpdateBatchFilename; // Where the client get all delta and desc file - std::string ClientPatchPath; - std::string ClientDataPath; + std::string ClientPatchPath; // Temporary path + std::string ReadableClientDataPath; // Where original data can be found + std::string WritableClientDataPath; // Where data can be written /// Output useful information for debugging in the log file bool VerboseLog; From 8fc8c3aa3993666fb3d956732f487d0d6978e9fa Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 18:01:32 +0100 Subject: [PATCH 043/175] Changed: Use defined directories prefixed by a default directory --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 54 ++++++++++++++++++++++++--- code/ryzom/client/src/login_patch.cpp | 27 +++++++------- 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 07ac27b62..765e2fcd6 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -675,22 +675,39 @@ void addSearchPaths(IProgressCallback &progress) progress.popCropedValues (); } - // add in last position, a specific possibly read only directory std::string defaultDirectory; #ifdef NL_OS_MAC - defaultDirectory = getAppBundlePath() + "/Contents/Resources/data"; + defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources"); #elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) - defaultDirectory = std::string(RYZOM_SHARE_PREFIX) + "/data"; + defaultDirectory = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX)); #endif - if (!defaultDirectory.empty()) CPath::addSearchPath(defaultDirectory, true, false); + // add in last position, a specific possibly read only directory + if (!defaultDirectory.empty()) + { + for (uint i = 0; i < ClientCfg.DataPath.size(); i++) + { + // don't prepend default directory if path is absolute + if (!ClientCfg.PreDataPath[i].empty() && ClientCfg.PreDataPath[i][0] != '/') + { + progress.progress ((float)i/(float)ClientCfg.DataPath.size()); + progress.pushCropedValues ((float)i/(float)ClientCfg.DataPath.size(), (float)(i+1)/(float)ClientCfg.DataPath.size()); + + CPath::addSearchPath(defaultDirectory + ClientCfg.DataPath[i], true, false, &progress); + + progress.popCropedValues (); + } + } + } } void addPreDataPaths(NLMISC::IProgressCallback &progress) { NLMISC::TTime initPaths = ryzomGetLocalTime (); - H_AUTO(InitRZAddSearchPaths) + + H_AUTO(InitRZAddSearchPaths); + for (uint i = 0; i < ClientCfg.PreDataPath.size(); i++) { progress.progress ((float)i/(float)ClientCfg.PreDataPath.size()); @@ -700,7 +717,34 @@ void addPreDataPaths(NLMISC::IProgressCallback &progress) progress.popCropedValues (); } + //nlinfo ("PROFILE: %d seconds for Add search paths Predata", (uint32)(ryzomGetLocalTime ()-initPaths)/1000); + + std::string defaultDirectory; + +#ifdef NL_OS_MAC + defaultDirectory = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources"); +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + defaultDirectory = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX)); +#endif + + // add in last position, a specific possibly read only directory + if (!defaultDirectory.empty()) + { + for (uint i = 0; i < ClientCfg.PreDataPath.size(); i++) + { + // don't prepend default directory if path is absolute + if (!ClientCfg.PreDataPath[i].empty() && ClientCfg.PreDataPath[i][0] != '/') + { + progress.progress ((float)i/(float)ClientCfg.PreDataPath.size()); + progress.pushCropedValues ((float)i/(float)ClientCfg.PreDataPath.size(), (float)(i+1)/(float)ClientCfg.PreDataPath.size()); + + CPath::addSearchPath(defaultDirectory + ClientCfg.PreDataPath[i], true, false, &progress); + + progress.popCropedValues (); + } + } + } } static void addPackedSheetUpdatePaths(NLMISC::IProgressCallback &progress) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 297f7fddf..2a08262f0 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -26,6 +26,10 @@ #include #endif +#ifdef NL_OS_MAC + #include "app_bundle_utils.h" +#endif + #include #include @@ -209,21 +213,16 @@ void CPatchManager::setClientRootPath(const std::string& clientRootPath) { ClientRootPath = CPath::standardizePath(clientRootPath); ClientPatchPath = CPath::standardizePath(ClientRootPath + "unpack"); - ReadableClientDataPath = CPath::standardizePath(ClientRootPath + "data"); - - std::string writableTest = ReadableClientDataPath + "writableTest"; + + WritableClientDataPath = CPath::standardizePath(ClientRootPath + "data"); - // if succeeded to create a delete a temporary file in data directory - if (CFile::createEmptyFile(writableTest) && CFile::deleteFile(writableTest)) - { - // use it to patch data files - WritableClientDataPath = ReadableClientDataPath; - } - else - { - // use system user profile to patch data files - WritableClientDataPath = CPath::standardizePath(CPath::getApplicationDirectory("Ryzom") + "data"); - } +#ifdef NL_OS_MAC + ReadableClientDataPath = CPath::standardizePath(getAppBundlePath() + "/Contents/Resources/data"); +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + ReadableClientDataPath = CPath::standardizePath(std::string(RYZOM_SHARE_PREFIX) + "/data"); +#else + ReadableClientDataPath = WritableClientDataPath; +#endif } // **************************************************************************** From bc78734602970200531be773191ee6d5e9241683 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 18:27:06 +0100 Subject: [PATCH 044/175] Changed: Fixed a wrong copy-paste --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 765e2fcd6..c6b74ebd2 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -689,7 +689,7 @@ void addSearchPaths(IProgressCallback &progress) for (uint i = 0; i < ClientCfg.DataPath.size(); i++) { // don't prepend default directory if path is absolute - if (!ClientCfg.PreDataPath[i].empty() && ClientCfg.PreDataPath[i][0] != '/') + if (!ClientCfg.DataPath[i].empty() && ClientCfg.DataPath[i][0] != '/') { progress.progress ((float)i/(float)ClientCfg.DataPath.size()); progress.pushCropedValues ((float)i/(float)ClientCfg.DataPath.size(), (float)(i+1)/(float)ClientCfg.DataPath.size()); From 1ab170b7d86580415f3864e92deba18a64a07c12 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 13 Jan 2015 13:21:56 +0100 Subject: [PATCH 045/175] Unhide layers in max export --HG-- branch : develop --- .../generators/max_exporter_scripts/clod.ms | 1 + .../generators/max_exporter_scripts/ig.ms | 1 + .../generators/max_exporter_scripts/shape.ms | 1 + .../generators/max_exporter_scripts/veget.ms | 1 + .../export_header.ms | 10 ++++++++++ .../export_header.ms | 10 ++++++++++ .../build_gamedata/processes/anim/1_export.py | 2 +- .../processes/anim/maxscript/anim_export.ms | 10 ++++++++++ .../processes/clodbank/1_export.py | 2 +- .../processes/clodbank/maxscript/clod_export.ms | 11 +++++++++++ .../processes/ig/maxscript/ig_export.ms | 11 +++++++++++ .../processes/ligo/maxscript/nel_ligo_export.ms | 17 +++++++++++++++++ .../processes/pacs_prim/1_export.py | 9 ++++++++- .../pacs_prim/maxscript/pacs_prim_export.ms | 10 ++++++++++ .../build_gamedata/processes/rbank/1_export.py | 2 +- .../processes/rbank/maxscript/cmb_export.ms | 10 ++++++++++ .../processes/shape/maxscript/shape_export.ms | 11 +++++++++++ .../build_gamedata/processes/skel/1_export.py | 2 +- .../processes/skel/maxscript/skel_export.ms | 10 ++++++++++ .../build_gamedata/processes/swt/1_export.py | 2 +- .../processes/swt/maxscript/swt_export.ms | 10 ++++++++++ .../build_gamedata/processes/veget/1_export.py | 2 +- .../processes/veget/maxscript/veget_export.ms | 11 +++++++++++ .../build_gamedata/processes/zone/1_export.py | 2 +- .../processes/zone/maxscript/zone_export.ms | 10 ++++++++++ 25 files changed, 160 insertions(+), 8 deletions(-) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms index 68c8455d6..1a947f7d6 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms @@ -49,6 +49,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms index df0ecf7fc..43a05abcc 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms @@ -54,6 +54,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms index 2a52947ec..cfb51d0e0 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms @@ -194,6 +194,7 @@ fn runNelMaxExportSub inputMaxFile retryCount = tagThisFile = false -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms index 22c49013a..614a9a94f 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms @@ -39,6 +39,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms index 2d5e5434f..f06bab786 100755 --- a/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms +++ b/code/nel/tools/build_gamedata/generators/simple_max_exporter_template/export_header.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms index 03bfea443..a7b97a064 100755 --- a/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms +++ b/code/nel/tools/build_gamedata/generators/tagged_max_exporter_template/export_header.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/anim/1_export.py b/code/nel/tools/build_gamedata/processes/anim/1_export.py index 4c51fc261..1745c45a9 100755 --- a/code/nel/tools/build_gamedata/processes/anim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/anim/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export anim -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export anim diff --git a/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms b/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms index 7121e16d5..fc1eda5f9 100755 --- a/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms +++ b/code/nel/tools/build_gamedata/processes/anim/maxscript/anim_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/clodbank/1_export.py b/code/nel/tools/build_gamedata/processes/clodbank/1_export.py index 64cd875df..c73a86ac7 100755 --- a/code/nel/tools/build_gamedata/processes/clodbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/clodbank/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export clodbank -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export clodbank diff --git a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms index a8693dc8a..02856d2c7 100755 --- a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms +++ b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -115,6 +125,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms index 65cb38c4a..e91732391 100755 --- a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms +++ b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -120,6 +130,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index 933468459..07d032809 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -17,6 +17,16 @@ NEL3D_APPDATA_IGNAME = 1423062564 -- string : name of the Instance Group tagThisFile = true +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -307,6 +317,10 @@ fn buildTransitionMatrixObj mt transitionZone cellSize = -- Export instance groups from the current loaded zone fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSize = ( + -- Unhide category + unhidelayers() + unhidecategory() + -- Unhide max unhide all @@ -501,6 +515,7 @@ try objXRefMgr.UpdateAllRecords() -- Unhide category + unhidelayers() unhidecategory() DeleteDebugMarkersFn () @@ -648,6 +663,7 @@ try objXRefMgr.UpdateAllRecords() -- Unhide category + unhidelayers() unhidecategory() DeleteDebugMarkersFn () @@ -863,6 +879,7 @@ try objXRefMgr.UpdateAllRecords() -- Unhide category + unhidelayers() unhidecategory() DeleteDebugMarkersFn () diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py b/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py index 4fb464704..cfb46635f 100755 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export pacs_prim -# \date 2013-07-24-14-21-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export pacs_prim @@ -130,6 +130,13 @@ if MaxAvailable: +# Remove bad file from previous script version +listPath = ExportBuildDirectory + "/" + PacsPrimExportDirectory + "/landscape_col_prim_pacs_list.txt" +if os.path.isfile(listPath): + os.remove(listPath) + + + log.close() if os.path.isfile("log.log"): os.remove("log.log") diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms index 750af80d9..d0d7c7ce4 100755 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/rbank/1_export.py b/code/nel/tools/build_gamedata/processes/rbank/1_export.py index 4b5667961..65c14c907 100755 --- a/code/nel/tools/build_gamedata/processes/rbank/1_export.py +++ b/code/nel/tools/build_gamedata/processes/rbank/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export rbank -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export rbank diff --git a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms index 59b444db3..4949f7c60 100755 --- a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms +++ b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms index 5bece0c50..f97419aa7 100755 --- a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms +++ b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -260,6 +270,7 @@ fn runNelMaxExportSub inputMaxFile retryCount = tagThisFile = false -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/skel/1_export.py b/code/nel/tools/build_gamedata/processes/skel/1_export.py index 5f065fe5d..dcf336dbd 100755 --- a/code/nel/tools/build_gamedata/processes/skel/1_export.py +++ b/code/nel/tools/build_gamedata/processes/skel/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export skel -# \date 2011-09-28-07-42-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export skel diff --git a/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms b/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms index 7fd2af0fb..74440350b 100755 --- a/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms +++ b/code/nel/tools/build_gamedata/processes/skel/maxscript/skel_export.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/swt/1_export.py b/code/nel/tools/build_gamedata/processes/swt/1_export.py index 0803f1246..820950fe5 100755 --- a/code/nel/tools/build_gamedata/processes/swt/1_export.py +++ b/code/nel/tools/build_gamedata/processes/swt/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export swt -# \date 2011-09-28-07-42-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export swt diff --git a/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms b/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms index ea6ff95c3..99d684ea3 100755 --- a/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms +++ b/code/nel/tools/build_gamedata/processes/swt/maxscript/swt_export.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( diff --git a/code/nel/tools/build_gamedata/processes/veget/1_export.py b/code/nel/tools/build_gamedata/processes/veget/1_export.py index b2f8a7c57..ae8b835a3 100755 --- a/code/nel/tools/build_gamedata/processes/veget/1_export.py +++ b/code/nel/tools/build_gamedata/processes/veget/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export veget -# \date 2011-09-21-20-51-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export veget diff --git a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms index cbc2f2177..1b8154530 100755 --- a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms +++ b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms @@ -16,6 +16,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( @@ -105,6 +115,7 @@ fn runNelMaxExport inputMaxFile = tagThisFile = true -- Unhide category + unhidelayers() unhidecategory() -- Unhide diff --git a/code/nel/tools/build_gamedata/processes/zone/1_export.py b/code/nel/tools/build_gamedata/processes/zone/1_export.py index 94a90900c..acffe9abb 100755 --- a/code/nel/tools/build_gamedata/processes/zone/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone/1_export.py @@ -6,7 +6,7 @@ # # \file 1_export.py # \brief Export zone -# \date 2011-09-28-07-42-GMT +# \date 2015-01-06-16-31-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export zone diff --git a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms index 3a0ebf8fe..6c4e0c8a0 100755 --- a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms +++ b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms @@ -13,6 +13,16 @@ nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename +-- Unhide layers +fn unhidelayers = +( + for i = 0 to (LayerManager.count - 1) do + ( + layer = (LayerManager.getLayer i) + layer.ishidden = false + ) +) + -- Unhide category fn unhidecategory = ( From dade81e02e52e5b2ee3d196fba89ea6f7b19853b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 13 Jan 2015 13:21:56 +0100 Subject: [PATCH 046/175] Lightmap debug message --HG-- branch : develop --- code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index d6bdbb690..d82e2a394 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp @@ -2144,6 +2144,8 @@ void appendLightmapLog (COFile &outputLog, const char *lightmapName, const vecto bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshBaseBuild *pZeMeshBaseBuild, INode& ZeNode, TimeValue tvTime, uint firstMaterial, bool outputLightmapLog) { + nldebug("Calculate LM: '%s'", ZeNode.GetName()); + DWORD t = timeGetTime(); uint32 i, j; From 704610668d75aabf72f8d4d5f2f2fcb58df31133 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 13 Jan 2015 13:47:19 +0100 Subject: [PATCH 047/175] Changed: Replaced ~0 by corresponding std::numeric_limits::max() --HG-- branch : develop --- code/ryzom/server/src/ai_service/ai.cpp | 4 +- code/ryzom/server/src/ai_service/ai.h | 6 +- .../src/ai_service/ai_generic_fight.cpp | 2 +- .../server/src/ai_service/ai_grp_fauna.cpp | 14 ++-- .../server/src/ai_service/child_container.h | 2 +- code/ryzom/server/src/ai_service/commands.cpp | 2 +- .../server/src/ai_service/continent_inline.h | 2 +- .../server/src/ai_service/family_behavior.h | 2 +- code/ryzom/server/src/ai_service/nf_helpers.h | 2 +- .../server/src/ai_service/path_behaviors.h | 14 ++-- .../server/src/ai_service/state_instance.h | 2 +- .../stat_user_file_list_builders.cpp | 2 +- .../ryzom_welcome_service.cpp | 2 +- .../server_share/logger_service_client.cpp | 4 +- .../server/src/server_share/msg_ai_service.h | 4 +- .../src/server_share/pet_interface_msg.h | 2 +- .../server/src/server_share/r2_vision.cpp | 64 +++++++++---------- .../ryzom/server/src/server_share/r2_vision.h | 8 +-- .../src/server_share/used_continent.cpp | 4 +- .../server/src/server_share/used_continent.h | 4 +- .../shard_unifier_service/character_sync.cpp | 2 +- .../src/tick_service/range_mirror_manager.cpp | 2 +- .../src/tick_service/range_mirror_manager.h | 2 +- .../server/src/tick_service/tick_service.cpp | 6 +- .../server/src/tick_service/tick_service.h | 2 +- .../tools/leveldesign/mp_generator/utils.h | 16 ++--- .../tools/patch_gen/patch_gen_common.cpp | 2 +- .../ai_build_wmap/build_proximity_maps.cpp | 8 +-- .../packed_world_builder.cpp | 2 +- 29 files changed, 94 insertions(+), 94 deletions(-) diff --git a/code/ryzom/server/src/ai_service/ai.cpp b/code/ryzom/server/src/ai_service/ai.cpp index 587e5ac0c..49144fa9d 100644 --- a/code/ryzom/server/src/ai_service/ai.cpp +++ b/code/ryzom/server/src/ai_service/ai.cpp @@ -224,7 +224,7 @@ uint32 CAIS::getEmotNumber(const std::string &name) { std::map::iterator it(_EmotNames.find(name)); if (it==_EmotNames.end()) - return ~0; + return std::numeric_limits::max(); return it->second; } @@ -280,7 +280,7 @@ uint32 CAIS::createAIInstance(const std::string &continentName, uint32 instanceN continue; nlwarning("CAIS::createAIInstance: instance number %u is already in use, can't create new instance.", instanceNumber); - return ~0; + return std::numeric_limits::max(); } CAIInstance *aii = _AIInstances.addChild(new CAIInstance(this)); diff --git a/code/ryzom/server/src/ai_service/ai.h b/code/ryzom/server/src/ai_service/ai.h index 4f9a7d802..57ff524ec 100644 --- a/code/ryzom/server/src/ai_service/ai.h +++ b/code/ryzom/server/src/ai_service/ai.h @@ -104,7 +104,7 @@ public: // classic init(), update() and release() /** create an AI instance, return the instance index in the AIList - * Return ~0 if the instance number is already in use. + * Return std::numeric_limits::max() if the instance number is already in use. */ uint32 createAIInstance(const std::string &continentName, uint32 instanceNumber); /** destroy an AI Instance (useful for ring creation / destruction of session) @@ -205,7 +205,7 @@ public: /// Time warp managment. This method is called when time as warped more than 600ms bool advanceUserTimer(uint32 nbTicks); - /// Retreive emot number given it's name, return ~0 if not found + /// Retreive emot number given it's name, return std::numeric_limits::max() if not found uint32 getEmotNumber(const std::string &name); CCont &AIList () { return _AIInstances; } @@ -243,7 +243,7 @@ public: class CCounter { public: - CCounter(const uint32 max=~0):_Total(0),_Max(max) + CCounter(const uint32 max=std::numeric_limits::max()):_Total(0),_Max(max) {} virtual ~CCounter() {} diff --git a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp index a19f747c3..f4c9a5cb0 100644 --- a/code/ryzom/server/src/ai_service/ai_generic_fight.cpp +++ b/code/ryzom/server/src/ai_service/ai_generic_fight.cpp @@ -571,7 +571,7 @@ bool CFightOrganizer::reorganizeIteration(CBot* bot) ennemy=entity; } } - entity->_ChooseLastTime=~0; + entity->_ChooseLastTime = std::numeric_limits::max(); } if (fleeEnnemy==NULL && !spawnBot->getUnreachableTarget().isNULL()) diff --git a/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp b/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp index 2bab5200d..6cd657ff2 100644 --- a/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp +++ b/code/ryzom/server/src/ai_service/ai_grp_fauna.cpp @@ -220,7 +220,7 @@ void CSpawnGroupFauna::update() getPersistent().updateStateInstance(); - if (_CurrentCycle==~0) + if (_CurrentCycle==std::numeric_limits::max()) return; // Respawn @@ -606,9 +606,9 @@ CGrpFauna::CGrpFauna(CMgrFauna* mgr, CAIAliasDescriptionNode* aliasTree, RYAI_MA // state - _CurPopulation = ~0u; + _CurPopulation = std::numeric_limits::max(); - _CurrentCycle = ~0; + _CurrentCycle = std::numeric_limits::max(); // default values. setTimer(EAT_TIME, refTimer(EAT_TIME)); @@ -699,9 +699,9 @@ CAliasTreeOwner* CGrpFauna::createChild(IAliasCont* cont, CAIAliasDescriptionNod CAIPlaceXYRFauna *faunaPlace = new CAIPlaceXYRFauna(this, aliasTree); child = faunaPlace; uint placeIndex = faunaPlace->setupFromOldName(name); - nlassert(placeIndex!=~0); + nlassert(placeIndex!=std::numeric_limits::max()); - if (placeIndex!=~0) + if (placeIndex!=std::numeric_limits::max()) cont->addAliasChild(child, placeIndex); return child; @@ -769,7 +769,7 @@ bool CGrpFauna::spawn() return false; setStartState(getStartState()); // stateInstance. - return spawnPop(~0); + return spawnPop(std::numeric_limits::max()); } bool CGrpFauna::timeAllowSpawn(uint32 popVersion) const @@ -841,7 +841,7 @@ bool CGrpFauna::spawnPop(uint popVersion) } // check the validity of the input parameter - if (popVersion!=~0 && popVersion>=_Populations.size()) + if (popVersion!=std::numeric_limits::max() && popVersion>=_Populations.size()) { nlwarning("CGrpFauna::spawn(idx) FAILED for group %s because idx (%d) >= _Populations.size() (%d)",this->CGroup::getFullName().c_str(),popVersion,_Populations.size()); return false; diff --git a/code/ryzom/server/src/ai_service/child_container.h b/code/ryzom/server/src/ai_service/child_container.h index ab98d93af..0b5c79c4e 100644 --- a/code/ryzom/server/src/ai_service/child_container.h +++ b/code/ryzom/server/src/ai_service/child_container.h @@ -495,7 +495,7 @@ uint32 CAliasCont::getChildIndexByAlias(uint32 alias) const if (child!=NULL && child->getAlias()==alias) return (uint32)i; } - return ~0; + return std::numeric_limits::max(); } template diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index d257d0492..b51c7615b 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -577,7 +577,7 @@ NLMISC_COMMAND(createStaticAIInstance, "Create a new static AIInstance for a giv CUsedContinent &uc = CUsedContinent::instance(); const uint32 in = uc.getInstanceForContinent(args[0]); - if (in == ~0) + if (in == std::numeric_limits::max()) { nlwarning("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str()); nlassert(in != ~0); diff --git a/code/ryzom/server/src/ai_service/continent_inline.h b/code/ryzom/server/src/ai_service/continent_inline.h index 49c21248e..4ddf09c18 100644 --- a/code/ryzom/server/src/ai_service/continent_inline.h +++ b/code/ryzom/server/src/ai_service/continent_inline.h @@ -695,7 +695,7 @@ static CAIVector randomPos(double dispersionRadius) { return CAIVector(0., 0.); } - uint32 const maxLimit=((uint32)~0U)>>1; + uint32 const maxLimit=(std::numeric_limits::max())>>1; double rval = (double)CAIS::rand32(maxLimit)/(double)maxLimit; // [0-1[ double r = dispersionRadius*sqrt(rval); rval = (double)CAIS::rand32(maxLimit)/(double)maxLimit; // [0-1[ diff --git a/code/ryzom/server/src/ai_service/family_behavior.h b/code/ryzom/server/src/ai_service/family_behavior.h index 893282ae0..52d534e1c 100644 --- a/code/ryzom/server/src/ai_service/family_behavior.h +++ b/code/ryzom/server/src/ai_service/family_behavior.h @@ -210,7 +210,7 @@ class CFamilyBehavior void spawnBoss(NLMISC::TStringId outpostName); - uint32 energyScale (uint32 levelIndex=~0) const; + uint32 energyScale (uint32 levelIndex=std::numeric_limits::max()) const; void setModifier (const float &value, const uint32 &index) { diff --git a/code/ryzom/server/src/ai_service/nf_helpers.h b/code/ryzom/server/src/ai_service/nf_helpers.h index 2b8ead4e6..dc9c7c345 100644 --- a/code/ryzom/server/src/ai_service/nf_helpers.h +++ b/code/ryzom/server/src/ai_service/nf_helpers.h @@ -161,7 +161,7 @@ public: if (_value==-1) // not for affectation. return; - if (_index==~0) // all indexs ? + if (_index==std::numeric_limits::max()) // all indexs ? { for (uint32 nrjIndex=0;nrjIndex<4;nrjIndex++) fb->setModifier (_value, nrjIndex); diff --git a/code/ryzom/server/src/ai_service/path_behaviors.h b/code/ryzom/server/src/ai_service/path_behaviors.h index 8c509ae9d..6684b2db3 100644 --- a/code/ryzom/server/src/ai_service/path_behaviors.h +++ b/code/ryzom/server/src/ai_service/path_behaviors.h @@ -168,11 +168,11 @@ public: // - This method adds the new object to the top of the CFollowPath singleton's context stack // parameters: // - contextName : an arbitrary string naming the context - // - maxSearchDepth : the value that the path finder search depth should be limitted to (default to ~0u meaning no limit) + // - maxSearchDepth : the value that the path finder search depth should be limitted to (default to std::numeric_limits::max() meaning no limit) // - forceMaxDepth : set this flag true to override previous limit with larger value // example: - // - ... Before we begin ... CFollowPath::_MaxSearchDepth = ~0u - // - CFollowPathContext context1("tata") : CFollowPath::_MaxSearchDepth => ~0u + // - ... Before we begin ... CFollowPath::_MaxSearchDepth = std::numeric_limits::max() + // - CFollowPathContext context1("tata") : CFollowPath::_MaxSearchDepth => std::numeric_limits::max() // - CFollowPathContext context2("tete",456) : CFollowPath::_MaxSearchDepth => 456 // - CFollowPathContext context3("titi",123) : CFollowPath::_MaxSearchDepth => 123 // - CFollowPathContext context4("toto",456) : CFollowPath::_MaxSearchDepth => 123 @@ -182,9 +182,9 @@ public: // - CFollowPathContext context5.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => 123 // - CFollowPathContext context4.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => 123 // - CFollowPathContext context3.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => 456 - // - CFollowPathContext context2.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => ~0u - // - CFollowPathContext context1.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => ~0u - CFollowPathContext(const char* contextName, uint32 maxSearchDepth=~0u, bool forceMaxDepth=false); + // - CFollowPathContext context2.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => std::numeric_limits::max() + // - CFollowPathContext context1.~CFollowPathContext() : CFollowPath::_MaxSearchDepth => std::numeric_limits::max() + CFollowPathContext(const char* contextName, uint32 maxSearchDepth=std::numeric_limits::max(), bool forceMaxDepth=false); // dtor // - This method removes the destroyed object from the CFollowPath singleton's context stack @@ -270,7 +270,7 @@ private: friend class CFollowPathContext; CFollowPathContext* _TopFollowPathContext; public: - uint32 getMaxSearchDepth() const { return (_TopFollowPathContext==NULL)? ~0u: _TopFollowPathContext->getMaxSearchDepth(); } + uint32 getMaxSearchDepth() const { return (_TopFollowPathContext==NULL)? std::numeric_limits::max(): _TopFollowPathContext->getMaxSearchDepth(); } const char* getContextName() const; }; diff --git a/code/ryzom/server/src/ai_service/state_instance.h b/code/ryzom/server/src/ai_service/state_instance.h index 94755c143..3ad6e6d55 100644 --- a/code/ryzom/server/src/ai_service/state_instance.h +++ b/code/ryzom/server/src/ai_service/state_instance.h @@ -185,7 +185,7 @@ protected: CAITimerExtended _StateTimeout; /// current state (index into manager's state vector) CAIState* _state; - /// variable set to request a state change (~0 otherwise) + /// variable set to request a state change (std::numeric_limits::max() otherwise) CAIState* _NextState; /// timer for timing punctual states diff --git a/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp b/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp index 8f4f1e07f..d5d6570a4 100644 --- a/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp +++ b/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp @@ -522,7 +522,7 @@ FILE_LIST_BUILDER(NewestFile,"remove all but the latest file for each account (a uint32 accountId= accountIds[i]; uint32& bestTime= bestTimes[accountId]; uint32 timeStamp= fdc[i].FileTimeStamp; - if (bestTime!=timeStamp || bestTime==~0u) + if (bestTime!=timeStamp || bestTime==std::numeric_limits::max()) { fdc.removeFile(i); continue; diff --git a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp index 1656f34c1..98ae3a893 100644 --- a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp +++ b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp @@ -912,7 +912,7 @@ void cbLSChooseShard (CMessage &msgin, const std::string &serviceName, TServiceI } - string ret = lsChooseShard(userName, cookie, userPriv, userExtended, WS::TUserRole::ur_player, 0xffffffff, ~0); + string ret = lsChooseShard(userName, cookie, userPriv, userExtended, WS::TUserRole::ur_player, 0xffffffff, std::numeric_limits::max()); if (!ret.empty()) { diff --git a/code/ryzom/server/src/server_share/logger_service_client.cpp b/code/ryzom/server/src/server_share/logger_service_client.cpp index e8174e0cd..d94834d12 100644 --- a/code/ryzom/server/src/server_share/logger_service_client.cpp +++ b/code/ryzom/server/src/server_share/logger_service_client.cpp @@ -238,8 +238,8 @@ namespace LGS // create the log context closing _LogInfos.push_back(TLogInfo()); _LogInfos.back().setLogName(contextName); - // tag as 'closing' with ~0 - _LogInfos.back().setTimeStamp(~0); + // tag as 'closing' with std::numeric_limits::max() + _LogInfos.back().setTimeStamp(std::numeric_limits::max()); } --_NbOpenContext; if (VerboseLogger) diff --git a/code/ryzom/server/src/server_share/msg_ai_service.h b/code/ryzom/server/src/server_share/msg_ai_service.h index bd4115f4a..13c6a3423 100644 --- a/code/ryzom/server/src/server_share/msg_ai_service.h +++ b/code/ryzom/server/src/server_share/msg_ai_service.h @@ -88,7 +88,7 @@ public: virtual void description () { className ("CUserEventMsg"); - property ("InstanceNumber", PropUInt32, uint32(~0), InstanceNumber); + property ("InstanceNumber", PropUInt32, std::numeric_limits::max(), InstanceNumber); property ("GrpAlias", PropUInt32, uint32(0xffffffff), GrpAlias); property ("EventId", PropUInt8, uint8(0xff), EventId); propertyCont ("Params", PropString, Params); @@ -133,7 +133,7 @@ public: virtual void description () { className ("CSetEscortTeamId"); - property ("InstanceNumber", PropUInt32, uint32(~0), InstanceNumber); + property ("InstanceNumber", PropUInt32, std::numeric_limits::max(), InstanceNumber); propertyCont ("Groups", PropUInt32, Groups); property ("TeamId", PropUInt16, CTEAM::InvalidTeamId, TeamId); } diff --git a/code/ryzom/server/src/server_share/pet_interface_msg.h b/code/ryzom/server/src/server_share/pet_interface_msg.h index d2f9e64a2..9aa914226 100644 --- a/code/ryzom/server/src/server_share/pet_interface_msg.h +++ b/code/ryzom/server/src/server_share/pet_interface_msg.h @@ -47,7 +47,7 @@ public: virtual void description () { className ("CPetSpawnMsg"); - property ("AIInstanceId", PropUInt32, (uint32)~0, AIInstanceId); + property ("AIInstanceId", PropUInt32, std::numeric_limits::max(), AIInstanceId); property ("SpawnMode", PropUInt16, (uint16)NEAR_PLAYER, SpawnMode); property ("CharacterMirrorRow", PropDataSetRow, TDataSetRow(), CharacterMirrorRow); property ("PetSheetId", PropSheetId, NLMISC::CSheetId::Unknown, PetSheetId); diff --git a/code/ryzom/server/src/server_share/r2_vision.cpp b/code/ryzom/server/src/server_share/r2_vision.cpp index 7433e9026..dd4b2a25d 100644 --- a/code/ryzom/server/src/server_share/r2_vision.cpp +++ b/code/ryzom/server/src/server_share/r2_vision.cpp @@ -147,8 +147,8 @@ namespace R2_VISION void CUniverse::createInstance(uint32 aiInstance, uint32 groupId) { - // just ignore attempts to create the ~0u instance - if (aiInstance==~0u) + // just ignore attempts to create the std::numeric_limits::max() instance + if (aiInstance==std::numeric_limits::max()) { return; } @@ -172,8 +172,8 @@ namespace R2_VISION void CUniverse::removeInstance(uint32 aiInstance) { - // just ignore attempts to remove the ~0u instance - if (aiInstance==~0u) + // just ignore attempts to remove the std::numeric_limits::max() instance + if (aiInstance==std::numeric_limits::max()) { return; } @@ -227,7 +227,7 @@ namespace R2_VISION SUniverseEntity& theEntity= _Entities[row]; // if the entity was already allocated then remove it - if (theEntity.AIInstance == ~0u) { return; } + if (theEntity.AIInstance == std::numeric_limits::max()) { return; } if ( theEntity.ViewerRecord) { @@ -325,8 +325,8 @@ namespace R2_VISION BOMB_IF(row>=_Entities.size(),NLMISC::toString("Ignoring attempt to set entity position with invalid row value: %d",row),return); // ensure that the new AIInstance exists - BOMB_IF(aiInstance!=~0u && (aiInstance>=_Instances.size() || _Instances[aiInstance]==NULL), - NLMISC::toString("ERROR: Failed to add entity %d to un-initialised instance: %d",row,aiInstance),aiInstance=~0u); + BOMB_IF(aiInstance!=std::numeric_limits::max() && (aiInstance>=_Instances.size() || _Instances[aiInstance]==NULL), + NLMISC::toString("ERROR: Failed to add entity %d to un-initialised instance: %d",row,aiInstance),aiInstance=std::numeric_limits::max()); // delegate to workhorse routine (converting y coordinate to +ve axis) _teleportEntity(dataSetRow,aiInstance,x,-y,invisibilityLevel); @@ -429,7 +429,7 @@ namespace R2_VISION SUniverseEntity& theEntity= _Entities[row]; // if the entity was already allocated then remove it - if (theEntity.AIInstance!=~0u) + if (theEntity.AIInstance!=std::numeric_limits::max()) { _removeEntity(dataSetRow); } @@ -455,7 +455,7 @@ namespace R2_VISION { // detach the entity from the instance it's currently in _Instances[theEntity.AIInstance]->removeEntity(theEntity); - theEntity.AIInstance= ~0u; + theEntity.AIInstance= std::numeric_limits::max(); theEntity.ViewerRecord= NULL; } } @@ -466,8 +466,8 @@ namespace R2_VISION SUniverseEntity& theEntity= _Entities[dataSetRow.getIndex()]; #ifdef NL_DEBUG - nlassert(theEntity.AIInstance==~0u || theEntity.AIInstance<_Instances.size()); - nlassert(theEntity.AIInstance==~0u || _Instances[theEntity.AIInstance]!=NULL); + nlassert(theEntity.AIInstance==std::numeric_limits::max() || theEntity.AIInstance<_Instances.size()); + nlassert(theEntity.AIInstance==std::numeric_limits::max() || _Instances[theEntity.AIInstance]!=NULL); #endif // if the entity is a viewer then move the view coordinates @@ -477,7 +477,7 @@ namespace R2_VISION } // if the entity is not currently in an AIInstance then stop here - if (theEntity.AIInstance==~0u) + if (theEntity.AIInstance==std::numeric_limits::max()) return; // set the instance entity record position @@ -498,10 +498,10 @@ namespace R2_VISION // set the new AIInstance value for the entity theEntity.AIInstance= aiInstance; - // if the aiInstance is set to ~0u (a reserved value) then we stop here - if (aiInstance==~0u) + // if the aiInstance is set to std::numeric_limits::max() (a reserved value) then we stop here + if (aiInstance==std::numeric_limits::max()) { - // clear out the vision for an entity in aiInstance ~0u + // clear out the vision for an entity in aiInstance std::numeric_limits::max() if (getEntity(dataSetRow)->ViewerRecord!=NULL) { TVision emptyVision(2); @@ -785,7 +785,7 @@ namespace R2_VISION // locate the old vision group (the one we're allocated to before isolation) uint32 visionId= viewerRecord->VisionId; NLMISC::CSmartPtr& oldVisionGroup= _VisionGroups[visionId]; - BOMB_IF(visionId>=_VisionGroups.size() ||oldVisionGroup==NULL,"Trying to remove entity from vision group with unknown vision id",viewerRecord->VisionId=~0u;return); + BOMB_IF(visionId>=_VisionGroups.size() ||oldVisionGroup==NULL,"Trying to remove entity from vision group with unknown vision id",viewerRecord->VisionId=std::numeric_limits::max();return); // if we're the only viewer then already isolated so just return if (oldVisionGroup->numViewers()==1) @@ -830,7 +830,7 @@ namespace R2_VISION if (viewerRecord!=NULL) { uint32 visionId= viewerRecord->VisionId; - BOMB_IF(visionId>=_VisionGroups.size() ||_VisionGroups[visionId]==NULL,"Trying to remove entity with unknown vision id",viewerRecord->VisionId=~0u;return); + BOMB_IF(visionId>=_VisionGroups.size() ||_VisionGroups[visionId]==NULL,"Trying to remove entity with unknown vision id",viewerRecord->VisionId=std::numeric_limits::max();return); _VisionGroups[visionId]->removeViewer(viewerRecord); } @@ -847,8 +847,8 @@ namespace R2_VISION _Entities.pop_back(); // invalidate the InstanceIndex value for the entity we just removed - entity.InstanceIndex=~0u; - entity.AIInstance=~0u; + entity.InstanceIndex=std::numeric_limits::max(); + entity.AIInstance=std::numeric_limits::max(); } void CInstance::release() @@ -899,11 +899,11 @@ namespace R2_VISION CVisionGroup::CVisionGroup() { - _XMin=~0u; + _XMin=std::numeric_limits::max(); _XMax=0; - _YMin=~0u; + _YMin=std::numeric_limits::max(); _YMax=0; - _VisionId=~0u; + _VisionId=std::numeric_limits::max(); // setup the dummy entry in the vision buffer _Vision.reserve(AllocatedVisionVectorSize); vectAppend(_Vision).DataSetRow= ZeroDataSetRow; @@ -923,8 +923,8 @@ namespace R2_VISION // ensure that the viewer wasn't aleady attached to another vision group #ifdef NL_DEBUG nlassert(viewer!=NULL); - nlassert(viewer->VisionId==~0u); - nlassert(viewer->VisionIndex==~0u); + nlassert(viewer->VisionId==std::numeric_limits::max()); + nlassert(viewer->VisionIndex==std::numeric_limits::max()); #endif TEST(("add viewer %d to grp %d",viewer->getViewerId().getIndex(),_VisionId)); @@ -961,8 +961,8 @@ namespace R2_VISION // pop the back entry off the vector and flag oursleves as unused _Viewers.pop_back(); - viewer->VisionId= ~0u; - viewer->VisionIndex= ~0u; + viewer->VisionId= std::numeric_limits::max(); + viewer->VisionIndex= std::numeric_limits::max(); // NOTE: after this the boundary may be out of date - this will be recalculated at the next // vision update so we don't take time to do it here @@ -1171,8 +1171,8 @@ namespace R2_VISION return; // calculate the bouding box for our viewers - uint32 xmin= ~0u; - uint32 ymin= ~0u; + uint32 xmin= std::numeric_limits::max(); + uint32 ymin= std::numeric_limits::max(); uint32 xmax= 0; uint32 ymax= 0; for (uint32 i=(uint32)_Viewers.size();i--;) @@ -1247,7 +1247,7 @@ namespace R2_VISION // reset the vision vector and add in the dummy entry with DataSetRow=0 _Vision.resize(AllocatedVisionVectorSize); _Vision[0].DataSetRow= ZeroDataSetRow; - _Vision[0].VisionSlot= ~0u; + _Vision[0].VisionSlot= std::numeric_limits::max(); // setup a vision slot iterator for filling in the vision buffer (=1 to skip passed the dummy entry) uint32 nextVisionSlot=1; @@ -1380,8 +1380,8 @@ namespace R2_VISION CViewer::CViewer() { - VisionId=~0u; - VisionIndex=~0u; + VisionId=std::numeric_limits::max(); + VisionIndex=std::numeric_limits::max(); _VisionResetCount= 0; } @@ -1399,7 +1399,7 @@ namespace R2_VISION // setup the dummy entry with DataSetRow=0 _Vision[0].DataSetRow= ZeroDataSetRow; - _Vision[0].VisionSlot= ~0u; + _Vision[0].VisionSlot= std::numeric_limits::max(); // setup the vision slots in reverse order from 254..0 (because they're popped from the back) _FreeVisionSlots.clear(); diff --git a/code/ryzom/server/src/server_share/r2_vision.h b/code/ryzom/server/src/server_share/r2_vision.h index 9bf3f7689..9872e606a 100644 --- a/code/ryzom/server/src/server_share/r2_vision.h +++ b/code/ryzom/server/src/server_share/r2_vision.h @@ -140,7 +140,7 @@ namespace R2_VISION // ctor SViewedEntity() { - VisionSlot=~0u; + VisionSlot=std::numeric_limits::max(); } }; @@ -196,15 +196,15 @@ namespace R2_VISION struct SUniverseEntity { TDataSetRow DataSetRow; // the complete data set row for the entity - uint32 AIInstance; // the id of the instance that we're currently in (~0u by default) + uint32 AIInstance; // the id of the instance that we're currently in (std::numeric_limits::max() by default) mutable uint32 InstanceIndex; // the index within the instance's _Entities vector NLMISC::CSmartPtr ViewerRecord; // pointer to the CViewer record for viewers (or NULL) // ctor SUniverseEntity() { - AIInstance=~0u; - InstanceIndex=~0u; + AIInstance=std::numeric_limits::max(); + InstanceIndex=std::numeric_limits::max(); } }; diff --git a/code/ryzom/server/src/server_share/used_continent.cpp b/code/ryzom/server/src/server_share/used_continent.cpp index 01ab2beda..075f16c14 100644 --- a/code/ryzom/server/src/server_share/used_continent.cpp +++ b/code/ryzom/server/src/server_share/used_continent.cpp @@ -105,7 +105,7 @@ uint32 CUsedContinent::getInstanceForContinent(const std::string &continentName) if (it != _Continents.end()) return it->ContinentInstance; else - return ~0; + return std::numeric_limits::max(); } uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEnum) const @@ -115,7 +115,7 @@ uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEn if (it != _Continents.end()) return it->ContinentInstance; else - return ~0; + return std::numeric_limits::max(); } const std::string &CUsedContinent::getContinentForInstance(uint32 instanceNumber) const diff --git a/code/ryzom/server/src/server_share/used_continent.h b/code/ryzom/server/src/server_share/used_continent.h index 150b6342c..85f002e40 100644 --- a/code/ryzom/server/src/server_share/used_continent.h +++ b/code/ryzom/server/src/server_share/used_continent.h @@ -60,12 +60,12 @@ public: bool isContinentUsed(const std::string &continentName) const; /** Return the static instance number associated with a continent name. - * If the continent name is unknow, return ~0 + * If the continent name is unknow, return std::numeric_limits::max() */ uint32 getInstanceForContinent(const std::string &continentName) const; /** Return the static instance number associated with a continent enum value - * If the continent name is unknow, return ~0 + * If the continent name is unknow, return std::numeric_limits::max() */ uint32 getInstanceForContinent(CONTINENT::TContinent continentEnum) const; diff --git a/code/ryzom/server/src/shard_unifier_service/character_sync.cpp b/code/ryzom/server/src/shard_unifier_service/character_sync.cpp index 3b1a8b995..29b404567 100644 --- a/code/ryzom/server/src/shard_unifier_service/character_sync.cpp +++ b/code/ryzom/server/src/shard_unifier_service/character_sync.cpp @@ -365,7 +365,7 @@ namespace CHARSYNC for (; first != last; ++first) { // default to no limit - uint32 limit=~0u; + uint32 limit=std::numeric_limits::max(); // if there's a limit in the limis map then use it instead... if (limitsMap.find(first->first)!=limitsMap.end()) diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp index f988ac054..2c92c738f 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp @@ -472,7 +472,7 @@ void CRangeList::acquireFirstRow() */ bool CRangeList::acquireRange( NLNET::TServiceId ownerServiceId, NLNET::TServiceId mirrorServiceId, sint32 nbRows, TDataSetIndex *first, TDataSetIndex *last ) { - TDataSetIndex prevlast(~0); + TDataSetIndex prevlast(std::numeric_limits::max()); TRangeList::iterator irl = _RangeList.begin(); // Find a compatible range diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.h b/code/ryzom/server/src/tick_service/range_mirror_manager.h index 6615a1c6a..0bde600e4 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.h +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.h @@ -46,7 +46,7 @@ class CRangeList public: /// Default constructor - CRangeList() : _TotalMaxRows(~0) { acquireFirstRow(); } + CRangeList() : _TotalMaxRows(std::numeric_limits::max()) { acquireFirstRow(); } /// Constructor CRangeList( sint32 totalMaxRows ) : _TotalMaxRows( totalMaxRows ) { acquireFirstRow(); } diff --git a/code/ryzom/server/src/tick_service/tick_service.cpp b/code/ryzom/server/src/tick_service/tick_service.cpp index 95f609571..4a64fdd7c 100644 --- a/code/ryzom/server/src/tick_service/tick_service.cpp +++ b/code/ryzom/server/src/tick_service/tick_service.cpp @@ -825,7 +825,7 @@ bool CTickService::loadGameCycle() /* * */ -CTickServiceGameCycleTimeMeasure::CTickServiceGameCycleTimeMeasure() : HistoryMain( CTickService::getInstance()->getServiceId(), NLNET::TServiceId(~0), false ) {} +CTickServiceGameCycleTimeMeasure::CTickServiceGameCycleTimeMeasure() : HistoryMain( CTickService::getInstance()->getServiceId(), NLNET::TServiceId(std::numeric_limits::max()), false ) {} /* @@ -904,7 +904,7 @@ void CTickServiceGameCycleTimeMeasure::displayStat( NLMISC::CLog *log, TTimeMeas uint divideBy = (HistoryMain.NbMeasures==0) ? 0 : ((stat==MHTSum) ? HistoryMain.NbMeasures : 1); HistoryMain.Stats[stat].displayStat( log, TickServiceTimeMeasureTypeToCString, divideBy ); { - CMirrorTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, ~0, 0 }; + CMirrorTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, std::numeric_limits::max(), 0 }; for ( std::vector::const_iterator ihm=HistoryByMirror.begin(); ihm!=HistoryByMirror.end(); ++ihm ) { log->displayRawNL( "\tMS-%hu, %u measures:", (*ihm).ServiceId.get(), (*ihm).NbMeasures ); @@ -921,7 +921,7 @@ void CTickServiceGameCycleTimeMeasure::displayStat( NLMISC::CLog *log, TTimeMeas } } { - CServiceTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, ~0, 0 }; + CServiceTimeMeasure gatheredStats [NbTimeMeasureHistoryStats] = { 0, std::numeric_limits::max(), 0 }; for ( std::vector::const_iterator ihs=HistoryByService.begin(); ihs!=HistoryByService.end(); ++ihs ) { log->displayRawNL( "\t%s (on MS-%hu), %u measures:", CUnifiedNetwork::getInstance()->getServiceUnifiedName( (*ihs).ServiceId ).c_str(), (*ihs).ParentServiceId.get(), (*ihs).NbMeasures ); diff --git a/code/ryzom/server/src/tick_service/tick_service.h b/code/ryzom/server/src/tick_service/tick_service.h index 5b07793a3..9abe079bc 100644 --- a/code/ryzom/server/src/tick_service/tick_service.h +++ b/code/ryzom/server/src/tick_service/tick_service.h @@ -113,7 +113,7 @@ public: NbMeasures = 0; Stats.resize( NbTimeMeasureHistoryStats ); Stats[MHTSum] = 0; - Stats[MHTMin] = ~0; + Stats[MHTMin] = std::numeric_limits::max(); Stats[MHTMax] = 0; } } diff --git a/code/ryzom/tools/leveldesign/mp_generator/utils.h b/code/ryzom/tools/leveldesign/mp_generator/utils.h index 63148f61f..01bb25fe7 100644 --- a/code/ryzom/tools/leveldesign/mp_generator/utils.h +++ b/code/ryzom/tools/leveldesign/mp_generator/utils.h @@ -55,17 +55,17 @@ public: * Display the item as a row of a HTML table. * If (key!=previousKey) and (name==previousName), the row will not be displayed entirely to save space * - * \param keyColumn If not ~0, column used for sorting => this column displays only the field matching the key + * \param keyColumn If not std::numeric_limits::max(), column used for sorting => this column displays only the field matching the key * \param key The key used for sorting (see keyColumn) * \param previousKey Previous key - * \param nameColumn If not ~0, column used for the unique name (column must have exaclty one element) + * \param nameColumn If not std::numeric_limits::max(), column used for the unique name (column must have exaclty one element) * \param previousName Previous name */ - std::string toHTMLRow( uint32 keyColumn=~0, const string& key=string(), const string& previousKey=string(), - uint32 nameColumn=~0, const string& previousName=string() ) const + std::string toHTMLRow( uint32 keyColumn=std::numeric_limits::max(), const string& key=string(), const string& previousKey=string(), + uint32 nameColumn=std::numeric_limits::max(), const string& previousName=string() ) const { std::string s = ""; - bool lightMode = (nameColumn == ~0) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); + bool lightMode = (nameColumn == std::numeric_limits::max()) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); for ( uint32 c=0; c!=NC; ++c ) { s += ""; @@ -86,11 +86,11 @@ public: /// - std::string toCSVLine( char columnSeparator=',', string internalSeparator=" - ", uint32 keyColumn=~0, const string& key=string(), const string& previousKey=string(), - uint32 nameColumn=~0, const string& previousName=string() ) const + std::string toCSVLine( char columnSeparator=',', string internalSeparator=" - ", uint32 keyColumn=std::numeric_limits::max(), const string& key=string(), const string& previousKey=string(), + uint32 nameColumn=std::numeric_limits::max(), const string& previousName=string() ) const { std::string s; - bool lightMode = (nameColumn == ~0) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); + bool lightMode = (nameColumn == std::numeric_limits::max()) ? false : ((key != previousKey) && (Fields[nameColumn][0] == previousName)); for ( uint32 c=0; c!=NC; ++c ) { if ( c == keyColumn ) diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index 3d28a2439..7f63177ac 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -149,7 +149,7 @@ CPackageDescription::CPackageDescription() void CPackageDescription::clear() { - _NextVersionNumber= ~0u; + _NextVersionNumber= std::numeric_limits::max(); _VersionNumberReserved = false; _Categories.clear(); _IndexFileName.clear(); diff --git a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp index a15f8c6d3..f194f996e 100644 --- a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp +++ b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp @@ -237,8 +237,8 @@ CProximityZone::CProximityZone(uint32 scanWidth,uint32 scanHeight,sint32 xOffset _MaxOffset = scanWidth * scanHeight -1; - _XMin = ~0u; - _YMin = ~0u; + _XMin = std::numeric_limits::max(); + _YMin = std::numeric_limits::max(); _XMax = 0; _YMax = 0; } @@ -386,7 +386,7 @@ void CProximityMapBuffer::load(const std::string& name) } } // setup the next pixel in the output buffers... - _Buffer[y*_ScanWidth+x]= (isAccessible? 0: (TBufferEntry)~0u); + _Buffer[y*_ScanWidth+x]= (isAccessible? 0: (TBufferEntry)std::numeric_limits::max()); } } } @@ -471,7 +471,7 @@ void CProximityMapBuffer::_prepareBufferForZoneProximityMap(const CProximityZone uint32 zoneWidth= zone.getZoneWidth(); uint32 zoneHeight= zone.getZoneHeight(); zoneBuffer.clear(); - zoneBuffer.resize(zoneWidth*zoneHeight,(TBufferEntry)~0u); + zoneBuffer.resize(zoneWidth*zoneHeight,(TBufferEntry)std::numeric_limits::max()); // setup the buffer's accessible points and prime vects[0] with the set of accessible points in the zone buffer for (uint32 i=0;i &islands, float camSpeed texturedMaterial.setDoubleSided(true); texturedMaterial.setZFunc(CMaterial::lessequal); // - uint currWorldIndex = ~0; + uint currWorldIndex = std::numeric_limits::max(); bool newPosWanted = true; // std::vector zones; From 303f7d2e790c19a5f571fb938c3aa7130d78ae8a Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 13 Jan 2015 14:11:07 +0100 Subject: [PATCH 048/175] Changed: Minor changes --HG-- branch : develop --- code/nel/include/nel/net/service.h | 10 +-- code/nel/src/3d/landscape.cpp | 1 - code/nel/src/3d/landscapevb_allocator.cpp | 1 - code/ryzom/client/src/CMakeLists.txt | 1 - code/ryzom/client/src/commands.cpp | 1 - code/ryzom/client/src/connection.cpp | 2 +- code/ryzom/client/src/init.cpp | 3 +- .../src/interface_v3/action_handler_item.cpp | 23 ++++--- .../interface_v3/bot_chat_page_mission.cpp | 1 - .../src/interface_v3/bot_chat_page_trade.cpp | 3 - .../client/src/interface_v3/chat_window.cpp | 2 +- .../client/src/interface_v3/dbctrl_sheet.cpp | 1 - .../dbgroup_list_sheet_text_share.cpp | 1 - .../interface_v3/dbgroup_list_sheet_trade.cpp | 1 - .../client/src/interface_v3/skill_manager.cpp | 2 - .../client/src/interface_v3/view_radar.cpp | 2 +- code/ryzom/client/src/misc.h | 1 + code/ryzom/client/src/player_cl.cpp | 2 +- code/ryzom/client/src/r2/editor.cpp | 4 +- code/ryzom/client/src/time_client.h | 2 +- .../server/src/ai_service/ai_bot_npc.cpp | 4 +- .../src/ai_service/generic_logic_action.cpp | 4 +- .../entities_game_service/dyn_chat_egs.cpp | 2 +- .../pvp_manager/pvp_manager_2.cpp | 7 ++- .../shop_type/character_shopping_list.cpp | 6 +- .../georges_editor_qt/src/configuration.cpp | 25 +++++--- .../georges_editor_qt/src/formdelegate.cpp | 3 +- .../src/georges_treeview_dialog.cpp | 3 +- .../src/georgesform_model.cpp | 62 +++++++++++-------- .../georges_editor_qt/src/main_window.cpp | 3 +- .../georges_editor_qt/src/new_dialog.cpp | 3 +- .../src/objectviewer_dialog.cpp | 6 +- .../georges_editor_qt/src/qt_displayer.cpp | 37 ++++++----- .../world_editor/land_export_lib/export.cpp | 4 +- code/ryzom/tools/translation_tools/main.cpp | 15 ++--- 35 files changed, 132 insertions(+), 116 deletions(-) diff --git a/code/nel/include/nel/net/service.h b/code/nel/include/nel/net/service.h index c74688799..8c7a52c63 100644 --- a/code/nel/include/nel/net/service.h +++ b/code/nel/include/nel/net/service.h @@ -218,13 +218,13 @@ public: static bool isServiceInitialized() { return _Instance != NULL; } /// Returns the current service short name (ie: TS) - const std::string &getServiceShortName () const { return _ShortName; }; + const std::string &getServiceShortName () const { return _ShortName; } /// Returns the current service long name (ie: test_serivce) - const std::string &getServiceLongName () const { return _LongName; }; + const std::string &getServiceLongName () const { return _LongName; } /// Returns the current service alias name setted by AES - const std::string &getServiceAliasName () const { return _AliasName; }; + const std::string &getServiceAliasName () const { return _AliasName; } /// Returns the current service unified name that is alias/short-id or short-id if alias is empty std::string getServiceUnifiedName () const; @@ -242,10 +242,10 @@ public: uint32 getLaunchingDate () const; /// Return true if this service don't use the NS (naming service) - bool getDontUseNS() const { return _DontUseNS; }; + bool getDontUseNS() const { return _DontUseNS; } /// Return true if this service don't use the AES (admin executor service) - bool getDontUseAES() const { return _DontUseAES; }; + bool getDontUseAES() const { return _DontUseAES; } /// Returns arguments of the program pass from the user to the program using parameters (ie: "myprog param1 param2") const NLMISC::CVectorSString &getArgs () const { return _Args; } diff --git a/code/nel/src/3d/landscape.cpp b/code/nel/src/3d/landscape.cpp index 154f6f847..ccdeabc34 100644 --- a/code/nel/src/3d/landscape.cpp +++ b/code/nel/src/3d/landscape.cpp @@ -583,7 +583,6 @@ void CLandscape::setDriver(IDriver *drv) // Does the driver has sufficient requirements for Vegetable??? // only if VP supported by GPU, and Only if max vertices allowed. _DriverOkForVegetable = _VertexShaderOk && (_Driver->getMaxVerticesByVertexBufferHard()>=(uint)NL3D_LANDSCAPE_VEGETABLE_MAX_AGP_VERTEX_MAX); - } } diff --git a/code/nel/src/3d/landscapevb_allocator.cpp b/code/nel/src/3d/landscapevb_allocator.cpp index 2c30cc19b..51714b88d 100644 --- a/code/nel/src/3d/landscapevb_allocator.cpp +++ b/code/nel/src/3d/landscapevb_allocator.cpp @@ -611,7 +611,6 @@ void CLandscapeVBAllocator::setupVBFormatAndVertexProgram(bool withVertexProgr nlverify(_Driver->compileVertexProgram(_VertexProgram[1])); } } - } diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index d06af95c8..a2f89420b 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -1,4 +1,3 @@ - # Need clientsheets lib for sheets packer tool ADD_SUBDIRECTORY(client_sheets) diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index ad8a328ba..90287955d 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -3890,7 +3890,6 @@ NLMISC_COMMAND(displayInventoryCounter, "display the Inventory counter to compar NLMISC_COMMAND(displayActionCounter, "display the action counters", "") { - CInterfaceManager *pIM= CInterfaceManager::getInstance(); CSPhraseManager *pPM= CSPhraseManager::getInstance(); diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 8b07cc7f2..92ecff0ac 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -31,7 +31,7 @@ // 3D Interface. #include "nel/3d/u_driver.h" #include "nel/3d/u_text_context.h" -#include +#include "nel/3d/stereo_display.h" // Game Share //#include "game_share/gd_time.h" // \todo GUIGUI : TO DELETE/CHANGE #include "game_share/gender.h" diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index c6b74ebd2..ed7943b8f 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -788,7 +788,7 @@ void prelogInit() #ifdef NL_OS_WINDOWS _control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM); #endif // NL_OS_WINDOWS - + CTime::CTimerInfo timerInfo; NLMISC::CTime::probeTimerInfo(timerInfo); if (timerInfo.RequiresSingleCore) // TODO: Also have a FV configuration value to force single core. @@ -930,7 +930,6 @@ void prelogInit() switch(ClientCfg.Driver3D) { #ifdef NL_OS_WINDOWS - case CClientConfig::Direct3D: driver = UDriver::Direct3d; break; diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp index 24f59cecc..f6dec2d1f 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -815,7 +815,6 @@ public: CurrentStackDst= NULL; validateStackItem(pCSSrc, pCSDst, val, CurrentStackMode); } - }; REGISTER_ACTION_HANDLER( CHandlerStackOk, "stack_item"); @@ -826,17 +825,17 @@ class CPlayerTradePutBagItemToExchange : public IActionHandler public: virtual void execute (CCtrlBase *pCaller, const string &/* Params */) { - CInterfaceManager *im = CInterfaceManager::getInstance(); - CDBCtrlSheet *src = dynamic_cast(pCaller); - CDBCtrlSheet *dest = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); - if (src->getSheetId() == 0) - { - putExchangedItemToInventory(dest); - } - else - { - putInventoryItemToExchange(src, dest); - } + CInterfaceManager *im = CInterfaceManager::getInstance(); + CDBCtrlSheet *src = dynamic_cast(pCaller); + CDBCtrlSheet *dest = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + if (src->getSheetId() == 0) + { + putExchangedItemToInventory(dest); + } + else + { + putInventoryItemToExchange(src, dest); + } } }; REGISTER_ACTION_HANDLER(CPlayerTradePutBagItemToExchange, "put_bag_item_to_exchange"); diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp index bb16353f5..caa90cdda 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp @@ -53,7 +53,6 @@ void CBotChatPageMission::init() NLGUI::CDBManager::getInstance()->addBranchObserver("SERVER:CHOOSE_MISSIONS", &_MissionPagesObs); } - // *************************************************************************************** void CBotChatPageMission::begin() { diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index 17aaead48..966a3886a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -1808,7 +1808,6 @@ void CBotChatPageTrade::giveFocusToMaxEBChangeBuyFilterDialog() setFocusOnEditBox(ig->getGroup("edit_max:eb")); } - // *************************************************************************** void CBotChatPageTrade::startChangeBuyFilterMPDialog() { @@ -1822,7 +1821,6 @@ void CBotChatPageTrade::startChangeBuyFilterMPDialog() CWidgetManager::getInstance()->enableModalWindow(NULL, ig); } - // *************************************************************************** void CBotChatPageTrade::confirmChangeBuyFilterMPDialog(uint ft) { @@ -1840,7 +1838,6 @@ void CBotChatPageTrade::confirmChangeBuyFilterMPDialog(uint ft) CWidgetManager::getInstance()->disableModalWindow(); } - // *************************************************************************** void CBotChatPageTrade::resetItemPartAndTypeFilters() { diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index e74392432..7dcf13eeb 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -601,7 +601,7 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC if (pos == ucstring::npos || (colonpos < pos)) { // No timestamp, so put it right after the color and add a space - pos = newmsg.find(ucstring("}"));; + pos = newmsg.find(ucstring("}")); prefix += " "; } newmsg = newmsg.substr(0, pos + 1) + prefix + newmsg.substr(pos + 1); diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 293582f52..91bb94a23 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -1741,7 +1741,6 @@ void CDBCtrlSheet::resetCharBitmaps() _CharBitmaps.clear(); } - // *************************************************************************** void CDBCtrlSheet::setupCharBitmaps(sint32 maxW, sint32 maxLine, sint32 maxWChar, bool topDown) { diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp index fcef370e0..112ec3e9e 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp @@ -175,7 +175,6 @@ void CDBGroupListSheetTextShare::CSheetChildShare::init(CDBGroupListSheetText *p pNL = NLGUI::CDBManager::getInstance()->getDbProp(sTmp, false); nlassert(pNL != NULL); CurrentWanted.link ( sTmp.c_str() ); - } diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index 0028ad964..d4fc5da86 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -728,7 +728,6 @@ void CDBGroupListSheetTrade::sort() } } - bool CDBGroupListSheetTrade::needCheckAllItems() { if (_LastFamePriceFactor != _FamePriceFactorLeaf->getValue16()) diff --git a/code/ryzom/client/src/interface_v3/skill_manager.cpp b/code/ryzom/client/src/interface_v3/skill_manager.cpp index e71225cc2..d8656d925 100644 --- a/code/ryzom/client/src/interface_v3/skill_manager.cpp +++ b/code/ryzom/client/src/interface_v3/skill_manager.cpp @@ -159,10 +159,8 @@ void CSkillManager::initInGame() _TrackSkillChange= NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:TRACK_SKILL_CHANGE", true); // Add a branch observer on skill value change NLGUI::CDBManager::getInstance()->addBranchObserver( "SERVER:CHARACTER_INFO:SKILLS", &_SkillChangeObs ); - } - // *************************************************************************** void CSkillManager::uninitInGame() { diff --git a/code/ryzom/client/src/interface_v3/view_radar.cpp b/code/ryzom/client/src/interface_v3/view_radar.cpp index 8c8cd1de8..5ebb7fd64 100644 --- a/code/ryzom/client/src/interface_v3/view_radar.cpp +++ b/code/ryzom/client/src/interface_v3/view_radar.cpp @@ -177,7 +177,7 @@ void CViewRadar::draw () // Select the icon to display and draw it uint spotId = CNPCIconCache::getInstance().getNPCIcon(entity).getSpotId(); CRadarSpotDesc spotDesc = _SpotDescriptions[spotId]; - + if (!_MissionIconsObs._displayMissionSpots) spotDesc = _SpotDescriptions[0]; diff --git a/code/ryzom/client/src/misc.h b/code/ryzom/client/src/misc.h index d74010c03..463f02b66 100644 --- a/code/ryzom/client/src/misc.h +++ b/code/ryzom/client/src/misc.h @@ -225,6 +225,7 @@ uint getCurrentColorDepth(); // get maximized bool isWindowMaximized(); +// get all supported video modes sint getRyzomModes(std::vector &videoModes, std::vector &stringModeList); #endif // CL_MISC_H diff --git a/code/ryzom/client/src/player_cl.cpp b/code/ryzom/client/src/player_cl.cpp index 4166dbec8..a050ac197 100644 --- a/code/ryzom/client/src/player_cl.cpp +++ b/code/ryzom/client/src/player_cl.cpp @@ -673,7 +673,7 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle * } // update title when gender changed - const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,_Gender == GSGENDER::female)); + const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, _Gender == GSGENDER::female)); if (!replacement.empty() || !ClientCfg.DebugStringManager) { // Get extended name diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index 2bceb4200..aa5995b05 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -5293,10 +5293,8 @@ void CEditor::onTestModeDisconnected(TSessionId sessionId, uint32 lastAct, TSce //H_AUTO(R2_CEditor_onTestModeDisconnected) CHECK_EDITOR _DMC->CDynamicMapClient::onTestModeDisconnected(sessionId, lastAct, sessionType); - } - // ********************************************************************************************************* void CEditor::nodeInserted(const std::string& instanceId, const std::string& attrName, sint32 position, const std::string& key, CObject* value) { @@ -6611,7 +6609,7 @@ NLMISC::CVectorD getVectorD(const CObject *obj) CObject *buildVector(const NLMISC::CVectorD &vector, const std::string &instanceId /*= ""*/) { CObject *table; - if (instanceId.empty() ) + if (instanceId.empty()) { table = getEditor().getDMC().newComponent("Position"); table->set("x", vector.x); diff --git a/code/ryzom/client/src/time_client.h b/code/ryzom/client/src/time_client.h index 9243a908d..b3327ee76 100644 --- a/code/ryzom/client/src/time_client.h +++ b/code/ryzom/client/src/time_client.h @@ -48,7 +48,7 @@ extern sint64 DT64; // Diff time with current and last frame in ms. extern float DT; // Diff time with current and last frame in sec. extern TTime TSend; // Next Time to send motions. extern TTime DTSend; // Delta of time to generate the next time to send motions. - extern double TimeInSec; // Time for the current frame in second. +extern double TimeInSec; // Time for the current frame in second. extern double FirstTimeInSec; // Game local origin time diff --git a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp index cb183850e..24de0feaf 100644 --- a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp @@ -875,9 +875,9 @@ Colors are something like that: 2: VERT CITRON VERT CITRON GREEN 3: VERT VERT TURQUOISE 4: BLEU BLEU BLUE -5: ROUGE fonce ROUGE (tout court) CRIMSON +5: ROUGE dark ROUGE (normal) CRIMSON 6: BLANC JAUNE WHITE -7: NOIR BLEU tres fonce BLACK +7: NOIR BLEU very dark BLACK 3D column is (probably) used for equipment */ diff --git a/code/ryzom/server/src/ai_service/generic_logic_action.cpp b/code/ryzom/server/src/ai_service/generic_logic_action.cpp index afd0f9b3c..aaa113b30 100644 --- a/code/ryzom/server/src/ai_service/generic_logic_action.cpp +++ b/code/ryzom/server/src/ai_service/generic_logic_action.cpp @@ -1407,8 +1407,8 @@ public: return false; } - // check if its a number or a var. - //TODO: et les variables negatives? + // check if it's a number or a var. + //TODO: and negative values ? if ((str[0]<='9' && str[0]>='0')||(str[0]=='-')) // its a number { var.Type = constant; diff --git a/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp b/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp index 90d41820f..98ec86a75 100644 --- a/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp +++ b/code/ryzom/server/src/entities_game_service/dyn_chat_egs.cpp @@ -507,7 +507,7 @@ void CDynChatEGS::iosSetHideBubble(TChanID chan, bool hideBubble) void CDynChatEGS::iosSetUniversalChannel(TChanID chan, bool universalChannel) { CMessage msg("DYN_CHAT:SET_UNIVERSAL_CHANNEL"); - msg.serial(chan); + msg.serial(chan); msg.serial(universalChannel); sendMessageViaMirror( "IOS", msg); } diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp index 6beb7b1b2..7f42a671c 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_manager_2.cpp @@ -211,13 +211,16 @@ std::vector CPVPManager2::getCharacterChannels(CCharacter * user) result.clear(); // Add lang channel, should be first. - if (!user->getLangChannel().empty()) { + if (!user->getLangChannel().empty()) + { TMAPExtraFactionChannel::iterator it = _ExtraFactionChannel.find(user->getLangChannel()); if (it != _ExtraFactionChannel.end()) { result.push_back((*it).second); } - } else { + } + else + { TMAPExtraFactionChannel::iterator it = _ExtraFactionChannel.find("en"); if (it != _ExtraFactionChannel.end()) { diff --git a/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp b/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp index d23945d25..e024334c2 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp +++ b/code/ryzom/server/src/entities_game_service/shop_type/character_shopping_list.cpp @@ -460,9 +460,9 @@ void CCharacterShoppingList::initPageToUpdate( uint32 nbSlotPerPage ) void CCharacterShoppingList::fillTradePage( uint16 session ) { /* -- Ajout de TRADING:*:PRICE_RETIRE (utile que si SELLER_TYPE == User ou ResaleAndUser). Note: Prix UNITAIRE (si MP, Ammo etc..) -- Si SELLER_TYPE==User seulement: Si PRICE==-1, alors cela veut dire " Item Sold " (pour afficher la liste des items vendus les plus récents) -- Note: TRADING:*:PRICE reste un Prix UNITAIRE (si MP, Ammo etc..) (cela devait déja être le cas) +- Added TRADING:*:PRICE_RETIRE (only useful if SELLER_TYPE == User or ResaleAndUser). Note: UNIT price (if Raw Mats, Ammo, etc..) +- If SELLER_TYPE==User only: if PRICE==-1, then it means " Item Sold " (to display list of more recent sold items) +- Note: TRADING:*:PRICE is wtill a UNIT price (if Raw Mats, Ammo, etc..) (it should already be the case) */ // get page to update if any diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp index 6af950eae..cd937688a 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/configuration.cpp @@ -53,7 +53,8 @@ namespace NLQT { { // load config QFile file(NLQT_CONFIG_FILE); - if (!file.exists()) { + if (!file.exists()) + { file.open( QIODevice::WriteOnly | QIODevice::Text ); file.write("GraphicsDrivers = { \"OpenGL\", \"Direct3D\" };"); file.write("\nSearchPaths = {\"\"};"); @@ -64,9 +65,12 @@ namespace NLQT { file.close(); } - try { + try + { ConfigFile.load(NLQT_CONFIG_FILE); - } catch(...) { + } + catch(...) + { } addLeveldesignPath(); @@ -213,16 +217,17 @@ namespace NLQT { uint listsize = tmpList->size(); for (uint i = 0; i < listsize; ++i) { - if(_progressCB) { - _progressCB->DisplayString = tmpList->at(i); - CPath::addSearchPath(tmpList->at(i), true, false, _progressCB); + if(_progressCB) + { + _progressCB->DisplayString = tmpList->at(i); + CPath::addSearchPath(tmpList->at(i), true, false, _progressCB); } else { - CProgressDialog pcb; - pcb.DisplayString = tmpList->at(i); - pcb.show(); - CPath::addSearchPath(tmpList->at(i), true, false, &pcb); + CProgressDialog pcb; + pcb.DisplayString = tmpList->at(i); + pcb.show(); + CPath::addSearchPath(tmpList->at(i), true, false, &pcb); } } if (!list) diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp index bb91f8b62..25b8a1490 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/formdelegate.cpp @@ -60,7 +60,8 @@ namespace NLQT CFormItem* curItem = m->getItem(mp->mapToSource(index)); NLGEORGES::UFormElm *curElm = curItem->getFormElm(); - if (!curElm) { + if (!curElm) + { // TODO: create new Element return 0; } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp index b5ab13ba3..f06bb537e 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georges_treeview_dialog.cpp @@ -377,7 +377,8 @@ namespace NLQT nlinfo("CGeorgesTreeViewDialog::filterRows"); CGeorgesFormProxyModel * mp = dynamic_cast(_ui.treeView->model()); CGeorgesFormModel *m = dynamic_cast(mp->sourceModel()); - if (m) { + if (m) + { m->setShowParents(_ui.checkBoxParent->isChecked()); m->setShowDefaults(_ui.checkBoxDefaults->isChecked()); } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp index 89cba843c..98c7b59e2 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp @@ -352,7 +352,8 @@ namespace NLQT /******************************************************************************/ - void CGeorgesFormModel::loadFormData(UFormElm *root, CFormItem *parent) { + void CGeorgesFormModel::loadFormData(UFormElm *root, CFormItem *parent) + { if (!root) return; @@ -390,7 +391,8 @@ namespace NLQT elmtType = "Array"; if (elmt->isStruct()) elmtType = "Struct"; - if (elmt->isAtom()) { + if (elmt->isAtom()) + { elmtType = "Atom"; uint numDefinitions = 0; const UType *type = elmt->getType(); @@ -433,7 +435,8 @@ namespace NLQT tmpValue = v.c_str(); if (type->getType() == UType::SignedInt) { - if (QString("%1").arg(value.c_str()).toDouble() == tmpValue.toDouble()) { + if (QString("%1").arg(value.c_str()).toDouble() == tmpValue.toDouble()) + { value = l; break; } @@ -482,7 +485,8 @@ namespace NLQT } columnData << QString(elmName.c_str()) << QString(value.c_str()) << "" << elmtType; parent->appendChild(new CFormItem(elmt, columnData, parent, *whereV, *whereN)); - //if (parents.last()->childCount() > 0) { + //if (parents.last()->childCount() > 0) + //{ // parents << parents.last()->child(parents.last()->childCount()-1); //} loadFormData(elmt, parent->child(parent->childCount()-1)); @@ -549,7 +553,8 @@ namespace NLQT { if (elmt->isArray()) elmtType = "Array"; - if (elmt->isStruct()) { + if (elmt->isStruct()) + { elmtType = "Struct"; } if (elmt->isAtom()) @@ -593,28 +598,35 @@ namespace NLQT CFormItem *fi_dep = new CFormItem(_rootElm, QList() << "dependencies", _rootItem); _rootItem->appendChild(fi_dep); - if (!dfns.isEmpty()) { - CFormItem *fi_dfn = new CFormItem(_rootElm, QList() << "dfn", fi_dep); - fi_dep->appendChild(fi_dfn); - foreach(QString str, dfns) { - fi_dfn->appendChild(new CFormItem(_rootElm, QList() << str, fi_dfn)); - } - } - if (!typs.isEmpty()) { - CFormItem *fi_typ = new CFormItem(_rootElm, QList() << "typ", fi_dep); - fi_dep->appendChild(fi_typ); - foreach(QString str, typs) { - fi_typ->appendChild(new CFormItem(_rootElm, QList() << str, fi_typ)); - } - } - if (!_dependencies.isEmpty()) { - CFormItem *fi_other = new CFormItem(_rootElm, QList() << "other", fi_dep); - fi_dep->appendChild(fi_other); - foreach(QStringList list, _dependencies) { - foreach(QString str, list) { - fi_other->appendChild(new CFormItem(_rootElm, QList() << str, fi_other)); + if (!dfns.isEmpty()) + { + CFormItem *fi_dfn = new CFormItem(_rootElm, QList() << "dfn", fi_dep); + fi_dep->appendChild(fi_dfn); + foreach(QString str, dfns) + { + fi_dfn->appendChild(new CFormItem(_rootElm, QList() << str, fi_dfn)); + } } + if (!typs.isEmpty()) + { + CFormItem *fi_typ = new CFormItem(_rootElm, QList() << "typ", fi_dep); + fi_dep->appendChild(fi_typ); + foreach(QString str, typs) + { + fi_typ->appendChild(new CFormItem(_rootElm, QList() << str, fi_typ)); + } } + if (!_dependencies.isEmpty()) + { + CFormItem *fi_other = new CFormItem(_rootElm, QList() << "other", fi_dep); + fi_dep->appendChild(fi_other); + foreach(QStringList list, _dependencies) + { + foreach(QString str, list) + { + fi_other->appendChild(new CFormItem(_rootElm, QList() << str, fi_other)); + } + } }*/ } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp index ef40f4dbc..8dbc2c18b 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/main_window.cpp @@ -338,7 +338,8 @@ namespace NLQT _aboutQtAction->setStatusTip(tr("Show the Qt library's About box")); connect(_aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); - for (int i = 0; i < MaxRecentFiles; ++i) { + for (int i = 0; i < MaxRecentFiles; ++i) + { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); connect(recentFileActs[i], SIGNAL(triggered()), diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp index 499b06d94..f0a1fe351 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/new_dialog.cpp @@ -333,7 +333,8 @@ namespace NLQT return -1; } - void CGeorgesNewDialog::validateParentCombo() { + void CGeorgesNewDialog::validateParentCombo() + { // TODO: clear if no valid text //if (!_filelist.contains(_ui.parentLineEdit->text())) // _ui.parentLineEdit->clear(); diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp index a47395cf6..e3c3d24e2 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/objectviewer_dialog.cpp @@ -77,7 +77,8 @@ namespace NLQT } } - void CObjectViewerDialog::topLevelChanged ( bool topLevel ) { + void CObjectViewerDialog::topLevelChanged ( bool topLevel ) + { //nldebug("topLevel:%d",topLevel); //_georges->init(); } @@ -100,7 +101,8 @@ namespace NLQT { //nldebug("%d %d",_nlw->width(), _nlw->height()); QDockWidget::resizeEvent(resizeEvent); - if (Modules::objViewInt()) { + if (Modules::objViewInt()) + { if (Modules::objViewInt()->getDriver()) Modules::objViewInt()->setSizeViewport(resizeEvent->size().width(), resizeEvent->size().height()); } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp index 07b338009..7c94e4fb0 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/qt_displayer.cpp @@ -39,8 +39,8 @@ namespace NLQT ; } - CQtDisplayer::~CQtDisplayer() { - ; + CQtDisplayer::~CQtDisplayer() + { } void CQtDisplayer::setParam (QPlainTextEdit *dlgDebug, bool eraseLastLog) @@ -59,7 +59,8 @@ namespace NLQT QTextCharFormat format; - if (args.Date != 0 && !_Raw) { + if (args.Date != 0 && !_Raw) + { str += dateToHumanString(args.Date); needSpace = true; } @@ -76,27 +77,31 @@ namespace NLQT } // Write thread identifier - /*if ( args.ThreadId != 0 && !_Raw) { - if (needSpace) { str += " "; needSpace = false; } - str += NLMISC::toString(args.ThreadId); - needSpace = true; + /*if ( args.ThreadId != 0 && !_Raw) + { + if (needSpace) { str += " "; needSpace = false; } + str += NLMISC::toString(args.ThreadId); + needSpace = true; }*/ - /*if (!args.ProcessName.empty() && !_Raw) { - if (needSpace) { str += " "; needSpace = false; } - str += args.ProcessName; - needSpace = true; + /*if (!args.ProcessName.empty() && !_Raw) + { + if (needSpace) { str += " "; needSpace = false; } + str += args.ProcessName; + needSpace = true; }*/ - //if (args.FileName != NULL && !_Raw) { + //if (args.FileName != NULL && !_Raw) + //{ // if (needSpace) { str += " "; needSpace = false; } // str += NLMISC::CFile::getFilename(args.FileName); // needSpace = true; //} - /*if (args.Line != -1 && !_Raw) { - if (needSpace) { str += " "; needSpace = false; } - str += NLMISC::toString(args.Line); - needSpace = true; + /*if (args.Line != -1 && !_Raw) + { + if (needSpace) { str += " "; needSpace = false; } + str += NLMISC::toString(args.Line); + needSpace = true; }*/ if (args.FuncName != NULL && !_Raw) diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp index e99b0eceb..279578293 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp @@ -2595,8 +2595,8 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa inStream.close(); if (_ExportCB != NULL) { - _ExportCB->dispWarning("Error while reading " + igName); - _ExportCB->dispWarning(e.what()); + _ExportCB->dispWarning("Error while reading " + igName); + _ExportCB->dispWarning(e.what()); } } } diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 9eba8c8da..9997342fe 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -96,13 +96,14 @@ const std::string historyDir("history/"); string diffVersion; #ifndef NL_OS_WINDOWS -char* itoa(int val, char *buffer, int base){ - static char buf[32] = {0}; - int i = 30; - for(; val && i ; --i, val /= base) - buf[i] = "0123456789abcdef"[val % base]; - return &buf[i+1]; -} +char* itoa(int val, char *buffer, int base) +{ + static char buf[32] = {0}; + int i = 30; + for(; val && i ; --i, val /= base) + buf[i] = "0123456789abcdef"[val % base]; + return &buf[i+1]; +} #endif // NL_OS_WINDOWS #ifdef NL_DEBUG From 5ee28644914902c1d1e175c4422faf7fc18eb030 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 13 Jan 2015 15:08:13 +0100 Subject: [PATCH 049/175] Fixed: Compilation --HG-- branch : develop --- .../server/src/ryzom_welcome_service/ryzom_welcome_service.cpp | 1 + code/ryzom/server/src/server_share/pet_interface_msg.h | 1 + code/ryzom/server/src/tick_service/range_mirror_manager.h | 1 + 3 files changed, 3 insertions(+) diff --git a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp index 98ae3a893..1de6677cb 100644 --- a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp +++ b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp @@ -21,6 +21,7 @@ #include #include +#include #include "nel/misc/debug.h" #include "nel/misc/config_file.h" diff --git a/code/ryzom/server/src/server_share/pet_interface_msg.h b/code/ryzom/server/src/server_share/pet_interface_msg.h index 9aa914226..f404a76ef 100644 --- a/code/ryzom/server/src/server_share/pet_interface_msg.h +++ b/code/ryzom/server/src/server_share/pet_interface_msg.h @@ -25,6 +25,7 @@ #include "game_share/synchronised_message.h" #include "game_share/mirror.h" +#include // Pet interface message class for AIS / EGS communication diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.h b/code/ryzom/server/src/tick_service/range_mirror_manager.h index 0bde600e4..ed12f706b 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.h +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace NLNET { From b70e8d3e7bb41582c278245a8a939d4ee534f68a Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 13 Jan 2015 15:15:07 +0100 Subject: [PATCH 050/175] Fixed: Compilation --HG-- branch : develop --- .../src/pd_support_service/stat_user_file_list_builders.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp b/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp index d5d6570a4..45c172384 100644 --- a/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp +++ b/code/ryzom/server/src/pd_support_service/stat_user_file_list_builders.cpp @@ -20,6 +20,7 @@ //------------------------------------------------------------------------------------------------- #include +#include #include "game_share/utils.h" #include "stat_file_list_builder_factory.h" #include "stat_globals.h" From 3aa448ba24a2590fa93e228457be49a6d6edbc86 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 13 Jan 2015 19:47:14 +0100 Subject: [PATCH 051/175] Changed: Replaced atoi and atof by NLMISC::fromString --HG-- branch : develop --- code/nel/src/3d/water_pool_manager.cpp | 8 ++--- code/nel/src/misc/sstring.cpp | 4 ++- code/nel/src/sound/sound_animation.cpp | 5 ++- .../nelns/login_service/connection_client.cpp | 2 +- .../Configuration.cpp | 2 +- .../nel_launcher_windows_ext/nel_launcher.cpp | 2 +- code/ryzom/client/src/3d_notes.cpp | 7 ++-- .../src/interfaces_manager/interf_script.cpp | 8 +++-- code/ryzom/client/src/scene_parser.cpp | 4 +-- code/ryzom/common/src/game_share/fame.cpp | 3 +- .../src/game_share/persistent_data_inline.h | 14 ++++++-- .../src/admin_modules/aes_client_module.cpp | 8 +++-- code/ryzom/server/src/ags_test/commands.cpp | 32 +++++++++++++------ .../server/src/ai_data_service/pacs_scan.cpp | 28 ++++++++++------ code/ryzom/server/src/ai_service/commands.cpp | 9 +++--- .../src/ai_service/generic_logic_action.cpp | 3 +- .../pvp_faction_reward_manager.cpp | 30 ++++++++++------- .../ryzom/server/src/gpm_service/commands.cpp | 4 +-- .../georges_convert/type_unit_double.cpp | 2 +- .../tools/leveldesign/prim_export/main.cpp | 4 +-- .../tools/make_anim_melee_impact/main.cpp | 2 +- 21 files changed, 116 insertions(+), 65 deletions(-) diff --git a/code/nel/src/3d/water_pool_manager.cpp b/code/nel/src/3d/water_pool_manager.cpp index b38068852..c377ff1f3 100644 --- a/code/nel/src/3d/water_pool_manager.cpp +++ b/code/nel/src/3d/water_pool_manager.cpp @@ -44,19 +44,19 @@ NLMISC_COMMAND(setWaterPool, "Setup a pool of water in the water pool manager", } if (numArgs == 3) { - whmb.FilterWeight = ::atof(args[2].c_str()); + NLMISC::fromString(args[2], whmb.FilterWeight); } if (numArgs == 4) { - whmb.UnitSize = ::atof(args[3].c_str()); + NLMISC::fromString(args[3], whmb.UnitSize); } if (numArgs == 5) { - whmb.WaveIntensity = ::atof(args[4].c_str()); + NLMISC::fromString(args[4], whmb.WaveIntensity); } if (numArgs == 4) { - whmb.WavePeriod = ::atof(args[5].c_str()); + NLMISC::fromString(args[5], whmb.WavePeriod); } // create the water pool GetWaterPoolManager().createWaterPool(whmb); diff --git a/code/nel/src/misc/sstring.cpp b/code/nel/src/misc/sstring.cpp index fe9332328..833553f21 100644 --- a/code/nel/src/misc/sstring.cpp +++ b/code/nel/src/misc/sstring.cpp @@ -1731,7 +1731,9 @@ namespace NLMISC double CSString::atof() const { - return ::atof(c_str()); + double val; + NLMISC::fromString(*this, val); + return val; } bool CSString::readFromFile(const CSString& fileName) diff --git a/code/nel/src/sound/sound_animation.cpp b/code/nel/src/sound/sound_animation.cpp index 5a6f1c256..1d1f9093a 100644 --- a/code/nel/src/sound/sound_animation.cpp +++ b/code/nel/src/sound/sound_animation.cpp @@ -176,7 +176,10 @@ void CSoundAnimation::load() throw NLMISC::Exception("Invalid sound animation marker"); } - marker->setTime((float) atof(time)); + float val; + NLMISC::fromString(time, val); + + marker->setTime(val); xmlFree ((void*)time); diff --git a/code/nelns/login_service/connection_client.cpp b/code/nelns/login_service/connection_client.cpp index 8ff713ec2..ebdef1b9a 100644 --- a/code/nelns/login_service/connection_client.cpp +++ b/code/nelns/login_service/connection_client.cpp @@ -126,7 +126,7 @@ retry: // now the user is on the database - uid = atoi(row[0]); + NLMISC::fromString(row[0], uid); if(cpassword != row[2]) { diff --git a/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp b/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp index f9092e56b..88b0d854a 100644 --- a/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp +++ b/code/nelns/login_system/nel_launcher_windows_ext/Configuration.cpp @@ -52,7 +52,7 @@ BOOL CConfiguration::Load() // Reading the configuration file version GetValue(csBuffer, KEY_VERSION, csValue); - m_dVersion = atof(csValue); + NLMISC::fromString(csValue, m_dVersion); nlinfo("Config' version %s", csValue); if(m_dVersion < APP.m_dVersion) diff --git a/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp b/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp index 8ace867f7..2e36702d8 100644 --- a/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp +++ b/code/nelns/login_system/nel_launcher_windows_ext/nel_launcher.cpp @@ -324,7 +324,7 @@ void CNel_launcherApp::LoadVersion() else { nlinfo("Launcher' version %s", csVersion); - m_dVersion = atof(csVersion); + NLMISC::fromString(csVersion, m_dVersion); } } diff --git a/code/ryzom/client/src/3d_notes.cpp b/code/ryzom/client/src/3d_notes.cpp index 7156854e4..618525de4 100644 --- a/code/ryzom/client/src/3d_notes.cpp +++ b/code/ryzom/client/src/3d_notes.cpp @@ -57,9 +57,10 @@ void cbNotesChanged() Notes.Notes.clear(); return; } - pos.x = (float)atof(posstr[0].c_str()); - pos.y = (float)atof(posstr[1].c_str()); - pos.z = (float)atof(posstr[2].c_str()); + + NLMISC::fromString(posstr[0], pos.x); + NLMISC::fromString(posstr[1], pos.y); + NLMISC::fromString(posstr[2], pos.z); string note(var.asString(i+2)); if(note.empty()) diff --git a/code/ryzom/client/src/interfaces_manager/interf_script.cpp b/code/ryzom/client/src/interfaces_manager/interf_script.cpp index f083eda18..734b99098 100644 --- a/code/ryzom/client/src/interfaces_manager/interf_script.cpp +++ b/code/ryzom/client/src/interfaces_manager/interf_script.cpp @@ -37,7 +37,11 @@ float getFloat() char delimiter[] = "[] \t"; char *ptr = strtok(NULL, delimiter); if(ptr != NULL) - return (float) atof(ptr); + { + float val; + NLMISC::fromString(ptr, val); + return val; + } return 0.f; }// getFloat // @@ -94,7 +98,7 @@ std::vector getVectorOfFloat(uint8 nbCol) ptr = strtok(NULL, delimiter); if(ptr != NULL) { - val = (float)atof(ptr); + NLMISC::fromString(ptr, val); if (val != 0.0f) vect.push_back(val); } diff --git a/code/ryzom/client/src/scene_parser.cpp b/code/ryzom/client/src/scene_parser.cpp index 1108f3a19..484c00129 100644 --- a/code/ryzom/client/src/scene_parser.cpp +++ b/code/ryzom/client/src/scene_parser.cpp @@ -123,7 +123,7 @@ void CSceneParser::load(const string &filename) char *ptr = strtok(tmpBuff, delimiter); if(ptr != NULL) - _FrameRate = atof(ptr); + NLMISC::fromString(ptr, _FrameRate); } // Close the speed file. @@ -1693,7 +1693,7 @@ void CSceneParser::loadScene(const string &filename) ptr = strtok(NULL, delimiter); if(ptr != NULL) { - seq.second = atof(ptr); + NLMISC::fromString(ptr, seq.second); _Scene.push_back(seq); } } diff --git a/code/ryzom/common/src/game_share/fame.cpp b/code/ryzom/common/src/game_share/fame.cpp index b453bca4e..ca226ecdc 100644 --- a/code/ryzom/common/src/game_share/fame.cpp +++ b/code/ryzom/common/src/game_share/fame.cpp @@ -479,10 +479,9 @@ void CStaticFames::loadStaticFame( const string& filename ) else NLMISC::fromString(s.substr(sep+1, s.size()-sep-1), factor); // Fames in file are in [-600;600] so don't forget 1000 factor - sint32 fame; float fameFloat; NLMISC::fromString(s.substr(0, sep), fameFloat); - fame = (sint32)(fameFloat * 1000.f); + sint32 fame = (sint32)(fameFloat * 1000.f); _FameTable[iFaction*_FameTableSize + jFaction] = fame; _PropagationFactorTable[iFaction*_FameTableSize + jFaction] = factor; diff --git a/code/ryzom/common/src/game_share/persistent_data_inline.h b/code/ryzom/common/src/game_share/persistent_data_inline.h index 72ef3fc9d..a2d575eef 100644 --- a/code/ryzom/common/src/game_share/persistent_data_inline.h +++ b/code/ryzom/common/src/game_share/persistent_data_inline.h @@ -706,7 +706,12 @@ inline float CPersistentDataRecord::CArg::asFloat() const case UINT64: return (float)(uint64)_Value.i64; case FLOAT32: return (float)_Value.f32; case FLOAT64: return (float)_Value.f64; - case STRING: return (float)atof(_String.c_str()); + case STRING: + { + float val; + NLMISC::fromString(_String, val); + return val; + } case FLAG: return 1.0f; case EXTEND_TYPE: switch(_Value.ExType) @@ -733,7 +738,12 @@ inline double CPersistentDataRecord::CArg::asDouble() const case UINT64: return (double)(uint64)_Value.i64; case FLOAT32: return (double)_Value.f32; case FLOAT64: return (double)_Value.f64; - case STRING: return (double)atof(_String.c_str()); + case STRING: + { + double val; + NLMISC::fromString(_String, val); + return val; + } case FLAG: return 1.0; case EXTEND_TYPE: switch(_Value.ExType) diff --git a/code/ryzom/server/src/admin_modules/aes_client_module.cpp b/code/ryzom/server/src/admin_modules/aes_client_module.cpp index e2b9ca390..9200f2d58 100644 --- a/code/ryzom/server/src/admin_modules/aes_client_module.cpp +++ b/code/ryzom/server/src/admin_modules/aes_client_module.cpp @@ -259,7 +259,7 @@ namespace ADMIN gs.HighRezTimeStamp = timer; IVariable *var = dynamic_cast(ICommand::getCommand(gvi.VarName)); if (var != NULL) - gs.SampleValue = atof(var->toString().c_str()); + NLMISC::fromString(var->toString(), gs.SampleValue); } } } @@ -305,7 +305,11 @@ namespace ADMIN // no sample collected yet, just ask a new one IVariable *var = dynamic_cast(ICommand::getCommand(gvi.VarName)); if (var != NULL) - gd.setValue(atof(var->toString().c_str())); + { + float val; + NLMISC::fromString(var->toString(), val); + gd.setValue(val); + } } else { diff --git a/code/ryzom/server/src/ags_test/commands.cpp b/code/ryzom/server/src/ags_test/commands.cpp index 7b2e6c2a8..4fa955401 100644 --- a/code/ryzom/server/src/ags_test/commands.cpp +++ b/code/ryzom/server/src/ags_test/commands.cpp @@ -586,7 +586,10 @@ NLMISC_COMMAND(actorSetOrientation,"Add one or more static actors"," if (i<(sizeof(angleNames)/sizeof(angleNames[0]))) theta=3.14159265359f*2.0f*(float)i/(float)(sizeof(angleNames)/sizeof(angleNames[0])); else - theta=(float)atof(args[0].c_str())/360.0f*2.0f*3.14159265359f; + { + NLMISC::fromString(args[0], theta); + theta = theta / 360.0f*2.0f*3.14159265359f; + } if (args.size()==1) { @@ -620,11 +623,13 @@ NLMISC_COMMAND(actorSetMagnetRange,"Set the magnet properties for wandering beha if(args.size() <1) return false; COMMAND_MACRO_RECORD_TEST - float range=(float)atof(args[0].c_str()); + float range; + NLMISC::fromString(args[0], range); if (range<=0.0f) return false; unsigned start; - float decay=(float)atof(args[0].c_str()); + float decay; + NLMISC::fromString(args[0], decay); if (decay<0.0f) return false; if (decay==0.0f) { @@ -664,7 +669,8 @@ NLMISC_COMMAND(actorSetAttackDistance,"set actor attack distance"," [< if(args.size() <1) return false; COMMAND_MACRO_RECORD_TEST - float distance=(float)atof(args[0].c_str()); + float distance; + NLMISC::fromString(args[0], distance); // if (distance<=0.0f) return false; if (args.size()<2) @@ -781,11 +787,13 @@ NLMISC_COMMAND(actorSetRespawnDelay,"set actor respawn delay"," [ filters; diff --git a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp index 28e55559c..9b5af1d5b 100644 --- a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp +++ b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp @@ -2465,9 +2465,17 @@ NLMISC_COMMAND(setDefaultStart,"Set the default start point for all continents", CVectorD startPoint; - startPoint.x = atof(args[0].c_str()); - startPoint.y = atof(args[1].c_str()); - startPoint.z = (args.size() < 3 ? 0.0 : atof(args[2].c_str())); + NLMISC::fromString(args[0], startPoint.x); + NLMISC::fromString(args[1], startPoint.y); + + if (args.size() > 2) + { + NLMISC::fromString(args[2], startPoint.z); + } + else + { + startPoint.z = 0.0; + } DefaultStartPoint = startPoint; @@ -2921,13 +2929,15 @@ NLMISC_COMMAND(testPacsMove, "test a pacs move", " " if (args.size() != 5) return false; - CPacsCruncher pc; + CPacsCruncher pc; + + string name = args[0]; - string name = args[0]; - double x = atof(args[1].c_str()); - double y = atof(args[2].c_str()); - double dx = atof(args[3].c_str()); - double dy = atof(args[4].c_str()); + double x, y, dx, dy; + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); + NLMISC::fromString(args[3], dx); + NLMISC::fromString(args[4], dy); pc.init(name); diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index b51c7615b..350afa67d 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -229,8 +229,9 @@ NLMISC_COMMAND(eventCreateNpcGroup, "create an event npc group", " return true; } - double x = atof(args[3].c_str()); - double y = atof(args[4].c_str()); + double x, y; + NLMISC::fromString(args[3], x); + NLMISC::fromString(args[4], y); double dispersionRadius = 10.; if (args.size()>5) @@ -1970,8 +1971,8 @@ NLMISC_COMMAND(displayVision3x3,"display 3x3 cell vision centred on a given coor } CAICoord x, y; - x=atof(args[1].c_str()); - y=atof(args[2].c_str()); + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); log.displayNL("3x3 Vision around (%.3f,%.3f)", x.asDouble(), y.asDouble()); uint32 botCount=0; diff --git a/code/ryzom/server/src/ai_service/generic_logic_action.cpp b/code/ryzom/server/src/ai_service/generic_logic_action.cpp index aaa113b30..e2c761619 100644 --- a/code/ryzom/server/src/ai_service/generic_logic_action.cpp +++ b/code/ryzom/server/src/ai_service/generic_logic_action.cpp @@ -1412,8 +1412,7 @@ public: if ((str[0]<='9' && str[0]>='0')||(str[0]=='-')) // its a number { var.Type = constant; - double val = atof(str.c_str()); - var.Value = float(val); + NLMISC::fromString(str, var.Value); return true; } diff --git a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp index 85579dcf8..50b039522 100644 --- a/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/pvp_manager/pvp_faction_reward_manager/pvp_faction_reward_manager.cpp @@ -1058,8 +1058,9 @@ NLMISC_COMMAND(getEffects, "get effects of a spire"," " ) return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1101,8 +1102,9 @@ NLMISC_COMMAND(buildSpirePos, "build a spire"," ") return true; } - float x = (float)atof(args[1].c_str()); - float y = (float)atof(args[2].c_str()); + float x, y; + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1138,8 +1140,9 @@ NLMISC_COMMAND(destroySpirePos, "destroy a spire"," ") return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1178,8 +1181,9 @@ NLMISC_COMMAND(getEffectsPos, "get effects of a spire"," " ) return true; } - float x = (float)atof(args[1].c_str()); - float y = (float)atof(args[2].c_str()); + float x, y; + NLMISC::fromString(args[1], x); + NLMISC::fromString(args[2], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1265,8 +1269,9 @@ NLMISC_COMMAND(getRegionOwner, "display the faction which currently owns the reg return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); @@ -1294,8 +1299,9 @@ NLMISC_COMMAND(getSpireStats, "display the status of spire in region correspondi return false; else { - float x = (float)atof(args[0].c_str()); - float y = (float)atof(args[1].c_str()); + float x, y; + NLMISC::fromString(args[0], x); + NLMISC::fromString(args[1], y); NLMISC::CVector vec( x, y, 0.0f ); diff --git a/code/ryzom/server/src/gpm_service/commands.cpp b/code/ryzom/server/src/gpm_service/commands.cpp index 127074856..8e5c8d1b8 100644 --- a/code/ryzom/server/src/gpm_service/commands.cpp +++ b/code/ryzom/server/src/gpm_service/commands.cpp @@ -179,8 +179,8 @@ NLMISC_COMMAND(getPatatEntryIndex, "Get the patat entry index at a pos", "x, y") CVector pos; - pos.x = (float)atof(args[0].c_str()); - pos.y = (float)atof(args[1].c_str()); + NLMISC::fromString(args[0], pos.x); + NLMISC::fromString(args[1], pos.y); pos.z = 0; nlinfo("entryIndex(%.1f, %.1f) = %d", pos.x, pos.y, CWorldPositionManager::getEntryIndex(pos)); diff --git a/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp b/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp index 6244c0f4a..674f77cd6 100644 --- a/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp +++ b/code/ryzom/tools/leveldesign/georges_convert/type_unit_double.cpp @@ -203,7 +203,7 @@ void CTypeUnitDouble::SetLowLimit( const CStringEx _sxll ) void CTypeUnitDouble::SetHighLimit( const CStringEx _sxhl ) { sxhighlimit = _sxhl; - dhighlimit = atof( sxhighlimit.c_str() ); + NLMISC::fromString(sxhighlimit, dhighlimit); } } diff --git a/code/ryzom/tools/leveldesign/prim_export/main.cpp b/code/ryzom/tools/leveldesign/prim_export/main.cpp index 86aeafa62..f9c33d953 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.cpp +++ b/code/ryzom/tools/leveldesign/prim_export/main.cpp @@ -629,7 +629,7 @@ void addPointPrimitive (CLandscape &landscape, const char *primFilename, uint32 string scaleText; float scale = 1; if (point->getPropertyByName ("scale", scaleText)) - scale = (float) atof (scaleText.c_str ()); + NLMISC::fromString(scaleText, scale); // Get zone coordinates sint x = (sint)floor (position.x / options.CellSize); @@ -654,7 +654,7 @@ void addPointPrimitive (CLandscape &landscape, const char *primFilename, uint32 // Get height if (!snap && point->getPropertyByName ("height", text)) - position.z = (float)atof(text.c_str()); + NLMISC::fromString(text, position.z); // *** Add the instance diff --git a/code/ryzom/tools/make_anim_melee_impact/main.cpp b/code/ryzom/tools/make_anim_melee_impact/main.cpp index 10fdeb0ed..3f67edd5e 100644 --- a/code/ryzom/tools/make_anim_melee_impact/main.cpp +++ b/code/ryzom/tools/make_anim_melee_impact/main.cpp @@ -79,7 +79,7 @@ void CAnimCombatState::build(const string &line) { StateCode= line.substr(4, 2); string time= line.substr(10, 5); - MeanAnimTime= (float)atof(time.c_str()); + NLMISC::fromString(time, MeanAnimTime); } From b26e7f4c1bea753cdc70185e814c211a13a6cc86 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 13 Jan 2015 20:35:34 +0100 Subject: [PATCH 052/175] Fixed: Compilation --HG-- branch : develop --- code/ryzom/server/src/ai_service/commands.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index 350afa67d..52315372a 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -1970,9 +1970,13 @@ NLMISC_COMMAND(displayVision3x3,"display 3x3 cell vision centred on a given coor } } + double dx, dy; + NLMISC::fromString(args[1], dx); + NLMISC::fromString(args[2], dy); + CAICoord x, y; - NLMISC::fromString(args[1], x); - NLMISC::fromString(args[2], y); + x = dx; + y = dy; log.displayNL("3x3 Vision around (%.3f,%.3f)", x.asDouble(), y.asDouble()); uint32 botCount=0; From 53f6adb04145a5a8a6a08f672ce0193c3138f4a1 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 15 Jan 2015 20:08:28 +0200 Subject: [PATCH 053/175] Include chat message channel/type to chatlog file --HG-- branch : issue-221 --- code/ryzom/client/src/client_chat_manager.cpp | 2 +- .../client/src/interface_v3/chat_window.cpp | 2 +- .../src/interface_v3/interface_manager.cpp | 4 +-- .../src/interface_v3/interface_manager.h | 2 +- .../client/src/interface_v3/people_list.cpp | 4 +-- code/ryzom/client/src/net_manager.cpp | 25 +++++++++++++++++-- 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/code/ryzom/client/src/client_chat_manager.cpp b/code/ryzom/client/src/client_chat_manager.cpp index bac2abf1e..141edea27 100644 --- a/code/ryzom/client/src/client_chat_manager.cpp +++ b/code/ryzom/client/src/client_chat_manager.cpp @@ -1204,7 +1204,7 @@ class CHandlerTell : public IActionHandler ucstring s = CI18N::get("youTellPlayer"); strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); - CInterfaceManager::getInstance()->log(finalMsg); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); } }; REGISTER_ACTION_HANDLER( CHandlerTell, "tell"); diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 7dcf13eeb..dd483030b 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -483,7 +483,7 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &receiver, const ucstrin strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); displayMessage(finalMsg, prop.getRGBA(), CChatGroup::tell, 0, numBlinks); - CInterfaceManager::getInstance()->log(finalMsg); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); } void CChatWindow::encodeColorTag(const NLMISC::CRGBA &color, ucstring &text, bool append) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 541cb853a..75678f7e6 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -2684,7 +2684,7 @@ bool CInterfaceManager::deletePlayerKeys (const std::string &playerFileIdent) } // *************************************************************************** -void CInterfaceManager::log(const ucstring &str) +void CInterfaceManager::log(const ucstring &str, const std::string &cat) { if (_LogState) { @@ -2693,7 +2693,7 @@ void CInterfaceManager::log(const ucstring &str) FILE *f = fopen(fileName.c_str(), "at"); if (f != NULL) { - const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " * " + str.toUtf8(); + const string finalString = string(NLMISC::IDisplayer::dateToHumanString()) + " (" + NLMISC::toUpper(cat) + ") * " + str.toUtf8(); fprintf(f, "%s\n", finalString.c_str()); } fclose(f); diff --git a/code/ryzom/client/src/interface_v3/interface_manager.h b/code/ryzom/client/src/interface_v3/interface_manager.h index 36bd909e3..d947f4912 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.h +++ b/code/ryzom/client/src/interface_v3/interface_manager.h @@ -218,7 +218,7 @@ public: // Log system (all chat/tell void setLogState(bool state) { _LogState = state; } bool getLogState() const { return _LogState; } - void log(const ucstring &str); + void log(const ucstring &str, const std::string &cat = ""); /// Text from here and from server diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 4dc451ea3..c2167358f 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -478,7 +478,7 @@ void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, c strFindReplace(s, "%name", receiver); strFindReplace(finalMsg, CI18N::get("youTell"), s); gl->addChild(getChatTextMngr().createMsgText(finalMsg, prop.getRGBA())); - CInterfaceManager::getInstance()->log(finalMsg); + CInterfaceManager::getInstance()->log(finalMsg, CChatGroup::groupTypeToString(CChatGroup::tell)); // if the group is closed, make it blink if (!gc->isOpen()) @@ -946,7 +946,7 @@ class CHandlerContactEntry : public IActionHandler ucstring s = CI18N::get("youTellPlayer"); strFindReplace(s, "%name", pWin->getFreeTellerName(str)); strFindReplace(final, CI18N::get("youTell"), s); - CInterfaceManager::getInstance()->log(final); + CInterfaceManager::getInstance()->log(final, CChatGroup::groupTypeToString(CChatGroup::tell)); } } } diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 4b37b698a..66c4b83fc 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -879,7 +879,28 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c } // Log - pIM->log (finalString); + + string channel; + if (mode == CChatGroup::dyn_chat) + { + sint32 dbIndex = ChatMngr.getDynamicChannelDbIndexFromId(dynChatId); + clamp(dbIndex, (sint32)0 , (sint32)CChatGroup::MaxDynChanPerPlayer); + + channel = "dyn" + toString(dbIndex); + } + else + { + channel = CChatGroup::groupTypeToString(mode); + if (channel.empty()) + { + channel = "#" + toString((uint32)mode); + } + } + if (!stringCategory.empty() && NLMISC::toUpper(stringCategory) != "SYS") + { + channel = channel + "/" + stringCategory; + } + pIM->log (finalString, channel); } @@ -911,7 +932,7 @@ void CInterfaceChatDisplayer::displayTell(/*TDataSetIndex senderIndex, */const u colorizeSender(finalString, senderPart, prop.getRGBA()); PeopleInterraction.ChatInput.Tell.displayTellMessage(/*senderIndex, */finalString, goodSenderName, prop.getRGBA(), 2, &windowVisible); - CInterfaceManager::getInstance()->log(finalString); + CInterfaceManager::getInstance()->log(finalString, CChatGroup::groupTypeToString(CChatGroup::tell)); // Open the free teller window CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow(); From eea09d8893aa3697f3685b03f1b143a7a657fc1b Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 21 Jan 2015 13:20:56 +0100 Subject: [PATCH 054/175] Fixed: Guilds with same characters and not same spaces --HG-- branch : develop --- code/ryzom/server/src/shard_unifier_service/name_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/server/src/shard_unifier_service/name_manager.cpp b/code/ryzom/server/src/shard_unifier_service/name_manager.cpp index 5b50f6359..17b500f92 100644 --- a/code/ryzom/server/src/shard_unifier_service/name_manager.cpp +++ b/code/ryzom/server/src/shard_unifier_service/name_manager.cpp @@ -1138,7 +1138,7 @@ bool CNameManager::loadGuildsNamesFromTxt() // merge the first words until we have only 3 words while (words.size() > 3) { - words[0] += words[1]; + words[0] += " " + words[1]; words.erase(words.begin()+1); } BOMB_IF (words.size()!=3,"Invalid line "< Date: Fri, 23 Jan 2015 21:11:15 +0100 Subject: [PATCH 055/175] Changed: Optimize sorting of files (instead of doing it several times for each directory, do it only once) --HG-- branch : develop --- code/nel/src/misc/path.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index d47b8ce4a..8f2926728 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -858,6 +858,8 @@ string getname (dirent *de) void CPath::getPathContent (const string &path, bool recurse, bool wantDir, bool wantFile, vector &result, class IProgressCallback *progressCallBack, bool showEverything) { getInstance()->_FileContainer.getPathContent(path, recurse, wantDir, wantFile, result, progressCallBack, showEverything); + + sort(result.begin(), result.end()); } void CFileContainer::getPathContent (const string &path, bool recurse, bool wantDir, bool wantFile, vector &result, class IProgressCallback *progressCallBack, bool showEverything) @@ -960,8 +962,6 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want progressCallBack->popCropedValues (); } } - - sort(result.begin(), result.end()); } void CPath::removeAllAlternativeSearchPath () From 73020237773b0c5dd4165988a9ae1f285d4dd675 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 17 Feb 2015 03:12:26 +0100 Subject: [PATCH 057/175] CMsgBoxDisplayer should not present a dialog now, but write the report to a file then attempt to launch the error reporter application. Which ofc doesn't exist yet in this commit. --HG-- branch : feature-crashreport --- code/nel/src/misc/debug.cpp | 2 +- code/nel/src/misc/report.cpp | 291 ++------------------------------- code/ryzom/client/src/init.cpp | 2 + 3 files changed, 18 insertions(+), 277 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index c7667acc2..2d09f5ef8 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -83,7 +83,7 @@ using namespace std; #define LOG_IN_FILE NEL_LOG_IN_FILE // If true, debug system will trap crash even if the application is in debugger -static const bool TrapCrashInDebugger = false; +static const bool TrapCrashInDebugger = true; #ifdef DEBUG_NEW #define new DEBUG_NEW diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 20b2b1c11..39f27de5f 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -42,25 +42,14 @@ using namespace std; namespace NLMISC { -#ifdef NL_OS_WINDOWS -static HWND sendReport=NULL; -#endif - //old doesn't work on visual c++ 7.1 due to default parameter typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile = "", bool onlyCheck = false); typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile, bool onlyCheck); -#define DELETE_OBJECT(a) if((a)!=NULL) { DeleteObject (a); a = NULL; } - static TEmailFunction EmailFunction = NULL; void setReportEmailFunction (void *emailFunction) { EmailFunction = (TEmailFunction)emailFunction; - -#ifdef NL_OS_WINDOWS - if (sendReport) - EnableWindow(sendReport, FALSE); -#endif } #ifndef NL_OS_WINDOWS @@ -73,91 +62,26 @@ void report () #else -// Windows specific version - -static string Body; -static string Subject; -static string AttachedFile; - -static HWND checkIgnore=NULL; -static HWND debug=NULL; -static HWND ignore=NULL; -static HWND quit=NULL; -static HWND dialog=NULL; - -static bool NeedExit; -static TReportResult Result; -static bool IgnoreNextTime; -static bool CanSendMailReport= false; +TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) +{ + std::string fname; -static bool DebugDefaultBehavior, QuitDefaultBehavior; + time_t s = time( NULL ); + fname = std::string( "log_" ) + toString( s ) + ".txt"; -static void sendEmail() -{ - if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) - { - bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); - if (res) - { - // EnableWindow(sendReport, FALSE); - // MessageBox (dialog, "The email was successfully sent", "email", MB_OK); -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_sent"); -#endif - } - else - { -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_failed"); -#endif - // MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); - } - } - else + std::ofstream f; + f.open( fname.c_str() ); + if( f.good() ) { -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_refused"); -#endif - } -} + f << body; + f.close(); -static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - //MSGFILTER *pmf; + NLMISC::launchProgram( "rcerror", fname ); + } - if (message == WM_COMMAND && HIWORD(wParam) == BN_CLICKED) - { - if ((HWND) lParam == checkIgnore) - { - IgnoreNextTime = !IgnoreNextTime; - } - else if ((HWND) lParam == debug) - { - sendEmail(); - NeedExit = true; - Result = ReportDebug; - if (DebugDefaultBehavior) - { - NLMISC_BREAKPOINT; - } - } - else if ((HWND) lParam == ignore) - { - sendEmail(); - NeedExit = true; - Result = ReportIgnore; - } - else if ((HWND) lParam == quit) - { - sendEmail(); - NeedExit = true; - Result = ReportQuit; + NLMISC::CFile::deleteFile( fname ); + - if (QuitDefaultBehavior) - { - // ace: we cannot call exit() because it's call the static object dtor and can crash the application - // if the dtor call order is not good. - //exit(EXIT_SUCCESS); #ifdef NL_OS_WINDOWS #ifndef NL_COMP_MINGW // disable the Windows popup telling that the application aborted and disable the dr watson report. @@ -166,193 +90,8 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM #endif // quit without calling atexit or static object dtors. abort(); - } - } - /*else if ((HWND) lParam == sendReport) - { - if (EmailFunction != NULL) - { - bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); - if (res) - { - EnableWindow(sendReport, FALSE); - MessageBox (dialog, "The email was successfully sent", "email", MB_OK); - CFile::createEmptyFile(getLogDirectory() + "report_sent"); - } - else - { - MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); - } - } - }*/ - } - else if (message == WM_CHAR) - { - if (wParam == 27) - { - // ESC -> ignore - sendEmail(); - NeedExit = true; - Result = ReportIgnore; - } - } - - return DefWindowProc (hWnd, message, wParam, lParam); -} - -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) -{ - // register the window - static bool AlreadyRegister = false; - if(!AlreadyRegister) - { - WNDCLASSW wc; - memset (&wc,0,sizeof(wc)); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = (WNDPROC)WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursor(NULL,IDC_ARROW); - wc.hbrBackground = (HBRUSH)COLOR_WINDOW; - wc.lpszClassName = L"NLReportWindow"; - wc.lpszMenuName = NULL; - if (!RegisterClassW(&wc)) return ReportError; - AlreadyRegister = true; - } - - ucstring formatedTitle = title.empty() ? ucstring("NeL report") : ucstring(title); - - - // create the window - dialog = CreateWindowW (L"NLReportWindow", (LPCWSTR)formatedTitle.c_str(), WS_DLGFRAME | WS_CAPTION /*| WS_THICKFRAME*/, CW_USEDEFAULT, CW_USEDEFAULT, 456, 400, NULL, NULL, GetModuleHandle(NULL), NULL); - - // create the font - HFONT font = CreateFont (-12, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); - - Subject = subject; - AttachedFile = attachedFile; - - // create the edit control - HWND edit = CreateWindowW (L"EDIT", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_READONLY | ES_LEFT | ES_MULTILINE, 7, 70, 429, 212, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (edit, WM_SETFONT, (WPARAM) font, TRUE); - - // set the edit text limit to lot of :) - SendMessage (edit, EM_LIMITTEXT, ~0U, 0); - - Body = addSlashR (body); - - // set the message in the edit text - SendMessage (edit, WM_SETTEXT, (WPARAM)0, (LPARAM)Body.c_str()); - - if (enableCheckIgnore) - { - // create the combo box control - checkIgnore = CreateWindowW (L"BUTTON", L"Don't display this report again", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_CHECKBOX, 7, 290, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (checkIgnore, WM_SETFONT, (WPARAM) font, TRUE); - - if(ignoreNextTime) - { - SendMessage (checkIgnore, BM_SETCHECK, BST_CHECKED, 0); - } - } - - // create the debug button control - debug = CreateWindowW (L"BUTTON", L"Debug", WS_CHILD | WS_VISIBLE, 7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (debug, WM_SETFONT, (WPARAM) font, TRUE); - - if (debugButton == 0) - EnableWindow(debug, FALSE); - - // create the ignore button control - ignore = CreateWindowW (L"BUTTON", L"Ignore", WS_CHILD | WS_VISIBLE, 75+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (ignore, WM_SETFONT, (WPARAM) font, TRUE); - - if (ignoreButton == 0) - EnableWindow(ignore, FALSE); - - // create the quit button control - quit = CreateWindowW (L"BUTTON", L"Quit", WS_CHILD | WS_VISIBLE, 75+75+7+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (quit, WM_SETFONT, (WPARAM) font, TRUE); - - if (quitButton == 0) - EnableWindow(quit, FALSE); - - // create the debug button control - sendReport = CreateWindowW (L"BUTTON", L"Don't send the report", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 7, 315+32, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (sendReport, WM_SETFONT, (WPARAM) font, TRUE); - - string formatedHeader; - if (header.empty()) - { - formatedHeader = "This application stopped to display this report."; - } - else - { - formatedHeader = header; - } - - // ace don't do that because it s slow to try to send a mail - //CanSendMailReport = sendReportButton && EmailFunction != NULL && EmailFunction("", "", "", "", "", true); - CanSendMailReport = sendReportButton && EmailFunction != NULL; - - if (CanSendMailReport) - formatedHeader += " Send report will only email the contents of the box below. Please, send it to help us (it could take few minutes to send the email, be patient)."; - else - EnableWindow(sendReport, FALSE); - - ucstring uc = ucstring::makeFromUtf8(formatedHeader); - - // create the label control - HWND label = CreateWindowW (L"STATIC", (LPCWSTR)uc.c_str(), WS_CHILD | WS_VISIBLE /*| SS_WHITERECT*/, 7, 7, 429, 51, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (label, WM_SETFONT, (WPARAM) font, TRUE); - - - DebugDefaultBehavior = debugButton==1; - QuitDefaultBehavior = quitButton==1; - - IgnoreNextTime = ignoreNextTime; - - // show until the cursor really show :) - while (ShowCursor(TRUE) < 0) - ; - - SetWindowPos (dialog, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); - - SetFocus(dialog); - SetForegroundWindow(dialog); - - NeedExit = false; - - while(!NeedExit) - { - MSG msg; - while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessageW(&msg); - } - nlSleep (1); - } - - // set the user result - ignoreNextTime = IgnoreNextTime; - - ShowWindow(dialog, SW_HIDE); - - - - DELETE_OBJECT(sendReport) - DELETE_OBJECT(quit) - DELETE_OBJECT(ignore) - DELETE_OBJECT(debug) - DELETE_OBJECT(checkIgnore) - DELETE_OBJECT(edit) - DELETE_OBJECT(label) - DELETE_OBJECT(dialog) - return Result; + return ReportQuit; } #endif diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 6958fe790..c7fdc97f8 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -539,6 +539,8 @@ void checkDriverVersion() void checkDriverDepth () { + nlassert( false ); + // Check desktop is in 32 bit else no window mode allowed. if (ClientCfg.Windowed) { From ee0b630f95bcee30e8678104de553b388e13bd3f Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 19 Feb 2015 00:20:18 +0100 Subject: [PATCH 058/175] Added the Ryzom Core Error Reporter's skeleton. --HG-- branch : feature-crashreport --- code/nel/CMakeLists.txt | 3 ++ code/nel/rcerror/CMakeLists.txt | 37 +++++++++++++ code/nel/rcerror/rcerror.cpp | 50 ++++++++++++++++++ code/nel/rcerror/rcerror_socket.cpp | 20 +++++++ code/nel/rcerror/rcerror_socket.h | 23 ++++++++ code/nel/rcerror/rcerror_widget.cpp | 70 ++++++++++++++++++++++++ code/nel/rcerror/rcerror_widget.h | 47 +++++++++++++++++ code/nel/rcerror/rcerror_widget.ui | 82 +++++++++++++++++++++++++++++ 8 files changed, 332 insertions(+) create mode 100644 code/nel/rcerror/CMakeLists.txt create mode 100644 code/nel/rcerror/rcerror.cpp create mode 100644 code/nel/rcerror/rcerror_socket.cpp create mode 100644 code/nel/rcerror/rcerror_socket.h create mode 100644 code/nel/rcerror/rcerror_widget.cpp create mode 100644 code/nel/rcerror/rcerror_widget.h create mode 100644 code/nel/rcerror/rcerror_widget.ui diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index 53bf071e3..00290d097 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -84,3 +84,6 @@ IF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) ADD_SUBDIRECTORY(tools) ENDIF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) +IF(WITH_QT) + ADD_SUBDIRECTORY(rcerror) +ENDIF(WITH_QT) diff --git a/code/nel/rcerror/CMakeLists.txt b/code/nel/rcerror/CMakeLists.txt new file mode 100644 index 000000000..412da9b6c --- /dev/null +++ b/code/nel/rcerror/CMakeLists.txt @@ -0,0 +1,37 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR} ${QT_INCLUDES}) +FILE(GLOB RCERROR_SRC *.cpp) +FILE(GLOB RCERROR_HDR *h) + +SET(RCERROR_MOC_HDR +rcerror_socket.h +rcerror_widget.h +) + +SET(RCERROR_UI +rcerror_widget.ui +) + +SET(QT_USE_QTGUI TRUE) +SET(QT_USE_QTNETWORK TRUE) +SET(QT_USE_QTMAIN TRUE) +SET(QT_USE_QTOPENGL FALSE) +SET(QT_USE_QTXML FALSE) + +INCLUDE(${QT_USE_FILE}) +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +QT4_WRAP_CPP(RCERROR_MOC_SRC ${RCERROR_MOC_HDR}) +QT4_WRAP_UI(RCERROR_UI_HDR ${RCERROR_UI}) + +SOURCE_GROUP(QtResources FILES ${RCERROR_UI}) +SOURCE_GROUP(QtGeneratedUiHdr FILES ${RCERROR_UI_HDR}) +SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${RCERROR_MOC_SRC}) +SOURCE_GROUP("source files" FILES ${RCERROR_SRC}) +SOURCE_GROUP("header files" FILES ${RCERROR_HDR}) + +ADD_EXECUTABLE(rcerror WIN32 MACOSX_BUNDLE ${RCERROR_SRC} ${RCERROR_MOC_HDR} ${RCERROR_MOC_SRC} ${RCERROR_UI_HDR}) +TARGET_LINK_LIBRARIES(rcerror ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) + +NL_DEFAULT_PROPS(rcerror "Ryzom Core Error Reporter") +NL_ADD_RUNTIME_FLAGS(rcerror) + diff --git a/code/nel/rcerror/rcerror.cpp b/code/nel/rcerror/rcerror.cpp new file mode 100644 index 000000000..6fa876e81 --- /dev/null +++ b/code/nel/rcerror/rcerror.cpp @@ -0,0 +1,50 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#include "rcerror_widget.h" +#include +#include + +int main( int argc, char **argv ) +{ + QApplication app( argc, argv ); + +#if 0 + + if( argc < 2 ) + { + QMessageBox::information( NULL, + QObject::tr( "Error" ), + QObject::tr( "Need to specify a path to the error report." ) ); + return 1; + } +#endif + + RCErrorWidget w; + +#if 0 + w.setFileName( argv[ 1 ] ); +#else + w.setFileName( "log.log" ); +#endif + + w.show(); + + return app.exec(); +} \ No newline at end of file diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/rcerror/rcerror_socket.cpp new file mode 100644 index 000000000..f39946423 --- /dev/null +++ b/code/nel/rcerror/rcerror_socket.cpp @@ -0,0 +1,20 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + +#include "rcerror_socket.h" + diff --git a/code/nel/rcerror/rcerror_socket.h b/code/nel/rcerror/rcerror_socket.h new file mode 100644 index 000000000..8cd9f54ad --- /dev/null +++ b/code/nel/rcerror/rcerror_socket.h @@ -0,0 +1,23 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#ifndef RCERROR_SOCKET +#define RCERROR_SOCKET +#endif + diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp new file mode 100644 index 000000000..a50b273d3 --- /dev/null +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -0,0 +1,70 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#include "rcerror_widget.h" +#include +#include +#include + +RCErrorWidget::RCErrorWidget( QWidget *parent ) : +QWidget( parent ) +{ + m_ui.setupUi( this ); + QTimer::singleShot( 1, this, SLOT( onLoad() ) ); + + connect( m_ui.sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); + connect( m_ui.canceButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); + connect( m_ui.emailCB, SIGNAL( stateChanged( int ) ), this, SLOT( onCBClicked() ) ); +} + +RCErrorWidget::~RCErrorWidget() +{ +} + +void RCErrorWidget::onLoad() +{ + QFile f( m_fileName ); + bool b = f.open( QFile::ReadOnly | QFile::Text ); + if( !b ) + { + return; + } + + QTextStream ss( &f ); + m_ui.reportEdit->setPlainText( ss.readAll() ); + f.close(); +} + +void RCErrorWidget::onSendClicked() +{ + close(); +} + +void RCErrorWidget::onCancelClicked() +{ + close(); +} + +void RCErrorWidget::onCBClicked() +{ + m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); +} + + + diff --git a/code/nel/rcerror/rcerror_widget.h b/code/nel/rcerror/rcerror_widget.h new file mode 100644 index 000000000..ae5629e55 --- /dev/null +++ b/code/nel/rcerror/rcerror_widget.h @@ -0,0 +1,47 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#ifndef RCERROR_WIDGET +#define RCERROR_SOCKET + + +#include "ui_rcerror_widget.h" + +class RCErrorWidget : public QWidget +{ + Q_OBJECT +public: + RCErrorWidget( QWidget *parent = NULL ); + ~RCErrorWidget(); + + void setFileName( const char *fn ){ m_fileName = fn; } + +private Q_SLOTS: + void onLoad(); + void onSendClicked(); + void onCancelClicked(); + void onCBClicked(); + +private: + Ui::RCErrorWidget m_ui; + QString m_fileName; +}; + +#endif + diff --git a/code/nel/rcerror/rcerror_widget.ui b/code/nel/rcerror/rcerror_widget.ui new file mode 100644 index 000000000..72e5f92f5 --- /dev/null +++ b/code/nel/rcerror/rcerror_widget.ui @@ -0,0 +1,82 @@ + + + RCErrorWidget + + + Qt::ApplicationModal + + + + 0 + 0 + 400 + 407 + + + + Ryzom Core error report + + + + + + What were you doing when the crash occured? + + + + + + + + + + Contents of the report ( automatically generated ) + + + + + + + true + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Email me if you have further questions, or updates on this issue + + + + + + + false + + + Enter your email address here + + + + + + + Send + + + + + + + Cancel + + + + + + + + From 03ce683e4960d5f8606b05ca12083e10c6599e86 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 01:59:04 +0100 Subject: [PATCH 059/175] Implemented the bug report Qt app and an example web app that takes the report. --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror_data.h | 33 ++++++++ code/nel/rcerror/rcerror_socket.cpp | 46 +++++++++++ code/nel/rcerror/rcerror_socket.h | 26 ++++++ code/nel/rcerror/rcerror_widget.cpp | 25 +++++- code/nel/rcerror/rcerror_widget.h | 7 +- code/web/rcerror_web/config.inc.php | 30 +++++++ code/web/rcerror_web/log.inc.php | 45 +++++++++++ code/web/rcerror_web/rcerror.php | 112 ++++++++++++++++++++++++++ code/web/rcerror_web/rcerror_test.htm | 19 +++++ 9 files changed, 341 insertions(+), 2 deletions(-) create mode 100644 code/nel/rcerror/rcerror_data.h create mode 100644 code/web/rcerror_web/config.inc.php create mode 100644 code/web/rcerror_web/log.inc.php create mode 100644 code/web/rcerror_web/rcerror.php create mode 100644 code/web/rcerror_web/rcerror_test.htm diff --git a/code/nel/rcerror/rcerror_data.h b/code/nel/rcerror/rcerror_data.h new file mode 100644 index 000000000..146102038 --- /dev/null +++ b/code/nel/rcerror/rcerror_data.h @@ -0,0 +1,33 @@ +// Ryzom Core MMORPG framework - Error Reporter +// +// Copyright (C) 2015 Laszlo Kis-Adam +// Copyright (C) 2010 Ryzom Core +// +// 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 . + + +#ifndef RCERROR_DATA +#define RCERROR_DATA + +#include + + +struct RCErrorData +{ + QString description; + QString report; + QString email; +}; + +#endif diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/rcerror/rcerror_socket.cpp index f39946423..d84f69ec8 100644 --- a/code/nel/rcerror/rcerror_socket.cpp +++ b/code/nel/rcerror/rcerror_socket.cpp @@ -17,4 +17,50 @@ // along with this program. If not, see . #include "rcerror_socket.h" +#include +#include +#include + +namespace +{ + static const char *BUG_URL = "http://192.168.2.67/dfighter/r.php"; +} + +class RCErrorSocketPvt +{ +public: + QNetworkAccessManager mgr; +}; + +RCErrorSocket::RCErrorSocket( QObject *parent ) : +QObject( parent ) +{ + m_pvt = new RCErrorSocketPvt(); + + connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished() ) ); +} + +RCErrorSocket::~RCErrorSocket() +{ + delete m_pvt; +} + +void RCErrorSocket::sendReport( const RCErrorData &data ) +{ + QUrl params; + params.addQueryItem( "report", data.report ); + params.addQueryItem( "descr", data.description ); + params.addQueryItem( "email", data.email ); + + QUrl url( BUG_URL ); + QNetworkRequest request( url ); + request.setRawHeader( "Connection", "close" ); + + m_pvt->mgr.post( request, params.encodedQuery() ); +} + +void RCErrorSocket::onFinished() +{ + Q_EMIT reportSent(); +} diff --git a/code/nel/rcerror/rcerror_socket.h b/code/nel/rcerror/rcerror_socket.h index 8cd9f54ad..ee0f510b1 100644 --- a/code/nel/rcerror/rcerror_socket.h +++ b/code/nel/rcerror/rcerror_socket.h @@ -19,5 +19,31 @@ #ifndef RCERROR_SOCKET #define RCERROR_SOCKET + +#include +#include "rcerror_data.h" + +class RCErrorSocketPvt; + +class RCErrorSocket : public QObject +{ + Q_OBJECT + +public: + RCErrorSocket( QObject *parent ); + ~RCErrorSocket(); + + void sendReport( const RCErrorData &data ); + +Q_SIGNALS: + void reportSent(); + +private Q_SLOTS: + void onFinished(); + +private: + RCErrorSocketPvt *m_pvt; +}; + #endif diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp index a50b273d3..faded0afa 100644 --- a/code/nel/rcerror/rcerror_widget.cpp +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -18,23 +18,32 @@ #include "rcerror_widget.h" +#include "rcerror_socket.h" +#include "rcerror_data.h" #include #include #include +#include RCErrorWidget::RCErrorWidget( QWidget *parent ) : QWidget( parent ) { m_ui.setupUi( this ); + + m_socket = new RCErrorSocket( this ); + QTimer::singleShot( 1, this, SLOT( onLoad() ) ); connect( m_ui.sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); connect( m_ui.canceButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); connect( m_ui.emailCB, SIGNAL( stateChanged( int ) ), this, SLOT( onCBClicked() ) ); + + connect( m_socket, SIGNAL( reportSent() ), this, SLOT( onReportSent() ) ); } RCErrorWidget::~RCErrorWidget() { + m_socket = NULL; } void RCErrorWidget::onLoad() @@ -53,7 +62,14 @@ void RCErrorWidget::onLoad() void RCErrorWidget::onSendClicked() { - close(); + m_ui.sendButton->setEnabled( false ); + + RCErrorData data; + data.description = m_ui.descriptionEdit->toPlainText(); + data.report = m_ui.reportEdit->toPlainText(); + data.email = m_ui.emailEdit->text(); + + m_socket->sendReport( data ); } void RCErrorWidget::onCancelClicked() @@ -66,5 +82,12 @@ void RCErrorWidget::onCBClicked() m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); } +void RCErrorWidget::onReportSent() +{ + QMessageBox::information( this, + tr( "Report sent" ), + tr( "The report has been sent." ) ); + close(); +} diff --git a/code/nel/rcerror/rcerror_widget.h b/code/nel/rcerror/rcerror_widget.h index ae5629e55..869838e41 100644 --- a/code/nel/rcerror/rcerror_widget.h +++ b/code/nel/rcerror/rcerror_widget.h @@ -18,11 +18,13 @@ #ifndef RCERROR_WIDGET -#define RCERROR_SOCKET +#define RCERROR_WIDGET #include "ui_rcerror_widget.h" +class RCErrorSocket; + class RCErrorWidget : public QWidget { Q_OBJECT @@ -37,10 +39,13 @@ private Q_SLOTS: void onSendClicked(); void onCancelClicked(); void onCBClicked(); + + void onReportSent(); private: Ui::RCErrorWidget m_ui; QString m_fileName; + RCErrorSocket *m_socket; }; #endif diff --git a/code/web/rcerror_web/config.inc.php b/code/web/rcerror_web/config.inc.php new file mode 100644 index 000000000..fe4b3e928 --- /dev/null +++ b/code/web/rcerror_web/config.inc.php @@ -0,0 +1,30 @@ + +// +// 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 . + +class BugReportConfig +{ + static public $dbhost = "localhost"; + static public $dbport = "3306"; + static public $dbdb = "bugs"; + static public $dbuser = "bugs"; + static public $dbpw = "bugs"; +} + +?> diff --git a/code/web/rcerror_web/log.inc.php b/code/web/rcerror_web/log.inc.php new file mode 100644 index 000000000..71deee24f --- /dev/null +++ b/code/web/rcerror_web/log.inc.php @@ -0,0 +1,45 @@ + +// +// 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 . + +/// Simple file logger class +class Logger +{ + private $lf = NULL; + + function __construct() + { + $this->lf = fopen( 'log.txt', 'a' ); + if( $this->lf === FALSE ) + exit( 1 ); + } + + function __destruct() + { + fclose( $this->lf ); + } + + public function log( $msg ) + { + $date = date( "[M d, Y H:i:s] " ); + fwrite( $this->lf, $date . $msg . "\n" ); + } +} + +?> diff --git a/code/web/rcerror_web/rcerror.php b/code/web/rcerror_web/rcerror.php new file mode 100644 index 000000000..d20214d11 --- /dev/null +++ b/code/web/rcerror_web/rcerror.php @@ -0,0 +1,112 @@ + +// +// 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 . + +require_once( 'config.inc.php' ); +require_once( 'log.inc.php' ); + +/// Example web application that takes bug reports from the bug reporter Qt app +class BugReportGatherApp +{ + private $db = NULL; + private $logger = NULL; + + function __construct() + { + $this->logger = new Logger(); + } + + private function logPOSTVars() + { + $report = ""; + $descr = ""; + $email = ""; + + if( isset( $_POST[ 'report' ] ) ) + $report = $_POST[ 'report' ]; + + if( isset( $_POST[ 'descr' ] ) ) + $descr = $_POST[ 'descr' ]; + + if( isset( $_POST[ 'email' ] ) ) + $email = $_POST[ 'email' ]; + + $this->logger->log( 'report: ' . "\n" . $report ); + $this->logger->log( 'description: ' . "\n" . $descr ); + $this->logger->log( 'email: ' . "\n" . $email ); + } + + private function buildQuery() + { + $report = ""; + $descr = ""; + $email = ""; + + if( isset( $_POST[ 'report' ] ) ) + $report = $_POST[ 'report' ]; + + if( isset( $_POST[ 'descr' ] ) ) + $descr = $_POST[ 'descr' ]; + + if( isset( $_POST[ 'email' ] ) ) + $email = $_POST[ 'email' ]; + + $report = $this->db->real_escape_string( $report ); + $descr = $this->db->real_escape_string( $descr ); + $email = $this->db->real_escape_string( $email ); + + + $q = "INSERT INTO `bugs` (`report`,`description`,`email`) VALUES ("; + $q .= "'$report',"; + $q .= "'$descr',"; + $q .= "'$email')"; + + return $q; + } + + public function exec() + { + //$this->logPOSTVars(); + + $this->db = new mysqli( BugReportConfig::$dbhost, BugReportConfig::$dbuser, BugReportConfig::$dbpw, BugReportConfig::$dbdb, BugReportConfig::$dbport ); + if( mysqli_connect_error() ) + { + $this->logger->log( "Connection error :(" ); + $this->logger->log( mysqli_connect_error() ); + return; + } + + $q = $this->buildQuery(); + $result = $this->db->query( $q ); + if( $result !== TRUE ) + { + $this->logger->log( "Query failed :(" ); + $this->logger->log( 'Query: ' . $q ); + $this->logPOSTVars(); + } + + $this->db->close(); + } +} + + +$app = new BugReportGatherApp(); +$app->exec(); + +?> diff --git a/code/web/rcerror_web/rcerror_test.htm b/code/web/rcerror_web/rcerror_test.htm new file mode 100644 index 000000000..eb314d3f7 --- /dev/null +++ b/code/web/rcerror_web/rcerror_test.htm @@ -0,0 +1,19 @@ + +Ryzom Core Error Report Web application test harness + +
+ + + + + + + + + +
Description
Report
Email
+ +
+
+ + From 9518a80c99da94ed0e9d4ca46d63da686f9d6966 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 02:03:33 +0100 Subject: [PATCH 060/175] Probably a good idea to look for rcerror as rcerror.exe on Windows. --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 39f27de5f..1a94e17a6 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -76,7 +76,11 @@ TReportResult report (const std::string &title, const std::string &header, const f << body; f.close(); +#ifdef NL_OS_WINDOWS + NLMISC::launchProgram( "rcerror.exe", fname ); +#else NLMISC::launchProgram( "rcerror", fname ); +#endif } NLMISC::CFile::deleteFile( fname ); From f0869aa65961ce24fea94e44358df57c0b964a06 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 02:35:11 +0100 Subject: [PATCH 061/175] Unfortunately on Windows argc and argv parameters are unreliable inside a Qt application, so I had to hardcode the report file name. :( --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror.cpp | 19 +------------------ code/nel/rcerror/rcerror_widget.cpp | 5 ++++- code/nel/src/misc/report.cpp | 8 +------- 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/code/nel/rcerror/rcerror.cpp b/code/nel/rcerror/rcerror.cpp index 6fa876e81..0d5088167 100644 --- a/code/nel/rcerror/rcerror.cpp +++ b/code/nel/rcerror/rcerror.cpp @@ -25,25 +25,8 @@ int main( int argc, char **argv ) { QApplication app( argc, argv ); -#if 0 - - if( argc < 2 ) - { - QMessageBox::information( NULL, - QObject::tr( "Error" ), - QObject::tr( "Need to specify a path to the error report." ) ); - return 1; - } -#endif - RCErrorWidget w; - -#if 0 - w.setFileName( argv[ 1 ] ); -#else - w.setFileName( "log.log" ); -#endif - + w.setFileName( "rcerrorlog.txt" ); w.show(); return app.exec(); diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp index faded0afa..6c31533ad 100644 --- a/code/nel/rcerror/rcerror_widget.cpp +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -52,7 +52,10 @@ void RCErrorWidget::onLoad() bool b = f.open( QFile::ReadOnly | QFile::Text ); if( !b ) { - return; + QMessageBox::information( this, + tr( "No log file found" ), + tr( "There was no log file found, therefore nothing to report. Exiting..." ) ); + close(); } QTextStream ss( &f ); diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 1a94e17a6..88c707aaa 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -64,10 +64,7 @@ void report () TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { - std::string fname; - - time_t s = time( NULL ); - fname = std::string( "log_" ) + toString( s ) + ".txt"; + std::string fname = "rcerrorlog.txt"; std::ofstream f; f.open( fname.c_str() ); @@ -83,9 +80,6 @@ TReportResult report (const std::string &title, const std::string &header, const #endif } - NLMISC::CFile::deleteFile( fname ); - - #ifdef NL_OS_WINDOWS #ifndef NL_COMP_MINGW // disable the Windows popup telling that the application aborted and disable the dr watson report. From 14a709449a4b6271a4762ba8c758b54bdb0745f1 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 02:44:22 +0100 Subject: [PATCH 062/175] Override the cursor while sending the report. --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror_socket.cpp | 2 +- code/nel/rcerror/rcerror_widget.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/rcerror/rcerror_socket.cpp index d84f69ec8..6b1fd932d 100644 --- a/code/nel/rcerror/rcerror_socket.cpp +++ b/code/nel/rcerror/rcerror_socket.cpp @@ -23,7 +23,7 @@ namespace { - static const char *BUG_URL = "http://192.168.2.67/dfighter/r.php"; + static const char *BUG_URL = "http://192.168.2.66/dfighter/r.php"; } class RCErrorSocketPvt diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp index 6c31533ad..e02090e0d 100644 --- a/code/nel/rcerror/rcerror_widget.cpp +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -66,6 +66,7 @@ void RCErrorWidget::onLoad() void RCErrorWidget::onSendClicked() { m_ui.sendButton->setEnabled( false ); + QApplication::setOverrideCursor( Qt::WaitCursor ); RCErrorData data; data.description = m_ui.descriptionEdit->toPlainText(); @@ -87,6 +88,8 @@ void RCErrorWidget::onCBClicked() void RCErrorWidget::onReportSent() { + QApplication::setOverrideCursor( Qt::ArrowCursor ); + QMessageBox::information( this, tr( "Report sent" ), tr( "The report has been sent." ) ); From 72566f1a71ae580ad3a61e4376f24c111b750a04 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 02:54:05 +0100 Subject: [PATCH 063/175] Tell the user if the report couldn't be sent. --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror_socket.cpp | 10 +++++++--- code/nel/rcerror/rcerror_socket.h | 4 +++- code/nel/rcerror/rcerror_widget.cpp | 11 +++++++++++ code/nel/rcerror/rcerror_widget.h | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/rcerror/rcerror_socket.cpp index 6b1fd932d..8a011c046 100644 --- a/code/nel/rcerror/rcerror_socket.cpp +++ b/code/nel/rcerror/rcerror_socket.cpp @@ -20,6 +20,7 @@ #include #include #include +#include namespace { @@ -37,7 +38,7 @@ QObject( parent ) { m_pvt = new RCErrorSocketPvt(); - connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished() ) ); + connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) ); } RCErrorSocket::~RCErrorSocket() @@ -59,8 +60,11 @@ void RCErrorSocket::sendReport( const RCErrorData &data ) m_pvt->mgr.post( request, params.encodedQuery() ); } -void RCErrorSocket::onFinished() +void RCErrorSocket::onFinished( QNetworkReply *reply ) { - Q_EMIT reportSent(); + if( reply->error() != QNetworkReply::NoError ) + Q_EMIT reportFailed(); + else + Q_EMIT reportSent(); } diff --git a/code/nel/rcerror/rcerror_socket.h b/code/nel/rcerror/rcerror_socket.h index ee0f510b1..a37fa32d0 100644 --- a/code/nel/rcerror/rcerror_socket.h +++ b/code/nel/rcerror/rcerror_socket.h @@ -24,6 +24,7 @@ #include "rcerror_data.h" class RCErrorSocketPvt; +class QNetworkReply; class RCErrorSocket : public QObject { @@ -37,9 +38,10 @@ public: Q_SIGNALS: void reportSent(); + void reportFailed(); private Q_SLOTS: - void onFinished(); + void onFinished( QNetworkReply *reply ); private: RCErrorSocketPvt *m_pvt; diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp index e02090e0d..a28afbca6 100644 --- a/code/nel/rcerror/rcerror_widget.cpp +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -39,6 +39,7 @@ QWidget( parent ) connect( m_ui.emailCB, SIGNAL( stateChanged( int ) ), this, SLOT( onCBClicked() ) ); connect( m_socket, SIGNAL( reportSent() ), this, SLOT( onReportSent() ) ); + connect( m_socket, SIGNAL( reportFailed() ), this, SLOT( onReportFailed() ) ); } RCErrorWidget::~RCErrorWidget() @@ -97,3 +98,13 @@ void RCErrorWidget::onReportSent() close(); } +void RCErrorWidget::onReportFailed() +{ + QApplication::setOverrideCursor( Qt::ArrowCursor ); + + QMessageBox::information( this, + tr( "Report failed" ), + tr( "Failed to send the report..." ) ); + + close(); +} \ No newline at end of file diff --git a/code/nel/rcerror/rcerror_widget.h b/code/nel/rcerror/rcerror_widget.h index 869838e41..1dd51c2af 100644 --- a/code/nel/rcerror/rcerror_widget.h +++ b/code/nel/rcerror/rcerror_widget.h @@ -41,6 +41,7 @@ private Q_SLOTS: void onCBClicked(); void onReportSent(); + void onReportFailed(); private: Ui::RCErrorWidget m_ui; From ef56d28542c2f4f840eebbf0c52965158dfd5b79 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 02:56:22 +0100 Subject: [PATCH 064/175] Oups --HG-- branch : feature-crashreport --- code/ryzom/client/src/init.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index c7fdc97f8..6958fe790 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -539,8 +539,6 @@ void checkDriverVersion() void checkDriverDepth () { - nlassert( false ); - // Check desktop is in 32 bit else no window mode allowed. if (ClientCfg.Windowed) { From 9b29695635c22349a848b05b188ec258d2a4c20c Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 20 Feb 2015 03:22:02 +0100 Subject: [PATCH 065/175] Typo... --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/rcerror/rcerror_data.h b/code/nel/rcerror/rcerror_data.h index 146102038..9f12b12fd 100644 --- a/code/nel/rcerror/rcerror_data.h +++ b/code/nel/rcerror/rcerror_data.h @@ -20,7 +20,7 @@ #ifndef RCERROR_DATA #define RCERROR_DATA -#include +#include struct RCErrorData From 6db8abf95cef7cda4ff7e9cecd8bef90c066ac2a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 16:24:19 +0100 Subject: [PATCH 066/175] Visual Studio 2013 compilation support for NLMISC --HG-- branch : develop --- code/CMakeLists.txt | 10 +- code/CMakeModules/FindIconv.cmake | 131 +++++++++++-------------- code/CMakeModules/FindMSVC.cmake | 2 +- code/CMakeModules/nel.cmake | 19 +++- code/nel/include/nel/misc/types_nl.h | 6 ++ code/nel/src/misc/debug.cpp | 29 +++--- code/nel/src/misc/displayer.cpp | 26 ++--- code/nel/src/misc/words_dictionary.cpp | 2 +- 8 files changed, 114 insertions(+), 111 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index dcc9f9c93..0ffef9c1e 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -112,16 +112,20 @@ IF(WITH_STATIC_LIBXML2) SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC) ENDIF(WITH_STATIC_LIBXML2) +IF(WITH_LIBXML2_ICONV) + FIND_PACKAGE(Iconv REQUIRED) + INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES}) +ENDIF(WITH_LIBXML2_ICONV) + IF(WITH_STATIC) # libxml2 could need winsock2 library SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB}) # on Mac OS X libxml2 requires iconv and liblzma IF(APPLE) - FIND_PACKAGE(Iconv REQUIRED) FIND_PACKAGE(LibLZMA REQUIRED) - SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES} ${LIBLZMA_LIBRARIES}) - INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES}) ENDIF(APPLE) ENDIF(WITH_STATIC) diff --git a/code/CMakeModules/FindIconv.cmake b/code/CMakeModules/FindIconv.cmake index 5e9e48250..092b35702 100644 --- a/code/CMakeModules/FindIconv.cmake +++ b/code/CMakeModules/FindIconv.cmake @@ -1,4 +1,4 @@ -# - Try to find Iconv on Mac OS X +# - Try to find Iconv # Once done this will define # # ICONV_FOUND - system has Iconv @@ -6,78 +6,59 @@ # ICONV_LIBRARIES - Link these to use Iconv # ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const # +include(CheckCCompilerFlag) +include(CheckCSourceCompiles) -IF(APPLE) - include(CheckCCompilerFlag) - include(CheckCSourceCompiles) - - IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) - ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - - IF(APPLE) - FIND_PATH(ICONV_INCLUDE_DIR iconv.h - PATHS - /opt/local/include/ - NO_CMAKE_SYSTEM_PATH - ) - - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c - PATHS - /opt/local/lib/ - NO_CMAKE_SYSTEM_PATH - ) - ENDIF(APPLE) - - FIND_PATH(ICONV_INCLUDE_DIR iconv.h PATHS /opt/local/include /sw/include) - - string(REGEX REPLACE "(.*)/include/?" "\\1" ICONV_INCLUDE_BASE_DIR "${ICONV_INCLUDE_DIR}") - - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib) - - IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) - ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - - set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) - IF(ICONV_FOUND) - check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR) - set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}") - if(ICONV_HAVE_WERROR) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - endif(ICONV_HAVE_WERROR) - check_c_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0; - } - " ICONV_SECOND_ARGUMENT_IS_CONST ) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") - ENDIF(ICONV_FOUND) - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) - - IF(ICONV_FOUND) - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) - ELSE(ICONV_FOUND) - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) - ENDIF(ICONV_FOUND) - - MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES - ICONV_SECOND_ARGUMENT_IS_CONST - ) -ENDIF(APPLE) +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h HINTS /sw/include/ PATHS /opt/local) + +FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c PATHS /opt/local) + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR) + set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}") + if(ICONV_HAVE_WERROR) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif(ICONV_HAVE_WERROR) + check_c_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}") +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) diff --git a/code/CMakeModules/FindMSVC.cmake b/code/CMakeModules/FindMSVC.cmake index 644fc57e6..94146775d 100644 --- a/code/CMakeModules/FindMSVC.cmake +++ b/code/CMakeModules/FindMSVC.cmake @@ -62,7 +62,7 @@ IF(MSVC12) IF(NOT MSVC12_REDIST_DIR) # If you have VC++ 2013 Express, put x64/Microsoft.VC120.CRT/*.dll in ${EXTERNAL_PATH}/redist SET(MSVC12_REDIST_DIR "${EXTERNAL_PATH}/redist") - ENDIF(NOT MSVC11_REDIST_DIR) + ENDIF(NOT MSVC12_REDIST_DIR) ELSEIF(MSVC11) DETECT_VC_VERSION("11.0") SET(MSVC_TOOLSET "110") diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 15f6d131d..081da67ca 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -255,6 +255,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) ELSE(WITH_STATIC) OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF) ENDIF(WITH_STATIC) + IF(APPLE) + OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON ) + ELSE(APPLE) + OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" OFF) + ENDIF(APPLE) OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF) IF(WIN32) OPTION(WITH_EXTERNAL "With provided external." ON ) @@ -558,9 +563,15 @@ MACRO(NL_SETUP_BUILD) # Ignore default include paths ADD_PLATFORM_FLAGS("/X") - IF(MSVC11) + IF(MSVC12) ADD_PLATFORM_FLAGS("/Gy- /MP") - # /Ox is working with VC++ 2010, but custom optimizations don't exist + # /Ox is working with VC++ 2013, but custom optimizations don't exist + SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}") + # without inlining it's unusable, use custom optimizations again + SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}") + ELSEIF(MSVC11) + ADD_PLATFORM_FLAGS("/Gy- /MP") + # /Ox is working with VC++ 2012, but custom optimizations don't exist SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}") # without inlining it's unusable, use custom optimizations again SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}") @@ -582,9 +593,9 @@ MACRO(NL_SETUP_BUILD) SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}") # without inlining it's unusable, use custom optimizations again SET(DEBUG_CFLAGS "/Od /Ob1 ${DEBUG_CFLAGS}") - ELSE(MSVC11) + ELSE(MSVC12) MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}") - ENDIF(MSVC11) + ENDIF(MSVC12) ADD_PLATFORM_FLAGS("/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /Zm1000 /wd4250") diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index f1ed871fc..7a6ee2662 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -414,6 +414,12 @@ extern void operator delete[](void *p) throw(); # define CHashMap stdext::hash_map # define CHashSet stdext::hash_set # define CHashMultiMap stdext::hash_multimap +#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION == 110) +# include +# include +# define CHashMap ::std::hash_map +# define CHashSet ::std::hash_set +# define CHashMultiMap ::std::hash_multimap #elif defined(NL_COMP_GCC) // GCC4 # include # include diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index c7667acc2..a4037607f 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -17,20 +17,6 @@ #include "stdmisc.h" #include "nel/misc/types_nl.h" -#include "nel/misc/debug.h" - -#ifdef HAVE_NELCONFIG_H -# include "nelconfig.h" -#endif // HAVE_NELCONFIG_H - -#include "nel/misc/log.h" -#include "nel/misc/displayer.h" -#include "nel/misc/mem_displayer.h" -#include "nel/misc/command.h" -#include "nel/misc/report.h" -#include "nel/misc/path.h" -#include "nel/misc/variable.h" -#include "nel/misc/system_info.h" #ifdef NL_OS_WINDOWS # define _WIN32_WINDOWS 0x0410 @@ -59,6 +45,21 @@ # include #endif +#include "nel/misc/debug.h" + +#ifdef HAVE_NELCONFIG_H +# include "nelconfig.h" +#endif // HAVE_NELCONFIG_H + +#include "nel/misc/log.h" +#include "nel/misc/displayer.h" +#include "nel/misc/mem_displayer.h" +#include "nel/misc/command.h" +#include "nel/misc/report.h" +#include "nel/misc/path.h" +#include "nel/misc/variable.h" +#include "nel/misc/system_info.h" + #define NL_NO_DEBUG_FILES 1 using namespace std; diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index d48c44d02..8b6b7a577 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -18,6 +18,19 @@ #include "nel/misc/types_nl.h" +#ifdef NL_OS_WINDOWS +// these defines is for IsDebuggerPresent(). it'll not compile on windows 95 +// just comment this and the IsDebuggerPresent to compile on windows 95 +# define _WIN32_WINDOWS 0x0410 +# ifndef NL_COMP_MINGW +# define WINVER 0x0400 +# define NOMINMAX +# endif +# include +#else +# define IsDebuggerPresent() false +#endif + #ifdef NL_OS_WINDOWS # include # include @@ -35,19 +48,6 @@ #include "nel/misc/debug.h" -#ifdef NL_OS_WINDOWS -// these defines is for IsDebuggerPresent(). it'll not compile on windows 95 -// just comment this and the IsDebuggerPresent to compile on windows 95 -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include -#else -# define IsDebuggerPresent() false -#endif - #include "nel/misc/displayer.h" using namespace std; diff --git a/code/nel/src/misc/words_dictionary.cpp b/code/nel/src/misc/words_dictionary.cpp index e2113e62d..4d5057dd7 100644 --- a/code/nel/src/misc/words_dictionary.cpp +++ b/code/nel/src/misc/words_dictionary.cpp @@ -251,7 +251,7 @@ void CWordsDictionary::exactLookupByKey( const CSString& key, CVectorSString& re */ inline CSString CWordsDictionary::makeResult( const CSString &key, const CSString &word ) { - return key + CSString(": ") + word; + return key + ": " + word.c_str(); } From 7ea4cff032bb5ff3a73ef5a65b2eee1f5c6d8804 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 16:29:09 +0100 Subject: [PATCH 067/175] Visual Studio 2013 compilation support for NLNET --HG-- branch : develop --- code/nel/src/net/service.cpp | 6 ------ code/nel/src/net/stdnet.h | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/code/nel/src/net/service.cpp b/code/nel/src/net/service.cpp index f42806245..84abb4bfb 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.cpp @@ -23,12 +23,6 @@ #ifdef NL_OS_WINDOWS // these defines is for IsDebuggerPresent(). it'll not compile on windows 95 // just comment this and the IsDebuggerPresent to compile on windows 95 -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include # include #elif defined NL_OS_UNIX # include diff --git a/code/nel/src/net/stdnet.h b/code/nel/src/net/stdnet.h index d18db3222..df2bc931d 100644 --- a/code/nel/src/net/stdnet.h +++ b/code/nel/src/net/stdnet.h @@ -17,7 +17,9 @@ #include "nel/misc/types_nl.h" #ifdef NL_OS_WINDOWS +# define _WIN32_WINDOWS 0x0410 # ifndef NL_COMP_MINGW +# define WINVER 0x0400 # define NOMINMAX # endif # include From cb986cba6f1a1e4d34db90f4a95eafc58de50c06 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 16:31:54 +0100 Subject: [PATCH 068/175] Visual Studio 2013 compilation support for NLPACS --HG-- branch : develop --- code/nel/src/pacs/local_retriever.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/pacs/local_retriever.cpp b/code/nel/src/pacs/local_retriever.cpp index 7158cee0a..c17709c70 100644 --- a/code/nel/src/pacs/local_retriever.cpp +++ b/code/nel/src/pacs/local_retriever.cpp @@ -2253,7 +2253,7 @@ bool NLPACS::CLocalRetriever::checkSurfaceIntegrity(uint surf, NLMISC::CVector t for (k=0; k+1(ochain[k], ochain[k+1])); + edges.push_back(std::pair(ochain[k], ochain[k+1])); } } } From f5335f068dea17139e63be70311edda749fe3566 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:07:23 +0100 Subject: [PATCH 069/175] Visual Studio 2013 compilation support for NLMISC --HG-- branch : develop --- code/nel/include/nel/misc/string_common.h | 34 +++++++++++++++++++++++ code/nel/include/nel/misc/xml_auto_ptr.h | 2 +- code/nel/src/misc/debug.cpp | 6 ---- code/nel/src/misc/displayer.cpp | 11 +------- code/nel/src/misc/mem_displayer.cpp | 2 +- code/nel/src/misc/mutex.cpp | 9 ------ code/nel/src/misc/stdmisc.h | 6 ++-- 7 files changed, 41 insertions(+), 29 deletions(-) diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index 4a455247d..2d2a7e676 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -264,6 +264,40 @@ inline bool fromString(const std::string &str, bool &val) return true; } +inline bool fromString(const char *str, uint32 &val) { if (strstr(str, "-") != NULL) { val = 0; return false; } char *end; unsigned long v; errno = 0; v = strtoul(str, &end, 10); if (errno || v > UINT_MAX || end == str) { val = 0; return false; } else { val = (uint32)v; return true; } } +inline bool fromString(const char *str, sint32 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > INT_MAX || v < INT_MIN || end == str) { val = 0; return false; } else { val = (sint32)v; return true; } } +inline bool fromString(const char *str, uint8 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > UCHAR_MAX || v < 0 || end == str) { val = 0; return false; } else { val = (uint8)v; return true; } } +inline bool fromString(const char *str, sint8 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > SCHAR_MAX || v < SCHAR_MIN || end == str) { val = 0; return false; } else { val = (sint8)v; return true; } } +inline bool fromString(const char *str, uint16 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > USHRT_MAX || v < 0 || end == str) { val = 0; return false; } else { val = (uint16)v; return true; } } +inline bool fromString(const char *str, sint16 &val) { char *end; long v; errno = 0; v = strtol(str, &end, 10); if (errno || v > SHRT_MAX || v < SHRT_MIN || end == str) { val = 0; return false; } else { val = (sint16)v; return true; } } +inline bool fromString(const char *str, uint64 &val) { bool ret = sscanf(str, "%"NL_I64"u", &val) == 1; if (!ret) val = 0; return ret; } +inline bool fromString(const char *str, sint64 &val) { bool ret = sscanf(str, "%"NL_I64"d", &val) == 1; if (!ret) val = 0; return ret; } +inline bool fromString(const char *str, float &val) { bool ret = sscanf(str, "%f", &val) == 1; if (!ret) val = 0.0f; return ret; } +inline bool fromString(const char *str, double &val) { bool ret = sscanf(str, "%lf", &val) == 1; if (!ret) val = 0.0; return ret; } + +inline bool fromString(const char *str, bool &val) +{ + switch (str[0]) + { + case '1': + case 't': + case 'y': + case 'T': + case 'Y': + val = true; + return true; + case '0': + case 'f': + case 'n': + case 'F': + case 'N': + val = false; + return true; + } + + return false; +} + inline bool fromString(const std::string &str, std::string &val) { val = str; return true; } // stl vectors of bool use bit reference and not real bools, so define the operator for bit reference diff --git a/code/nel/include/nel/misc/xml_auto_ptr.h b/code/nel/include/nel/misc/xml_auto_ptr.h index eacde74da..8e0c3adb7 100644 --- a/code/nel/include/nel/misc/xml_auto_ptr.h +++ b/code/nel/include/nel/misc/xml_auto_ptr.h @@ -31,7 +31,7 @@ public: ~CXMLAutoPtr() { destroy(); } operator const char *() const { return _Value; } operator bool() const { return _Value != NULL; } - operator std::string() const { return std::string(_Value); } + inline std::string str() const { return _Value; } bool operator ! () const { return _Value == NULL; } operator const unsigned char *() const { return (const unsigned char *) _Value; } char operator * () const { nlassert(_Value); return *_Value; } diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index a4037607f..2a9c5282a 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -19,12 +19,6 @@ #include "nel/misc/types_nl.h" #ifdef NL_OS_WINDOWS -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include # include # include # include diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index 8b6b7a577..4b9231663 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -18,16 +18,7 @@ #include "nel/misc/types_nl.h" -#ifdef NL_OS_WINDOWS -// these defines is for IsDebuggerPresent(). it'll not compile on windows 95 -// just comment this and the IsDebuggerPresent to compile on windows 95 -# define _WIN32_WINDOWS 0x0410 -# ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -# endif -# include -#else +#ifndef NL_OS_WINDOWS # define IsDebuggerPresent() false #endif diff --git a/code/nel/src/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index 49431097d..fc5681657 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.cpp @@ -103,7 +103,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr) if (stop==0 && (parse[i] == ',' || parse[i] == ')')) { char tmp[32]; - sprintf (tmp, "=0x%p", *((ULONG*)(stackAddr) + 2 + pos++)); + sprintf(tmp, "=0x%p", *((DWORD_TYPE*)(stackAddr) + 2 + pos++)); str += tmp; } str += parse[i]; diff --git a/code/nel/src/misc/mutex.cpp b/code/nel/src/misc/mutex.cpp index 28f6bae37..8135d954f 100644 --- a/code/nel/src/misc/mutex.cpp +++ b/code/nel/src/misc/mutex.cpp @@ -41,15 +41,6 @@ using namespace std; #ifdef NL_OS_WINDOWS -// these defines are for IsDebuggerPresent(). It'll not compile on windows 95 -// just comment this and the IsDebuggerPresent to compile on windows 95 -#define _WIN32_WINDOWS 0x0410 -#ifndef NL_COMP_MINGW -# define WINVER 0x0400 -# define NOMINMAX -#endif -#include - #ifdef DEBUG_NEW #define new DEBUG_NEW #endif diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index b98d92d2a..37284511c 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -43,8 +43,10 @@ #include #ifdef _WIN32 -# ifndef __MINGW32__ - #define NOMINMAX +# define _WIN32_WINDOWS 0x0410 +# ifndef NL_COMP_MINGW +# define WINVER 0x0400 +# define NOMINMAX # endif # include # include From a15221b00df3970a1c3e673f64d94e81a588a2a7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:14:00 +0100 Subject: [PATCH 070/175] Visual Studio 2013 compilation support for NLSOUND --HG-- branch : develop --- code/nel/src/sound/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/sound/CMakeLists.txt b/code/nel/src/sound/CMakeLists.txt index 2cf570f69..6b0dc285d 100644 --- a/code/nel/src/sound/CMakeLists.txt +++ b/code/nel/src/sound/CMakeLists.txt @@ -86,6 +86,7 @@ NL_TARGET_LIB(nelsound ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${VORBIS_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${OGG_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nelsound ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}) From 221267364d1cf27481d78383d95f1867da133cae Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:14:12 +0100 Subject: [PATCH 071/175] Visual Studio 2013 compilation support for NL3D --HG-- branch : develop --- code/nel/src/3d/zone_search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/zone_search.cpp b/code/nel/src/3d/zone_search.cpp index cbadc8c39..f850d4377 100644 --- a/code/nel/src/3d/zone_search.cpp +++ b/code/nel/src/3d/zone_search.cpp @@ -73,7 +73,7 @@ pair CZoneSearch::getZoneName(uint x, uint y, uint cx, uint cy) sprintf(name, "%d_%c%c.zonel", zoneY, firstLetter, secondLetter); - return make_pair(string(name), distance); + return std::pair(string(name), distance); } From 1879a434f7c3a2bdd3fdbfe0c693625bc017d68d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:17:07 +0100 Subject: [PATCH 072/175] Visual Studio 2013 compilation support for NLGUI --HG-- branch : develop --- code/nel/include/nel/gui/dbgroup_combo_box.h | 2 +- code/nel/src/gui/CMakeLists.txt | 2 +- code/nel/src/gui/ctrl_scroll.cpp | 10 +++++----- code/nel/src/gui/dbgroup_combo_box.cpp | 4 ++-- code/nel/src/gui/group_menu.cpp | 2 +- code/nel/src/gui/interface_anim.cpp | 2 +- code/nel/src/gui/interface_parser.cpp | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/nel/include/nel/gui/dbgroup_combo_box.h b/code/nel/include/nel/gui/dbgroup_combo_box.h index 75208b1e3..e7be1de4b 100644 --- a/code/nel/include/nel/gui/dbgroup_combo_box.h +++ b/code/nel/include/nel/gui/dbgroup_combo_box.h @@ -60,7 +60,7 @@ namespace NLGUI void setText(uint i, const ucstring &text); void insertText(uint i, const ucstring &text); const ucstring &getText(uint i) const; - const uint &getTextId(uint i) const; + uint getTextId(uint i) const; uint getTextPos(uint nId) const; const ucstring &getTexture(uint i) const; void removeText(uint nPos); diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt index e3d501e23..32125791d 100644 --- a/code/nel/src/gui/CMakeLists.txt +++ b/code/nel/src/gui/CMakeLists.txt @@ -6,7 +6,7 @@ SOURCE_GROUP("src" FILES ${SRC}) NL_TARGET_LIB(nelgui ${SRC} ${HEADERS}) -INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBWWW_LIBRARIES} ${CURL_LIBRARIES}) SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "") diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index f534fc0a1..c29f73fea 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -519,17 +519,17 @@ namespace NLGUI // Read Action handlers prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" ); - if (prop) _AHOnScroll = NLMISC::strlwr(prop); + if (prop) _AHOnScroll = NLMISC::strlwr(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"params" ); if (prop) _AHOnScrollParams = string((const char*)prop); // prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" ); - if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop); + if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" ); if (prop) _AHOnScrollEndParams = string((const char*)prop); // prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" ); - if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop); + if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" ); if (prop) _AHOnScrollCancelParams = string((const char*)prop); @@ -538,9 +538,9 @@ namespace NLGUI prop = (char*) xmlGetProp( node, (xmlChar*)"target" ); if (prop) { - CInterfaceGroup *group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop)); + CInterfaceGroup *group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop.str())); if(group == NULL) - group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop)); + group = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop.str())); if(group != NULL) setTarget (group); diff --git a/code/nel/src/gui/dbgroup_combo_box.cpp b/code/nel/src/gui/dbgroup_combo_box.cpp index 61b8ec3e6..39ddd63c1 100644 --- a/code/nel/src/gui/dbgroup_combo_box.cpp +++ b/code/nel/src/gui/dbgroup_combo_box.cpp @@ -268,7 +268,7 @@ namespace NLGUI void CDBGroupComboBox::addText(const ucstring &text) { dirt(); - _Texts.push_back(make_pair(_Texts.size(), text)); + _Texts.push_back(make_pair((uint)_Texts.size(), text)); _Textures.push_back(std::string()); } @@ -330,7 +330,7 @@ namespace NLGUI } // *************************************************************************** - const uint &CDBGroupComboBox::getTextId(uint i) const + uint CDBGroupComboBox::getTextId(uint i) const { static uint null = 0; if(i<_Texts.size()) diff --git a/code/nel/src/gui/group_menu.cpp b/code/nel/src/gui/group_menu.cpp index 08f887e9e..ddd022310 100644 --- a/code/nel/src/gui/group_menu.cpp +++ b/code/nel/src/gui/group_menu.cpp @@ -2200,7 +2200,7 @@ namespace NLGUI if( editorMode ) _Extends = std::string( (const char*)prop ); - CGroupMenu *gm = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop)); + CGroupMenu *gm = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(prop.str())); if (!gm) { gm = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:" + std::string((const char*)prop))); diff --git a/code/nel/src/gui/interface_anim.cpp b/code/nel/src/gui/interface_anim.cpp index 627a93280..693e63f09 100644 --- a/code/nel/src/gui/interface_anim.cpp +++ b/code/nel/src/gui/interface_anim.cpp @@ -74,7 +74,7 @@ namespace NLGUI } // - if (!CInterfaceLink::splitLinkTargets (ptr, parentGroup, _Targets)) + if (!CInterfaceLink::splitLinkTargets (ptr.str(), parentGroup, _Targets)) { nlwarning ("no target for track"); return false; diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 096c001ae..a3e2c48aa 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -1771,7 +1771,7 @@ namespace NLGUI { CInterfaceExprValue res; - if (CInterfaceExpr::eval(ptrVal2, res)) + if (CInterfaceExpr::eval(ptrVal2.str(), res)) { if (!res.toString()) { From 32b3b4ac80d306dcf3a8ef8af270c7b9b73d8e86 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:50:58 +0100 Subject: [PATCH 073/175] Visual Studio 2013 compilation support for Ryzom Client --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 2 +- .../client/src/interface_v3/dbctrl_sheet.cpp | 24 ++++++++-------- .../src/interface_v3/dbgroup_list_sheet.cpp | 2 +- .../interface_v3/dbgroup_list_sheet_text.cpp | 2 +- .../src/interface_v3/interface_3d_scene.cpp | 8 +++--- .../src/interface_v3/inventory_manager.cpp | 14 +++++----- .../src/interface_v3/parser_modules.cpp | 2 +- .../_backup_service_interface_non_module.cpp | 2 +- .../game_share/deployment_configuration.cpp | 26 ++++++++--------- .../src/game_share/persistent_data_tree.cpp | 28 +++++++++---------- .../game_share/server_animation_module.cpp | 2 +- 11 files changed, 56 insertions(+), 56 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index ed7943b8f..33bec822f 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -568,7 +568,7 @@ void listStereoDisplayDevices(std::vector &devices) std::stringstream name; name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName; std::stringstream fullname; - fullname << std::string("[") << name << "] [" << it->Serial << "]"; + fullname << std::string("[") << name.str() << "] [" << it->Serial << "]"; nlinfo("VR [C]: Stereo Display: %s", name.str().c_str()); if (cache) { diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index fe7f20e1f..d72a975f3 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -333,29 +333,29 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" ); if (prop) { - if (NLMISC::strlwr(prop) == "item") + if (NLMISC::strlwr(prop.str()) == "item") _Type = CCtrlSheetInfo::SheetType_Item; - else if (NLMISC::strlwr(prop) == "pact") + else if (NLMISC::strlwr(prop.str()) == "pact") _Type = CCtrlSheetInfo::SheetType_Pact; - else if (NLMISC::strlwr(prop) == "skill") + else if (NLMISC::strlwr(prop.str()) == "skill") _Type = CCtrlSheetInfo::SheetType_Skill; - else if (NLMISC::strlwr(prop) == "auto") + else if (NLMISC::strlwr(prop.str()) == "auto") _Type = CCtrlSheetInfo::SheetType_Auto; - else if (NLMISC::strlwr(prop) == "macro") + else if (NLMISC::strlwr(prop.str()) == "macro") _Type = CCtrlSheetInfo::SheetType_Macro; - else if (NLMISC::strlwr(prop) == "guild_flag") + else if (NLMISC::strlwr(prop.str()) == "guild_flag") _Type = CCtrlSheetInfo::SheetType_GuildFlag; - else if (NLMISC::strlwr(prop) == "mission") + else if (NLMISC::strlwr(prop.str()) == "mission") _Type = CCtrlSheetInfo::SheetType_Mission; - else if (NLMISC::strlwr(prop) == "sbrick") + else if (NLMISC::strlwr(prop.str()) == "sbrick") _Type = CCtrlSheetInfo::SheetType_SBrick; - else if (NLMISC::strlwr(prop) == "sphraseid") + else if (NLMISC::strlwr(prop.str()) == "sphraseid") _Type = CCtrlSheetInfo::SheetType_SPhraseId; - else if (NLMISC::strlwr(prop) == "sphrase") + else if (NLMISC::strlwr(prop.str()) == "sphrase") _Type = CCtrlSheetInfo::SheetType_SPhrase; - else if (NLMISC::strlwr(prop) == "elevator_destination") + else if (NLMISC::strlwr(prop.str()) == "elevator_destination") _Type = CCtrlSheetInfo::SheetType_ElevatorDestination; - else if (NLMISC::strlwr(prop) == "outpost_building") + else if (NLMISC::strlwr(prop.str()) == "outpost_building") _Type = CCtrlSheetInfo::SheetType_OutpostBuilding; } diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp index 74bd2be47..2966e65b4 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp @@ -115,7 +115,7 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) if (prop) { // get a branch in the database. - CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop); + CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(prop.str()); if(!branch) { nlinfo ("Branch not found in the database %s", (const char*)prop); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp index 772f99418..2294d3926 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp @@ -98,7 +98,7 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) if (prop) { // get a branch in the database. - CCDBNodeBranch *branch= NLGUI::CDBManager::getInstance()->getDbBranch(prop); + CCDBNodeBranch *branch = NLGUI::CDBManager::getInstance()->getDbBranch(prop.str()); if(!branch) { nlinfo ("Branch not found in the database %s", (const char*)prop); diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index 0d51a538e..6acc2a17b 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -162,13 +162,13 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) _Ref3DScene = NULL; if (ptr) { - CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr); + CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr.str()); _Ref3DScene = dynamic_cast(pIE); } if (_Ref3DScene != NULL) { ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" ); - if (ptr) setCurrentCamera (ptr); + if (ptr) setCurrentCamera (ptr.str()); return true; } @@ -294,7 +294,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name")); string animName; if (ptr) - animName = strlwr (CFile::getFilenameWithoutExtension(ptr)); + animName = strlwr (CFile::getFilenameWithoutExtension(ptr.str())); if (!animName.empty()) { @@ -340,7 +340,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) // Get the current camera ptr = (char*) xmlGetProp( cur, (xmlChar*)"curcam" ); - if (ptr) setCurrentCamera (ptr); + if (ptr) setCurrentCamera(ptr.str()); return true; } diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 5e7d66075..7a56e470e 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -1981,7 +1981,7 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */) prop = xmlGetProp (cur, (xmlChar*)"inv_type"); if (prop) { - InvType = CInventoryManager::invTypeFromString(prop); + InvType = CInventoryManager::invTypeFromString(prop.str()); } else { @@ -1990,22 +1990,22 @@ bool SBagOptions::parse(xmlNodePtr cur, CInterfaceGroup * /* parentGroup */) } prop = xmlGetProp (cur, (xmlChar*)"filter_armor"); - if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterArmor = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_weapon"); - if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterWeapon = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_tool"); - if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterTool = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_mp"); - if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterMP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_missmp"); - if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterMissMP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); prop = xmlGetProp (cur, (xmlChar*)"filter_tp"); - if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop); + if (prop) DbFilterTP = NLGUI::CDBManager::getInstance()->getDbProp(prop.str()); return true; } diff --git a/code/ryzom/client/src/interface_v3/parser_modules.cpp b/code/ryzom/client/src/interface_v3/parser_modules.cpp index ff1c93645..58158ea62 100644 --- a/code/ryzom/client/src/interface_v3/parser_modules.cpp +++ b/code/ryzom/client/src/interface_v3/parser_modules.cpp @@ -369,7 +369,7 @@ bool CCommandParser::parse( xmlNodePtr cur, NLGUI::CInterfaceGroup *parentGroup // if prop "ctrlchar" is declared with false, then disable ctrlchar for this command CXMLAutoPtr prop((const char*) xmlGetProp( cur, (xmlChar*)"ctrlchar" )); if( (const char*)prop && (CInterfaceElement::convertBool((const char*)prop)==false) ) - ICommand::enableControlCharForCommand(ptrName, false); + ICommand::enableControlCharForCommand(ptrName.str(), false); // Done ret = true; diff --git a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp index 2e1d474b2..801d78433 100644 --- a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp +++ b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp @@ -381,7 +381,7 @@ void CBSIINonModule::activate() // setup the callback array CUnifiedNetwork::getInstance()->addCallbackArray( CbArray, sizeof(CbArray)/sizeof(CbArray[0]) ); - string host = BackupServiceIP; + string host = BackupServiceIP.get(); if(host.empty()) { nlwarning("Can't use backup because BSHost variable is empty"); diff --git a/code/ryzom/common/src/game_share/deployment_configuration.cpp b/code/ryzom/common/src/game_share/deployment_configuration.cpp index 52fc9087c..8957c89ac 100644 --- a/code/ryzom/common/src/game_share/deployment_configuration.cpp +++ b/code/ryzom/common/src/game_share/deployment_configuration.cpp @@ -313,13 +313,13 @@ namespace DEPCFG void CInfoBlock::addUseEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors) { - DROP_IF(_UseEntries.find(entry)!=_UseEntries.end(),context+"Ignoring duplicate refference to 'use' clause: "+entry,return); + DROP_IF(_UseEntries.find(entry) != _UseEntries.end(), context + "Ignoring duplicate refference to 'use' clause: " + entry.c_str(), return); _UseEntries.insert(entry); } void CInfoBlock::addDataEntry(const NLMISC::CSString& entry,const NLMISC::CSString& context,uint32& errors) { - DROP_IF(_DataEntries.find(entry)!=_DataEntries.end(),context+"Ignoring duplicate refference to 'data' clause: "+entry,return); + DROP_IF(_DataEntries.find(entry) != _DataEntries.end(), context + "Ignoring duplicate refference to 'data' clause: " + entry.c_str(), return); _DataEntries.insert(entry); } @@ -406,10 +406,10 @@ namespace DEPCFG // try to get a pointer to the refferenced info block... CInfoBlock* infoBlockPtr= container->getInfoBlock(theEntry); - DROP_IF(infoBlockPtr==NULL,"Failed to find block named '"+theEntry+"' while fixing up children of block: "+_Name, ++errors;continue); + DROP_IF(infoBlockPtr == NULL, "Failed to find block named '" + theEntry + "' while fixing up children of block: " + _Name.c_str(), ++errors; continue); // make sure that this block doesn't figure amongst the children of the refferenced info block (to avoid circular refs) - DROP_IF(_haveCircularRef(infoBlockPtr),"Circular dependency found between definitions of '"+_Name+"' and '"+theEntry+"'", ++errors;continue); + DROP_IF(_haveCircularRef(infoBlockPtr), "Circular dependency found between definitions of '" + _Name + "' and '" + theEntry.c_str() + "'", ++errors; continue); // add the info block to our children _Children.push_back(infoBlockPtr); @@ -431,7 +431,7 @@ namespace DEPCFG DROP_IF(!_ShardName.empty() && !theExe.ShardName.empty(), "more than one shard found in: "+theExe.FullName, ++errors ); DROP_IF(!_CmdLine.empty() && !theExe.CmdLine.empty(), "more than one cmdLine found in: "+theExe.FullName, ++errors ); DROP_IF(!_Host.empty() && !theExe.Host.empty(), "more than one host found in: "+theExe.FullName, ++errors ); - WARN_IF(!_UniqueName.empty() && !theExe.UniqueName.empty(), "replacing name '"+theExe.UniqueName+"' with '"+_UniqueName+"' in: "+theExe.FullName); + WARN_IF(!_UniqueName.empty() && !theExe.UniqueName.empty(), "replacing name '" + theExe.UniqueName + "' with '" + _UniqueName.c_str() + "' in: " + theExe.FullName.c_str()); // fill our own data into the exe record if (!_DomainName.empty()) theExe.DomainName = _DomainName; @@ -645,22 +645,22 @@ namespace DEPCFG // try to treat the keyword if (keyword=="include") { - DROP_IF(args.empty(),context+"No file name found following 'include': "+line, ++errors;continue); - DROP_IF(fileNameSet.find(args)!=fileNameSet.end(),context+"Warning: Duplicate 'include' block ignored: "+line, continue); + DROP_IF(args.empty(), context + "No file name found following 'include': " + line.c_str(), ++errors; continue); + DROP_IF(fileNameSet.find(args) != fileNameSet.end(), context + "Warning: Duplicate 'include' block ignored: " + line.c_str(), continue); fileNameSet.insert(args); _readFile(args.unquoteIfQuoted(),errors,fileNameSet); } else if (keyword=="define") { - DROP_IF(args.empty(),context+"No block name found following 'define': "+line, ++errors;continue); - DROP_IF(_InfoBlocks.find(args)!=_InfoBlocks.end(),context+"Duplicate 'define' block found: "+line, ++errors;continue); + DROP_IF(args.empty(), context + "No block name found following 'define': " + line.c_str(), ++errors; continue); + DROP_IF(_InfoBlocks.find(args) != _InfoBlocks.end(), context + "Duplicate 'define' block found: " + line.c_str(), ++errors; continue); // create a new info block and push it into our infoblock set _CurrentInfoBlock= new CInfoBlock(args); _InfoBlocks[args]= _CurrentInfoBlock; } else { - DROP_IF(_CurrentInfoBlock==NULL,context+"Expecting 'define ' but found: "+line, ++errors;continue); + DROP_IF(_CurrentInfoBlock == NULL, context + "Expecting 'define ' but found: " + line.c_str(), ++errors; continue); if (keyword=="domain") { _CurrentInfoBlock->setDomainName(args,context,errors); } else if (keyword=="shard") { _CurrentInfoBlock->setShardName(args,context,errors); } @@ -674,7 +674,7 @@ namespace DEPCFG else if (keyword=="cfgAfter") { _CurrentInfoBlock->addCfgEntryPost(rawArgs,context,errors); } else if (keyword=="cfgFile") { _CurrentInfoBlock->addCfgFile(args,context,errors); } else if (keyword=="cfgFileAfter") { _CurrentInfoBlock->addCfgFilePost(args,context,errors); } - else { DROP(context+"Unrecognised keyword: "+line, ++errors;continue); } + else { DROP(context + "Unrecognised keyword: " + line.c_str(), ++errors; continue); } } } } @@ -725,7 +725,7 @@ namespace DEPCFG // yell if the name already looks like a 'fixed up' name DROP_IF(name.right(3).left(1)=="_" && (name.right(2)=="00" || name.right(2).atoui()!=0),"Appending '_' to name ending in '_00' style format as this can clash with auto renumbering => "+name+'_',name+='_') // compose a second version of the name with the shard name added - NLMISC::CSString name_with_shard= name+'_'+it2->ShardName; + NLMISC::CSString name_with_shard = name + '_' + it2->ShardName.c_str(); // insert both versions of the name into the unique name counter ++nameCounts[name]; ++nameCounts[name_with_shard]; @@ -1123,7 +1123,7 @@ namespace DEPCFG result.CfgFile= "// Auto generated config file\n" "// Use with commandline: "+theApp.CmdLine+"\n" - "AESAliasName= \""+appName+"\";\n" + "AESAliasName= \"" + appName.c_str() + "\";\n" "\n"; // copy the cfg set to the result record (the cfgAfter set should have been merged in already) diff --git a/code/ryzom/common/src/game_share/persistent_data_tree.cpp b/code/ryzom/common/src/game_share/persistent_data_tree.cpp index 63252a70c..feefbad1c 100644 --- a/code/ryzom/common/src/game_share/persistent_data_tree.cpp +++ b/code/ryzom/common/src/game_share/persistent_data_tree.cpp @@ -139,10 +139,10 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent) bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uint32 idx) { // check value of 'idx' - BOMB_IF(parent!=NULL && idx>1024*1024,"Implausibly high number of children requested ("+NLMISC::toString("%d",idx)+") for persistent data tree node: "+parent->getNodeName(),return false); + BOMB_IF(parent != NULL && idx>1024 * 1024, "Implausibly high number of children requested (" + NLMISC::toString("%d", idx) + ") for persistent data tree node: " + parent->getNodeName().c_str(), return false); // check for attachment to previous parent - BOMB_IF(_Parent!=NULL,"Attempting to attach a persistent data node to parent '"+(parent==NULL?"NULL":parent->getNodeName())+"' when it's already attached to another parent as: "+getNodeName(),return false); + BOMB_IF(_Parent != NULL, "Attempting to attach a persistent data node to parent '" + (parent == NULL ? "NULL" : parent->getNodeName()) + "' when it's already attached to another parent as: " + getNodeName().c_str(), return false); // split the name into its component parts CSString mapIndex= _Name; @@ -159,7 +159,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin if (parent!=NULL) { // check parent isn't a value - BOMB_IF(parent->_IsValue,"Attempting to attach a persistent data node to parent that has a value '"+parent->getNodeName()+"' = "+parent->_Value,return false); + BOMB_IF(parent->_IsValue, "Attempting to attach a persistent data node to parent that has a value '" + parent->getNodeName() + "' = " + parent->_Value.c_str(), return false); if (hasExplicitIndex) { @@ -179,7 +179,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin } // ensure that there isn't already a node with the same '#' value attached to the same parent - DROP_IF(parent->_ChildIndex.find(nameBase+'#'+mapIndex)!=parent->_ChildIndex.end(),"Failed to add child '"+_Name+"' to parent '"+parent->getNodeName()+"' because another child of same name already exists",return false); + DROP_IF(parent->_ChildIndex.find(nameBase + '#' + mapIndex.c_str()) != parent->_ChildIndex.end(), "Failed to add child '" + _Name + "' to parent '" + parent->getNodeName().c_str() + "' because another child of same name already exists", return false); } } if (!hasExplicitIndex) @@ -190,7 +190,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin } // construct our cleaned up name from its constituent parts - _Name= nameBase+'#'+mapIndex; + _Name = nameBase + '#' + mapIndex.c_str(); // setup own _Parent property and ensure that there are no trailing spaces round the _Name _Parent= parent; @@ -205,7 +205,7 @@ bool CPersistentDataTreeNode::attachToParent(CPersistentDataTreeNode* parent,uin } // ensure that there isn't another child already assigned to this parent slot - BOMB_IF(_Parent->_Children[idx]!=NULL,"Ignoring attempt to add second child to same slot ("+NLMISC::toString("%d",idx)+") in persistent data tree node's children: "+_Parent->getNodeName(),return false); + BOMB_IF(_Parent->_Children[idx] != NULL, "Ignoring attempt to add second child to same slot (" + NLMISC::toString("%d", idx) + ") in persistent data tree node's children: " + _Parent->getNodeName().c_str(), return false); // write own pointer into parent's _Children vector _Parent->_Children[idx]= this; @@ -239,7 +239,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr) return false; // pop the end of block token for the block we just finished processing - DROP_IF(pdr.peekNextToken()!=token,"ERROR: End of "+pdr.lookupString(token)+" block expected but not found at: "+getNodeName(),return false); + DROP_IF(pdr.peekNextToken() != token, "ERROR: End of " + pdr.lookupString(token) + " block expected but not found at: " + getNodeName().c_str(), return false); pdr.popStructEnd(token); } else if (pdr.isEndOfStruct()) @@ -259,7 +259,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr) // extract the map key and ensure that it's followed by a valid __Val__ entry CSString mapKey; pdr.pop(mapKeyToken,mapKey); - DROP_IF(pdr.isEndOfData() || pdr.peekNextToken()!=mapValToken,"ERROR: Ignoring map key (__Key__) because __Val__ token expected but not found at: "+getNodeName()+":"+mapKey,continue); + DROP_IF(pdr.isEndOfData() || pdr.peekNextToken() != mapValToken, "ERROR: Ignoring map key (__Key__) because __Val__ token expected but not found at: " + getNodeName() + ":" + mapKey.c_str(), continue); if (needsQuotes(mapKey)) mapKey=mapKey.quote(); @@ -278,7 +278,7 @@ bool CPersistentDataTreeNode::readFromPdr(CPersistentDataRecord& pdr) return false; // pop the end of struct marker - DROP_IF(pdr.peekNextToken()!=mapValToken,"ERROR: End of __Val__ block expected but not found at: "+getNodeName()+":"+mapKey,return false); + DROP_IF(pdr.peekNextToken() != mapValToken, "ERROR: End of __Val__ block expected but not found at: " + getNodeName() + ":" + mapKey.c_str(), return false); pdr.popStructEnd(mapValToken); } else @@ -419,9 +419,9 @@ bool CPersistentDataTreeNode::writeToBuffer(NLMISC::CSString& buffer) const { // write a value if (needsQuotes(_Value)) - buffer+= getNodeName()+"=="+_Value.quote()+"\n"; + buffer += getNodeName() + "==" + _Value.quote().c_str() + "\n"; else - buffer+= getNodeName()+"="+_Value+"\n"; + buffer += getNodeName() + "=" + _Value.c_str() + "\n"; } else { @@ -468,8 +468,8 @@ CSString CPersistentDataTreeNode::getNodeName() const // return one of name, parentName.name and parentName:name if (parentName.empty()) return name; - if (isMapEntry()) return parentName+":"+name; - else return parentName+"."+name; + if (isMapEntry()) return parentName + ":" + name.c_str(); + else return parentName + "." + name.c_str(); } void CPersistentDataTreeNode::setValue(const TValue& value) @@ -507,7 +507,7 @@ bool CPersistentDataTreeNode::isMapEntry() const bool CPersistentDataTreeNode::flagAsMap() { - DROP_IF(_IsValue,"ERROR: Failed to flag persistent data tree node '"+getNodeName()+"' as a map as it already has a value: "+_Value,return false); + DROP_IF(_IsValue, "ERROR: Failed to flag persistent data tree node '" + getNodeName() + "' as a map as it already has a value: " + _Value.c_str(), return false); if (_IsMap) return true; diff --git a/code/ryzom/common/src/game_share/server_animation_module.cpp b/code/ryzom/common/src/game_share/server_animation_module.cpp index 51d7ce19e..3d3548d54 100644 --- a/code/ryzom/common/src/game_share/server_animation_module.cpp +++ b/code/ryzom/common/src/game_share/server_animation_module.cpp @@ -1017,7 +1017,7 @@ IPrimitive* CServerAnimationModule::getAction(CObject* action, const std::string } if(result.size()>=2) - result[1] = "DSS_"+toString(scenarioId)+" "+result[1]; + result[1] = "DSS_"+toString(scenarioId)+" "+result[1].c_str(); if(result.size()>=3) { for(uint32 i=2;i Date: Fri, 20 Feb 2015 17:51:13 +0100 Subject: [PATCH 074/175] Visual Studio 2013 compilation support for NeL Tools --HG-- branch : develop --- code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp | 2 +- code/nel/tools/misc/xml_packer/xml_packer.cpp | 2 +- code/nel/tools/pacs/build_rbank/build_rbank.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp index 53d515fdd..851dfe6df 100644 --- a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp +++ b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp @@ -163,7 +163,7 @@ void readFormId( string& outputFileName ) map::iterator itFT = FileTypeToId.find(fileType); if( itFT == FileTypeToId.end() ) { - FileTypeToId.insert( make_pair(fileType,fid.FormIDInfos.Type) ); + FileTypeToId.insert( std::pair(fileType,fid.FormIDInfos.Type) ); } } else diff --git a/code/nel/tools/misc/xml_packer/xml_packer.cpp b/code/nel/tools/misc/xml_packer/xml_packer.cpp index 6f82b5426..2d7695de4 100644 --- a/code/nel/tools/misc/xml_packer/xml_packer.cpp +++ b/code/nel/tools/misc/xml_packer/xml_packer.cpp @@ -379,7 +379,7 @@ int main(int argc, char *argv[]) CSString subFileName = parser.leftCrop(sizeof(" (i, fi)); + faultyInstances.insert(std::pair(i, fi)); } } @@ -1046,7 +1046,7 @@ void processGlobalRetriever() { if (Verbose) nlinfo("after fix: unlink: %s", unlinkstr.c_str()); - faultyInstances.insert(make_pair(i, fi)); + faultyInstances.insert(std::pair(i, fi)); } } } From aebda454dc61d2b884b3048d142d64aa9e10d130 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:53:39 +0100 Subject: [PATCH 075/175] Visual Studio 2013 compilation support for Ryzom Client --HG-- branch : develop --- code/ryzom/client/src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index a2f89420b..9c2b4b431 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -83,6 +83,7 @@ INCLUDE_DIRECTORIES( ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIR} ) TARGET_LINK_LIBRARIES(ryzom_client From 2667c5d8a2d2429b6e73a93285cf194f17a6b701 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 17:57:11 +0100 Subject: [PATCH 076/175] Visual Studio 2013 compilation support for Ryzom Client --HG-- branch : develop --- code/ryzom/client/src/r2/dmc/client_edition_module.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index 93978800d..5d00cdc2b 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1352,8 +1352,8 @@ bool CClientEditionModule::loadUserComponent(const std::string& filename, bool m } } - std::string sourceExtension = UserComponentsSourceExtension; - std::string componentExtension = UserComponentsComponentExtension; + std::string sourceExtension = UserComponentsSourceExtension.get(); + std::string componentExtension = UserComponentsComponentExtension.get(); uint32 uncompressedFileLength = 0; From a8db3b2dda53e3ce8245d6c67566a005fb497c6b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Feb 2015 18:10:06 +0100 Subject: [PATCH 077/175] Visual Studio 2013 compilation support for Ryzom Client --HG-- branch : develop --- code/CMakeLists.txt | 6 ++++-- code/CMakeModules/nel.cmake | 5 +++++ code/nel/include/nel/gui/group_html.h | 1 - code/nel/include/nel/misc/sstring.h | 8 ++++---- code/nel/include/nel/misc/types_nl.h | 5 ++++- code/ryzom/client/src/http_client_curl.cpp | 1 - 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 0ffef9c1e..279aa3d49 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -156,9 +156,11 @@ IF(WITH_NEL) FIND_PACKAGE(Luabind REQUIRED) FIND_PACKAGE(CURL REQUIRED) - IF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") + IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) SET(CURL_STATIC ON) - ENDIF(WIN32 OR CURL_LIBRARIES MATCHES "\\.a") + ELSE((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) + SET(CURL_STATIC OFF) + ENDIF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) IF(CURL_STATIC) SET(CURL_DEFINITIONS -DCURL_STATICLIB) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 081da67ca..70113e11b 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -255,6 +255,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) ELSE(WITH_STATIC) OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF) ENDIF(WITH_STATIC) + IF (WITH_STATIC) + OPTION(WITH_STATIC_CURL "With static curl" ON ) + ELSE(WITH_STATIC) + OPTION(WITH_STATIC_CURL "With static curl" OFF) + ENDIF(WITH_STATIC) IF(APPLE) OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON ) ELSE(APPLE) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 333800760..4f9bee46c 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -17,7 +17,6 @@ #ifndef CL_GROUP_HTML_H #define CL_GROUP_HTML_H -#define CURL_STATICLIB 1 #include #include "nel/misc/types_nl.h" diff --git a/code/nel/include/nel/misc/sstring.h b/code/nel/include/nel/misc/sstring.h index fdeebcfc8..c9ebff721 100644 --- a/code/nel/include/nel/misc/sstring.h +++ b/code/nel/include/nel/misc/sstring.h @@ -937,21 +937,21 @@ inline CSString operator+(const CSString& s0,const CSString& s1) */ inline CSString operator+(char s0,const CSString& s1) { - return CSString(s0)+s1; + return CSString(s0) + s1.c_str(); } inline CSString operator+(const char* s0,const CSString& s1) { - return CSString(s0)+s1; + return CSString(s0) + s1.c_str(); } -#ifndef NL_COMP_VC10 +#if !defined(NL_COMP_VC) || (NL_COMP_VC_VERSION <= 100) // TODO: check if it can be disabled for other compilers too inline CSString operator+(const std::string& s0,const CSString& s1) { return s0+static_cast(s1); } -#endif // NL_COMP_VC10 +#endif } // NLMISC diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index 7a6ee2662..7091f4905 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -54,6 +54,9 @@ # ifdef _MSC_VER # define NL_COMP_VC # if _MSC_VER >= 1700 +# define NL_COMP_VC12 +# define NL_COMP_VC_VERSION 120 +# elif _MSC_VER >= 1700 # define NL_COMP_VC11 # define NL_COMP_VC_VERSION 110 # elif _MSC_VER >= 1600 @@ -414,7 +417,7 @@ extern void operator delete[](void *p) throw(); # define CHashMap stdext::hash_map # define CHashSet stdext::hash_set # define CHashMultiMap stdext::hash_multimap -#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION == 110) +#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 120) # include # include # define CHashMap ::std::hash_map diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index db830a9df..008bef19a 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -15,7 +15,6 @@ // along with this program. If not, see . #include "stdpch.h" -#define CURL_STATICLIB 1 #include #include "http_client_curl.h" From 7efb3334fc6b47ea4659ea48e11af5d7ddfb46a7 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 21 Feb 2015 20:01:44 +0100 Subject: [PATCH 078/175] Install rcerror --HG-- branch : feature-crashreport --- code/nel/rcerror/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/nel/rcerror/CMakeLists.txt b/code/nel/rcerror/CMakeLists.txt index 412da9b6c..51522cf0c 100644 --- a/code/nel/rcerror/CMakeLists.txt +++ b/code/nel/rcerror/CMakeLists.txt @@ -35,3 +35,5 @@ TARGET_LINK_LIBRARIES(rcerror ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) NL_DEFAULT_PROPS(rcerror "Ryzom Core Error Reporter") NL_ADD_RUNTIME_FLAGS(rcerror) +INSTALL(TARGETS rcerror RUNTIME DESTINATION ${NL_BIN_PREFIX}) + From 1476bfe648a1b88213453592ba9587b206ba5dbc Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 21 Feb 2015 21:28:56 +0100 Subject: [PATCH 079/175] Use CMsgBoxDisplayer on platforms other than Windows as well. --HG-- branch : feature-crashreport --- code/nel/src/misc/debug.cpp | 8 +------- code/nel/src/misc/displayer.cpp | 2 -- code/nel/src/misc/report.cpp | 12 ------------ 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 2d09f5ef8..aaa551f1f 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1193,13 +1193,7 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) INelContext::getInstance().setAssertLog(new CLog (CLog::LOG_ASSERT)); sd = new CStdDisplayer ("DEFAULT_SD"); - -#ifdef NL_OS_WINDOWS - if (TrapCrashInDebugger || !IsDebuggerPresent ()) - { - DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); - } -#endif + DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); #if LOG_IN_FILE if (logInFile) diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index d48c44d02..35ae27964 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -529,7 +529,6 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { -#ifdef NL_OS_WINDOWS bool needSpace = false; // stringstream ss; @@ -720,7 +719,6 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m } */ } -#endif } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 88c707aaa..b165e29f5 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -52,16 +52,6 @@ void setReportEmailFunction (void *emailFunction) EmailFunction = (TEmailFunction)emailFunction; } -#ifndef NL_OS_WINDOWS - -// GNU/Linux, do nothing - -void report () -{ -} - -#else - TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { std::string fname = "rcerrorlog.txt"; @@ -92,7 +82,5 @@ TReportResult report (const std::string &title, const std::string &header, const return ReportQuit; } -#endif - } // NLMISC From e130625ccab79190121cc76247cc634f26c6d3d8 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 21 Feb 2015 22:32:11 +0100 Subject: [PATCH 080/175] A little cleanup of CMsgBoxDisplayer. --HG-- branch : feature-crashreport --- code/nel/include/nel/misc/report.h | 17 +-- code/nel/src/misc/debug.cpp | 2 +- code/nel/src/misc/displayer.cpp | 174 +---------------------------- code/nel/src/misc/report.cpp | 19 +--- 4 files changed, 7 insertions(+), 205 deletions(-) diff --git a/code/nel/include/nel/misc/report.h b/code/nel/include/nel/misc/report.h index 11745b6e3..6bf3df959 100644 --- a/code/nel/include/nel/misc/report.h +++ b/code/nel/include/nel/misc/report.h @@ -21,21 +21,8 @@ namespace NLMISC { -/** Display a custom message box. - * - * \param title set the title of the report. If empty, it'll display "NeL report". - * \param header message displayed before the edit text box. If empty, it displays the default message. - * \param body message displayed in the edit text box. This string will be sent by email. - * \param debugButton 0 for disabling it, 1 for enable with default behaviors (generate a breakpoint), 2 for enable with no behavior - * - * - * - * \return the button clicked or error - */ - -enum TReportResult { ReportDebug, ReportIgnore, ReportQuit, ReportError }; - -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const std::string &attachedFile = ""); +/// Prepares the error report, writes it to disk and launches the error reporter +void report ( const std::string &body ); /** call this in the main of your appli to enable email: setReportEmailFunction (sendEmail); */ diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index aaa551f1f..67c8cb0f3 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -553,7 +553,7 @@ public: // yoyo: allow only to send the crash report once. Because users usually click ignore, // which create noise into list of bugs (once a player crash, it will surely continues to do it). bool i = false; - report (progname+shortExc, "", subject, _Reason, true, 1, true, 1, !isCrashAlreadyReported(), i, NL_CRASH_DUMP_FILE); + report ( _Reason ); // no more sent mail for crash setCrashAlreadyReported(true); diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index 35ae27964..8296d1c0b 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -529,114 +529,7 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { - - bool needSpace = false; -// stringstream ss; - string str; - - // create the string for the clipboard - - if (args.Date != 0) - { - str += dateToHumanString(args.Date); - needSpace = true; - } - - if (args.LogType != CLog::LOG_NO) - { - //if (needSpace) { ss << " "; needSpace = false; } - if (needSpace) { str += " "; needSpace = false; } - str += logTypeToString(args.LogType); - needSpace = true; - } - - if (!args.ProcessName.empty()) - { - //if (needSpace) { ss << " "; needSpace = false; } - if (needSpace) { str += " "; needSpace = false; } - str += args.ProcessName; - needSpace = true; - } - - if (args.FileName != NULL) - { - //if (needSpace) { ss << " "; needSpace = false; } - if (needSpace) { str += " "; needSpace = false; } - str += CFile::getFilename(args.FileName); - needSpace = true; - } - - if (args.Line != -1) - { - //if (needSpace) { ss << " "; needSpace = false; } - if (needSpace) { str += " "; needSpace = false; } - str += NLMISC::toString(args.Line); - needSpace = true; - } - - if (args.FuncName != NULL) - { - //if (needSpace) { ss << " "; needSpace = false; } - if (needSpace) { str += " "; needSpace = false; } - str += args.FuncName; - needSpace = true; - } - - if (needSpace) { str += ": "; needSpace = false; } - - str += message; - - CSystemUtils::copyTextToClipboard(str); - - // create the string on the screen - needSpace = false; -// stringstream ss2; - string str2; - -#ifdef NL_DEBUG - if (!args.ProcessName.empty()) - { - if (needSpace) { str2 += " "; needSpace = false; } - str2 += args.ProcessName; - needSpace = true; - } - - if (args.FileName != NULL) - { - if (needSpace) { str2 += " "; needSpace = false; } - str2 += CFile::getFilename(args.FileName); - needSpace = true; - } - - if (args.Line != -1) - { - if (needSpace) { str2 += " "; needSpace = false; } - str2 += NLMISC::toString(args.Line); - needSpace = true; - } - - if (args.FuncName != NULL) - { - if (needSpace) { str2 += " "; needSpace = false; } - str2 += args.FuncName; - needSpace = true; - } - - if (needSpace) { str2 += ": "; needSpace = false; } - -#endif // NL_DEBUG - - str2 += message; - str2 += "\n\n(this message was copied in the clipboard)"; - -/* if (IsDebuggerPresent ()) - { - // Must break in assert call - DebugNeedAssert = true; - } - else -*/ { - + // Display the report string body; @@ -656,69 +549,8 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m body += "Reason: " + toString(message); body += args.CallstackAndLog; - - string subject; - - // procname is host/service_name-sid we only want the service_name to avoid redondant mail - string procname; - string::size_type pos = args.ProcessName.find ("/"); - if (pos == string::npos) - { - procname = args.ProcessName; - } - else - { - string::size_type pos2 = args.ProcessName.find ("-", pos+1); - if (pos2 == string::npos) - { - procname = args.ProcessName.substr (pos+1); - } - else - { - procname = args.ProcessName.substr (pos+1, pos2-pos-1); - } - } - - subject += procname + " NeL " + toString(LogTypeToString[0][args.LogType]) + " " + (args.FileName?string(args.FileName):"") + " " + toString(args.Line) + " " + (args.FuncName?string(args.FuncName):""); - - // Check the envvar NEL_IGNORE_ASSERT - if (getenv ("NEL_IGNORE_ASSERT") == NULL) - { - // yoyo: allow only to send the crash report once. Because users usually click ignore, - // which create noise into list of bugs (once a player crash, it will surely continues to do it). - std::string filename = getLogDirectory() + NL_CRASH_DUMP_FILE; - - if (ReportDebug == report (args.ProcessName + " NeL " + toString(logTypeToString(args.LogType, true)), "", subject, body, true, 2, true, 1, !isCrashAlreadyReported(), IgnoreNextTime, filename.c_str())) - { - INelContext::getInstance().setDebugNeedAssert(true); - } - - // no more sent mail for crash - setCrashAlreadyReported(true); - } - -/* // Check the envvar NEL_IGNORE_ASSERT - if (getenv ("NEL_IGNORE_ASSERT") == NULL) - { - // Ask the user to continue, debug or ignore - int result = MessageBox (NULL, ss2.str().c_str (), logTypeToString(args.LogType, true), MB_ABORTRETRYIGNORE | MB_ICONSTOP); - if (result == IDABORT) - { - // Exit the program now - exit (EXIT_FAILURE); - } - else if (result == IDRETRY) - { - // Give the debugger a try - DebugNeedAssert = true; - } - else if (result == IDIGNORE) - { - // Continue, do nothing - } - } -*/ } - + + report( body ); } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index b165e29f5..54c456ade 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -22,23 +22,8 @@ #include "nel/misc/report.h" #include "nel/misc/path.h" -#ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include -# include -# include -#endif // NL_OS_WINDOWS - -#define NL_NO_DEBUG_FILES 1 - using namespace std; -#ifdef DEBUG_NEW - #define new DEBUG_NEW -#endif - namespace NLMISC { @@ -52,7 +37,7 @@ void setReportEmailFunction (void *emailFunction) EmailFunction = (TEmailFunction)emailFunction; } -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) +void report ( const std::string &body ) { std::string fname = "rcerrorlog.txt"; @@ -78,8 +63,6 @@ TReportResult report (const std::string &title, const std::string &header, const #endif // quit without calling atexit or static object dtors. abort(); - - return ReportQuit; } From d2194cda05e647151b522e6d2014480726bd0b69 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 21 Feb 2015 22:34:02 +0100 Subject: [PATCH 081/175] Removed unused references to CMsgBoxDisplayer. --HG-- branch : feature-crashreport --- code/ryzom/client/src/connection.cpp | 1 - code/ryzom/client/src/init.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 8b07cc7f2..22354e436 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -103,7 +103,6 @@ extern uint32 Version; // Client Version. extern UDriver *Driver; extern UTextContext *TextContext; extern bool game_exit; -extern CMsgBoxDisplayer MsgBoxError; extern CSoundManager *SoundMngr; diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 6958fe790..f0fd40dae 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -142,7 +142,6 @@ using namespace std; // Ligo primitive class CLigoConfig LigoConfig; -CMsgBoxDisplayer MsgBoxError; CClientChatManager ChatMngr; bool LastScreenSaverEnabled = false; From 4e00903dccfdacf1dce6fbd9d75879dd245299e4 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 17:15:41 +0100 Subject: [PATCH 082/175] Back out from 5bb3dad --HG-- branch : feature-crashreport --- code/nel/include/nel/misc/report.h | 17 ++- code/nel/src/misc/debug.cpp | 2 +- code/nel/src/misc/displayer.cpp | 174 ++++++++++++++++++++++++++++- code/nel/src/misc/report.cpp | 19 +++- 4 files changed, 205 insertions(+), 7 deletions(-) diff --git a/code/nel/include/nel/misc/report.h b/code/nel/include/nel/misc/report.h index 6bf3df959..11745b6e3 100644 --- a/code/nel/include/nel/misc/report.h +++ b/code/nel/include/nel/misc/report.h @@ -21,8 +21,21 @@ namespace NLMISC { -/// Prepares the error report, writes it to disk and launches the error reporter -void report ( const std::string &body ); +/** Display a custom message box. + * + * \param title set the title of the report. If empty, it'll display "NeL report". + * \param header message displayed before the edit text box. If empty, it displays the default message. + * \param body message displayed in the edit text box. This string will be sent by email. + * \param debugButton 0 for disabling it, 1 for enable with default behaviors (generate a breakpoint), 2 for enable with no behavior + * + * + * + * \return the button clicked or error + */ + +enum TReportResult { ReportDebug, ReportIgnore, ReportQuit, ReportError }; + +TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const std::string &attachedFile = ""); /** call this in the main of your appli to enable email: setReportEmailFunction (sendEmail); */ diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 67c8cb0f3..aaa551f1f 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -553,7 +553,7 @@ public: // yoyo: allow only to send the crash report once. Because users usually click ignore, // which create noise into list of bugs (once a player crash, it will surely continues to do it). bool i = false; - report ( _Reason ); + report (progname+shortExc, "", subject, _Reason, true, 1, true, 1, !isCrashAlreadyReported(), i, NL_CRASH_DUMP_FILE); // no more sent mail for crash setCrashAlreadyReported(true); diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index 8296d1c0b..35ae27964 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -529,7 +529,114 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { - + + bool needSpace = false; +// stringstream ss; + string str; + + // create the string for the clipboard + + if (args.Date != 0) + { + str += dateToHumanString(args.Date); + needSpace = true; + } + + if (args.LogType != CLog::LOG_NO) + { + //if (needSpace) { ss << " "; needSpace = false; } + if (needSpace) { str += " "; needSpace = false; } + str += logTypeToString(args.LogType); + needSpace = true; + } + + if (!args.ProcessName.empty()) + { + //if (needSpace) { ss << " "; needSpace = false; } + if (needSpace) { str += " "; needSpace = false; } + str += args.ProcessName; + needSpace = true; + } + + if (args.FileName != NULL) + { + //if (needSpace) { ss << " "; needSpace = false; } + if (needSpace) { str += " "; needSpace = false; } + str += CFile::getFilename(args.FileName); + needSpace = true; + } + + if (args.Line != -1) + { + //if (needSpace) { ss << " "; needSpace = false; } + if (needSpace) { str += " "; needSpace = false; } + str += NLMISC::toString(args.Line); + needSpace = true; + } + + if (args.FuncName != NULL) + { + //if (needSpace) { ss << " "; needSpace = false; } + if (needSpace) { str += " "; needSpace = false; } + str += args.FuncName; + needSpace = true; + } + + if (needSpace) { str += ": "; needSpace = false; } + + str += message; + + CSystemUtils::copyTextToClipboard(str); + + // create the string on the screen + needSpace = false; +// stringstream ss2; + string str2; + +#ifdef NL_DEBUG + if (!args.ProcessName.empty()) + { + if (needSpace) { str2 += " "; needSpace = false; } + str2 += args.ProcessName; + needSpace = true; + } + + if (args.FileName != NULL) + { + if (needSpace) { str2 += " "; needSpace = false; } + str2 += CFile::getFilename(args.FileName); + needSpace = true; + } + + if (args.Line != -1) + { + if (needSpace) { str2 += " "; needSpace = false; } + str2 += NLMISC::toString(args.Line); + needSpace = true; + } + + if (args.FuncName != NULL) + { + if (needSpace) { str2 += " "; needSpace = false; } + str2 += args.FuncName; + needSpace = true; + } + + if (needSpace) { str2 += ": "; needSpace = false; } + +#endif // NL_DEBUG + + str2 += message; + str2 += "\n\n(this message was copied in the clipboard)"; + +/* if (IsDebuggerPresent ()) + { + // Must break in assert call + DebugNeedAssert = true; + } + else +*/ { + // Display the report string body; @@ -549,8 +656,69 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m body += "Reason: " + toString(message); body += args.CallstackAndLog; - - report( body ); + + string subject; + + // procname is host/service_name-sid we only want the service_name to avoid redondant mail + string procname; + string::size_type pos = args.ProcessName.find ("/"); + if (pos == string::npos) + { + procname = args.ProcessName; + } + else + { + string::size_type pos2 = args.ProcessName.find ("-", pos+1); + if (pos2 == string::npos) + { + procname = args.ProcessName.substr (pos+1); + } + else + { + procname = args.ProcessName.substr (pos+1, pos2-pos-1); + } + } + + subject += procname + " NeL " + toString(LogTypeToString[0][args.LogType]) + " " + (args.FileName?string(args.FileName):"") + " " + toString(args.Line) + " " + (args.FuncName?string(args.FuncName):""); + + // Check the envvar NEL_IGNORE_ASSERT + if (getenv ("NEL_IGNORE_ASSERT") == NULL) + { + // yoyo: allow only to send the crash report once. Because users usually click ignore, + // which create noise into list of bugs (once a player crash, it will surely continues to do it). + std::string filename = getLogDirectory() + NL_CRASH_DUMP_FILE; + + if (ReportDebug == report (args.ProcessName + " NeL " + toString(logTypeToString(args.LogType, true)), "", subject, body, true, 2, true, 1, !isCrashAlreadyReported(), IgnoreNextTime, filename.c_str())) + { + INelContext::getInstance().setDebugNeedAssert(true); + } + + // no more sent mail for crash + setCrashAlreadyReported(true); + } + +/* // Check the envvar NEL_IGNORE_ASSERT + if (getenv ("NEL_IGNORE_ASSERT") == NULL) + { + // Ask the user to continue, debug or ignore + int result = MessageBox (NULL, ss2.str().c_str (), logTypeToString(args.LogType, true), MB_ABORTRETRYIGNORE | MB_ICONSTOP); + if (result == IDABORT) + { + // Exit the program now + exit (EXIT_FAILURE); + } + else if (result == IDRETRY) + { + // Give the debugger a try + DebugNeedAssert = true; + } + else if (result == IDIGNORE) + { + // Continue, do nothing + } + } +*/ } + } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 54c456ade..b165e29f5 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -22,8 +22,23 @@ #include "nel/misc/report.h" #include "nel/misc/path.h" +#ifdef NL_OS_WINDOWS +# ifndef NL_COMP_MINGW +# define NOMINMAX +# endif +# include +# include +# include +#endif // NL_OS_WINDOWS + +#define NL_NO_DEBUG_FILES 1 + using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { @@ -37,7 +52,7 @@ void setReportEmailFunction (void *emailFunction) EmailFunction = (TEmailFunction)emailFunction; } -void report ( const std::string &body ) +TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { std::string fname = "rcerrorlog.txt"; @@ -63,6 +78,8 @@ void report ( const std::string &body ) #endif // quit without calling atexit or static object dtors. abort(); + + return ReportQuit; } From 7efbee6d0a67030281c823a91f5c0c6ba5c40cdd Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 17:20:24 +0100 Subject: [PATCH 083/175] Backed out from 5942903 --HG-- branch : feature-crashreport --- code/nel/src/misc/debug.cpp | 8 +++++++- code/nel/src/misc/displayer.cpp | 2 ++ code/nel/src/misc/report.cpp | 12 ++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index aaa551f1f..2d09f5ef8 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1193,7 +1193,13 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) INelContext::getInstance().setAssertLog(new CLog (CLog::LOG_ASSERT)); sd = new CStdDisplayer ("DEFAULT_SD"); - DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); + +#ifdef NL_OS_WINDOWS + if (TrapCrashInDebugger || !IsDebuggerPresent ()) + { + DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); + } +#endif #if LOG_IN_FILE if (logInFile) diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index 35ae27964..d48c44d02 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -529,6 +529,7 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { +#ifdef NL_OS_WINDOWS bool needSpace = false; // stringstream ss; @@ -719,6 +720,7 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m } */ } +#endif } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index b165e29f5..88c707aaa 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -52,6 +52,16 @@ void setReportEmailFunction (void *emailFunction) EmailFunction = (TEmailFunction)emailFunction; } +#ifndef NL_OS_WINDOWS + +// GNU/Linux, do nothing + +void report () +{ +} + +#else + TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { std::string fname = "rcerrorlog.txt"; @@ -82,5 +92,7 @@ TReportResult report (const std::string &title, const std::string &header, const return ReportQuit; } +#endif + } // NLMISC From 3d9357637b6d48d806ab5f0d76a33325d0b96770 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 17:38:06 +0100 Subject: [PATCH 084/175] Backed out from fdc0d40 --HG-- branch : feature-crashreport --- code/nel/src/misc/debug.cpp | 2 +- code/nel/src/misc/report.cpp | 291 +++++++++++++++++++++++++++++++++-- 2 files changed, 278 insertions(+), 15 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 2d09f5ef8..c7667acc2 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -83,7 +83,7 @@ using namespace std; #define LOG_IN_FILE NEL_LOG_IN_FILE // If true, debug system will trap crash even if the application is in debugger -static const bool TrapCrashInDebugger = true; +static const bool TrapCrashInDebugger = false; #ifdef DEBUG_NEW #define new DEBUG_NEW diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 88c707aaa..20b2b1c11 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -42,14 +42,25 @@ using namespace std; namespace NLMISC { +#ifdef NL_OS_WINDOWS +static HWND sendReport=NULL; +#endif + //old doesn't work on visual c++ 7.1 due to default parameter typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile = "", bool onlyCheck = false); typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile, bool onlyCheck); +#define DELETE_OBJECT(a) if((a)!=NULL) { DeleteObject (a); a = NULL; } + static TEmailFunction EmailFunction = NULL; void setReportEmailFunction (void *emailFunction) { EmailFunction = (TEmailFunction)emailFunction; + +#ifdef NL_OS_WINDOWS + if (sendReport) + EnableWindow(sendReport, FALSE); +#endif } #ifndef NL_OS_WINDOWS @@ -62,24 +73,91 @@ void report () #else -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) -{ - std::string fname = "rcerrorlog.txt"; +// Windows specific version - std::ofstream f; - f.open( fname.c_str() ); - if( f.good() ) - { - f << body; - f.close(); +static string Body; +static string Subject; +static string AttachedFile; -#ifdef NL_OS_WINDOWS - NLMISC::launchProgram( "rcerror.exe", fname ); -#else - NLMISC::launchProgram( "rcerror", fname ); +static HWND checkIgnore=NULL; +static HWND debug=NULL; +static HWND ignore=NULL; +static HWND quit=NULL; +static HWND dialog=NULL; + +static bool NeedExit; +static TReportResult Result; +static bool IgnoreNextTime; +static bool CanSendMailReport= false; + +static bool DebugDefaultBehavior, QuitDefaultBehavior; + +static void sendEmail() +{ + if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) + { + bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); + if (res) + { + // EnableWindow(sendReport, FALSE); + // MessageBox (dialog, "The email was successfully sent", "email", MB_OK); +#ifndef NL_NO_DEBUG_FILES + CFile::createEmptyFile(getLogDirectory() + "report_sent"); +#endif + } + else + { +#ifndef NL_NO_DEBUG_FILES + CFile::createEmptyFile(getLogDirectory() + "report_failed"); +#endif + // MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); + } + } + else + { +#ifndef NL_NO_DEBUG_FILES + CFile::createEmptyFile(getLogDirectory() + "report_refused"); #endif } +} + +static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //MSGFILTER *pmf; + + if (message == WM_COMMAND && HIWORD(wParam) == BN_CLICKED) + { + if ((HWND) lParam == checkIgnore) + { + IgnoreNextTime = !IgnoreNextTime; + } + else if ((HWND) lParam == debug) + { + sendEmail(); + NeedExit = true; + Result = ReportDebug; + if (DebugDefaultBehavior) + { + NLMISC_BREAKPOINT; + } + } + else if ((HWND) lParam == ignore) + { + sendEmail(); + NeedExit = true; + Result = ReportIgnore; + } + else if ((HWND) lParam == quit) + { + sendEmail(); + NeedExit = true; + Result = ReportQuit; + if (QuitDefaultBehavior) + { + // ace: we cannot call exit() because it's call the static object dtor and can crash the application + // if the dtor call order is not good. + //exit(EXIT_SUCCESS); #ifdef NL_OS_WINDOWS #ifndef NL_COMP_MINGW // disable the Windows popup telling that the application aborted and disable the dr watson report. @@ -88,8 +166,193 @@ TReportResult report (const std::string &title, const std::string &header, const #endif // quit without calling atexit or static object dtors. abort(); + } + } + /*else if ((HWND) lParam == sendReport) + { + if (EmailFunction != NULL) + { + bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); + if (res) + { + EnableWindow(sendReport, FALSE); + MessageBox (dialog, "The email was successfully sent", "email", MB_OK); + CFile::createEmptyFile(getLogDirectory() + "report_sent"); + } + else + { + MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); + } + } + }*/ + } + else if (message == WM_CHAR) + { + if (wParam == 27) + { + // ESC -> ignore + sendEmail(); + NeedExit = true; + Result = ReportIgnore; + } + } + + return DefWindowProc (hWnd, message, wParam, lParam); +} + +TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) +{ + // register the window + static bool AlreadyRegister = false; + if(!AlreadyRegister) + { + WNDCLASSW wc; + memset (&wc,0,sizeof(wc)); + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = (WNDPROC)WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = GetModuleHandle(NULL); + wc.hIcon = NULL; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.hbrBackground = (HBRUSH)COLOR_WINDOW; + wc.lpszClassName = L"NLReportWindow"; + wc.lpszMenuName = NULL; + if (!RegisterClassW(&wc)) return ReportError; + AlreadyRegister = true; + } + + ucstring formatedTitle = title.empty() ? ucstring("NeL report") : ucstring(title); + + + // create the window + dialog = CreateWindowW (L"NLReportWindow", (LPCWSTR)formatedTitle.c_str(), WS_DLGFRAME | WS_CAPTION /*| WS_THICKFRAME*/, CW_USEDEFAULT, CW_USEDEFAULT, 456, 400, NULL, NULL, GetModuleHandle(NULL), NULL); + + // create the font + HFONT font = CreateFont (-12, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); + + Subject = subject; + AttachedFile = attachedFile; + + // create the edit control + HWND edit = CreateWindowW (L"EDIT", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_READONLY | ES_LEFT | ES_MULTILINE, 7, 70, 429, 212, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (edit, WM_SETFONT, (WPARAM) font, TRUE); + + // set the edit text limit to lot of :) + SendMessage (edit, EM_LIMITTEXT, ~0U, 0); + + Body = addSlashR (body); + + // set the message in the edit text + SendMessage (edit, WM_SETTEXT, (WPARAM)0, (LPARAM)Body.c_str()); + + if (enableCheckIgnore) + { + // create the combo box control + checkIgnore = CreateWindowW (L"BUTTON", L"Don't display this report again", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_CHECKBOX, 7, 290, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (checkIgnore, WM_SETFONT, (WPARAM) font, TRUE); + + if(ignoreNextTime) + { + SendMessage (checkIgnore, BM_SETCHECK, BST_CHECKED, 0); + } + } + + // create the debug button control + debug = CreateWindowW (L"BUTTON", L"Debug", WS_CHILD | WS_VISIBLE, 7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (debug, WM_SETFONT, (WPARAM) font, TRUE); + + if (debugButton == 0) + EnableWindow(debug, FALSE); + + // create the ignore button control + ignore = CreateWindowW (L"BUTTON", L"Ignore", WS_CHILD | WS_VISIBLE, 75+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (ignore, WM_SETFONT, (WPARAM) font, TRUE); + + if (ignoreButton == 0) + EnableWindow(ignore, FALSE); + + // create the quit button control + quit = CreateWindowW (L"BUTTON", L"Quit", WS_CHILD | WS_VISIBLE, 75+75+7+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (quit, WM_SETFONT, (WPARAM) font, TRUE); + + if (quitButton == 0) + EnableWindow(quit, FALSE); + + // create the debug button control + sendReport = CreateWindowW (L"BUTTON", L"Don't send the report", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 7, 315+32, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (sendReport, WM_SETFONT, (WPARAM) font, TRUE); + + string formatedHeader; + if (header.empty()) + { + formatedHeader = "This application stopped to display this report."; + } + else + { + formatedHeader = header; + } + + // ace don't do that because it s slow to try to send a mail + //CanSendMailReport = sendReportButton && EmailFunction != NULL && EmailFunction("", "", "", "", "", true); + CanSendMailReport = sendReportButton && EmailFunction != NULL; + + if (CanSendMailReport) + formatedHeader += " Send report will only email the contents of the box below. Please, send it to help us (it could take few minutes to send the email, be patient)."; + else + EnableWindow(sendReport, FALSE); + + ucstring uc = ucstring::makeFromUtf8(formatedHeader); + + // create the label control + HWND label = CreateWindowW (L"STATIC", (LPCWSTR)uc.c_str(), WS_CHILD | WS_VISIBLE /*| SS_WHITERECT*/, 7, 7, 429, 51, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); + SendMessage (label, WM_SETFONT, (WPARAM) font, TRUE); + + + DebugDefaultBehavior = debugButton==1; + QuitDefaultBehavior = quitButton==1; + + IgnoreNextTime = ignoreNextTime; + + // show until the cursor really show :) + while (ShowCursor(TRUE) < 0) + ; + + SetWindowPos (dialog, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); + + SetFocus(dialog); + SetForegroundWindow(dialog); + + NeedExit = false; + + while(!NeedExit) + { + MSG msg; + while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } + nlSleep (1); + } + + // set the user result + ignoreNextTime = IgnoreNextTime; + + ShowWindow(dialog, SW_HIDE); + + + + DELETE_OBJECT(sendReport) + DELETE_OBJECT(quit) + DELETE_OBJECT(ignore) + DELETE_OBJECT(debug) + DELETE_OBJECT(checkIgnore) + DELETE_OBJECT(edit) + DELETE_OBJECT(label) + DELETE_OBJECT(dialog) - return ReportQuit; + return Result; } #endif From 24aa500d0b1c2fccf1e2a547a77bb54c1002092a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 18:45:41 +0100 Subject: [PATCH 085/175] Launch the error report application instead of sending an email. --HG-- branch : feature-crashreport --- code/nel/src/misc/debug.cpp | 3 ++- code/nel/src/misc/report.cpp | 38 ++++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index c7667acc2..3f0c26f69 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -83,7 +83,8 @@ using namespace std; #define LOG_IN_FILE NEL_LOG_IN_FILE // If true, debug system will trap crash even if the application is in debugger -static const bool TrapCrashInDebugger = false; +//static const bool TrapCrashInDebugger = false; +static const bool TrapCrashInDebugger = true; #ifdef DEBUG_NEW #define new DEBUG_NEW diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 20b2b1c11..d761373fd 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -92,6 +92,36 @@ static bool CanSendMailReport= false; static bool DebugDefaultBehavior, QuitDefaultBehavior; +static void doSendReport() +{ + std::string filename; + + // Unfortunately Qt 4.8.5 on Windows messes up arguments. + // As a workaround the report filename is hardcoded for now. + // + //filename = "report_"; + //filename += NLMISC::toString( time( NULL ) ); + //filename += ".txt"; + + filename = "rcerrorlog.txt"; + + std::ofstream f; + f.open( filename.c_str() ); + if( !f.good() ) + return; + + f << Body; + + f.close(); + +#ifdef NL_OS_WINDOWS + NLMISC::launchProgram( "rcerror.exe", filename ); +#else + NLMISC::launchProgram( "rcerror", filename ); +#endif + +} + static void sendEmail() { if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) @@ -133,7 +163,7 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM } else if ((HWND) lParam == debug) { - sendEmail(); + doSendReport(); NeedExit = true; Result = ReportDebug; if (DebugDefaultBehavior) @@ -143,13 +173,13 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM } else if ((HWND) lParam == ignore) { - sendEmail(); + doSendReport(); NeedExit = true; Result = ReportIgnore; } else if ((HWND) lParam == quit) { - sendEmail(); + doSendReport(); NeedExit = true; Result = ReportQuit; @@ -191,7 +221,7 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM if (wParam == 27) { // ESC -> ignore - sendEmail(); + doSendReport(); NeedExit = true; Result = ReportIgnore; } From bdb20d32dd37be4e7b513e2be9a52c1a20896cdc Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 18:59:35 +0100 Subject: [PATCH 086/175] Copyright header changed to Nel... --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror.cpp | 2 +- code/nel/rcerror/rcerror_socket.cpp | 2 +- code/nel/rcerror/rcerror_socket.h | 2 +- code/nel/rcerror/rcerror_widget.cpp | 2 +- code/nel/rcerror/rcerror_widget.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nel/rcerror/rcerror.cpp b/code/nel/rcerror/rcerror.cpp index 0d5088167..4f9174f78 100644 --- a/code/nel/rcerror/rcerror.cpp +++ b/code/nel/rcerror/rcerror.cpp @@ -1,4 +1,4 @@ -// Ryzom Core MMORPG framework - Error Reporter +// Nel MMORPG framework - Error Reporter // // Copyright (C) 2015 Laszlo Kis-Adam // Copyright (C) 2010 Ryzom Core diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/rcerror/rcerror_socket.cpp index 8a011c046..721265d1e 100644 --- a/code/nel/rcerror/rcerror_socket.cpp +++ b/code/nel/rcerror/rcerror_socket.cpp @@ -1,4 +1,4 @@ -// Ryzom Core MMORPG framework - Error Reporter +// Nel MMORPG framework - Error Reporter // // Copyright (C) 2015 Laszlo Kis-Adam // Copyright (C) 2010 Ryzom Core diff --git a/code/nel/rcerror/rcerror_socket.h b/code/nel/rcerror/rcerror_socket.h index a37fa32d0..f64b8a708 100644 --- a/code/nel/rcerror/rcerror_socket.h +++ b/code/nel/rcerror/rcerror_socket.h @@ -1,4 +1,4 @@ -// Ryzom Core MMORPG framework - Error Reporter +// Nel MMORPG framework - Error Reporter // // Copyright (C) 2015 Laszlo Kis-Adam // Copyright (C) 2010 Ryzom Core diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp index a28afbca6..86c68504e 100644 --- a/code/nel/rcerror/rcerror_widget.cpp +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -1,4 +1,4 @@ -// Ryzom Core MMORPG framework - Error Reporter +// Nel MMORPG framework - Error Reporter // // Copyright (C) 2015 Laszlo Kis-Adam // Copyright (C) 2010 Ryzom Core diff --git a/code/nel/rcerror/rcerror_widget.h b/code/nel/rcerror/rcerror_widget.h index 1dd51c2af..7393793e9 100644 --- a/code/nel/rcerror/rcerror_widget.h +++ b/code/nel/rcerror/rcerror_widget.h @@ -1,4 +1,4 @@ -// Ryzom Core MMORPG framework - Error Reporter +// Nel MMORPG framework - Error Reporter // // Copyright (C) 2015 Laszlo Kis-Adam // Copyright (C) 2010 Ryzom Core From b5c72182edfb8b26b74efaa2f7bb0474ff2ada0a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:04:11 +0100 Subject: [PATCH 087/175] Class names in Nel start with a C... --HG-- branch : feature-crashreport --- code/nel/rcerror/rcerror.cpp | 2 +- code/nel/rcerror/rcerror_data.h | 2 +- code/nel/rcerror/rcerror_socket.cpp | 12 ++++++------ code/nel/rcerror/rcerror_socket.h | 12 ++++++------ code/nel/rcerror/rcerror_widget.cpp | 20 ++++++++++---------- code/nel/rcerror/rcerror_widget.h | 10 +++++----- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/code/nel/rcerror/rcerror.cpp b/code/nel/rcerror/rcerror.cpp index 4f9174f78..f26886735 100644 --- a/code/nel/rcerror/rcerror.cpp +++ b/code/nel/rcerror/rcerror.cpp @@ -25,7 +25,7 @@ int main( int argc, char **argv ) { QApplication app( argc, argv ); - RCErrorWidget w; + CRCErrorWidget w; w.setFileName( "rcerrorlog.txt" ); w.show(); diff --git a/code/nel/rcerror/rcerror_data.h b/code/nel/rcerror/rcerror_data.h index 9f12b12fd..8accc75a3 100644 --- a/code/nel/rcerror/rcerror_data.h +++ b/code/nel/rcerror/rcerror_data.h @@ -23,7 +23,7 @@ #include -struct RCErrorData +struct SRCErrorData { QString description; QString report; diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/rcerror/rcerror_socket.cpp index 721265d1e..720cb792b 100644 --- a/code/nel/rcerror/rcerror_socket.cpp +++ b/code/nel/rcerror/rcerror_socket.cpp @@ -27,26 +27,26 @@ namespace static const char *BUG_URL = "http://192.168.2.66/dfighter/r.php"; } -class RCErrorSocketPvt +class CRCErrorSocketPvt { public: QNetworkAccessManager mgr; }; -RCErrorSocket::RCErrorSocket( QObject *parent ) : +CRCErrorSocket::CRCErrorSocket( QObject *parent ) : QObject( parent ) { - m_pvt = new RCErrorSocketPvt(); + m_pvt = new CRCErrorSocketPvt(); connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) ); } -RCErrorSocket::~RCErrorSocket() +CRCErrorSocket::~CRCErrorSocket() { delete m_pvt; } -void RCErrorSocket::sendReport( const RCErrorData &data ) +void CRCErrorSocket::sendReport( const SRCErrorData &data ) { QUrl params; params.addQueryItem( "report", data.report ); @@ -60,7 +60,7 @@ void RCErrorSocket::sendReport( const RCErrorData &data ) m_pvt->mgr.post( request, params.encodedQuery() ); } -void RCErrorSocket::onFinished( QNetworkReply *reply ) +void CRCErrorSocket::onFinished( QNetworkReply *reply ) { if( reply->error() != QNetworkReply::NoError ) Q_EMIT reportFailed(); diff --git a/code/nel/rcerror/rcerror_socket.h b/code/nel/rcerror/rcerror_socket.h index f64b8a708..95092a250 100644 --- a/code/nel/rcerror/rcerror_socket.h +++ b/code/nel/rcerror/rcerror_socket.h @@ -23,18 +23,18 @@ #include #include "rcerror_data.h" -class RCErrorSocketPvt; +class CRCErrorSocketPvt; class QNetworkReply; -class RCErrorSocket : public QObject +class CRCErrorSocket : public QObject { Q_OBJECT public: - RCErrorSocket( QObject *parent ); - ~RCErrorSocket(); + CRCErrorSocket( QObject *parent ); + ~CRCErrorSocket(); - void sendReport( const RCErrorData &data ); + void sendReport( const SRCErrorData &data ); Q_SIGNALS: void reportSent(); @@ -44,7 +44,7 @@ private Q_SLOTS: void onFinished( QNetworkReply *reply ); private: - RCErrorSocketPvt *m_pvt; + CRCErrorSocketPvt *m_pvt; }; #endif diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/rcerror/rcerror_widget.cpp index 86c68504e..04d06ff94 100644 --- a/code/nel/rcerror/rcerror_widget.cpp +++ b/code/nel/rcerror/rcerror_widget.cpp @@ -25,12 +25,12 @@ #include #include -RCErrorWidget::RCErrorWidget( QWidget *parent ) : +CRCErrorWidget::CRCErrorWidget( QWidget *parent ) : QWidget( parent ) { m_ui.setupUi( this ); - m_socket = new RCErrorSocket( this ); + m_socket = new CRCErrorSocket( this ); QTimer::singleShot( 1, this, SLOT( onLoad() ) ); @@ -42,12 +42,12 @@ QWidget( parent ) connect( m_socket, SIGNAL( reportFailed() ), this, SLOT( onReportFailed() ) ); } -RCErrorWidget::~RCErrorWidget() +CRCErrorWidget::~CRCErrorWidget() { m_socket = NULL; } -void RCErrorWidget::onLoad() +void CRCErrorWidget::onLoad() { QFile f( m_fileName ); bool b = f.open( QFile::ReadOnly | QFile::Text ); @@ -64,12 +64,12 @@ void RCErrorWidget::onLoad() f.close(); } -void RCErrorWidget::onSendClicked() +void CRCErrorWidget::onSendClicked() { m_ui.sendButton->setEnabled( false ); QApplication::setOverrideCursor( Qt::WaitCursor ); - RCErrorData data; + SRCErrorData data; data.description = m_ui.descriptionEdit->toPlainText(); data.report = m_ui.reportEdit->toPlainText(); data.email = m_ui.emailEdit->text(); @@ -77,17 +77,17 @@ void RCErrorWidget::onSendClicked() m_socket->sendReport( data ); } -void RCErrorWidget::onCancelClicked() +void CRCErrorWidget::onCancelClicked() { close(); } -void RCErrorWidget::onCBClicked() +void CRCErrorWidget::onCBClicked() { m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); } -void RCErrorWidget::onReportSent() +void CRCErrorWidget::onReportSent() { QApplication::setOverrideCursor( Qt::ArrowCursor ); @@ -98,7 +98,7 @@ void RCErrorWidget::onReportSent() close(); } -void RCErrorWidget::onReportFailed() +void CRCErrorWidget::onReportFailed() { QApplication::setOverrideCursor( Qt::ArrowCursor ); diff --git a/code/nel/rcerror/rcerror_widget.h b/code/nel/rcerror/rcerror_widget.h index 7393793e9..1d016fa52 100644 --- a/code/nel/rcerror/rcerror_widget.h +++ b/code/nel/rcerror/rcerror_widget.h @@ -23,14 +23,14 @@ #include "ui_rcerror_widget.h" -class RCErrorSocket; +class CRCErrorSocket; -class RCErrorWidget : public QWidget +class CRCErrorWidget : public QWidget { Q_OBJECT public: - RCErrorWidget( QWidget *parent = NULL ); - ~RCErrorWidget(); + CRCErrorWidget( QWidget *parent = NULL ); + ~CRCErrorWidget(); void setFileName( const char *fn ){ m_fileName = fn; } @@ -46,7 +46,7 @@ private Q_SLOTS: private: Ui::RCErrorWidget m_ui; QString m_fileName; - RCErrorSocket *m_socket; + CRCErrorSocket *m_socket; }; #endif From 4ec87b3d6ddaa2a02e0e884364c92b42cab93066 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:24:38 +0100 Subject: [PATCH 088/175] Moved to nel\tools\misc --HG-- branch : feature-crashreport --- code/nel/CMakeLists.txt | 4 ---- code/nel/tools/misc/CMakeLists.txt | 1 + code/nel/{ => tools/misc}/rcerror/CMakeLists.txt | 0 code/nel/{ => tools/misc}/rcerror/rcerror.cpp | 0 code/nel/{ => tools/misc}/rcerror/rcerror_data.h | 0 code/nel/{ => tools/misc}/rcerror/rcerror_socket.cpp | 0 code/nel/{ => tools/misc}/rcerror/rcerror_socket.h | 0 code/nel/{ => tools/misc}/rcerror/rcerror_widget.cpp | 0 code/nel/{ => tools/misc}/rcerror/rcerror_widget.h | 0 code/nel/{ => tools/misc}/rcerror/rcerror_widget.ui | 0 10 files changed, 1 insertion(+), 4 deletions(-) rename code/nel/{ => tools/misc}/rcerror/CMakeLists.txt (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror.cpp (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror_data.h (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror_socket.cpp (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror_socket.h (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror_widget.cpp (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror_widget.h (100%) rename code/nel/{ => tools/misc}/rcerror/rcerror_widget.ui (100%) diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index 00290d097..16a8166fe 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -83,7 +83,3 @@ IF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) ENDIF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(tools) ENDIF(WITH_NEL_TOOLS OR WITH_NEL_MAXPLUGIN) - -IF(WITH_QT) - ADD_SUBDIRECTORY(rcerror) -ENDIF(WITH_QT) diff --git a/code/nel/tools/misc/CMakeLists.txt b/code/nel/tools/misc/CMakeLists.txt index 5386cbbc6..1cda7e8e6 100644 --- a/code/nel/tools/misc/CMakeLists.txt +++ b/code/nel/tools/misc/CMakeLists.txt @@ -3,6 +3,7 @@ SUBDIRS(bnp_make disp_sheet_id extract_filename lock make_sheet_id xml_packer) IF(WITH_QT) ADD_SUBDIRECTORY(words_dic_qt) ADD_SUBDIRECTORY(message_box_qt) + ADD_SUBDIRECTORY(rcerror) ENDIF(WITH_QT) IF(WIN32) diff --git a/code/nel/rcerror/CMakeLists.txt b/code/nel/tools/misc/rcerror/CMakeLists.txt similarity index 100% rename from code/nel/rcerror/CMakeLists.txt rename to code/nel/tools/misc/rcerror/CMakeLists.txt diff --git a/code/nel/rcerror/rcerror.cpp b/code/nel/tools/misc/rcerror/rcerror.cpp similarity index 100% rename from code/nel/rcerror/rcerror.cpp rename to code/nel/tools/misc/rcerror/rcerror.cpp diff --git a/code/nel/rcerror/rcerror_data.h b/code/nel/tools/misc/rcerror/rcerror_data.h similarity index 100% rename from code/nel/rcerror/rcerror_data.h rename to code/nel/tools/misc/rcerror/rcerror_data.h diff --git a/code/nel/rcerror/rcerror_socket.cpp b/code/nel/tools/misc/rcerror/rcerror_socket.cpp similarity index 100% rename from code/nel/rcerror/rcerror_socket.cpp rename to code/nel/tools/misc/rcerror/rcerror_socket.cpp diff --git a/code/nel/rcerror/rcerror_socket.h b/code/nel/tools/misc/rcerror/rcerror_socket.h similarity index 100% rename from code/nel/rcerror/rcerror_socket.h rename to code/nel/tools/misc/rcerror/rcerror_socket.h diff --git a/code/nel/rcerror/rcerror_widget.cpp b/code/nel/tools/misc/rcerror/rcerror_widget.cpp similarity index 100% rename from code/nel/rcerror/rcerror_widget.cpp rename to code/nel/tools/misc/rcerror/rcerror_widget.cpp diff --git a/code/nel/rcerror/rcerror_widget.h b/code/nel/tools/misc/rcerror/rcerror_widget.h similarity index 100% rename from code/nel/rcerror/rcerror_widget.h rename to code/nel/tools/misc/rcerror/rcerror_widget.h diff --git a/code/nel/rcerror/rcerror_widget.ui b/code/nel/tools/misc/rcerror/rcerror_widget.ui similarity index 100% rename from code/nel/rcerror/rcerror_widget.ui rename to code/nel/tools/misc/rcerror/rcerror_widget.ui From 195dfcc3f3061d714c4a9ae7ba0557a33a031072 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:26:03 +0100 Subject: [PATCH 089/175] Changed default title to NeL Error Report. --HG-- branch : feature-crashreport --- code/nel/tools/misc/rcerror/rcerror_widget.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/misc/rcerror/rcerror_widget.ui b/code/nel/tools/misc/rcerror/rcerror_widget.ui index 72e5f92f5..b92ac65a6 100644 --- a/code/nel/tools/misc/rcerror/rcerror_widget.ui +++ b/code/nel/tools/misc/rcerror/rcerror_widget.ui @@ -14,7 +14,7 @@ - Ryzom Core error report + NeL Error Report From 97de06bff27a607df229b3eb4131d2573a5cff99 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:28:02 +0100 Subject: [PATCH 090/175] renamed directory. --HG-- branch : feature-crashreport --- code/nel/tools/misc/CMakeLists.txt | 2 +- code/nel/tools/misc/{rcerror => crash_report}/CMakeLists.txt | 0 code/nel/tools/misc/{rcerror => crash_report}/rcerror.cpp | 0 code/nel/tools/misc/{rcerror => crash_report}/rcerror_data.h | 0 .../nel/tools/misc/{rcerror => crash_report}/rcerror_socket.cpp | 0 code/nel/tools/misc/{rcerror => crash_report}/rcerror_socket.h | 0 .../nel/tools/misc/{rcerror => crash_report}/rcerror_widget.cpp | 0 code/nel/tools/misc/{rcerror => crash_report}/rcerror_widget.h | 0 code/nel/tools/misc/{rcerror => crash_report}/rcerror_widget.ui | 0 9 files changed, 1 insertion(+), 1 deletion(-) rename code/nel/tools/misc/{rcerror => crash_report}/CMakeLists.txt (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror.cpp (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror_data.h (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror_socket.cpp (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror_socket.h (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror_widget.cpp (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror_widget.h (100%) rename code/nel/tools/misc/{rcerror => crash_report}/rcerror_widget.ui (100%) diff --git a/code/nel/tools/misc/CMakeLists.txt b/code/nel/tools/misc/CMakeLists.txt index 1cda7e8e6..c9bbcd058 100644 --- a/code/nel/tools/misc/CMakeLists.txt +++ b/code/nel/tools/misc/CMakeLists.txt @@ -3,7 +3,7 @@ SUBDIRS(bnp_make disp_sheet_id extract_filename lock make_sheet_id xml_packer) IF(WITH_QT) ADD_SUBDIRECTORY(words_dic_qt) ADD_SUBDIRECTORY(message_box_qt) - ADD_SUBDIRECTORY(rcerror) + ADD_SUBDIRECTORY(crash_report) ENDIF(WITH_QT) IF(WIN32) diff --git a/code/nel/tools/misc/rcerror/CMakeLists.txt b/code/nel/tools/misc/crash_report/CMakeLists.txt similarity index 100% rename from code/nel/tools/misc/rcerror/CMakeLists.txt rename to code/nel/tools/misc/crash_report/CMakeLists.txt diff --git a/code/nel/tools/misc/rcerror/rcerror.cpp b/code/nel/tools/misc/crash_report/rcerror.cpp similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror.cpp rename to code/nel/tools/misc/crash_report/rcerror.cpp diff --git a/code/nel/tools/misc/rcerror/rcerror_data.h b/code/nel/tools/misc/crash_report/rcerror_data.h similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror_data.h rename to code/nel/tools/misc/crash_report/rcerror_data.h diff --git a/code/nel/tools/misc/rcerror/rcerror_socket.cpp b/code/nel/tools/misc/crash_report/rcerror_socket.cpp similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror_socket.cpp rename to code/nel/tools/misc/crash_report/rcerror_socket.cpp diff --git a/code/nel/tools/misc/rcerror/rcerror_socket.h b/code/nel/tools/misc/crash_report/rcerror_socket.h similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror_socket.h rename to code/nel/tools/misc/crash_report/rcerror_socket.h diff --git a/code/nel/tools/misc/rcerror/rcerror_widget.cpp b/code/nel/tools/misc/crash_report/rcerror_widget.cpp similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror_widget.cpp rename to code/nel/tools/misc/crash_report/rcerror_widget.cpp diff --git a/code/nel/tools/misc/rcerror/rcerror_widget.h b/code/nel/tools/misc/crash_report/rcerror_widget.h similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror_widget.h rename to code/nel/tools/misc/crash_report/rcerror_widget.h diff --git a/code/nel/tools/misc/rcerror/rcerror_widget.ui b/code/nel/tools/misc/crash_report/rcerror_widget.ui similarity index 100% rename from code/nel/tools/misc/rcerror/rcerror_widget.ui rename to code/nel/tools/misc/crash_report/rcerror_widget.ui From 6be70dd39c090d1d80ff80d08695f51cd726fce8 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:33:12 +0100 Subject: [PATCH 091/175] Renames. --HG-- branch : feature-crashreport --- .../tools/misc/crash_report/CMakeLists.txt | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/code/nel/tools/misc/crash_report/CMakeLists.txt b/code/nel/tools/misc/crash_report/CMakeLists.txt index 51522cf0c..0e2d2a9bc 100644 --- a/code/nel/tools/misc/crash_report/CMakeLists.txt +++ b/code/nel/tools/misc/crash_report/CMakeLists.txt @@ -1,14 +1,14 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR} ${QT_INCLUDES}) -FILE(GLOB RCERROR_SRC *.cpp) -FILE(GLOB RCERROR_HDR *h) +FILE(GLOB CRASHREPORT_SRC *.cpp) +FILE(GLOB CRASHREPORT_HDR *h) -SET(RCERROR_MOC_HDR -rcerror_socket.h -rcerror_widget.h +SET(CRASHREPORT_MOC_HDR +crash_report_socket.h +crash_report_widget.h ) -SET(RCERROR_UI -rcerror_widget.ui +SET(CRASHREPORT_UI +crash_report_widget.ui ) SET(QT_USE_QTGUI TRUE) @@ -20,20 +20,20 @@ SET(QT_USE_QTXML FALSE) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(${QT_DEFINITIONS}) -QT4_WRAP_CPP(RCERROR_MOC_SRC ${RCERROR_MOC_HDR}) -QT4_WRAP_UI(RCERROR_UI_HDR ${RCERROR_UI}) +QT4_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) +QT4_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) -SOURCE_GROUP(QtResources FILES ${RCERROR_UI}) -SOURCE_GROUP(QtGeneratedUiHdr FILES ${RCERROR_UI_HDR}) -SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${RCERROR_MOC_SRC}) -SOURCE_GROUP("source files" FILES ${RCERROR_SRC}) -SOURCE_GROUP("header files" FILES ${RCERROR_HDR}) +SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI}) +SOURCE_GROUP(QtGeneratedUiHdr FILES ${CRASHREPORT_UI_HDR}) +SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${CRASHREPORT_MOC_SRC}) +SOURCE_GROUP("source files" FILES ${CRASHREPORT_SRC}) +SOURCE_GROUP("header files" FILES ${CRASHREPORT_HDR}) -ADD_EXECUTABLE(rcerror WIN32 MACOSX_BUNDLE ${RCERROR_SRC} ${RCERROR_MOC_HDR} ${RCERROR_MOC_SRC} ${RCERROR_UI_HDR}) -TARGET_LINK_LIBRARIES(rcerror ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) +ADD_EXECUTABLE(crash_report WIN32 MACOSX_BUNDLE ${CRASHREPORT_SRC} ${CRASHREPORT_MOC_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR}) +TARGET_LINK_LIBRARIES(crash_report ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) -NL_DEFAULT_PROPS(rcerror "Ryzom Core Error Reporter") -NL_ADD_RUNTIME_FLAGS(rcerror) +NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report") +NL_ADD_RUNTIME_FLAGS(crash_report) -INSTALL(TARGETS rcerror RUNTIME DESTINATION ${NL_BIN_PREFIX}) +INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX}) From 39879717926f8bfdc06fefe1f0158bad1cf31165 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:33:38 +0100 Subject: [PATCH 092/175] Renames. --HG-- branch : feature-crashreport --- .../nel/tools/misc/crash_report/{rcerror.cpp => crash_report.cpp} | 0 .../misc/crash_report/{rcerror_data.h => crash_report_data.h} | 0 .../crash_report/{rcerror_socket.cpp => crash_report_socket.cpp} | 0 .../misc/crash_report/{rcerror_socket.h => crash_report_socket.h} | 0 .../crash_report/{rcerror_widget.cpp => crash_report_widget.cpp} | 0 .../misc/crash_report/{rcerror_widget.h => crash_report_widget.h} | 0 .../crash_report/{rcerror_widget.ui => crash_report_widget.ui} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename code/nel/tools/misc/crash_report/{rcerror.cpp => crash_report.cpp} (100%) rename code/nel/tools/misc/crash_report/{rcerror_data.h => crash_report_data.h} (100%) rename code/nel/tools/misc/crash_report/{rcerror_socket.cpp => crash_report_socket.cpp} (100%) rename code/nel/tools/misc/crash_report/{rcerror_socket.h => crash_report_socket.h} (100%) rename code/nel/tools/misc/crash_report/{rcerror_widget.cpp => crash_report_widget.cpp} (100%) rename code/nel/tools/misc/crash_report/{rcerror_widget.h => crash_report_widget.h} (100%) rename code/nel/tools/misc/crash_report/{rcerror_widget.ui => crash_report_widget.ui} (100%) diff --git a/code/nel/tools/misc/crash_report/rcerror.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror.cpp rename to code/nel/tools/misc/crash_report/crash_report.cpp diff --git a/code/nel/tools/misc/crash_report/rcerror_data.h b/code/nel/tools/misc/crash_report/crash_report_data.h similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror_data.h rename to code/nel/tools/misc/crash_report/crash_report_data.h diff --git a/code/nel/tools/misc/crash_report/rcerror_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror_socket.cpp rename to code/nel/tools/misc/crash_report/crash_report_socket.cpp diff --git a/code/nel/tools/misc/crash_report/rcerror_socket.h b/code/nel/tools/misc/crash_report/crash_report_socket.h similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror_socket.h rename to code/nel/tools/misc/crash_report/crash_report_socket.h diff --git a/code/nel/tools/misc/crash_report/rcerror_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror_widget.cpp rename to code/nel/tools/misc/crash_report/crash_report_widget.cpp diff --git a/code/nel/tools/misc/crash_report/rcerror_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror_widget.h rename to code/nel/tools/misc/crash_report/crash_report_widget.h diff --git a/code/nel/tools/misc/crash_report/rcerror_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui similarity index 100% rename from code/nel/tools/misc/crash_report/rcerror_widget.ui rename to code/nel/tools/misc/crash_report/crash_report_widget.ui From cfe2d603503d7da01e87dc8e14a90942e7544843 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 19:52:01 +0100 Subject: [PATCH 093/175] More renames... --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 4 +-- .../tools/misc/crash_report/crash_report.cpp | 4 +-- .../misc/crash_report/crash_report_data.h | 2 +- .../misc/crash_report/crash_report_socket.cpp | 14 +++++----- .../misc/crash_report/crash_report_socket.h | 14 +++++----- .../misc/crash_report/crash_report_widget.cpp | 26 +++++++++---------- .../misc/crash_report/crash_report_widget.h | 14 +++++----- .../misc/crash_report/crash_report_widget.ui | 4 +-- 8 files changed, 41 insertions(+), 41 deletions(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index d761373fd..09cfc1178 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -115,9 +115,9 @@ static void doSendReport() f.close(); #ifdef NL_OS_WINDOWS - NLMISC::launchProgram( "rcerror.exe", filename ); + NLMISC::launchProgram( "crash_report.exe", filename ); #else - NLMISC::launchProgram( "rcerror", filename ); + NLMISC::launchProgram( "crash_report", filename ); #endif } diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index f26886735..d04928d21 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -17,7 +17,7 @@ // along with this program. If not, see . -#include "rcerror_widget.h" +#include "crash_report_widget.h" #include #include @@ -25,7 +25,7 @@ int main( int argc, char **argv ) { QApplication app( argc, argv ); - CRCErrorWidget w; + CCrashReportWidget w; w.setFileName( "rcerrorlog.txt" ); w.show(); diff --git a/code/nel/tools/misc/crash_report/crash_report_data.h b/code/nel/tools/misc/crash_report/crash_report_data.h index 8accc75a3..5884e7eb4 100644 --- a/code/nel/tools/misc/crash_report/crash_report_data.h +++ b/code/nel/tools/misc/crash_report/crash_report_data.h @@ -23,7 +23,7 @@ #include -struct SRCErrorData +struct SCrashReportData { QString description; QString report; diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp index 720cb792b..209ea89e8 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -16,7 +16,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "rcerror_socket.h" +#include "crash_report_socket.h" #include #include #include @@ -27,26 +27,26 @@ namespace static const char *BUG_URL = "http://192.168.2.66/dfighter/r.php"; } -class CRCErrorSocketPvt +class CCrashReportSocketPvt { public: QNetworkAccessManager mgr; }; -CRCErrorSocket::CRCErrorSocket( QObject *parent ) : +CCrashReportSocket::CCrashReportSocket( QObject *parent ) : QObject( parent ) { - m_pvt = new CRCErrorSocketPvt(); + m_pvt = new CCrashReportSocketPvt(); connect( &m_pvt->mgr, SIGNAL( finished( QNetworkReply* ) ), this, SLOT( onFinished( QNetworkReply* ) ) ); } -CRCErrorSocket::~CRCErrorSocket() +CCrashReportSocket::~CCrashReportSocket() { delete m_pvt; } -void CRCErrorSocket::sendReport( const SRCErrorData &data ) +void CCrashReportSocket::sendReport( const SCrashReportData &data ) { QUrl params; params.addQueryItem( "report", data.report ); @@ -60,7 +60,7 @@ void CRCErrorSocket::sendReport( const SRCErrorData &data ) m_pvt->mgr.post( request, params.encodedQuery() ); } -void CRCErrorSocket::onFinished( QNetworkReply *reply ) +void CCrashReportSocket::onFinished( QNetworkReply *reply ) { if( reply->error() != QNetworkReply::NoError ) Q_EMIT reportFailed(); diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.h b/code/nel/tools/misc/crash_report/crash_report_socket.h index 95092a250..24bf6c451 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.h +++ b/code/nel/tools/misc/crash_report/crash_report_socket.h @@ -21,20 +21,20 @@ #define RCERROR_SOCKET #include -#include "rcerror_data.h" +#include "crash_report_data.h" -class CRCErrorSocketPvt; +class CCrashReportSocketPvt; class QNetworkReply; -class CRCErrorSocket : public QObject +class CCrashReportSocket : public QObject { Q_OBJECT public: - CRCErrorSocket( QObject *parent ); - ~CRCErrorSocket(); + CCrashReportSocket( QObject *parent ); + ~CCrashReportSocket(); - void sendReport( const SRCErrorData &data ); + void sendReport( const SCrashReportData &data ); Q_SIGNALS: void reportSent(); @@ -44,7 +44,7 @@ private Q_SLOTS: void onFinished( QNetworkReply *reply ); private: - CRCErrorSocketPvt *m_pvt; + CCrashReportSocketPvt *m_pvt; }; #endif diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 04d06ff94..49925765d 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -17,20 +17,20 @@ // along with this program. If not, see . -#include "rcerror_widget.h" -#include "rcerror_socket.h" -#include "rcerror_data.h" +#include "crash_report_widget.h" +#include "crash_report_socket.h" +#include "crash_report_data.h" #include #include #include #include -CRCErrorWidget::CRCErrorWidget( QWidget *parent ) : +CCrashReportWidget::CCrashReportWidget( QWidget *parent ) : QWidget( parent ) { m_ui.setupUi( this ); - m_socket = new CRCErrorSocket( this ); + m_socket = new CCrashReportSocket( this ); QTimer::singleShot( 1, this, SLOT( onLoad() ) ); @@ -42,12 +42,12 @@ QWidget( parent ) connect( m_socket, SIGNAL( reportFailed() ), this, SLOT( onReportFailed() ) ); } -CRCErrorWidget::~CRCErrorWidget() +CCrashReportWidget::~CCrashReportWidget() { m_socket = NULL; } -void CRCErrorWidget::onLoad() +void CCrashReportWidget::onLoad() { QFile f( m_fileName ); bool b = f.open( QFile::ReadOnly | QFile::Text ); @@ -64,12 +64,12 @@ void CRCErrorWidget::onLoad() f.close(); } -void CRCErrorWidget::onSendClicked() +void CCrashReportWidget::onSendClicked() { m_ui.sendButton->setEnabled( false ); QApplication::setOverrideCursor( Qt::WaitCursor ); - SRCErrorData data; + SCrashReportData data; data.description = m_ui.descriptionEdit->toPlainText(); data.report = m_ui.reportEdit->toPlainText(); data.email = m_ui.emailEdit->text(); @@ -77,17 +77,17 @@ void CRCErrorWidget::onSendClicked() m_socket->sendReport( data ); } -void CRCErrorWidget::onCancelClicked() +void CCrashReportWidget::onCancelClicked() { close(); } -void CRCErrorWidget::onCBClicked() +void CCrashReportWidget::onCBClicked() { m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); } -void CRCErrorWidget::onReportSent() +void CCrashReportWidget::onReportSent() { QApplication::setOverrideCursor( Qt::ArrowCursor ); @@ -98,7 +98,7 @@ void CRCErrorWidget::onReportSent() close(); } -void CRCErrorWidget::onReportFailed() +void CCrashReportWidget::onReportFailed() { QApplication::setOverrideCursor( Qt::ArrowCursor ); diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index 1d016fa52..47d16ad77 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -21,16 +21,16 @@ #define RCERROR_WIDGET -#include "ui_rcerror_widget.h" +#include "ui_crash_report_widget.h" -class CRCErrorSocket; +class CCrashReportSocket; -class CRCErrorWidget : public QWidget +class CCrashReportWidget : public QWidget { Q_OBJECT public: - CRCErrorWidget( QWidget *parent = NULL ); - ~CRCErrorWidget(); + CCrashReportWidget( QWidget *parent = NULL ); + ~CCrashReportWidget(); void setFileName( const char *fn ){ m_fileName = fn; } @@ -44,9 +44,9 @@ private Q_SLOTS: void onReportFailed(); private: - Ui::RCErrorWidget m_ui; + Ui::CrashReportWidget m_ui; QString m_fileName; - CRCErrorSocket *m_socket; + CCrashReportSocket *m_socket; }; #endif diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui index b92ac65a6..589810578 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.ui +++ b/code/nel/tools/misc/crash_report/crash_report_widget.ui @@ -1,7 +1,7 @@ - RCErrorWidget - + CrashReportWidget + Qt::ApplicationModal From 955ef484608242126953099a8c5935f263143e96 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 21:51:17 +0100 Subject: [PATCH 094/175] Parametrize crash reporter. --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 21 ++++--- .../tools/misc/crash_report/crash_report.cpp | 61 ++++++++++++++++++- .../misc/crash_report/crash_report_socket.cpp | 7 +-- .../misc/crash_report/crash_report_socket.h | 4 ++ .../misc/crash_report/crash_report_widget.cpp | 56 ++++++++++++++++- .../misc/crash_report/crash_report_widget.h | 7 +++ 6 files changed, 139 insertions(+), 17 deletions(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 09cfc1178..58740ce28 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -92,18 +92,21 @@ static bool CanSendMailReport= false; static bool DebugDefaultBehavior, QuitDefaultBehavior; +static std::string URL = "FILL_IN_CRASH_REPORT_HOSTNAME_HERE"; + static void doSendReport() { std::string filename; - // Unfortunately Qt 4.8.5 on Windows messes up arguments. - // As a workaround the report filename is hardcoded for now. - // - //filename = "report_"; - //filename += NLMISC::toString( time( NULL ) ); - //filename += ".txt"; + filename = "report_"; + filename += NLMISC::toString( time( NULL ) ); + filename += ".txt"; - filename = "rcerrorlog.txt"; + std::string params; + params = "-log "; + params += filename; + params += " -host "; + params += URL; std::ofstream f; f.open( filename.c_str() ); @@ -115,9 +118,9 @@ static void doSendReport() f.close(); #ifdef NL_OS_WINDOWS - NLMISC::launchProgram( "crash_report.exe", filename ); + NLMISC::launchProgram( "crash_report.exe", params ); #else - NLMISC::launchProgram( "crash_report", filename ); + NLMISC::launchProgram( "crash_report", params ); #endif } diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index d04928d21..e083de126 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -21,12 +21,71 @@ #include #include +#include +#include +#include + +class CCmdLineParser +{ +public: + static void parse( int argc, char **argv, std::vector< std::pair< std::string, std::string > > &v ) + { + std::stack< std::string > stack; + std::string key; + std::string value; + + for( int i = argc - 1 ; i >= 0; i-- ) + { + stack.push( std::string( argv[ i ] ) ); + } + + while( !stack.empty() ) + { + key = stack.top(); + stack.pop(); + + // If not a real parameter ( they start with '-' ), discard. + if( key[ 0 ] != '-' ) + continue; + + // Remove the '-' + key = key.substr( 1 ); + + // No more parameters + if( stack.empty() ) + { + v.push_back( std::make_pair( key, "" ) ); + break; + } + + value = stack.top(); + + // If next parameter is a key, process it in the next iteration + if( value[ 0 ] == '-' ) + { + v.push_back( std::make_pair( key, "" ) ); + continue; + } + // Otherwise store the pair + else + { + v.push_back( std::make_pair( key, value ) ); + stack.pop(); + } + } + } +}; + int main( int argc, char **argv ) { QApplication app( argc, argv ); + std::vector< std::pair< std::string, std::string > > params; + + CCmdLineParser::parse( argc, argv, params ); + CCrashReportWidget w; - w.setFileName( "rcerrorlog.txt" ); + w.setup( params ); w.show(); return app.exec(); diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp index 209ea89e8..5f8720e05 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -22,11 +22,6 @@ #include #include -namespace -{ - static const char *BUG_URL = "http://192.168.2.66/dfighter/r.php"; -} - class CCrashReportSocketPvt { public: @@ -53,7 +48,7 @@ void CCrashReportSocket::sendReport( const SCrashReportData &data ) params.addQueryItem( "descr", data.description ); params.addQueryItem( "email", data.email ); - QUrl url( BUG_URL ); + QUrl url( m_url ); QNetworkRequest request( url ); request.setRawHeader( "Connection", "close" ); diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.h b/code/nel/tools/misc/crash_report/crash_report_socket.h index 24bf6c451..32ccc5da0 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.h +++ b/code/nel/tools/misc/crash_report/crash_report_socket.h @@ -34,6 +34,9 @@ public: CCrashReportSocket( QObject *parent ); ~CCrashReportSocket(); + void setURL( const char *URL ){ m_url = URL; } + QString url() const{ return m_url; } + void sendReport( const SCrashReportData &data ); Q_SIGNALS: @@ -45,6 +48,7 @@ private Q_SLOTS: private: CCrashReportSocketPvt *m_pvt; + QString m_url; }; #endif diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 49925765d..ff0028223 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -47,8 +47,39 @@ CCrashReportWidget::~CCrashReportWidget() m_socket = NULL; } +void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::string > > ¶ms ) +{ + for( int i = 0; i < params.size(); i++ ) + { + const std::pair< std::string, std::string > &p = params[ i ]; + const std::string &k = p.first; + const std::string &v = p.second; + + if( k == "log" ) + { + m_fileName = v.c_str(); + } + else + if( k == "host" ) + { + m_socket->setURL( v.c_str() ); + } + else + if( k == "title" ) + { + setWindowTitle( v.c_str() ); + } + } +} + void CCrashReportWidget::onLoad() { + if( !checkSettings() ) + { + close(); + return; + } + QFile f( m_fileName ); bool b = f.open( QFile::ReadOnly | QFile::Text ); if( !b ) @@ -57,6 +88,7 @@ void CCrashReportWidget::onLoad() tr( "No log file found" ), tr( "There was no log file found, therefore nothing to report. Exiting..." ) ); close(); + return; } QTextStream ss( &f ); @@ -107,4 +139,26 @@ void CCrashReportWidget::onReportFailed() tr( "Failed to send the report..." ) ); close(); -} \ No newline at end of file +} + +bool CCrashReportWidget::checkSettings() +{ + if( m_fileName.isEmpty() ) + { + QMessageBox::information( this, + tr( "No log file specified." ), + tr( "No log file specified. Exiting..." ) ); + return false; + } + + if( m_socket->url().isEmpty() ) + { + QMessageBox::information( this, + tr( "No host specified." ), + tr( "No host specified. Exiting..." ) ); + return false; + } + + return true; +} + diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index 47d16ad77..0baf2521d 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -22,6 +22,8 @@ #include "ui_crash_report_widget.h" +#include +#include class CCrashReportSocket; @@ -34,6 +36,8 @@ public: void setFileName( const char *fn ){ m_fileName = fn; } + void setup( const std::vector< std::pair< std::string, std::string > > ¶ms ); + private Q_SLOTS: void onLoad(); void onSendClicked(); @@ -44,6 +48,9 @@ private Q_SLOTS: void onReportFailed(); private: + bool checkSettings(); + + Ui::CrashReportWidget m_ui; QString m_fileName; CCrashReportSocket *m_socket; From 2bb5e8e9ba6be80184635505cc570176b1a153b7 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 22:34:07 +0100 Subject: [PATCH 095/175] Remove generated log file when quitting the reporter. --HG-- branch : feature-crashreport --- .../tools/misc/crash_report/crash_report_widget.cpp | 13 ++++++++++--- .../tools/misc/crash_report/crash_report_widget.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index ff0028223..968978f94 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -24,6 +24,7 @@ #include #include #include +#include CCrashReportWidget::CCrashReportWidget( QWidget *parent ) : QWidget( parent ) @@ -111,7 +112,7 @@ void CCrashReportWidget::onSendClicked() void CCrashReportWidget::onCancelClicked() { - close(); + removeAndQuit(); } void CCrashReportWidget::onCBClicked() @@ -127,7 +128,7 @@ void CCrashReportWidget::onReportSent() tr( "Report sent" ), tr( "The report has been sent." ) ); - close(); + removeAndQuit(); } void CCrashReportWidget::onReportFailed() @@ -138,7 +139,7 @@ void CCrashReportWidget::onReportFailed() tr( "Report failed" ), tr( "Failed to send the report..." ) ); - close(); + removeAndQuit(); } bool CCrashReportWidget::checkSettings() @@ -162,3 +163,9 @@ bool CCrashReportWidget::checkSettings() return true; } +void CCrashReportWidget::removeAndQuit() +{ + QFile::remove( m_fileName ); + close(); +} + diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index 0baf2521d..61b56e340 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -49,7 +49,7 @@ private Q_SLOTS: private: bool checkSettings(); - + void removeAndQuit(); Ui::CrashReportWidget m_ui; QString m_fileName; From 8bf372056f1290301b75e38eac367eb74306383d Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 23 Feb 2015 01:36:50 +0100 Subject: [PATCH 096/175] Use CMsgBoxDisplayer on non-windows platforms as well. --HG-- branch : feature-crashreport --- code/nel/src/misc/debug.cpp | 2 +- code/nel/src/misc/displayer.cpp | 4 +- code/nel/src/misc/report.cpp | 79 ++++++++++++++++++--------------- 3 files changed, 47 insertions(+), 38 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 3f0c26f69..86752a412 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1197,10 +1197,10 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) #ifdef NL_OS_WINDOWS if (TrapCrashInDebugger || !IsDebuggerPresent ()) +#endif { DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); } -#endif #if LOG_IN_FILE if (logInFile) diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index d48c44d02..86fc1d726 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -529,7 +529,7 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { -#ifdef NL_OS_WINDOWS +//#ifdef NL_OS_WINDOWS bool needSpace = false; // stringstream ss; @@ -720,7 +720,7 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m } */ } -#endif +//#endif } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 58740ce28..784f49a9a 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -63,19 +63,61 @@ void setReportEmailFunction (void *emailFunction) #endif } +static string Body; +static std::string URL = "FILL_IN_CRASH_REPORT_HOSTNAME_HERE"; + + +static void doSendReport() +{ + std::string filename; + + filename = "report_"; + filename += NLMISC::toString( int( time( NULL ) ) ); + filename += ".txt"; + + std::string params; + params = "-log "; + params += filename; + params += " -host "; + params += URL; + + std::ofstream f; + f.open( filename.c_str() ); + if( !f.good() ) + return; + + f << Body; + + f.close(); + +#ifdef NL_OS_WINDOWS + NLMISC::launchProgram( "crash_report.exe", params ); +#else + NLMISC::launchProgram( "crash_report", params ); +#endif + + // Added because NLSMIC::launcProgram needs time to launch + nlSleep( 2 * 1000 ); + +} + #ifndef NL_OS_WINDOWS // GNU/Linux, do nothing -void report () +TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { + Body = addSlashR( body ); + + doSendReport(); + + return ReportQuit; } #else // Windows specific version -static string Body; static string Subject; static string AttachedFile; @@ -92,39 +134,6 @@ static bool CanSendMailReport= false; static bool DebugDefaultBehavior, QuitDefaultBehavior; -static std::string URL = "FILL_IN_CRASH_REPORT_HOSTNAME_HERE"; - -static void doSendReport() -{ - std::string filename; - - filename = "report_"; - filename += NLMISC::toString( time( NULL ) ); - filename += ".txt"; - - std::string params; - params = "-log "; - params += filename; - params += " -host "; - params += URL; - - std::ofstream f; - f.open( filename.c_str() ); - if( !f.good() ) - return; - - f << Body; - - f.close(); - -#ifdef NL_OS_WINDOWS - NLMISC::launchProgram( "crash_report.exe", params ); -#else - NLMISC::launchProgram( "crash_report", params ); -#endif - -} - static void sendEmail() { if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) From a912fa49ac1e133738b90157872e2026edaf2565 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:25:23 +0100 Subject: [PATCH 097/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- code/ryzom/server/src/pd_lib/db_description_parser.cpp | 2 +- code/ryzom/server/src/pd_lib/pd_lib.cpp | 2 +- code/ryzom/server/src/pd_lib/pd_messages.cpp | 6 +++--- code/ryzom/server/src/pd_lib/pd_string_mapper.cpp | 2 +- code/ryzom/server/src/pd_lib/pd_utils.h | 10 +++++++--- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/code/ryzom/server/src/pd_lib/db_description_parser.cpp b/code/ryzom/server/src/pd_lib/db_description_parser.cpp index 175000cf2..55eb4a3d6 100644 --- a/code/ryzom/server/src/pd_lib/db_description_parser.cpp +++ b/code/ryzom/server/src/pd_lib/db_description_parser.cpp @@ -260,7 +260,7 @@ bool CDBDescriptionParser::loadType(xmlNodePtr node) return false; } - typeNode.EnumValues.push_back(make_pair(name, value)); + typeNode.EnumValues.push_back(std::pair(name, value)); if (typeNode.Dimension <= value) typeNode.Dimension = value; diff --git a/code/ryzom/server/src/pd_lib/pd_lib.cpp b/code/ryzom/server/src/pd_lib/pd_lib.cpp index f57a4be62..1a2cda9ba 100644 --- a/code/ryzom/server/src/pd_lib/pd_lib.cpp +++ b/code/ryzom/server/src/pd_lib/pd_lib.cpp @@ -571,7 +571,7 @@ void CPDSLib::update() CMessage* msgupd = new CMessage("PD_UPDATE"); msgupd->serial(_DatabaseId); msgupd->serial(_UpdateId); - _QueuedMessages.push_back(make_pair(_UpdateId, msgupd)); + _QueuedMessages.push_back(std::pair(_UpdateId, msgupd)); ++_UpdateId; // serial queue diff --git a/code/ryzom/server/src/pd_lib/pd_messages.cpp b/code/ryzom/server/src/pd_lib/pd_messages.cpp index 253855d46..b5e731d95 100644 --- a/code/ryzom/server/src/pd_lib/pd_messages.cpp +++ b/code/ryzom/server/src/pd_lib/pd_messages.cpp @@ -504,7 +504,7 @@ bool CUpdateLog::selectMessages(const CDBDescriptionParser& description, const N if (message.getType() == CDbMessage::PushContext) { - contextsStart.push_back(std::make_pair(msg, false)); + contextsStart.push_back(std::pair(msg, false)); } else if (message.getType() == CDbMessage::PopContext) { @@ -561,7 +561,7 @@ bool CUpdateLog::selectMessages(const CDBDescriptionParser& description, const s if (message.getType() == CDbMessage::PushContext) { - contextsStart.push_back(std::make_pair(msg, false)); + contextsStart.push_back(std::pair(msg, false)); } else if (message.getType() == CDbMessage::PopContext) { @@ -644,7 +644,7 @@ bool CUpdateLog::selectMessages(const CDBDescriptionParser& description, const N if (message.getType() == CDbMessage::PushContext) { - contextsStart.push_back(std::make_pair(msg, false)); + contextsStart.push_back(std::pair(msg, false)); } else if (message.getType() == CDbMessage::PopContext) { diff --git a/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp b/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp index 184d4bb7f..7a326dc67 100644 --- a/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp +++ b/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp @@ -64,7 +64,7 @@ void CPDStringMapper::setMapping(const std::string& str, uint32 id) return; } - its = _StringMap.insert(std::make_pair(lowMapStr, id)).first; + its = _StringMap.insert(std::pair(lowMapStr, id)).first; _IdMap[id] = its; } diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index 73a0268d8..0f0ab46d5 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -494,9 +494,13 @@ struct CColumnIndexHashMapTraits static const size_t min_buckets = 8; CColumnIndexHashMapTraits() { } size_t operator() (const CColumnIndex &id) const - { - return id.hash(); - } + { + return id.hash(); + } + bool operator()(const CColumnIndex &left, const CColumnIndex &right) + { + return left.hash() < right.hash(); + } }; class CSetMap From 4cb42c6de0ff6820390cc3cd47d4498ae3466509 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:28:13 +0100 Subject: [PATCH 098/175] Visual Studio 2013 compilation support for Ryzom Tools --HG-- branch : develop --- code/ryzom/server/src/ai_share/16x16_layer.cpp | 2 +- code/ryzom/server/src/ai_share/world_map.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/server/src/ai_share/16x16_layer.cpp b/code/ryzom/server/src/ai_share/16x16_layer.cpp index c820e4f7b..4e78cf54e 100644 --- a/code/ryzom/server/src/ai_share/16x16_layer.cpp +++ b/code/ryzom/server/src/ai_share/16x16_layer.cpp @@ -100,7 +100,7 @@ I16x16Layer *I16x16Layer::compress(I16x16Layer *layer, sint32 blank) map::iterator it = count.find(val); if (it == count.end()) - count.insert(make_pair(val, 1)); + count.insert(std::pair(val, 1)); else ++((*it).second); } diff --git a/code/ryzom/server/src/ai_share/world_map.cpp b/code/ryzom/server/src/ai_share/world_map.cpp index eae84acbf..f468c1144 100644 --- a/code/ryzom/server/src/ai_share/world_map.cpp +++ b/code/ryzom/server/src/ai_share/world_map.cpp @@ -1469,7 +1469,7 @@ bool CWorldMap::findAStarPath(CWorldPosition const& start, CWorldPosition const& uint father = (uint)nodes.size()-1; // Add start topology to visited nodes (father holds start topo node index for the moment) - visited.insert(make_pair(startTopo, father)); + visited.insert(std::pair(startTopo, father)); // Push start node in the heap with a zero cost heap.push(0.0f, father); @@ -1562,7 +1562,7 @@ bool CWorldMap::findAStarPath(CWorldPosition const& start, CWorldPosition const& // Add node to heap with a computed f(n)=g(n)+h(n) heap.push(distance + heuristic, child); // Add node to visited - visited.insert(make_pair(next, child)); + visited.insert(std::pair(next, child)); } } @@ -1633,7 +1633,7 @@ bool CWorldMap::findAStarPath(const CTopology::TTopologyId &start, const CTopolo uint father = (uint)nodes.size()-1; // add current to visited nodes - visited.insert(make_pair(startTopo, father)); + visited.insert(std::pair(startTopo, father)); heap.push(0.0f, father); bool found=false; @@ -1699,7 +1699,7 @@ bool CWorldMap::findAStarPath(const CTopology::TTopologyId &start, const CTopolo // add node to visited and to heap heap.push(heuristic, child); - visited.insert(make_pair(next, child)); + visited.insert(std::pair(next, child)); } } @@ -1767,7 +1767,7 @@ bool CWorldMap::findInsideAStarPath(CWorldPosition const& start, CWorldPosition uint father = (uint)nodes.size()-1; // Add start node to visited nodes (father holds start node index for the moment) - visited.insert(make_pair(startNode, father)); + visited.insert(std::pair(startNode, father)); // Push start node in the heap with a zero cost heap.push(0.0f, father); @@ -1854,7 +1854,7 @@ bool CWorldMap::findInsideAStarPath(CWorldPosition const& start, CWorldPosition // Add node to heap with a computed f(n)=g(n)+h(n) heap.push(distance + heuristic, child); // Add node to visited - visited.insert(make_pair(next, child)); + visited.insert(std::pair(next, child)); } } From 389bde2e110a513877620a98cec8cf15c1dbfa70 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:37:51 +0100 Subject: [PATCH 099/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- .../server/src/ai_data_service/pacs_scan.cpp | 6 +++--- .../server/src/ai_service/event_manager.h | 2 ++ .../src/backup_service/backup_service.cpp | 2 +- .../src/backup_service/web_connection.cpp | 18 +++++++++--------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp index 9b5af1d5b..e52b97573 100644 --- a/code/ryzom/server/src/ai_data_service/pacs_scan.cpp +++ b/code/ryzom/server/src/ai_data_service/pacs_scan.cpp @@ -1651,7 +1651,7 @@ public: first.flags = (topNode.isInWater() ? 1 : 0) + (topNode.isInNogo() ? 2 : 0); // push first position - stacks[first.flags].insert(make_pair(first.flags, stwp)); + stacks[first.flags].insert(std::pair(first.flags, stwp)); while (true) { @@ -1750,11 +1750,11 @@ public: } if (tmp.getTopologyNode().Id == topNode.Id) { - stacks[0].insert(make_pair(ndist, tmp)); + stacks[0].insert(std::pair(ndist, tmp)); } else { - stacks[tmpflags+1].insert(make_pair(ndist, tmp)); + stacks[tmpflags + 1].insert(std::pair(ndist, tmp)); } } } diff --git a/code/ryzom/server/src/ai_service/event_manager.h b/code/ryzom/server/src/ai_service/event_manager.h index ab49b8d68..731539051 100644 --- a/code/ryzom/server/src/ai_service/event_manager.h +++ b/code/ryzom/server/src/ai_service/event_manager.h @@ -17,6 +17,8 @@ #ifndef RYAI_EVENT_MANAGER_H #define RYAI_EVENT_MANAGER_H +#include + #include "event_reaction.h" #include "states.h" diff --git a/code/ryzom/server/src/backup_service/backup_service.cpp b/code/ryzom/server/src/backup_service/backup_service.cpp index aed50a32c..95c11d07a 100644 --- a/code/ryzom/server/src/backup_service/backup_service.cpp +++ b/code/ryzom/server/src/backup_service/backup_service.cpp @@ -718,7 +718,7 @@ void CBackupService::init() BSIsSlave = true; FileManager.forbidStall(); // I'm a slave, try to contact master - string host = MasterBSHost; + string host = MasterBSHost.get(); if (host.find (":") == string::npos) host += ":49990"; diff --git a/code/ryzom/server/src/backup_service/web_connection.cpp b/code/ryzom/server/src/backup_service/web_connection.cpp index 86a62902d..6afa8f885 100644 --- a/code/ryzom/server/src/backup_service/web_connection.cpp +++ b/code/ryzom/server/src/backup_service/web_connection.cpp @@ -209,10 +209,10 @@ void cbGetSaveList(CMemStream &msgin, TSockId host) explode(str, string("%%"), params, true); - string incrementalDir = IncrementalBackupDirectory; - string saveShardRoot = SaveShardRoot; - string templatePath = SaveTemplatePath; - string extList = SaveExtList; + string incrementalDir = IncrementalBackupDirectory.get(); + string saveShardRoot = SaveShardRoot.get(); + string templatePath = SaveTemplatePath.get(); + string extList = SaveExtList.get(); string shard; string userid; @@ -293,8 +293,8 @@ void cbRestoreSave(CMemStream &msgin, TSockId host) explode(str, string("%%"), params, true); - string saveShardRoot = SaveShardRoot; - string templatePath = SaveTemplatePath; + string saveShardRoot = SaveShardRoot.get(); + string templatePath = SaveTemplatePath.get(); string shard; string userid; @@ -368,9 +368,9 @@ void cbCopyOverSave(CMemStream &msgin, TSockId host) explode(str, string("%%"), params, true); - string saveShardRoot = SaveShardRoot; - string templatePath = SaveTemplatePath; - string extList = SaveExtList; + string saveShardRoot = SaveShardRoot.get(); + string templatePath = SaveTemplatePath.get(); + string extList = SaveExtList.get(); string shard; string userid; From aede54925f8946919cad60fef2650e3bfa3465f9 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:38:43 +0100 Subject: [PATCH 100/175] Visual Studio 2013 compilation support for Ryzom Tools --HG-- branch : develop --- code/ryzom/tools/pd_parser/parser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/pd_parser/parser.cpp b/code/ryzom/tools/pd_parser/parser.cpp index 733bad4df..4b5e9f5c1 100644 --- a/code/ryzom/tools/pd_parser/parser.cpp +++ b/code/ryzom/tools/pd_parser/parser.cpp @@ -1189,7 +1189,7 @@ bool CEnumSimpleValueNode::prolog() uint i; for (i=0; iValues.push_back(make_pair(Names[i], CurrentValue)); + CurrentEnumNode->Values.push_back(std::pair(Names[i], CurrentValue)); } if (parent != NULL) ++(parent->CurrentValue); @@ -1214,7 +1214,7 @@ bool CEnumRangeNode::prolog() CurrentValue = 0; } - CurrentEnumNode->Values.push_back(make_pair(Name, CurrentValue)); + CurrentEnumNode->Values.push_back(std::pair(Name, CurrentValue)); return true; } @@ -1238,7 +1238,7 @@ bool CEnumRangeNode::epilog() if (!EndRange.empty()) { - CurrentEnumNode->Values.push_back(make_pair(EndRange, CurrentValue)); + CurrentEnumNode->Values.push_back(std::pair(EndRange, CurrentValue)); } return true; @@ -4709,7 +4709,7 @@ void CLogMsgNode::generateContent() CClassNode *cnd; if ( (tnd = getTypeNode(type, false)) ) { - pair::iterator, bool> res = params.insert(make_pair(name, tnd)); + pair::iterator, bool> res = params.insert(std::pair(name, tnd)); if (!res.second) error("log parameter '"+name+"' already defined"); @@ -4723,7 +4723,7 @@ void CLogMsgNode::generateContent() } else if ( (cnd = getClassNode(type, false)) ) { - pair::iterator, bool> res = params.insert(make_pair(name, cnd)); + pair::iterator, bool> res = params.insert(std::pair(name, cnd)); if (!res.second) error("log parameter '"+name+"' already defined"); @@ -4739,7 +4739,7 @@ void CLogMsgNode::generateContent() { CExtLogTypeNode* extnd = new CExtLogTypeNode(); extnd->ExtLogType = "string"; - pair::iterator, bool> res = params.insert(make_pair(name, extnd)); + pair::iterator, bool> res = params.insert(std::pair(name, extnd)); if (!res.second) error("log parameter '"+name+"' already defined"); From 883d69942871b81684fa980fcc328303e4d20a25 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:48:41 +0100 Subject: [PATCH 101/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- .../entities_game_service/player_manager/db_string_updater.h | 2 ++ .../entities_game_service/player_manager/player_manager.h | 5 +++-- .../player_manager/player_manager_interface.h | 5 +++-- .../src/frontend_service/client_entity_id_translator.h | 5 +++-- code/ryzom/server/src/frontend_service/vision_provider.h | 2 ++ code/ryzom/server/src/gpm_service/world_position_manager.h | 5 +++-- code/ryzom/server/src/pd_lib/pd_utils.h | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h index 059e7d765..ec8e8041f 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h @@ -53,6 +53,8 @@ class CDBStringUpdater : public NLMISC::CSingleton // hasher for the identifier struct THashDBStringLeaf { + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator()(const TBDStringLeaf &stringLeaf) const { return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h index 9f1643e84..9f159fd01 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h @@ -48,9 +48,10 @@ namespace NLNET extern CGenericXmlMsgHeaderManager GenericMsgManager; -class CServiceIdHash +struct CServiceIdHash { -public: + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); } }; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h index a18e1645a..a76e9656a 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h @@ -41,9 +41,10 @@ public: }; - class CUint32Hash + struct CUint32Hash { - public: + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator () ( const uint32 &i ) const { return i; } }; diff --git a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h index 0f18698c5..f6b79e42d 100644 --- a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h +++ b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h @@ -89,9 +89,10 @@ public: private: - class CHash + struct CHash { - public: + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator () ( const TEntityIndex& index ) const { return index.getIndex(); } }; diff --git a/code/ryzom/server/src/frontend_service/vision_provider.h b/code/ryzom/server/src/frontend_service/vision_provider.h index 39d84fb2f..aaca90869 100644 --- a/code/ryzom/server/src/frontend_service/vision_provider.h +++ b/code/ryzom/server/src/frontend_service/vision_provider.h @@ -84,6 +84,8 @@ class CClientIdLookup; // Hash function: ClientId * 256 + CeId struct CHash { + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator() ( TPairClientSlot pair ) const { return (pair.ClientId << 8) + pair.Slot; } }; diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.h b/code/ryzom/server/src/gpm_service/world_position_manager.h index 75ea9ead5..f3a285a2e 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.h +++ b/code/ryzom/server/src/gpm_service/world_position_manager.h @@ -137,9 +137,10 @@ public: //friend void CWorldEntity::createPrimitive(NLPACS::UMoveContainer *pMoveContainer, uint8 worldImage); friend void CWorldEntity::removePrimitive(); - class CEntityIdHash + struct CEntityIdHash { - public: + static const size_t bucket_size = 4; + static const size_t min_buckets = 8; size_t operator () ( const NLMISC::CEntityId &id ) const { return (uint32)id.getShortId(); } }; diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index 0f0ab46d5..e6dbb15fc 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -499,7 +499,7 @@ struct CColumnIndexHashMapTraits } bool operator()(const CColumnIndex &left, const CColumnIndex &right) { - return left.hash() < right.hash(); + return left < right; } }; From 3ac5c4c5c3a7d2972fcc996e5f27bd8c5d111567 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:52:01 +0100 Subject: [PATCH 102/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- .../src/entities_game_service/deposit.cpp | 1 + .../src/entities_game_service/fame_pd.cpp | 2 +- .../game_event_manager.cpp | 4 ++-- .../guild_container_pd.cpp | 2 +- .../src/entities_game_service/guild_pd.cpp | 2 +- .../mission_manager/mission_queue_manager.cpp | 4 ++-- .../src/entities_game_service/mission_pd.cpp | 18 +++++++++--------- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/deposit.cpp b/code/ryzom/server/src/entities_game_service/deposit.cpp index 7d8000f4d..d4cd560ad 100644 --- a/code/ryzom/server/src/entities_game_service/deposit.cpp +++ b/code/ryzom/server/src/entities_game_service/deposit.cpp @@ -16,6 +16,7 @@ #include "stdpch.h" +#include #include "deposit.h" #include "player_manager/character.h" #include "player_manager/player_manager.h" diff --git a/code/ryzom/server/src/entities_game_service/fame_pd.cpp b/code/ryzom/server/src/entities_game_service/fame_pd.cpp index db2104c5d..2e201412a 100644 --- a/code/ryzom/server/src/entities_game_service/fame_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/fame_pd.cpp @@ -516,7 +516,7 @@ void CFameContainerPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; NLMISC::CSheetId __k; data.serial(__k); - _Entries.insert(std::make_pair(__k, CFameContainerEntryPD())); + _Entries.insert(std::pair(__k, CFameContainerEntryPD())); CFameContainerEntryPD* __o = &(_Entries[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); diff --git a/code/ryzom/server/src/entities_game_service/game_event_manager.cpp b/code/ryzom/server/src/entities_game_service/game_event_manager.cpp index 5346809a3..b95fb1ad4 100644 --- a/code/ryzom/server/src/entities_game_service/game_event_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/game_event_manager.cpp @@ -59,7 +59,7 @@ CGameEventManager::CGameEventManager() // ---------------------------------------------------------------------------- void CGameEventManager::init() { - string sFilename = GameEventFile; + string sFilename = GameEventFile.get(); sFilename = CPath::standardizePath(IService::getInstance()->WriteFilesDirectory) + sFilename; if (CFile::fileExists(sFilename)) @@ -302,7 +302,7 @@ void CGameEventManager::saveGameEventFile() { if( _InitOk ) { - string sFilename = GameEventFile; + string sFilename = GameEventFile.get(); sFilename = CPath::standardizePath(IService::getInstance()->WriteFilesDirectory) + sFilename; static CPersistentDataRecordRyzomStore pdr; diff --git a/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp b/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp index dea4e2a1d..7e025acdf 100644 --- a/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_container_pd.cpp @@ -298,7 +298,7 @@ void CGuildContainerPD::pds__fetch(RY_PDS::CPData &data) TGuildId __k; data.serial(__k); CGuildPD* __o = static_cast(PDSLib.create(tableIndex)); - _Guilds.insert(std::make_pair(__k, __o)); + _Guilds.insert(std::pair(__k, __o)); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); __o->pds__setParentUnnotified(this); diff --git a/code/ryzom/server/src/entities_game_service/guild_pd.cpp b/code/ryzom/server/src/entities_game_service/guild_pd.cpp index 819ae72ad..1da40c221 100644 --- a/code/ryzom/server/src/entities_game_service/guild_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_pd.cpp @@ -470,7 +470,7 @@ void CGuildPD::pds__fetch(RY_PDS::CPData &data) TCharacterId __k; data.serial(__k); CGuildMemberPD* __o = static_cast(PDSLib.create(tableIndex)); - _Members.insert(std::make_pair(__k, __o)); + _Members.insert(std::pair(__k, __o)); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); __o->pds__setParentUnnotified(this); diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp index bab69042a..a821eef45 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_queue_manager.cpp @@ -48,7 +48,7 @@ CMissionQueueManager::CMissionQueueManager() // ---------------------------------------------------------------------------- void CMissionQueueManager::init() { - string sFilename = MissionQueueFile; + string sFilename = MissionQueueFile.get(); sFilename = Bsi.getLocalPath() + sFilename; if (CFile::fileExists(sFilename)) @@ -141,7 +141,7 @@ void CMissionQueueManager::saveToFile() if( _InitOk ) { - string sFilename = MissionQueueFile; + string sFilename = MissionQueueFile.get(); // save file via Backup Service (BS) try diff --git a/code/ryzom/server/src/entities_game_service/mission_pd.cpp b/code/ryzom/server/src/entities_game_service/mission_pd.cpp index ffa8855a9..1d5903687 100644 --- a/code/ryzom/server/src/entities_game_service/mission_pd.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_pd.cpp @@ -328,7 +328,7 @@ void CActiveStepPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _States.insert(std::make_pair(__k, CActiveStepStatePD())); + _States.insert(std::pair(__k, CActiveStepStatePD())); CActiveStepStatePD* __o = &(_States[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2353,7 +2353,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _Steps.insert(std::make_pair(__k, CActiveStepPD())); + _Steps.insert(std::pair(__k, CActiveStepPD())); CActiveStepPD* __o = &(_Steps[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2367,7 +2367,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _Compass.insert(std::make_pair(__k, CMissionCompassPD())); + _Compass.insert(std::pair(__k, CMissionCompassPD())); CMissionCompassPD* __o = &(_Compass[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2381,7 +2381,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _StepsDone.insert(std::make_pair(__k, CDoneStepPD())); + _StepsDone.insert(std::pair(__k, CDoneStepPD())); CDoneStepPD* __o = &(_StepsDone[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2395,7 +2395,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _Teleports.insert(std::make_pair(__k, CMissionTeleportPD())); + _Teleports.insert(std::pair(__k, CMissionTeleportPD())); CMissionTeleportPD* __o = &(_Teleports[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2409,7 +2409,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _InsidePlaces.insert(std::make_pair(__k, CMissionInsidePlacePD())); + _InsidePlaces.insert(std::pair(__k, CMissionInsidePlacePD())); CMissionInsidePlacePD* __o = &(_InsidePlaces[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2423,7 +2423,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _OutsidePlaces.insert(std::make_pair(__k, CMissionOutsidePlacePD())); + _OutsidePlaces.insert(std::pair(__k, CMissionOutsidePlacePD())); CMissionOutsidePlacePD* __o = &(_OutsidePlaces[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -2437,7 +2437,7 @@ void CMissionPD::pds__fetch(RY_PDS::CPData &data) if (rowIndex == RY_PDS::INVALID_ROW_INDEX || tableIndex == RY_PDS::INVALID_TABLE_INDEX) break; uint32 __k; data.serial(__k); - _HandledAIGroups.insert(std::make_pair(__k, CHandledAIGroupPD())); + _HandledAIGroups.insert(std::pair(__k, CHandledAIGroupPD())); CHandledAIGroupPD* __o = &(_HandledAIGroups[__k]); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); @@ -3276,7 +3276,7 @@ void CMissionContainerPD::pds__fetch(RY_PDS::CPData &data) uint32 __k; data.serial(__k); CMissionPD* __o = static_cast(PDSLib.create(tableIndex)); - _Missions.insert(std::make_pair(__k, __o)); + _Missions.insert(std::pair(__k, __o)); PDSLib.setRowIndex(rowIndex, __o); __o->pds__fetch(data); __o->pds__setParentUnnotified(this); From 77d17265eb4578beb0bc88fff09af74d725d4580 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 12:58:43 +0100 Subject: [PATCH 103/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- code/nel/include/nel/gui/lua_object.h | 3 +-- code/nel/include/nel/misc/class_id.h | 3 +-- code/nel/include/nel/misc/entity_id.h | 3 +-- code/nel/include/nel/misc/sheet_id.h | 3 +-- code/nel/include/nel/misc/string_mapper.h | 3 +-- code/nel/include/nel/misc/ucstring.h | 3 +-- code/nel/include/nel/sound/containers.h | 3 +-- code/nel/include/nel/sound/context_sound.h | 3 +-- code/nel/samples/net/udp/bench_service.cpp | 3 +-- code/nel/tools/pacs/build_rbank/build_surf.cpp | 3 +-- code/ryzom/client/src/actions.h | 3 +-- code/ryzom/client/src/network_connection.h | 10 ++-------- code/ryzom/common/src/game_share/base_types.h | 3 +-- .../player_manager/db_string_updater.h | 3 +-- .../player_manager/player_manager.h | 3 +-- .../player_manager/player_manager_interface.h | 3 +-- .../src/frontend_service/client_entity_id_translator.h | 3 +-- .../server/src/frontend_service/client_id_lookup.h | 5 ++--- code/ryzom/server/src/frontend_service/fe_types.h | 6 ++---- .../server/src/gpm_service/world_position_manager.cpp | 8 ++++---- .../server/src/gpm_service/world_position_manager.h | 3 +-- .../src/input_output_service/string_manager_parser.cpp | 2 +- code/ryzom/server/src/monitor_service/client.cpp | 2 +- code/ryzom/server/src/pd_lib/pd_utils.h | 3 +-- 24 files changed, 30 insertions(+), 57 deletions(-) diff --git a/code/nel/include/nel/gui/lua_object.h b/code/nel/include/nel/gui/lua_object.h index 1564df080..2360f1609 100644 --- a/code/nel/include/nel/gui/lua_object.h +++ b/code/nel/include/nel/gui/lua_object.h @@ -285,8 +285,7 @@ namespace NLGUI class CLuaHashMapTraits { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CLuaHashMapTraits() {} diff --git a/code/nel/include/nel/misc/class_id.h b/code/nel/include/nel/misc/class_id.h index 0628e8030..d02fc5646 100644 --- a/code/nel/include/nel/misc/class_id.h +++ b/code/nel/include/nel/misc/class_id.h @@ -61,8 +61,7 @@ public: class CClassIdHashMapTraits { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline size_t operator() ( const CClassId& classId ) const { return ((((uint64)classId >> 32)|0xFFFFFFFF) ^ (((uint64)classId|0xFFFFFFFF) & 0xFFFFFFFF)); diff --git a/code/nel/include/nel/misc/entity_id.h b/code/nel/include/nel/misc/entity_id.h index 027fe28c7..b4e40909e 100644 --- a/code/nel/include/nel/misc/entity_id.h +++ b/code/nel/include/nel/misc/entity_id.h @@ -575,8 +575,7 @@ public: // Traits for hash_map using CEntityId struct CEntityIdHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CEntityIdHashMapTraits() { } size_t operator() (const NLMISC::CEntityId &id ) const { diff --git a/code/nel/include/nel/misc/sheet_id.h b/code/nel/include/nel/misc/sheet_id.h index 869a61af6..b11e97188 100644 --- a/code/nel/include/nel/misc/sheet_id.h +++ b/code/nel/include/nel/misc/sheet_id.h @@ -248,8 +248,7 @@ private : class CSheetIdHashMapTraits { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline size_t operator() ( const CSheetId& sheetId ) const { return sheetId.asInt() >> 5; diff --git a/code/nel/include/nel/misc/string_mapper.h b/code/nel/include/nel/misc/string_mapper.h index 36a73ed4d..1f62dd123 100644 --- a/code/nel/include/nel/misc/string_mapper.h +++ b/code/nel/include/nel/misc/string_mapper.h @@ -39,8 +39,7 @@ typedef const std::string *TStringId; // Traits for hash_map using CStringId struct CStringIdHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CStringIdHashMapTraits() { } size_t operator() (const NLMISC::TStringId &stringId) const { diff --git a/code/nel/include/nel/misc/ucstring.h b/code/nel/include/nel/misc/ucstring.h index e6d7544b1..88e599c1a 100644 --- a/code/nel/include/nel/misc/ucstring.h +++ b/code/nel/include/nel/misc/ucstring.h @@ -355,8 +355,7 @@ namespace NLMISC // Traits for hash_map using CEntityId struct CUCStringHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CUCStringHashMapTraits() { } size_t operator() (const ucstring &id ) const { diff --git a/code/nel/include/nel/sound/containers.h b/code/nel/include/nel/sound/containers.h index 63e134077..57387e91e 100644 --- a/code/nel/include/nel/sound/containers.h +++ b/code/nel/include/nel/sound/containers.h @@ -42,8 +42,7 @@ namespace NLSOUND { template struct THashPtr : public std::unary_function { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () (const Pointer &ptr) const { //CHashSet::hasher h; diff --git a/code/nel/include/nel/sound/context_sound.h b/code/nel/include/nel/sound/context_sound.h index 13683ac56..8424ee087 100644 --- a/code/nel/include/nel/sound/context_sound.h +++ b/code/nel/include/nel/sound/context_sound.h @@ -82,8 +82,7 @@ struct CContextMatcher struct CHash : public std::unary_function { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () (const CContextMatcher &patternMatcher) const { return patternMatcher.getHashValue(); diff --git a/code/nel/samples/net/udp/bench_service.cpp b/code/nel/samples/net/udp/bench_service.cpp index 981a0dd0a..190347d4b 100644 --- a/code/nel/samples/net/udp/bench_service.cpp +++ b/code/nel/samples/net/udp/bench_service.cpp @@ -98,8 +98,7 @@ struct CClient struct TInetAddressHash { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline bool operator() (const NLNET::CInetAddress &x1, const NLNET::CInetAddress &x2) const { diff --git a/code/nel/tools/pacs/build_rbank/build_surf.cpp b/code/nel/tools/pacs/build_rbank/build_surf.cpp index 9546e19f1..10d4c6a19 100644 --- a/code/nel/tools/pacs/build_rbank/build_surf.cpp +++ b/code/nel/tools/pacs/build_rbank/build_surf.cpp @@ -201,8 +201,7 @@ template class CHashPtr { public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; typedef A *ptrA; size_t operator() (const ptrA &a) const diff --git a/code/ryzom/client/src/actions.h b/code/ryzom/client/src/actions.h index cdc3f200a..b177c1818 100644 --- a/code/ryzom/client/src/actions.h +++ b/code/ryzom/client/src/actions.h @@ -281,8 +281,7 @@ public: // HashMapTraits for NLMISC::TKey struct CTKeyHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CTKeyHashMapTraits() { } size_t operator() (NLMISC::TKey key) const { diff --git a/code/ryzom/client/src/network_connection.h b/code/ryzom/client/src/network_connection.h index 3eb5cd95b..da47f925e 100644 --- a/code/ryzom/client/src/network_connection.h +++ b/code/ryzom/client/src/network_connection.h @@ -776,16 +776,10 @@ protected: /// @name NLMISC::CEntityId handling (for gamedev) //@{ - class CHash + struct CHash { - public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; - - CHash() {} - + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () (const CLFECOMMON::TSheetId &id) const { return id; } - inline bool operator() (const CLFECOMMON::TSheetId &id1, const CLFECOMMON::TSheetId &id2) const { return (size_t)id1 < (size_t)id2; } }; diff --git a/code/ryzom/common/src/game_share/base_types.h b/code/ryzom/common/src/game_share/base_types.h index 250e5f5e4..5330537b7 100644 --- a/code/ryzom/common/src/game_share/base_types.h +++ b/code/ryzom/common/src/game_share/base_types.h @@ -238,8 +238,7 @@ public: CHashCode() {} - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const TDataSetRow &index ) const { return index.getHashCode(); } diff --git a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h index ec8e8041f..7603c92e9 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h @@ -53,8 +53,7 @@ class CDBStringUpdater : public NLMISC::CSingleton // hasher for the identifier struct THashDBStringLeaf { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator()(const TBDStringLeaf &stringLeaf) const { return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4); diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h index 9f159fd01..ba0d1c306 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h @@ -50,8 +50,7 @@ extern CGenericXmlMsgHeaderManager GenericMsgManager; struct CServiceIdHash { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); } }; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h index a76e9656a..3e5de3130 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h @@ -43,8 +43,7 @@ public: struct CUint32Hash { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const uint32 &i ) const { return i; } }; diff --git a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h index f6b79e42d..957774f39 100644 --- a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h +++ b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h @@ -91,8 +91,7 @@ private: struct CHash { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const TEntityIndex& index ) const { return index.getIndex(); } }; diff --git a/code/ryzom/server/src/frontend_service/client_id_lookup.h b/code/ryzom/server/src/frontend_service/client_id_lookup.h index 3d6db560e..9db039a12 100644 --- a/code/ryzom/server/src/frontend_service/client_id_lookup.h +++ b/code/ryzom/server/src/frontend_service/client_id_lookup.h @@ -114,10 +114,9 @@ private: typedef std::vector TEntityIndexToClient; - class CIdHash + struct CIdHash { - public: - + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( NLMISC::CEntityId id ) const { return (uint32)id.getShortId(); } }; diff --git a/code/ryzom/server/src/frontend_service/fe_types.h b/code/ryzom/server/src/frontend_service/fe_types.h index 747fd6f9e..08a12eb5a 100644 --- a/code/ryzom/server/src/frontend_service/fe_types.h +++ b/code/ryzom/server/src/frontend_service/fe_types.h @@ -69,11 +69,9 @@ typedef uint32 TUid; /** * CInetAddress hash function */ -class CInetAddressHashMapTraits +struct CInetAddressHashMapTraits { -public: - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; inline size_t operator() ( const NLNET::CInetAddress& x ) const { //return x.port(); diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.cpp b/code/ryzom/server/src/gpm_service/world_position_manager.cpp index 2c10878a6..9674541fc 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.cpp +++ b/code/ryzom/server/src/gpm_service/world_position_manager.cpp @@ -504,7 +504,7 @@ void CWorldPositionManager::triggerSubscribe(NLNET::TServiceId serviceId, const STOP_IF(IsRingShard,"Illegal use of CWorldPositionManager on ring shard"); if (_PatatSubscribeManager.exist(name)) { - _PatatSubscribeManager.subscribe(serviceId, make_pair(name, id)); + _PatatSubscribeManager.subscribe(serviceId, std::pair(name, id)); } } @@ -2113,7 +2113,7 @@ void CWorldPositionManager::movePlayer(CWorldEntity *entity, sint32 x, sint32 y, { if (entity->PlayerInfos->DistanceHistory.size() >= 20) entity->PlayerInfos->DistanceHistory.pop_back(); - entity->PlayerInfos->DistanceHistory.push_front(make_pair(CVectorD(x*0.001, y*0.001, z*0.001), tick)); + entity->PlayerInfos->DistanceHistory.push_front(std::pair(CVectorD(x*0.001, y*0.001, z*0.001), tick)); } #endif @@ -3227,7 +3227,7 @@ void CWorldPositionManager::visionRequest(sint32 x, sint32 y, sint32 range, vect if (abs(x - entity->X) < range && abs(y - entity->Y) < range && (rrange = sqrt(sqr((x - entity->X)*0.001) + sqr((y - entity->Y)*0.001))) < frange) { - entities.push_back(make_pair(entity->Id, (sint32)(rrange*1000))); + entities.push_back(std::pair(entity->Id, (sint32)(rrange * 1000))); } } @@ -3240,7 +3240,7 @@ void CWorldPositionManager::visionRequest(sint32 x, sint32 y, sint32 range, vect if (abs(x - entity->X) < range && abs(y - entity->Y) < range && (rrange = sqrt(sqr((x - entity->X)*0.001) + sqr((y - entity->Y)*0.001))) < frange) { - entities.push_back(make_pair(entity->Id, (sint32)(rrange*1000))); + entities.push_back(std::pair(entity->Id, (sint32)(rrange * 1000))); } } } diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.h b/code/ryzom/server/src/gpm_service/world_position_manager.h index f3a285a2e..18645d8ca 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.h +++ b/code/ryzom/server/src/gpm_service/world_position_manager.h @@ -139,8 +139,7 @@ public: struct CEntityIdHash { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const NLMISC::CEntityId &id ) const { return (uint32)id.getShortId(); } }; diff --git a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index 0cbfbf595..2aa3c896b 100644 --- a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp @@ -1356,7 +1356,7 @@ void CStringManager::mergeEntityWords(CEntityWords& dest, const CEntityWords& so std::map::const_iterator iti; for (iti=source._ColumnInfo.begin(); iti!=source._ColumnInfo.end(); ++iti) if (dest._ColumnInfo.find((*iti).first) == dest._ColumnInfo.end()) - extraColumns.push_back(std::make_pair((*iti).first, osz+(uint32)extraColumns.size())); + extraColumns.push_back(std::pair((*iti).first, osz + (uint32)extraColumns.size())); for (iti=source._RowInfo.begin(); iti!=source._RowInfo.end(); ++iti) if (dest._RowInfo.find((*iti).first) == dest._RowInfo.end()) diff --git a/code/ryzom/server/src/monitor_service/client.cpp b/code/ryzom/server/src/monitor_service/client.cpp index 6d761ba3e..ce2fdc5dc 100644 --- a/code/ryzom/server/src/monitor_service/client.cpp +++ b/code/ryzom/server/src/monitor_service/client.cpp @@ -273,7 +273,7 @@ void CMonitorClient::update () TYPE_NAME_STRING_ID id = Str[i]; std::map::iterator ite = StringMap.find (id); nlassert (ite != StringMap.end()); - strToSend.push_back( make_pair(id, &((*ite).second)) ); + strToSend.push_back(std::pair(id, &((*ite).second))); strTotalSize += 4+4+(uint)(*ite).second.size(); } diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index e6dbb15fc..85a183753 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -490,8 +490,7 @@ typedef std::vector TIndexList; struct CColumnIndexHashMapTraits { - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; + enum { bucket_size = 4, min_buckets = 8, }; CColumnIndexHashMapTraits() { } size_t operator() (const CColumnIndex &id) const { From 609fbbc9c38726a80dd5b329c6b233ea3d3f74d3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 13:08:03 +0100 Subject: [PATCH 104/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- .../server/src/frontend_service/client_entity_id_translator.h | 3 ++- code/ryzom/server/src/frontend_service/client_id_lookup.h | 3 ++- code/ryzom/server/src/frontend_service/fe_types.h | 1 + code/ryzom/server/src/frontend_service/frontend_service.cpp | 2 +- code/ryzom/server/src/gpm_service/world_position_manager.h | 3 ++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h index 957774f39..f80fbe983 100644 --- a/code/ryzom/server/src/frontend_service/client_entity_id_translator.h +++ b/code/ryzom/server/src/frontend_service/client_entity_id_translator.h @@ -92,7 +92,8 @@ private: struct CHash { enum { bucket_size = 4, min_buckets = 8, }; - size_t operator () ( const TEntityIndex& index ) const { return index.getIndex(); } + size_t operator () (const TEntityIndex& index) const { return index.getIndex(); } + bool operator() (const TEntityIndex& left, const TEntityIndex& right) { return left < right; } }; // table to map CEntityId to TCLEntityId diff --git a/code/ryzom/server/src/frontend_service/client_id_lookup.h b/code/ryzom/server/src/frontend_service/client_id_lookup.h index 9db039a12..9c63a60a6 100644 --- a/code/ryzom/server/src/frontend_service/client_id_lookup.h +++ b/code/ryzom/server/src/frontend_service/client_id_lookup.h @@ -117,7 +117,8 @@ private: struct CIdHash { enum { bucket_size = 4, min_buckets = 8, }; - size_t operator () ( NLMISC::CEntityId id ) const { return (uint32)id.getShortId(); } + size_t operator () (NLMISC::CEntityId id) const { return (uint32)id.getShortId(); } + bool operator() (const NLMISC::CEntityId& left, const NLMISC::CEntityId& right) { return left < right; } }; typedef CHashMap TIdToClientMap; diff --git a/code/ryzom/server/src/frontend_service/fe_types.h b/code/ryzom/server/src/frontend_service/fe_types.h index 08a12eb5a..d63ef1e42 100644 --- a/code/ryzom/server/src/frontend_service/fe_types.h +++ b/code/ryzom/server/src/frontend_service/fe_types.h @@ -77,6 +77,7 @@ struct CInetAddressHashMapTraits //return x.port(); return x.internalIPAddress(); } + bool operator() (const NLNET::CInetAddress& left, const NLNET::CInetAddress& right) { return left < right; } // bool operator() (const NLNET::CInetAddress &x1, const NLNET::CInetAddress &x2) const // { // return classId1 < classId2; diff --git a/code/ryzom/server/src/frontend_service/frontend_service.cpp b/code/ryzom/server/src/frontend_service/frontend_service.cpp index cbf4a5610..c973ebcfd 100644 --- a/code/ryzom/server/src/frontend_service/frontend_service.cpp +++ b/code/ryzom/server/src/frontend_service/frontend_service.cpp @@ -1862,7 +1862,7 @@ NLMISC_COMMAND( dumpImpulseStats, "Dump Impulse stat to XML log", " [[- if (reverse) comp = -comp; - result.push_back(std::make_pair(comp, client)); + result.push_back(std::pair(comp, client)); } if (ucriterion != 0 && !result.empty()) diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.h b/code/ryzom/server/src/gpm_service/world_position_manager.h index 18645d8ca..81209357c 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.h +++ b/code/ryzom/server/src/gpm_service/world_position_manager.h @@ -140,7 +140,8 @@ public: struct CEntityIdHash { enum { bucket_size = 4, min_buckets = 8, }; - size_t operator () ( const NLMISC::CEntityId &id ) const { return (uint32)id.getShortId(); } + size_t operator () (const NLMISC::CEntityId &id) const { return (uint32)id.getShortId(); } + size_t operator () (const NLMISC::CEntityId &left, const NLMISC::CEntityId &right) const { return left < right; } }; /// Container of entities (all entities are referenced by this container From ca3243782b15165df5b1a3136d9fc8a1e357dc17 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 13:13:11 +0100 Subject: [PATCH 105/175] Visual Studio 2013 compilation support for Ryzom Tools --HG-- branch : develop --- code/ryzom/tools/client/client_patcher/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index e5b845e43..70857105e 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -12,6 +12,7 @@ ADD_EXECUTABLE(ryzom_client_patcher ${SRC}) INCLUDE_DIRECTORIES( ${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/client/src ) @@ -20,6 +21,7 @@ TARGET_LINK_LIBRARIES(ryzom_client_patcher nelnet ryzom_gameshare ryzom_sevenzip + ${ZLIB_LIBRARIES} ${CURL_LIBRARIES}) IF(APPLE) From 55d0c3282d86ff27df4d250bc3f92d0bc2c67955 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 13:16:50 +0100 Subject: [PATCH 106/175] Visual Studio 2013 compilation support for Ryzom Server --HG-- branch : develop --- code/ryzom/server/src/monitor_service/service_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/server/src/monitor_service/service_main.cpp b/code/ryzom/server/src/monitor_service/service_main.cpp index 84bbcbe86..bf092bbae 100644 --- a/code/ryzom/server/src/monitor_service/service_main.cpp +++ b/code/ryzom/server/src/monitor_service/service_main.cpp @@ -418,7 +418,9 @@ void clientAuthentication(CMessage &msgin, TSockId from, CCallbackNetBase &netba // fail the authentication // Do not send result immediatly to avoid a potential hacker // to try a dictionnary or that dort of things - BadLoginClients.insert(std::make_pair(NLMISC::CTime::getLocalTime() + LOGIN_RETRY_DELAY_IN_MILLISECONDS, Clients[i])); + BadLoginClients.insert(std::pair >( + NLMISC::CTime::getLocalTime() + LOGIN_RETRY_DELAY_IN_MILLISECONDS, + (NLMISC::CRefPtr)Clients[i])); Clients[i]->BadLogin =true; return; } From 6ae954326d761cc0b176ec83212afcd6c534095c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 19:23:15 +0100 Subject: [PATCH 107/175] GCC/Linux version of NLMISC_BREAKPOINT --HG-- branch : feature-crashreport --- code/nel/include/nel/misc/debug.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/debug.h b/code/nel/include/nel/misc/debug.h index 690d340a3..8d2483e4e 100644 --- a/code/nel/include/nel/misc/debug.h +++ b/code/nel/include/nel/misc/debug.h @@ -350,8 +350,10 @@ void setCrashAlreadyReported(bool state); */ // removed because we always check assert (even in release mode) #if defined (NL_OS_WINDOWS) && defined (NL_DEBUG) -#if defined (NL_OS_WINDOWS) -#define NLMISC_BREAKPOINT __debugbreak(); +#if defined(NL_OS_WINDOWS) +#define NLMISC_BREAKPOINT __debugbreak() +#elif defined(NL_OS_UNIX) && defined(NL_COMP_GCC) +#define NLMISC_BREAKPOINT __builtin_trap() #else #define NLMISC_BREAKPOINT abort() #endif From e4e3f2019b427f862d34a5dce39746a889a7b7e2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 20:01:20 +0100 Subject: [PATCH 108/175] Add function to set custom host url. Deprecate email callback function. Add some comments --HG-- branch : feature-crashreport --- code/nel/include/nel/misc/report.h | 13 ++- code/nel/src/misc/report.cpp | 174 +++++++++++++---------------- 2 files changed, 86 insertions(+), 101 deletions(-) diff --git a/code/nel/include/nel/misc/report.h b/code/nel/include/nel/misc/report.h index 11745b6e3..c492f4aa2 100644 --- a/code/nel/include/nel/misc/report.h +++ b/code/nel/include/nel/misc/report.h @@ -21,9 +21,11 @@ namespace NLMISC { +enum TReportResult { ReportDebug, ReportIgnore, ReportQuit, ReportError }; + /** Display a custom message box. * - * \param title set the title of the report. If empty, it'll display "NeL report". + * \param title set the title of the report. If empty, it'll display "NeL Crash Report" or the default title set by setReportWindowTitle. * \param header message displayed before the edit text box. If empty, it displays the default message. * \param body message displayed in the edit text box. This string will be sent by email. * \param debugButton 0 for disabling it, 1 for enable with default behaviors (generate a breakpoint), 2 for enable with no behavior @@ -32,14 +34,15 @@ namespace NLMISC { * * \return the button clicked or error */ +TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const std::string &attachedFile = ""); -enum TReportResult { ReportDebug, ReportIgnore, ReportQuit, ReportError }; - -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const std::string &attachedFile = ""); +/// Set the Url of the web service used to post crash reports to +void setReportPostUrl(const std::string &postUrl); +/// DEPRECATED /** call this in the main of your appli to enable email: setReportEmailFunction (sendEmail); */ -void setReportEmailFunction (void *emailFunction); +void setReportEmailFunction(void *emailFunction); } // NLMISC diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 784f49a9a..69ce40544 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -16,6 +16,8 @@ #include "stdmisc.h" +#include + #include "nel/misc/common.h" #include "nel/misc/ucstring.h" @@ -42,125 +44,126 @@ using namespace std; namespace NLMISC { -#ifdef NL_OS_WINDOWS -static HWND sendReport=NULL; -#endif - -//old doesn't work on visual c++ 7.1 due to default parameter typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile = "", bool onlyCheck = false); -typedef bool (*TEmailFunction) (const std::string &smtpServer, const std::string &from, const std::string &to, const std::string &subject, const std::string &body, const std::string &attachedFile, bool onlyCheck); - -#define DELETE_OBJECT(a) if((a)!=NULL) { DeleteObject (a); a = NULL; } - -static TEmailFunction EmailFunction = NULL; - -void setReportEmailFunction (void *emailFunction) +void setReportEmailFunction(void *emailFunction) { - EmailFunction = (TEmailFunction)emailFunction; - -#ifdef NL_OS_WINDOWS - if (sendReport) - EnableWindow(sendReport, FALSE); -#endif + // DEPRECATED + // no-op } -static string Body; -static std::string URL = "FILL_IN_CRASH_REPORT_HOSTNAME_HERE"; +// Contents of crash report +static string ReportBody; +// Host url for crash report +static std::string ReportPostUrl = ""; +// Title for the crash report window +static std::string ReportWindowTitle = ""; +void setReportPostUrl(const std::string &postUrl) +{ + ReportPostUrl = postUrl; +} +// Launch the crash report application static void doSendReport() { std::string filename; - filename = "report_"; + filename = /*getLogDirectory() + */ "report_"; // FIXME: Should use log directory filename += NLMISC::toString( int( time( NULL ) ) ); filename += ".txt"; - std::string params; - params = "-log "; - params += filename; - params += " -host "; - params += URL; + std::stringstream params; + params << "-log "; + params << filename; // FIXME: Escape the filepath with quotes + if (!ReportPostUrl.empty()) + { + params << " -host "; + params << ReportPostUrl; + } + if (!ReportWindowTitle.empty()) + { + params << " -title "; + params << ReportWindowTitle; // FIXME: Escape the title with quotes and test + } std::ofstream f; f.open( filename.c_str() ); if( !f.good() ) return; - f << Body; + f << ReportBody; f.close(); #ifdef NL_OS_WINDOWS - NLMISC::launchProgram( "crash_report.exe", params ); + NLMISC::launchProgram( "crash_report.exe", params.str() ); #else - NLMISC::launchProgram( "crash_report", params ); + NLMISC::launchProgram( "crash_report", params.str() ); #endif // Added because NLSMIC::launcProgram needs time to launch nlSleep( 2 * 1000 ); - + } -#ifndef NL_OS_WINDOWS +#if defined(FINAL_VERSION) || !defined(NL_OS_WINDOWS) -// GNU/Linux, do nothing - -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) +// For FINAL_VERSION, simply launch the crash report and exit the application +TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { - Body = addSlashR( body ); - - doSendReport(); + ReportWindowTitle = title; + ReportBody = addSlashR(body); + + doSendReport(); + +# if 1 // TODO: This behaviour is used in the old report code when Quitting the application is the default crash report behaviour. Needs testing. +# ifdef NL_OS_WINDOWS +# ifndef NL_COMP_MINGW + // disable the Windows popup telling that the application aborted and disable the dr watson report. + _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); +# endif +# endif + // quit without calling atexit or static object dtors. + abort(); +# endif - return ReportQuit; + return ReportQuit; } #else -// Windows specific version +// Windows specific version for DEV builds, first shows a dialog box for debugging -static string Subject; -static string AttachedFile; +static HWND sendReport=NULL; +#define DELETE_OBJECT(a) if((a)!=NULL) { DeleteObject (a); a = NULL; } -static HWND checkIgnore=NULL; -static HWND debug=NULL; -static HWND ignore=NULL; -static HWND quit=NULL; -static HWND dialog=NULL; +static HWND checkIgnore = NULL; +static HWND debug = NULL; +static HWND ignore = NULL; +static HWND quit = NULL; +static HWND dialog = NULL; static bool NeedExit; static TReportResult Result; static bool IgnoreNextTime; -static bool CanSendMailReport= false; +static bool CanSendMailReport = false; static bool DebugDefaultBehavior, QuitDefaultBehavior; -static void sendEmail() +static void maybeSendReport() { if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) { - bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); - if (res) - { - // EnableWindow(sendReport, FALSE); - // MessageBox (dialog, "The email was successfully sent", "email", MB_OK); + doSendReport(); #ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_sent"); + CFile::createEmptyFile(getLogDirectory() + "report_sent"); #endif - } - else - { -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_failed"); -#endif - // MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); - } } else { #ifndef NL_NO_DEBUG_FILES CFile::createEmptyFile(getLogDirectory() + "report_refused"); #endif - } +- } } static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -175,7 +178,7 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM } else if ((HWND) lParam == debug) { - doSendReport(); + maybeSendReport(); NeedExit = true; Result = ReportDebug; if (DebugDefaultBehavior) @@ -185,13 +188,13 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM } else if ((HWND) lParam == ignore) { - doSendReport(); + maybeSendReport(); NeedExit = true; Result = ReportIgnore; } else if ((HWND) lParam == quit) { - doSendReport(); + maybeSendReport(); NeedExit = true; Result = ReportQuit; @@ -210,43 +213,26 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM abort(); } } - /*else if ((HWND) lParam == sendReport) - { - if (EmailFunction != NULL) - { - bool res = EmailFunction ("", "", "", Subject, Body, AttachedFile, false); - if (res) - { - EnableWindow(sendReport, FALSE); - MessageBox (dialog, "The email was successfully sent", "email", MB_OK); - CFile::createEmptyFile(getLogDirectory() + "report_sent"); - } - else - { - MessageBox (dialog, "Failed to send the email", "email", MB_OK | MB_ICONERROR); - } - } - }*/ } else if (message == WM_CHAR) { if (wParam == 27) { // ESC -> ignore - doSendReport(); + maybeSendReport(); NeedExit = true; Result = ReportIgnore; } } - return DefWindowProc (hWnd, message, wParam, lParam); + return DefWindowProc(hWnd, message, wParam, lParam); } -TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) +TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { // register the window static bool AlreadyRegister = false; - if(!AlreadyRegister) + if (!AlreadyRegister) { WNDCLASSW wc; memset (&wc,0,sizeof(wc)); @@ -264,8 +250,8 @@ TReportResult report (const std::string &title, const std::string &header, const AlreadyRegister = true; } - ucstring formatedTitle = title.empty() ? ucstring("NeL report") : ucstring(title); - + ReportWindowTitle = title.empty() ? "Nel Crash Report" : title; + ucstring formatedTitle = ucstring::makeFromUtf8(ReportWindowTitle); // create the window dialog = CreateWindowW (L"NLReportWindow", (LPCWSTR)formatedTitle.c_str(), WS_DLGFRAME | WS_CAPTION /*| WS_THICKFRAME*/, CW_USEDEFAULT, CW_USEDEFAULT, 456, 400, NULL, NULL, GetModuleHandle(NULL), NULL); @@ -273,9 +259,6 @@ TReportResult report (const std::string &title, const std::string &header, const // create the font HFONT font = CreateFont (-12, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); - Subject = subject; - AttachedFile = attachedFile; - // create the edit control HWND edit = CreateWindowW (L"EDIT", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_READONLY | ES_LEFT | ES_MULTILINE, 7, 70, 429, 212, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); SendMessage (edit, WM_SETFONT, (WPARAM) font, TRUE); @@ -283,10 +266,10 @@ TReportResult report (const std::string &title, const std::string &header, const // set the edit text limit to lot of :) SendMessage (edit, EM_LIMITTEXT, ~0U, 0); - Body = addSlashR (body); + ReportBody = addSlashR(body); // set the message in the edit text - SendMessage (edit, WM_SETTEXT, (WPARAM)0, (LPARAM)Body.c_str()); + SendMessage (edit, WM_SETTEXT, (WPARAM)0, (LPARAM)ReportBody.c_str()); if (enableCheckIgnore) { @@ -336,8 +319,7 @@ TReportResult report (const std::string &title, const std::string &header, const } // ace don't do that because it s slow to try to send a mail - //CanSendMailReport = sendReportButton && EmailFunction != NULL && EmailFunction("", "", "", "", "", true); - CanSendMailReport = sendReportButton && EmailFunction != NULL; + CanSendMailReport = sendReportButton && !ReportPostUrl.empty(); if (CanSendMailReport) formatedHeader += " Send report will only email the contents of the box below. Please, send it to help us (it could take few minutes to send the email, be patient)."; From fc950e08e020ae7f3fa993f793ff34a38bde9c60 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 20:07:29 +0100 Subject: [PATCH 109/175] Move crash report web application to appropriate directory --HG-- branch : feature-crashreport --- .../crash_report}/config.inc.php | 0 .../crash_report}/log.inc.php | 0 .../crash_report/submit.php} | 0 code/web/rcerror_web/rcerror_test.htm | 19 ------------------- 4 files changed, 19 deletions(-) rename code/web/{rcerror_web => public_php/crash_report}/config.inc.php (100%) rename code/web/{rcerror_web => public_php/crash_report}/log.inc.php (100%) rename code/web/{rcerror_web/rcerror.php => public_php/crash_report/submit.php} (100%) delete mode 100644 code/web/rcerror_web/rcerror_test.htm diff --git a/code/web/rcerror_web/config.inc.php b/code/web/public_php/crash_report/config.inc.php similarity index 100% rename from code/web/rcerror_web/config.inc.php rename to code/web/public_php/crash_report/config.inc.php diff --git a/code/web/rcerror_web/log.inc.php b/code/web/public_php/crash_report/log.inc.php similarity index 100% rename from code/web/rcerror_web/log.inc.php rename to code/web/public_php/crash_report/log.inc.php diff --git a/code/web/rcerror_web/rcerror.php b/code/web/public_php/crash_report/submit.php similarity index 100% rename from code/web/rcerror_web/rcerror.php rename to code/web/public_php/crash_report/submit.php diff --git a/code/web/rcerror_web/rcerror_test.htm b/code/web/rcerror_web/rcerror_test.htm deleted file mode 100644 index eb314d3f7..000000000 --- a/code/web/rcerror_web/rcerror_test.htm +++ /dev/null @@ -1,19 +0,0 @@ - -Ryzom Core Error Report Web application test harness - -
- - - - - - - - - -
Description
Report
Email
- -
-
- - From a548940b8c30276a0066581b279936798c46e5bf Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 20:09:51 +0100 Subject: [PATCH 110/175] Default window title --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 69ce40544..ca06d1077 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -110,7 +110,7 @@ static void doSendReport() // For FINAL_VERSION, simply launch the crash report and exit the application TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { - ReportWindowTitle = title; + ReportWindowTitle = title.empty() ? "Nel Crash Report" : title; ReportBody = addSlashR(body); doSendReport(); From 68120a53e7c6a6fcbcaeb997a6ef820f81265e2b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 23 Feb 2015 20:33:31 +0100 Subject: [PATCH 111/175] Only in FINAL_VERSION --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index ca06d1077..7323716e3 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -115,7 +115,7 @@ TReportResult report(const std::string &title, const std::string &header, const doSendReport(); -# if 1 // TODO: This behaviour is used in the old report code when Quitting the application is the default crash report behaviour. Needs testing. +# if defined(FINAL_VERSION) // TODO: This behaviour is used in the old report code when Quitting the application is the default crash report behaviour. Needs testing. # ifdef NL_OS_WINDOWS # ifndef NL_COMP_MINGW // disable the Windows popup telling that the application aborted and disable the dr watson report. From 02e8100ea4b77dea376d36f1ca21696f1288bfb6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 12:47:32 +0100 Subject: [PATCH 113/175] Fix sstream include --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 7323716e3..8c58234cf 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -16,7 +16,7 @@ #include "stdmisc.h" -#include +#include #include "nel/misc/common.h" #include "nel/misc/ucstring.h" From e2dcc3b0354825bc24556c799439a2e98549dd30 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 12:47:54 +0100 Subject: [PATCH 114/175] Categorize NLMISC project source files --HG-- branch : develop --- code/nel/src/misc/CMakeLists.txt | 170 +++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 2d3ef9066..f40517f5b 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -1,6 +1,176 @@ FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h) FILE(GLOB HEADERS ../../include/nel/misc/*.h) +FILE(GLOB NLMISC_CDB + cdb.cpp ../../include/nel/misc/cdb.h + cdb_*.cpp ../../include/nel/misc/cdb_*.h +) + +FILE(GLOB NLMISC_EVENT + events.cpp ../../include/nel/misc/events.h + event_*.cpp ../../include/nel/misc/event_*.h + *_event_*.cpp ../../include/nel/misc/*_event_*.h +) + +FILE(GLOB NLMISC_DEBUG + debug.cpp ../../include/nel/misc/debug.h + report.cpp ../../include/nel/misc/report.h + log.cpp ../../include/nel/misc/log.h +) + +FILE(GLOB NLMISC_FILESYSTEM + async_file_manager.cpp ../../include/nel/misc/async_file_manager.h + file.cpp ../../include/nel/misc/file.h + path.cpp ../../include/nel/misc/path.h + big_file.cpp ../../include/nel/misc/big_file.h + *_xml.cpp ../../include/nel/misc/*_xml.h + xml_*.cpp ../../include/nel/misc/xml_*.h +) + +FILE(GLOB NLMISC_STREAM + *_stream.cpp ../../include/nel/misc/*_stream.h + stream.cpp ../../include/nel/misc/stream.h + stream_*.cpp ../../include/nel/misc/stream_*.h +) + +FILE(GLOB NLMISC_DISPLAYER + displayer.cpp ../../include/nel/misc/displayer.h + *_displayer.cpp ../../include/nel/misc/*_displayer.h +) + +FILE(GLOB NLMISC_MATH + plane.cpp ../../include/nel/misc/plane.h + ../../include/nel/misc/plane_inline.h + polygon.cpp ../../include/nel/misc/polygon.h + quad.cpp ../../include/nel/misc/quad.h + quat.cpp ../../include/nel/misc/quat.h + rect.cpp ../../include/nel/misc/rect.h + rgba.cpp ../../include/nel/misc/rgba.h + triangle.cpp ../../include/nel/misc/triangle.h + uv.cpp ../../include/nel/misc/uv.h + vector*.cpp ../../include/nel/misc/vector*.h + aabbox.cpp ../../include/nel/misc/aabbox.h + algo.cpp ../../include/nel/misc/algo.h + bsphere.cpp ../../include/nel/misc/bsphere.h + fast_floor.cpp ../../include/nel/misc/fast_floor.h + geom_ext.cpp ../../include/nel/misc/geom_ext.h + line.cpp ../../include/nel/misc/line.h + matrix.cpp ../../include/nel/misc/matrix.h +) + +FILE(GLOB NLMISC_PLATFORM + *_nl.cpp ../../include/nel/misc/*_nl.h + common.cpp ../../include/nel/misc/common.h + app_context.cpp ../../include/nel/misc/app_context.h + check_fpu.cpp ../../include/nel/misc/check_fpu.h + cpu_time_stat.cpp ../../include/nel/misc/cpu_time_stat.h + dummy_window.cpp ../../include/nel/misc/dummy_window.h + dynloadlib.cpp ../../include/nel/misc/dynloadlib.h + fast_mem.cpp ../../include/nel/misc/fast_mem.h + inter_window_msg_queue.cpp ../../include/nel/misc/inter_window_msg_queue.h + system_*.cpp ../../include/nel/misc/system_*.h + win32_util.cpp ../../include/nel/misc/win32_util.h + win_tray.cpp ../../include/nel/misc/win_tray.h +) + +FILE(GLOB NLMISC_GENERIC + ../../include/nel/misc/array_2d.h + *_memory.cpp ../../include/nel/misc/*_memory.h + buf_fifo.cpp ../../include/nel/misc/buf_fifo.h + ../../include/nel/misc/callback.h + *_allocator.cpp ../../include/nel/misc/*_allocator.h + ../../include/nel/misc/enum_bitset.h + fast_id_map.cpp ../../include/nel/misc/fast_id_map.h + hierarchical_timer.cpp ../../include/nel/misc/hierarchical_timer.h + ../../include/nel/misc/historic.h + ../../include/nel/misc/mutable_container.h + ../../include/nel/misc/random.h + smart_ptr.cpp ../../include/nel/misc/smart_ptr.h + ../../include/nel/misc/smart_ptr_inline.h + ../../include/nel/misc/resource_ptr.h + ../../include/nel/misc/resource_ptr_inline.h + bit_set.cpp ../../include/nel/misc/bit_set.h + stop_watch.cpp ../../include/nel/misc/stop_watch.h + ../../include/nel/misc/twin_map.h + object_vector.cpp ../../include/nel/misc/object_vector.h + ../../include/nel/misc/singleton.h + speaker_listener.cpp ../../include/nel/misc/speaker_listener.h + ../../include/nel/misc/static_map.h + stl_block_list.cpp ../../include/nel/misc/stl_block_list.h +) + +FILE(GLOB NLMISC_UTILITY + config_file.cpp ../../include/nel/misc/config_file.h + cf_*.cpp ../../include/nel/misc/cf_*.h + config_file/config_file.cpp config_file/config_file.h + config_file/cf_*.cpp config_file/cf_*.h + class_id.cpp ../../include/nel/misc/class_id.h + class_registry.cpp ../../include/nel/misc/class_registry.h + cmd_args.cpp ../../include/nel/misc/cmd_args.h + command.cpp ../../include/nel/misc/command.h + eid_translator.cpp ../../include/nel/misc/eid_translator.h + entity_id.cpp ../../include/nel/misc/entity_id.h + eval_num_expr.cpp ../../include/nel/misc/eval_num_expr.h + factory.cpp ../../include/nel/misc/factory.h + grid_traversal.cpp ../../include/nel/misc/grid_traversal.h + mouse_smoother.cpp ../../include/nel/misc/mouse_smoother.h + noise_value.cpp ../../include/nel/misc/noise_value.h + progress_callback.cpp ../../include/nel/misc/progress_callback.h + sheet_id.cpp ../../include/nel/misc/sheet_id.h + variable.cpp ../../include/nel/misc/variable.h + value_smoother.cpp ../../include/nel/misc/value_smoother.h +) + +FILE(GLOB NLMISC_STRING + string_*.cpp ../../include/nel/misc/string_*.h + ../../include/nel/misc/ucstring.h + unicode.cpp + sstring.cpp ../../include/nel/misc/sstring.h +) + +FILE(GLOB NLMISC_I18N + diff_tool.cpp ../../include/nel/misc/diff_tool.h + i18n.cpp ../../include/nel/misc/i18n.h + words_dictionary.cpp ../../include/nel/misc/words_dictionary.h +) + +FILE(GLOB NLMISC_THREAD + co_task.cpp ../../include/nel/misc/co_task.h + mutex.cpp ../../include/nel/misc/mutex.h + *_thread.cpp ../../include/nel/misc/*_thread.h + task_*.cpp ../../include/nel/misc/task_*.h + reader_writer.cpp ../../include/nel/misc/reader_writer.h + tds.cpp ../../include/nel/misc/tds.h + thread.cpp ../../include/nel/misc/thread.h +) + +FILE(GLOB NLMISC_BITMAP + bitmap.cpp ../../include/nel/misc/bitmap.h + bitmap_*.cpp +) + +FILE(GLOB NLMISC_CRYPT + md5.cpp ../../include/nel/misc/md5.h + sha1.cpp ../../include/nel/misc/sha1.h +) + +SOURCE_GROUP("" FILES ${SRC} ${HEADERS}) +SOURCE_GROUP("cdb" FILES ${NLMISC_CDB}) +SOURCE_GROUP("event" FILES ${NLMISC_EVENT}) +SOURCE_GROUP("debug" FILES ${NLMISC_DEBUG}) +SOURCE_GROUP("platform" FILES ${NLMISC_PLATFORM}) +SOURCE_GROUP("filesystem" FILES ${NLMISC_FILESYSTEM}) +SOURCE_GROUP("stream" FILES ${NLMISC_STREAM}) +SOURCE_GROUP("displayer" FILES ${NLMISC_DISPLAYER}) +SOURCE_GROUP("math" FILES ${NLMISC_MATH}) +SOURCE_GROUP("generic" FILES ${NLMISC_GENERIC}) +SOURCE_GROUP("utility" FILES ${NLMISC_UTILITY}) +SOURCE_GROUP("bitmap" FILES ${NLMISC_BITMAP}) +SOURCE_GROUP("thread" FILES ${NLMISC_THREAD}) +SOURCE_GROUP("i18n" FILES ${NLMISC_I18N}) +SOURCE_GROUP("crypt" FILES ${NLMISC_CRYPT}) +SOURCE_GROUP("string" FILES ${NLMISC_STRING}) + NL_TARGET_LIB(nelmisc ${HEADERS} ${SRC}) IF(WITH_GTK) From e201c909379b8a70b24e16c6b3f45d9297178814 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 12:47:54 +0100 Subject: [PATCH 115/175] Remove redundant windows.h includes in NLMISC --HG-- branch : develop --- code/nel/include/nel/misc/dummy_window.h | 12 ++++++++++++ .../nel/include/nel/misc/inter_window_msg_queue.h | 12 ++++++++++++ code/nel/include/nel/misc/win_displayer.h | 12 ++++++++++-- code/nel/src/misc/co_task.cpp | 15 +-------------- code/nel/src/misc/common.cpp | 4 ---- code/nel/src/misc/log.cpp | 4 ---- code/nel/src/misc/mem_displayer.cpp | 4 ---- code/nel/src/misc/path.cpp | 4 ---- code/nel/src/misc/report.cpp | 4 ---- code/nel/src/misc/shared_memory.cpp | 7 +------ code/nel/src/misc/stdmisc.h | 1 + code/nel/src/misc/system_info.cpp | 4 ---- code/nel/src/misc/system_utils.cpp | 5 ----- code/nel/src/misc/time_nl.cpp | 7 +------ code/nel/src/misc/win32_util.cpp | 2 -- code/nel/src/misc/win_displayer.cpp | 4 ---- code/nel/src/misc/win_event_emitter.cpp | 4 ---- 17 files changed, 38 insertions(+), 67 deletions(-) diff --git a/code/nel/include/nel/misc/dummy_window.h b/code/nel/include/nel/misc/dummy_window.h index bd205f0a0..66d9345ba 100644 --- a/code/nel/include/nel/misc/dummy_window.h +++ b/code/nel/include/nel/misc/dummy_window.h @@ -22,6 +22,18 @@ #ifdef NL_OS_WINDOWS // for win32 os only +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif +#ifndef _WIN32_WINDOWS +# define _WIN32_WINDOWS 0x0410 +#endif +#ifndef WINVER +# define WINVER 0x0400 +#endif +#ifndef NOMINMAX +# define NOMINMAX +#endif #include diff --git a/code/nel/include/nel/misc/inter_window_msg_queue.h b/code/nel/include/nel/misc/inter_window_msg_queue.h index 02867f8b4..4ab5bef4e 100644 --- a/code/nel/include/nel/misc/inter_window_msg_queue.h +++ b/code/nel/include/nel/misc/inter_window_msg_queue.h @@ -27,6 +27,18 @@ #include "nel/misc/mem_stream.h" #include "nel/misc/dummy_window.h" +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif +#ifndef _WIN32_WINDOWS +# define _WIN32_WINDOWS 0x0410 +#endif +#ifndef WINVER +# define WINVER 0x0400 +#endif +#ifndef NOMINMAX +# define NOMINMAX +#endif #include namespace NLMISC diff --git a/code/nel/include/nel/misc/win_displayer.h b/code/nel/include/nel/misc/win_displayer.h index 934a6e990..f7a5e55e1 100644 --- a/code/nel/include/nel/misc/win_displayer.h +++ b/code/nel/include/nel/misc/win_displayer.h @@ -21,8 +21,16 @@ #ifdef NL_OS_WINDOWS -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#ifndef NL_COMP_MINGW +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif +#ifndef _WIN32_WINDOWS +# define _WIN32_WINDOWS 0x0410 +#endif +#ifndef WINVER +# define WINVER 0x0400 +#endif +#ifndef NOMINMAX # define NOMINMAX #endif #include diff --git a/code/nel/src/misc/co_task.cpp b/code/nel/src/misc/co_task.cpp index d238b4853..97a9e1e23 100644 --- a/code/nel/src/misc/co_task.cpp +++ b/code/nel/src/misc/co_task.cpp @@ -43,20 +43,7 @@ #else //NL_USE_THREAD_COTASK // some platform specifics #if defined (NL_OS_WINDOWS) -//# define _WIN32_WINNT 0x0500 -# define NL_WIN_CALLBACK CALLBACK -// Visual .NET won't allow Fibers for a Windows version older than 2000. However the basic features are sufficient for us, we want to compile them for all Windows >= 95 -# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0400) -# ifdef _WIN32_WINNT -# undef _WIN32_WINNT -# endif -# define _WIN32_WINNT 0x0400 -# endif - -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include +# define NL_WIN_CALLBACK CALLBACK #elif defined (NL_OS_UNIX) # define NL_WIN_CALLBACK # include diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 31ad7edb0..e8bec1e92 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -20,10 +20,6 @@ #include "nel/misc/common.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # include #elif defined NL_OS_UNIX diff --git a/code/nel/src/misc/log.cpp b/code/nel/src/misc/log.cpp index 478a5e338..f0e3e36f8 100644 --- a/code/nel/src/misc/log.cpp +++ b/code/nel/src/misc/log.cpp @@ -19,11 +19,7 @@ #include "nel/misc/log.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif # include -# include #else # include #endif diff --git a/code/nel/src/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index fc5681657..0aaac26cc 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.cpp @@ -24,10 +24,6 @@ #include "nel/misc/debug.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # pragma comment(lib, "imagehlp.lib") # ifdef NL_OS_WIN64 diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index f593f695d..71d57104a 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -25,10 +25,6 @@ #include "nel/misc/xml_pack.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # include # include diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 20b2b1c11..15d8a8287 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -23,10 +23,6 @@ #include "nel/misc/path.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # include #endif // NL_OS_WINDOWS diff --git a/code/nel/src/misc/shared_memory.cpp b/code/nel/src/misc/shared_memory.cpp index 7b11fea52..3afe795f1 100644 --- a/code/nel/src/misc/shared_memory.cpp +++ b/code/nel/src/misc/shared_memory.cpp @@ -19,12 +19,7 @@ #include "nel/misc/shared_memory.h" #include "nel/misc/debug.h" -#ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include -#else +#ifndef NL_OS_WINDOWS # include # include # include diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index 37284511c..186a0fccd 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -43,6 +43,7 @@ #include #ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN # define _WIN32_WINDOWS 0x0410 # ifndef NL_COMP_MINGW # define WINVER 0x0400 diff --git a/code/nel/src/misc/system_info.cpp b/code/nel/src/misc/system_info.cpp index 31cde5283..8524939c8 100644 --- a/code/nel/src/misc/system_info.cpp +++ b/code/nel/src/misc/system_info.cpp @@ -19,10 +19,6 @@ #include "nel/misc/system_info.h" #ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include # include # include # include diff --git a/code/nel/src/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index a66eed02f..f53f6822e 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.cpp @@ -18,11 +18,6 @@ #include "nel/misc/system_utils.h" #ifdef NL_OS_WINDOWS - #ifndef NL_COMP_MINGW - #define NOMINMAX - #endif - #include - #ifdef _WIN32_WINNT_WIN7 // only supported by Windows 7 Platform SDK #include diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 8aacbd002..821e4b397 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -20,12 +20,7 @@ #include "nel/misc/sstring.h" #include "nel/misc/thread.h" -#ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include -#elif defined (NL_OS_UNIX) +#if defined (NL_OS_UNIX) # include # include #endif diff --git a/code/nel/src/misc/win32_util.cpp b/code/nel/src/misc/win32_util.cpp index 63315e1b2..6085e98e5 100644 --- a/code/nel/src/misc/win32_util.cpp +++ b/code/nel/src/misc/win32_util.cpp @@ -20,8 +20,6 @@ #ifdef NL_OS_WINDOWS -#include - #ifdef DEBUG_NEW #define new DEBUG_NEW #endif diff --git a/code/nel/src/misc/win_displayer.cpp b/code/nel/src/misc/win_displayer.cpp index 95b6b34cf..a91f64b4d 100644 --- a/code/nel/src/misc/win_displayer.cpp +++ b/code/nel/src/misc/win_displayer.cpp @@ -18,10 +18,6 @@ #include "nel/misc/win_displayer.h" #ifdef NL_OS_WINDOWS -#ifndef NL_COMP_MINGW -# define NOMINMAX -#endif -#include #include #include #include diff --git a/code/nel/src/misc/win_event_emitter.cpp b/code/nel/src/misc/win_event_emitter.cpp index 01da89564..67e426f1e 100644 --- a/code/nel/src/misc/win_event_emitter.cpp +++ b/code/nel/src/misc/win_event_emitter.cpp @@ -22,10 +22,6 @@ #include "nel/misc/event_server.h" #ifdef NL_OS_WINDOWS -#ifndef NL_COMP_MINGW -#define NOMINMAX -#endif -#include #include /** From 50e11b05367e96934e650e13d65e00abcf7bce64 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 12:47:54 +0100 Subject: [PATCH 116/175] Add _WIN32_WINNT fallback define --HG-- branch : develop --- code/nel/include/nel/misc/dummy_window.h | 3 +++ code/nel/include/nel/misc/inter_window_msg_queue.h | 3 +++ code/nel/include/nel/misc/win_displayer.h | 3 +++ code/nel/src/misc/stdmisc.h | 3 +++ 4 files changed, 12 insertions(+) diff --git a/code/nel/include/nel/misc/dummy_window.h b/code/nel/include/nel/misc/dummy_window.h index 66d9345ba..81ef078f9 100644 --- a/code/nel/include/nel/misc/dummy_window.h +++ b/code/nel/include/nel/misc/dummy_window.h @@ -28,6 +28,9 @@ #ifndef _WIN32_WINDOWS # define _WIN32_WINDOWS 0x0410 #endif +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif #ifndef WINVER # define WINVER 0x0400 #endif diff --git a/code/nel/include/nel/misc/inter_window_msg_queue.h b/code/nel/include/nel/misc/inter_window_msg_queue.h index 4ab5bef4e..c23a52412 100644 --- a/code/nel/include/nel/misc/inter_window_msg_queue.h +++ b/code/nel/include/nel/misc/inter_window_msg_queue.h @@ -33,6 +33,9 @@ #ifndef _WIN32_WINDOWS # define _WIN32_WINDOWS 0x0410 #endif +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif #ifndef WINVER # define WINVER 0x0400 #endif diff --git a/code/nel/include/nel/misc/win_displayer.h b/code/nel/include/nel/misc/win_displayer.h index f7a5e55e1..b4a56178c 100644 --- a/code/nel/include/nel/misc/win_displayer.h +++ b/code/nel/include/nel/misc/win_displayer.h @@ -27,6 +27,9 @@ #ifndef _WIN32_WINDOWS # define _WIN32_WINDOWS 0x0410 #endif +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif #ifndef WINVER # define WINVER 0x0400 #endif diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index 186a0fccd..de7df693c 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -45,6 +45,9 @@ #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # define _WIN32_WINDOWS 0x0410 +# ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +# endif # ifndef NL_COMP_MINGW # define WINVER 0x0400 # define NOMINMAX From d9dd425dc6e6f0c8843173dc67caee93c2ebba3d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 12:47:54 +0100 Subject: [PATCH 117/175] Cleanup Windows includes --HG-- branch : develop --- code/nel/src/misc/common.cpp | 1 + code/nel/src/misc/stdmisc.h | 6 ++++-- code/nel/src/misc/system_utils.cpp | 9 +++++---- code/nel/src/misc/time_nl.cpp | 4 +++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index e8bec1e92..671879f2e 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -20,6 +20,7 @@ #include "nel/misc/common.h" #ifdef NL_OS_WINDOWS +# include # include # include #elif defined NL_OS_UNIX diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index de7df693c..b24a74616 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -42,7 +42,9 @@ #include #include -#ifdef _WIN32 +#include + +#ifdef NL_OS_WINDOWS # define WIN32_LEAN_AND_MEAN # define _WIN32_WINDOWS 0x0410 # ifndef _WIN32_WINNT @@ -53,7 +55,7 @@ # define NOMINMAX # endif # include -# include +# include #endif #endif // NL_STDMISC_H diff --git a/code/nel/src/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index f53f6822e..e298f941c 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.cpp @@ -18,11 +18,12 @@ #include "nel/misc/system_utils.h" #ifdef NL_OS_WINDOWS - #ifdef _WIN32_WINNT_WIN7 +# include +# ifdef _WIN32_WINNT_WIN7 // only supported by Windows 7 Platform SDK - #include - #define TASKBAR_PROGRESS 1 - #endif +# include +# define TASKBAR_PROGRESS 1 +# endif #endif #ifdef DEBUG_NEW diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index 821e4b397..70b7b3807 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -20,7 +20,9 @@ #include "nel/misc/sstring.h" #include "nel/misc/thread.h" -#if defined (NL_OS_UNIX) +#ifdef NL_OS_WINDOWS +# include +#elif defined (NL_OS_UNIX) # include # include #endif From 54ae2da0a62882a64b4814a7cc8c04326043125c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 17:17:45 +0100 Subject: [PATCH 118/175] Fix _MSC_VER typo --HG-- branch : develop --- code/nel/include/nel/misc/types_nl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index 7091f4905..cd733d732 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -53,7 +53,7 @@ # endif # ifdef _MSC_VER # define NL_COMP_VC -# if _MSC_VER >= 1700 +# if _MSC_VER >= 1800 # define NL_COMP_VC12 # define NL_COMP_VC_VERSION 120 # elif _MSC_VER >= 1700 From cb52c7ee7e4c22e4189763a20c9d56dc73c1c966 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 17:17:45 +0100 Subject: [PATCH 119/175] Use ULL suffix for unsigned 64bit integer constants with Visual Studio 2013 --HG-- branch : develop --- code/nel/include/nel/misc/types_nl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index cd733d732..2461cb5e6 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -463,7 +463,11 @@ typedef uint16 ucchar; // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) #ifdef NL_COMP_VC -# if (NL_COMP_VC_VERSION >= 80) +# if (NL_COMP_VC_VERSION >= 120) +# define INT64_CONSTANT(c) (c##LL) +# define SINT64_CONSTANT(c) (c##LL) +# define UINT64_CONSTANT(c) (c##ULL) +# elif (NL_COMP_VC_VERSION >= 80) # define INT64_CONSTANT(c) (c##LL) # define SINT64_CONSTANT(c) (c##LL) # define UINT64_CONSTANT(c) (c##LL) From a66204a03a615d7735e314b5712749abc48c42f3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 17:17:45 +0100 Subject: [PATCH 120/175] Add isWindowedApplication to INeLContext --HG-- branch : develop --- code/nel/include/nel/misc/app_context.h | 7 +++++++ code/nel/include/nel/misc/gtk_displayer.h | 6 +----- code/nel/include/nel/misc/win_displayer.h | 6 +----- code/nel/src/misc/app_context.cpp | 21 +++++++++++++++++++ code/nel/src/misc/debug.cpp | 5 +++++ code/nel/src/misc/gtk_displayer.cpp | 9 ++++++++ code/nel/src/misc/win_displayer.cpp | 8 +++++++ code/ryzom/client/src/client.cpp | 2 ++ .../client/src/snowballs_client.cpp | 1 + 9 files changed, 55 insertions(+), 10 deletions(-) diff --git a/code/nel/include/nel/misc/app_context.h b/code/nel/include/nel/misc/app_context.h index 46d2a15c7..df9165baf 100644 --- a/code/nel/include/nel/misc/app_context.h +++ b/code/nel/include/nel/misc/app_context.h @@ -88,6 +88,8 @@ namespace NLMISC virtual void setNoAssert(bool noAssert) =0; virtual bool getAlreadyCreateSharedAmongThreads() =0; virtual void setAlreadyCreateSharedAmongThreads(bool b) =0; + virtual bool isWindowedApplication() = 0; + virtual void setWindowedApplication(bool b = true) = 0; //@} protected: /// Called by derived class to finalize initialisation of context @@ -131,6 +133,8 @@ namespace NLMISC virtual void setNoAssert(bool noAssert); virtual bool getAlreadyCreateSharedAmongThreads(); virtual void setAlreadyCreateSharedAmongThreads(bool b); + virtual bool isWindowedApplication(); + virtual void setWindowedApplication(bool b); private: /// Singleton registry @@ -147,6 +151,7 @@ namespace NLMISC bool DebugNeedAssert; bool NoAssert; bool AlreadyCreateSharedAmongThreads; + bool WindowedApplication; }; /** This class implements the context interface for the a library module. @@ -183,6 +188,8 @@ namespace NLMISC virtual void setNoAssert(bool noAssert); virtual bool getAlreadyCreateSharedAmongThreads(); virtual void setAlreadyCreateSharedAmongThreads(bool b); + virtual bool isWindowedApplication(); + virtual void setWindowedApplication(bool b); private: /// Pointer to the application context. diff --git a/code/nel/include/nel/misc/gtk_displayer.h b/code/nel/include/nel/misc/gtk_displayer.h index 88dd3acc8..e2d35c83c 100644 --- a/code/nel/include/nel/misc/gtk_displayer.h +++ b/code/nel/include/nel/misc/gtk_displayer.h @@ -42,11 +42,7 @@ class CGtkDisplayer : public NLMISC::CWindowDisplayer { public: - CGtkDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName) - { - needSlashR = false; - createLabel ("@Clear|CLEAR"); - } + CGtkDisplayer (const char *displayerName = ""); virtual ~CGtkDisplayer (); diff --git a/code/nel/include/nel/misc/win_displayer.h b/code/nel/include/nel/misc/win_displayer.h index b4a56178c..f450055a9 100644 --- a/code/nel/include/nel/misc/win_displayer.h +++ b/code/nel/include/nel/misc/win_displayer.h @@ -57,11 +57,7 @@ class CWinDisplayer : public NLMISC::CWindowDisplayer { public: - CWinDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName), Exit(false) - { - needSlashR = true; - createLabel ("@Clear|CLEAR"); - } + CWinDisplayer(const char *displayerName = ""); virtual ~CWinDisplayer (); diff --git a/code/nel/src/misc/app_context.cpp b/code/nel/src/misc/app_context.cpp index 32b981bb3..2383fcda5 100644 --- a/code/nel/src/misc/app_context.cpp +++ b/code/nel/src/misc/app_context.cpp @@ -114,6 +114,7 @@ CApplicationContext::CApplicationContext() DebugNeedAssert = false; NoAssert = false; AlreadyCreateSharedAmongThreads = false; + WindowedApplication = false; contextReady(); } @@ -242,6 +243,16 @@ void CApplicationContext::setAlreadyCreateSharedAmongThreads(bool b) AlreadyCreateSharedAmongThreads = b; } +bool CApplicationContext::isWindowedApplication() +{ + return WindowedApplication; +} + +void CApplicationContext::setWindowedApplication(bool b) +{ + WindowedApplication = b; +} + CLibraryContext::CLibraryContext(INelContext &applicationContext) : _ApplicationContext(&applicationContext) { @@ -430,6 +441,16 @@ void CLibraryContext::setAlreadyCreateSharedAmongThreads(bool b) _ApplicationContext->setAlreadyCreateSharedAmongThreads(b); } +bool CLibraryContext::isWindowedApplication() +{ + return _ApplicationContext->isWindowedApplication(); +} + +void CLibraryContext::setWindowedApplication(bool b) +{ + _ApplicationContext->setWindowedApplication(b); +} + void initNelLibrary(NLMISC::CLibrary &lib) { nlassert(lib.isLibraryLoaded()); diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 2a9c5282a..01aa148dc 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1222,6 +1222,11 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) #endif // LOG_IN_FILE DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD"); +#ifdef NL_OS_WINDOWS + if (GetConsoleWindow() == NULL) + INelContext::getInstance().setWindowedApplication(true); +#endif + initDebug2(logInFile); INelContext::getInstance().setAlreadyCreateSharedAmongThreads(true); diff --git a/code/nel/src/misc/gtk_displayer.cpp b/code/nel/src/misc/gtk_displayer.cpp index c2e04e67e..0c581b2e5 100644 --- a/code/nel/src/misc/gtk_displayer.cpp +++ b/code/nel/src/misc/gtk_displayer.cpp @@ -32,6 +32,7 @@ #pragma comment(lib, "gthread-1.3.lib") #endif +#include "nel/misc/app_context.h" #include "nel/misc/path.h" #include "nel/misc/command.h" #include "nel/misc/thread.h" @@ -59,6 +60,14 @@ static GtkWidget *hrootbox = NULL, *scrolled_win2 = NULL; // Functions // +CGtkDisplayer (const char *displayerName) : CWindowDisplayer(displayerName) +{ + needSlashR = false; + createLabel ("@Clear|CLEAR"); + + INelContext::getInstance().setWindowedApplication(true); +} + CGtkDisplayer::~CGtkDisplayer () { if (_Init) diff --git a/code/nel/src/misc/win_displayer.cpp b/code/nel/src/misc/win_displayer.cpp index a91f64b4d..5da7db65b 100644 --- a/code/nel/src/misc/win_displayer.cpp +++ b/code/nel/src/misc/win_displayer.cpp @@ -26,6 +26,7 @@ #include #include +#include "nel/misc/app_context.h" #include "nel/misc/path.h" #include "nel/misc/command.h" #include "nel/misc/thread.h" @@ -41,6 +42,13 @@ namespace NLMISC { static CHARFORMAT2 CharFormat; +CWinDisplayer::CWinDisplayer(const char *displayerName) : CWindowDisplayer(displayerName), Exit(false) +{ + needSlashR = true; + createLabel("@Clear|CLEAR"); + + INelContext::getInstance().setWindowedApplication(true); +} CWinDisplayer::~CWinDisplayer () { diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index fb6e2dca5..1b4285dd5 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -365,6 +365,8 @@ int main(int argc, char **argv) createDebug(); + INelContext::getInstance().setWindowedApplication(true); + #ifndef NL_DEBUG INelContext::getInstance().getDebugLog()->removeDisplayer("DEFAULT_SD"); INelContext::getInstance().getInfoLog()->removeDisplayer("DEFAULT_SD"); diff --git a/code/snowballs2/client/src/snowballs_client.cpp b/code/snowballs2/client/src/snowballs_client.cpp index 7e019412b..059960922 100644 --- a/code/snowballs2/client/src/snowballs_client.cpp +++ b/code/snowballs2/client/src/snowballs_client.cpp @@ -1264,6 +1264,7 @@ sint main(int argc, char **argv) { // use log.log if NEL_LOG_IN_FILE and SBCLIENT_USE_LOG_LOG defined as 1 createDebug(NULL, SBCLIENT_USE_LOG_LOG, false); + INelContext::getInstance().setWindowedApplication(true); #if SBCLIENT_USE_LOG // create snowballs_client.log From 72475cf7194e8f9c288f3428ca9c68927855c484 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 17:17:45 +0100 Subject: [PATCH 121/175] Fix FindLibOVR cmake script --HG-- branch : develop --- code/CMakeModules/FindLibOVR.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeModules/FindLibOVR.cmake b/code/CMakeModules/FindLibOVR.cmake index 1403a4b2c..707949613 100644 --- a/code/CMakeModules/FindLibOVR.cmake +++ b/code/CMakeModules/FindLibOVR.cmake @@ -38,7 +38,7 @@ ELSEIF(WIN32) ENDIF(UNIX) FIND_LIBRARY(LIBOVR_LIBRARY - NAMES ovr + NAMES ovr libovr PATHS $ENV{LIBOVR_DIR}/${LIBOVR_LIBRARY_BUILD_PATH} /usr/local/lib From 826907c8ddae52451398c4daff421f673e93d419 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 24 Feb 2015 17:18:48 +0100 Subject: [PATCH 122/175] Qt5 compile fix for crash report tool --HG-- branch : feature-crashreport --- .../misc/crash_report/crash_report_socket.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_socket.cpp b/code/nel/tools/misc/crash_report/crash_report_socket.cpp index 5f8720e05..f2a14e84b 100644 --- a/code/nel/tools/misc/crash_report/crash_report_socket.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_socket.cpp @@ -21,6 +21,9 @@ #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) +# include +#endif class CCrashReportSocketPvt { @@ -43,16 +46,26 @@ CCrashReportSocket::~CCrashReportSocket() void CCrashReportSocket::sendReport( const SCrashReportData &data ) { +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QUrlQuery params; +#else QUrl params; +#endif params.addQueryItem( "report", data.report ); params.addQueryItem( "descr", data.description ); - params.addQueryItem( "email", data.email ); + params.addQueryItem("email", data.email); QUrl url( m_url ); QNetworkRequest request( url ); request.setRawHeader( "Connection", "close" ); - m_pvt->mgr.post( request, params.encodedQuery() ); +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QByteArray postData = params.query(QUrl::FullyEncoded).toUtf8(); +#else + QByteArray postData = params.encodedQuery(); +#endif + + m_pvt->mgr.post(request, postData); } void CCrashReportSocket::onFinished( QNetworkReply *reply ) From c00ba3f2c1c2b0f66ba2a2646b38f9d75c610c6b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 1 Mar 2015 18:41:16 +0200 Subject: [PATCH 123/175] Fix compilation --HG-- branch : develop --- code/nel/src/gui/interface_anim.cpp | 2 +- code/nel/src/gui/interface_group.cpp | 2 +- code/nel/src/gui/interface_parser.cpp | 14 +++++++------- .../ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 2 +- code/ryzom/client/src/interface_v3/group_map.cpp | 2 +- .../client/src/interface_v3/parser_modules.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/nel/src/gui/interface_anim.cpp b/code/nel/src/gui/interface_anim.cpp index 693e63f09..f18f9633d 100644 --- a/code/nel/src/gui/interface_anim.cpp +++ b/code/nel/src/gui/interface_anim.cpp @@ -55,7 +55,7 @@ namespace NLGUI if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr); ptr = xmlGetProp (cur, (xmlChar*)"type"); - string sTmp = ptr; + string sTmp = ptr.str(); sTmp = strlwr(sTmp); if (sTmp == "linear") _Type = Track_Linear; diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 29ad75f8c..b5027a87c 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -312,7 +312,7 @@ namespace NLGUI ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" ); if (ptr) { - string idparent = ptr; + string idparent = ptr.str(); idparent = NLMISC::strlwr(idparent); if (idparent != "parent") { diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index a3e2c48aa..f8725c086 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -664,7 +664,7 @@ namespace NLGUI //if it begins with a #, it is a reference in the instance attribute if (strchr(ptr, '#') != NULL) { - string LastProp = ptr; + string LastProp = ptr.str(); string NewProp =""; string RepProp; @@ -929,7 +929,7 @@ namespace NLGUI nlwarning(" Can't read the expression for a link node"); return false; } - std::string expr = ptr; + std::string expr = ptr.str(); std::vector targets; @@ -1119,13 +1119,13 @@ namespace NLGUI nlinfo ("options has no name"); return false; } - string optionsName = ptr; + string optionsName = ptr.str(); // herit if possible ptr = (char*) xmlGetProp( cur, (xmlChar*)"herit" ); if (ptr) { - string optionsParentName = ptr; + string optionsParentName = ptr.str(); CInterfaceOptions *io = wm->getOptions( optionsParentName ); if( io != NULL ) options->copyBasicMap( *io ); @@ -1807,7 +1807,7 @@ namespace NLGUI nlwarning ("no id in a procedure"); return false; } - string procId= ptr; + string procId= ptr.str(); if (_ProcedureMap.find(procId) != _ProcedureMap.end()) { @@ -2171,7 +2171,7 @@ namespace NLGUI //get the property value ptr = (char*)xmlGetProp( cur, props->name); nlassert(ptr); - string propVal= ptr; + string propVal= ptr.str(); string newPropVal; // solve define of this prop @@ -2328,7 +2328,7 @@ namespace NLGUI nlinfo ("anim has no id"); return false; } - string animId = ptr; + string animId = ptr.str(); pAnim = new CInterfaceAnim; if (pAnim->parse (cur, parentGroup)) diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index d72a975f3..68ceb7bf0 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -468,7 +468,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr prop = (char*) xmlGetProp( cur, (xmlChar*)"item_slot" ); if(prop) { - string str= prop; + string str= prop.str(); _ItemSlot= SLOTTYPE::stringToSlotType(NLMISC::toUpper(str)); } diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 371673a00..667e900c4 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -556,7 +556,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) ptr = (char*) xmlGetProp( cur, (xmlChar*)"map_mode" ); if (ptr) { - string sTmp = ptr; + string sTmp = ptr.str(); if (sTmp == "normal") _MapMode = MapMode_Normal; else if (sTmp == "death") diff --git a/code/ryzom/client/src/interface_v3/parser_modules.cpp b/code/ryzom/client/src/interface_v3/parser_modules.cpp index 58158ea62..b540900a4 100644 --- a/code/ryzom/client/src/interface_v3/parser_modules.cpp +++ b/code/ryzom/client/src/interface_v3/parser_modules.cpp @@ -353,7 +353,7 @@ bool CCommandParser::parse( xmlNodePtr cur, NLGUI::CInterfaceGroup *parentGroup if (ptrName) { // Does the action exist ? - std::string name = ptrName; + std::string name = ptrName.str(); if (!ICommand::exists (name) || (CUserCommand::CommandMap.find(name) != CUserCommand::CommandMap.end())) { // Get the action From 4daf4f5b5fb7fa9f4177107d1c98c25cf3e8a5fe Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 13:06:51 +0100 Subject: [PATCH 124/175] Fix #208 linking against static libX11.a --HG-- branch : develop --- code/nel/src/3d/driver/opengl/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/nel/src/3d/driver/opengl/CMakeLists.txt b/code/nel/src/3d/driver/opengl/CMakeLists.txt index 9e9e05918..12e20fbb3 100644 --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt @@ -67,6 +67,16 @@ IF(UNIX AND NOT APPLE) ADD_DEFINITIONS(-DHAVE_XCURSOR) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB}) ENDIF(X11_Xcursor_FOUND) + IF(X11_Xext_FOUND) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xext_LIB}) + ENDIF(X11_Xext_FOUND) + # libraries needed to be linked while linking to static X11 libraries + FIND_LIBRARY(XCB_LIBRARY + NAMES xcb + HINTS ${X11_LIB_SEARCH_PATH}) + IF(XCB_LIBRARY) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XCB_LIBRARY}) + ENDIF(XCB_LIBRARY) ENDIF(UNIX AND NOT APPLE) IF(WITH_PCH) From c0e885aa6ae7c85d18bbaea33ee403fd2c9d2292 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 13:07:33 +0100 Subject: [PATCH 125/175] Fixed: Skip .hg directories --HG-- branch : develop --- code/nel/src/misc/path.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 71d57104a..b47c741f1 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -898,10 +898,10 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want if (isdirectory(de)) { - // skip CVS and .svn directory - if ((!showEverything) && (fn == "CVS" || fn == ".svn")) + // skip CVS, .svn and .hg directory + if ((!showEverything) && (fn == "CVS" || fn == ".svn" || fn == ".hg")) { - NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS and .svn directory", path.c_str(), recurse, wantDir, wantFile); + NL_DISPLAY_PATH("PATH: CPath::getPathContent(%s, %d, %d, %d): skip CVS, .svn and .hg directory", path.c_str(), recurse, wantDir, wantFile); continue; } From fdc8ddb9f4ca6c6af3c9f629865dd5ca411b87d3 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 13:08:42 +0100 Subject: [PATCH 126/175] Fix #229 missing include in tools sources --HG-- branch : develop --- code/ryzom/tools/leveldesign/mp_generator/utils.h | 1 + code/ryzom/tools/patch_gen/patch_gen_common.cpp | 1 + code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp | 2 ++ 3 files changed, 4 insertions(+) diff --git a/code/ryzom/tools/leveldesign/mp_generator/utils.h b/code/ryzom/tools/leveldesign/mp_generator/utils.h index 01bb25fe7..efa42149d 100644 --- a/code/ryzom/tools/leveldesign/mp_generator/utils.h +++ b/code/ryzom/tools/leveldesign/mp_generator/utils.h @@ -17,6 +17,7 @@ #ifndef UTILS_H_ #define UTILS_H_ +#include // DtName must be the 1st one enum TDataCol { DtName, DtTitle, DtRMFamily, DtGroup, DtEcosystem, DtLevelZone, DtStatQuality, DtProp, DtCreature, DtCreaTitle, DtCraftSlotName, DtCraftCivSpec, DtColor, DtAverageEnergy, DtMaxLevel, DtCustomizedProperties, DtNbCols }; diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index 7f63177ac..e1b3110fe 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -19,6 +19,7 @@ //----------------------------------------------------------------------------- #include +#include #include "game_share/bnp_patch.h" #include "nel/misc/path.h" diff --git a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp index f194f996e..f5b6af644 100644 --- a/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp +++ b/code/ryzom/tools/server/ai_build_wmap/build_proximity_maps.cpp @@ -32,6 +32,8 @@ // AI share #include "ai_share/world_map.h" +// STL +#include //------------------------------------------------------------------------------------------------- // using namespaces... From a0c60bc89682ce74c83becd4b48f58f456aa45fb Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 13:09:16 +0100 Subject: [PATCH 127/175] Changed: Use CFile::createEmptyFile() --HG-- branch : develop --- code/ryzom/tools/patch_gen/patch_gen_common.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ryzom/tools/patch_gen/patch_gen_common.cpp b/code/ryzom/tools/patch_gen/patch_gen_common.cpp index e1b3110fe..2437c068e 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_common.cpp +++ b/code/ryzom/tools/patch_gen/patch_gen_common.cpp @@ -346,8 +346,7 @@ void CPackageDescription::generatePatches(CBNPFileSet& packageIndex) const if (packageIndex.getFile(i).versionCount()==1) { prevVersionFileName= _RootDirectory + "empty"; - NLMISC::COFile tmpFile(prevVersionFileName); - tmpFile.close(); + CFile::createEmptyFile(prevVersionFileName); usingTemporaryFile = true; deleteRefAfterDelta= false; } From bb429f0ea936e7fecafabd1920ea9d6db595b695 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 13:09:57 +0100 Subject: [PATCH 128/175] Changed: Use NLMISC::toString instead of itoa --HG-- branch : develop --- code/ryzom/tools/translation_tools/main.cpp | 25 +++++---------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 9997342fe..ed45c3000 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -95,17 +95,6 @@ const std::string historyDir("history/"); string diffVersion; -#ifndef NL_OS_WINDOWS -char* itoa(int val, char *buffer, int base) -{ - static char buf[32] = {0}; - int i = 30; - for(; val && i ; --i, val /= base) - buf[i] = "0123456789abcdef"[val % base]; - return &buf[i+1]; -} -#endif // NL_OS_WINDOWS - #ifdef NL_DEBUG # define LOG nldebug #else @@ -970,7 +959,6 @@ public: void onChanged(uint addIndex, uint refIndex, TPhraseDiffContext &context) { ucstring chg; - char temp[1024]; // check what is changed. if (context.Addition[addIndex].Parameters != context.Reference[refIndex].Parameters) chg += "// Parameter list changed." + nl; @@ -981,11 +969,11 @@ public: for (uint i=0; i Date: Mon, 2 Mar 2015 13:13:26 +0100 Subject: [PATCH 129/175] Fixed: Sort files in CFileContainer::addSearchPath too --HG-- branch : develop --- code/nel/src/misc/path.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index b47c741f1..60802a142 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1033,6 +1033,9 @@ void CFileContainer::addSearchPath (const string &path, bool recurse, bool alter { // find all path and subpath getPathContent (newPath, recurse, true, false, pathsToProcess, progressCallBack); + + // sort files + sort(pathsToProcess.begin(), pathsToProcess.end()); } for (uint p = 0; p < pathsToProcess.size(); p++) @@ -1078,7 +1081,10 @@ void CFileContainer::addSearchPath (const string &path, bool recurse, bool alter // find all files in the path and subpaths getPathContent (newPath, recurse, false, true, filesToProcess, progressCallBack); - // Progree bar + // sort files + sort(filesToProcess.begin(), filesToProcess.end()); + + // Progress bar if (progressCallBack) { progressCallBack->popCropedValues (); From 5e390364deaaac7b098a0822925b43321e7c3b7e Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 13:13:45 +0100 Subject: [PATCH 130/175] Changed: Minor change --HG-- branch : develop --- code/nel/src/misc/path.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 60802a142..248116f20 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -937,10 +937,10 @@ void CFileContainer::getPathContent (const string &path, bool recurse, bool want closedir (dir); #ifndef NL_OS_WINDOWS - BasePathgetPathContent = ""; + BasePathgetPathContent.clear(); #endif - // let s recurse + // let's recurse for (uint i = 0; i < recursPath.size (); i++) { // Progress bar From 9d92e2d0d3ae191bcc9431a86dd8c002ea9a1f9b Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 2 Mar 2015 19:52:39 +0100 Subject: [PATCH 131/175] GUI changes as per requested by Kaetemi. --HG-- branch : feature-crashreport --- .../misc/crash_report/crash_report_widget.cpp | 74 ++++++++++++++++++- .../misc/crash_report/crash_report_widget.h | 8 ++ .../misc/crash_report/crash_report_widget.ui | 38 +++------- 3 files changed, 91 insertions(+), 29 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 968978f94..889606d99 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -25,18 +25,21 @@ #include #include #include +#include +#include CCrashReportWidget::CCrashReportWidget( QWidget *parent ) : QWidget( parent ) { + m_developerMode = false; + m_forceSend = false; + m_ui.setupUi( this ); m_socket = new CCrashReportSocket( this ); QTimer::singleShot( 1, this, SLOT( onLoad() ) ); - connect( m_ui.sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); - connect( m_ui.canceButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); connect( m_ui.emailCB, SIGNAL( stateChanged( int ) ), this, SLOT( onCBClicked() ) ); connect( m_socket, SIGNAL( reportSent() ), this, SLOT( onReportSent() ) ); @@ -70,11 +73,60 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: { setWindowTitle( v.c_str() ); } + else + if( k == "dev" ) + { + m_developerMode = true; + } + else + if( k == "sendreport" ) + { + m_forceSend = true; + } + } + + QHBoxLayout *hbl = new QHBoxLayout( this ); + + if( m_developerMode ) + { + QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this ); + QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this ); + QPushButton *abortButton = new QPushButton( tr( "Abort" ), this ); + QPushButton *breakButton = new QPushButton( tr( "Break" ), this ); + + hbl->addWidget( alwaysIgnoreButton ); + hbl->addWidget( ignoreButton ); + hbl->addWidget( abortButton ); + hbl->addWidget( breakButton ); + + m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); + + connect( alwaysIgnoreButton, SIGNAL( clicked( bool ) ), this, SLOT( onAlwaysIgnoreClicked() ) ); + connect( ignoreButton, SIGNAL( clicked( bool ) ), this, SLOT( onIgnoreClicked() ) ); + connect( abortButton, SIGNAL( clicked( bool ) ), this, SLOT( onAbortClicked() ) ); + connect( breakButton, SIGNAL( clicked( bool ) ), this, SLOT( onBreakClicked() ) ); + } + else + { + QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); + connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); + hbl->addWidget( sendButton ); + + if( !m_forceSend ) + { + QPushButton *cancelButton = new QPushButton( tr( "Don't send report" ), this ); + connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); + hbl->addWidget( cancelButton ); + } + + m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); } } void CCrashReportWidget::onLoad() { + return; + if( !checkSettings() ) { close(); @@ -99,7 +151,6 @@ void CCrashReportWidget::onLoad() void CCrashReportWidget::onSendClicked() { - m_ui.sendButton->setEnabled( false ); QApplication::setOverrideCursor( Qt::WaitCursor ); SCrashReportData data; @@ -120,6 +171,23 @@ void CCrashReportWidget::onCBClicked() m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); } +void CCrashReportWidget::onAlwaysIgnoreClicked() +{ +} + +void CCrashReportWidget::onIgnoreClicked() +{ +} + +void CCrashReportWidget::onAbortClicked() +{ +} + +void CCrashReportWidget::onBreakClicked() +{ +} + + void CCrashReportWidget::onReportSent() { QApplication::setOverrideCursor( Qt::ArrowCursor ); diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index 61b56e340..b0039e0e2 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -43,6 +43,11 @@ private Q_SLOTS: void onSendClicked(); void onCancelClicked(); void onCBClicked(); + + void onAlwaysIgnoreClicked(); + void onIgnoreClicked(); + void onAbortClicked(); + void onBreakClicked(); void onReportSent(); void onReportFailed(); @@ -54,6 +59,9 @@ private: Ui::CrashReportWidget m_ui; QString m_fileName; CCrashReportSocket *m_socket; + bool m_developerMode; + bool m_forceSend; + }; #endif diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui index 589810578..ed252eb07 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.ui +++ b/code/nel/tools/misc/crash_report/crash_report_widget.ui @@ -9,8 +9,8 @@ 0 0 - 400 - 407 + 406 + 430 @@ -24,9 +24,6 @@
- - - @@ -34,24 +31,17 @@ - - - - true - - - Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - + + - + Email me if you have further questions, or updates on this issue - + false @@ -61,17 +51,13 @@ - - - - Send + + + + true - - - - - - Cancel + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse From d6662403438d22b79cfdd8ae6fb4f4fada172d1f Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 2 Mar 2015 20:12:09 +0100 Subject: [PATCH 132/175] Added return codes as requested. --HG-- branch : feature-crashreport --- code/nel/tools/misc/crash_report/crash_report.cpp | 8 +++++++- .../tools/misc/crash_report/crash_report_widget.cpp | 8 ++++++++ .../tools/misc/crash_report/crash_report_widget.h | 13 +++++++++++++ code/ryzom/client/src/init.cpp | 2 ++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index e083de126..0c9e4fc93 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -88,5 +88,11 @@ int main( int argc, char **argv ) w.setup( params ); w.show(); - return app.exec(); + int ret = app.exec(); + + if( ret != EXIT_SUCCESS ) + return ret; + else + return w.getReturnValue(); + } \ No newline at end of file diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 889606d99..609c58562 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -173,18 +173,26 @@ void CCrashReportWidget::onCBClicked() void CCrashReportWidget::onAlwaysIgnoreClicked() { + m_returnValue = ERET_ALWAYS_IGNORE; + close(); } void CCrashReportWidget::onIgnoreClicked() { + m_returnValue = ERET_IGNORE; + close(); } void CCrashReportWidget::onAbortClicked() { + m_returnValue = ERET_ABORT; + close(); } void CCrashReportWidget::onBreakClicked() { + m_returnValue = ERET_BREAK; + close(); } diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index b0039e0e2..db3d85b47 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -31,12 +31,24 @@ class CCrashReportWidget : public QWidget { Q_OBJECT public: + + enum EReturnValue + { + ERET_NULL = 0, + ERET_ALWAYS_IGNORE = 21, + ERET_IGNORE = 22, + ERET_ABORT = 23, + ERET_BREAK = 24 + }; + CCrashReportWidget( QWidget *parent = NULL ); ~CCrashReportWidget(); void setFileName( const char *fn ){ m_fileName = fn; } void setup( const std::vector< std::pair< std::string, std::string > > ¶ms ); + + EReturnValue getReturnValue() const{ return m_returnValue; } private Q_SLOTS: void onLoad(); @@ -62,6 +74,7 @@ private: bool m_developerMode; bool m_forceSend; + EReturnValue m_returnValue; }; #endif diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index f0fd40dae..2ffc6e8e0 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -538,6 +538,8 @@ void checkDriverVersion() void checkDriverDepth () { + nlassert( false ); + // Check desktop is in 32 bit else no window mode allowed. if (ClientCfg.Windowed) { From 374d966069911a3daf60f551937aed308aac9173 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 2 Mar 2015 21:06:01 +0100 Subject: [PATCH 133/175] Some more GUI changes. --HG-- branch : feature-crashreport --- .../misc/crash_report/crash_report_widget.cpp | 98 ++++++++++++------- .../misc/crash_report/crash_report_widget.h | 4 +- .../misc/crash_report/crash_report_widget.ui | 4 +- 3 files changed, 66 insertions(+), 40 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 609c58562..350a35ff8 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -27,6 +27,7 @@ #include #include #include +#include CCrashReportWidget::CCrashReportWidget( QWidget *parent ) : QWidget( parent ) @@ -85,10 +86,38 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: } } + if( m_fileName.isEmpty() ) + { + m_ui.reportLabel->hide(); + m_ui.reportEdit->hide(); + } + + // When no -host specified no custom entry and email fields + if( m_socket->url().isEmpty() ) + { + m_ui.descriptionEdit->hide(); + m_ui.emailCB->hide(); + m_ui.emailEdit->hide(); + m_ui.descrLabel->hide(); + } + QHBoxLayout *hbl = new QHBoxLayout( this ); if( m_developerMode ) { + if( !m_socket->url().isEmpty() ) + { + m_ui.emailCB->setEnabled( false ); + + QCheckBox *cb = new QCheckBox( tr( "Send report" ), this ); + m_ui.gridLayout->addWidget( cb, 4, 0, 1, 1 ); + + m_ui.gridLayout->addWidget( m_ui.emailCB, 5, 0, 1, 1 ); + m_ui.gridLayout->addWidget( m_ui.emailEdit, 6, 0, 1, 1 ); + + connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onSendCBClicked() ) ); + } + QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this ); QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this ); QPushButton *abortButton = new QPushButton( tr( "Abort" ), this ); @@ -99,7 +128,7 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: hbl->addWidget( abortButton ); hbl->addWidget( breakButton ); - m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); + m_ui.gridLayout->addLayout( hbl, 7, 0, 1, 3 ); connect( alwaysIgnoreButton, SIGNAL( clicked( bool ) ), this, SLOT( onAlwaysIgnoreClicked() ) ); connect( ignoreButton, SIGNAL( clicked( bool ) ), this, SLOT( onIgnoreClicked() ) ); @@ -108,15 +137,26 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: } else { - QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); - connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); - hbl->addWidget( sendButton ); - - if( !m_forceSend ) + // If -host is specified, offer the send function + if( !m_socket->url().isEmpty() ) { - QPushButton *cancelButton = new QPushButton( tr( "Don't send report" ), this ); - connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); - hbl->addWidget( cancelButton ); + QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); + connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); + hbl->addWidget( sendButton ); + + if( !m_forceSend ) + { + QPushButton *cancelButton = new QPushButton( tr( "Don't send report" ), this ); + connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); + hbl->addWidget( cancelButton ); + } + } + // Otherwise only offer exit + else + { + QPushButton *exitButton = new QPushButton( tr( "Exit" ), this ); + connect( exitButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); + hbl->addWidget( exitButton ); } m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); @@ -125,13 +165,8 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: void CCrashReportWidget::onLoad() { - return; - - if( !checkSettings() ) - { - close(); + if( m_fileName.isEmpty() ) return; - } QFile f( m_fileName ); bool b = f.open( QFile::ReadOnly | QFile::Text ); @@ -171,6 +206,18 @@ void CCrashReportWidget::onCBClicked() m_ui.emailEdit->setEnabled( m_ui.emailCB->isChecked() ); } +void CCrashReportWidget::onSendCBClicked() +{ + bool b = m_ui.emailCB->isEnabled(); + + if( b ) + { + m_ui.emailCB->setChecked( false ); + } + + m_ui.emailCB->setEnabled( !b ); +} + void CCrashReportWidget::onAlwaysIgnoreClicked() { m_returnValue = ERET_ALWAYS_IGNORE; @@ -218,27 +265,6 @@ void CCrashReportWidget::onReportFailed() removeAndQuit(); } -bool CCrashReportWidget::checkSettings() -{ - if( m_fileName.isEmpty() ) - { - QMessageBox::information( this, - tr( "No log file specified." ), - tr( "No log file specified. Exiting..." ) ); - return false; - } - - if( m_socket->url().isEmpty() ) - { - QMessageBox::information( this, - tr( "No host specified." ), - tr( "No host specified. Exiting..." ) ); - return false; - } - - return true; -} - void CCrashReportWidget::removeAndQuit() { QFile::remove( m_fileName ); diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index db3d85b47..a0468a565 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -49,12 +49,13 @@ public: void setup( const std::vector< std::pair< std::string, std::string > > ¶ms ); EReturnValue getReturnValue() const{ return m_returnValue; } - + private Q_SLOTS: void onLoad(); void onSendClicked(); void onCancelClicked(); void onCBClicked(); + void onSendCBClicked(); void onAlwaysIgnoreClicked(); void onIgnoreClicked(); @@ -65,7 +66,6 @@ private Q_SLOTS: void onReportFailed(); private: - bool checkSettings(); void removeAndQuit(); Ui::CrashReportWidget m_ui; diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui index ed252eb07..dec7e74ca 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.ui +++ b/code/nel/tools/misc/crash_report/crash_report_widget.ui @@ -18,14 +18,14 @@ - + What were you doing when the crash occured? - + Contents of the report ( automatically generated ) From c2139e95c01074bb6e7ba9f4abd1961221b4511d Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 23:27:12 +0100 Subject: [PATCH 134/175] Fixed: Compilation with GCC --HG-- branch : develop --- code/nel/src/gui/interface_anim.cpp | 2 +- code/nel/src/gui/interface_parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/interface_anim.cpp b/code/nel/src/gui/interface_anim.cpp index f18f9633d..edd96e1cf 100644 --- a/code/nel/src/gui/interface_anim.cpp +++ b/code/nel/src/gui/interface_anim.cpp @@ -194,7 +194,7 @@ namespace NLGUI fromString((const char*)time, fAnimTime); TAnimationTime animTime = fAnimTime * CWidgetManager::getInstance()->getSystemOption(CWidgetManager::OptionMulCoefAnim).getValFloat(); double animValue; - fromString(value, animValue); + fromString(value.str(), animValue); // Depending on the type of the track add the key switch(_Type) diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index f8725c086..1dbf62d51 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -796,7 +796,7 @@ namespace NLGUI return false; } sint32 size; - fromString(cSize, size); + fromString(cSize.str(), size); if (size <= 0) { // todo hulud interface syntax error From f999cc892c1d91130e96d7e6c43268cc9786c930 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 2 Mar 2015 23:51:23 +0100 Subject: [PATCH 135/175] Fixed: Compilation with GCC --HG-- branch : develop --- .../src/entities_game_service/player_manager/cdb_branch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp b/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp index d54dbd694..44205d02a 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/cdb_branch.cpp @@ -284,7 +284,7 @@ void CCDBStructNodeBranch::init( xmlNodePtr node, NLMISC::IProgressCallback &pro { // dealing with an array of entries uint countAsInt; - NLMISC::fromString(count, countAsInt); + NLMISC::fromString(count.str(), countAsInt); nlassert((const char *) count != NULL); for (uint i=0;i Date: Tue, 3 Mar 2015 02:30:39 +0100 Subject: [PATCH 136/175] Send report in dev mode if the CB is checked. --HG-- branch : feature-crashreport --- .../misc/crash_report/crash_report_widget.cpp | 40 +++++++++++++------ .../misc/crash_report/crash_report_widget.h | 1 + 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 350a35ff8..e176bb2be 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -34,6 +34,7 @@ QWidget( parent ) { m_developerMode = false; m_forceSend = false; + m_devSendReport = false; m_ui.setupUi( this ); @@ -63,6 +64,8 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: if( k == "log" ) { m_fileName = v.c_str(); + if( !QFile::exists( m_fileName ) ) + m_fileName.clear(); } else if( k == "host" ) @@ -92,8 +95,8 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: m_ui.reportEdit->hide(); } - // When no -host specified no custom entry and email fields - if( m_socket->url().isEmpty() ) + + if( m_socket->url().isEmpty() || m_fileName.isEmpty() ) { m_ui.descriptionEdit->hide(); m_ui.emailCB->hide(); @@ -105,7 +108,7 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: if( m_developerMode ) { - if( !m_socket->url().isEmpty() ) + if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() ) { m_ui.emailCB->setEnabled( false ); @@ -172,10 +175,7 @@ void CCrashReportWidget::onLoad() bool b = f.open( QFile::ReadOnly | QFile::Text ); if( !b ) { - QMessageBox::information( this, - tr( "No log file found" ), - tr( "There was no log file found, therefore nothing to report. Exiting..." ) ); - close(); + m_fileName.clear(); return; } @@ -186,6 +186,18 @@ void CCrashReportWidget::onLoad() void CCrashReportWidget::onSendClicked() { + if( m_developerMode && !m_devSendReport ) + { + close(); + return; + } + + if( m_socket->url().isEmpty() || m_fileName.isEmpty() ) + { + close(); + return; + } + QApplication::setOverrideCursor( Qt::WaitCursor ); SCrashReportData data; @@ -216,30 +228,32 @@ void CCrashReportWidget::onSendCBClicked() } m_ui.emailCB->setEnabled( !b ); + + m_devSendReport = !m_devSendReport; } void CCrashReportWidget::onAlwaysIgnoreClicked() { m_returnValue = ERET_ALWAYS_IGNORE; - close(); + onSendClicked(); } void CCrashReportWidget::onIgnoreClicked() { m_returnValue = ERET_IGNORE; - close(); + onSendClicked(); } void CCrashReportWidget::onAbortClicked() { m_returnValue = ERET_ABORT; - close(); + onSendClicked(); } void CCrashReportWidget::onBreakClicked() { m_returnValue = ERET_BREAK; - close(); + onSendClicked(); } @@ -267,7 +281,9 @@ void CCrashReportWidget::onReportFailed() void CCrashReportWidget::removeAndQuit() { - QFile::remove( m_fileName ); + if( !m_fileName.isEmpty() ) + QFile::remove( m_fileName ); + close(); } diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.h b/code/nel/tools/misc/crash_report/crash_report_widget.h index a0468a565..f40e40854 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.h +++ b/code/nel/tools/misc/crash_report/crash_report_widget.h @@ -73,6 +73,7 @@ private: CCrashReportSocket *m_socket; bool m_developerMode; bool m_forceSend; + bool m_devSendReport; EReturnValue m_returnValue; }; From d561a7078c35898f936ca0c34606016a151f91c3 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 3 Mar 2015 02:33:04 +0100 Subject: [PATCH 137/175] Only send email if the email CB is checked. --HG-- branch : feature-crashreport --- code/nel/tools/misc/crash_report/crash_report_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index e176bb2be..9c23b793a 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -203,7 +203,9 @@ void CCrashReportWidget::onSendClicked() SCrashReportData data; data.description = m_ui.descriptionEdit->toPlainText(); data.report = m_ui.reportEdit->toPlainText(); - data.email = m_ui.emailEdit->text(); + + if( m_ui.emailCB->isChecked() ) + data.email = m_ui.emailEdit->text(); m_socket->sendReport( data ); } From 7ca008ba86ef29c9479de4b3a27af6ec147f54c3 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 3 Mar 2015 02:37:51 +0100 Subject: [PATCH 138/175] Don't offer send in non-dev mode when there's no log file specified. --HG-- branch : feature-crashreport --- code/nel/tools/misc/crash_report/crash_report_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 9c23b793a..07ec7cd6f 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -141,7 +141,7 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: else { // If -host is specified, offer the send function - if( !m_socket->url().isEmpty() ) + if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() ) { QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); From baa5273eaa9ff939f22c6c33590775b2da245f04 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 3 Mar 2015 03:10:28 +0100 Subject: [PATCH 139/175] Default return value. --HG-- branch : feature-crashreport --- code/nel/tools/misc/crash_report/crash_report_widget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 07ec7cd6f..00b4c33bf 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -35,6 +35,7 @@ QWidget( parent ) m_developerMode = false; m_forceSend = false; m_devSendReport = false; + m_returnValue = ERET_NULL; m_ui.setupUi( this ); From 74cb91d460bbd8e7ae6afe3e5808b02144299a4a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 3 Mar 2015 03:10:59 +0100 Subject: [PATCH 140/175] This was left here unintentionally. --HG-- branch : feature-crashreport --- code/ryzom/client/src/init.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 2ffc6e8e0..f0fd40dae 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -538,8 +538,6 @@ void checkDriverVersion() void checkDriverDepth () { - nlassert( false ); - // Check desktop is in 32 bit else no window mode allowed. if (ClientCfg.Windowed) { From 242b19e9e2f078f85bb972f54ca099c9526604d2 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 3 Mar 2015 18:59:23 +0100 Subject: [PATCH 141/175] Fixed: Compilation --HG-- branch : develop --- code/ryzom/tools/translation_tools/main.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index ed45c3000..30054ffbd 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -985,13 +985,11 @@ public: // changed element TPhrase phrase = context.Addition[addIndex]; -// char temp[1024]; - sprintf(temp, "// DIFF CHANGED %u ", addIndex); vector tempV; tempV.push_back(context.Reference[refIndex]); ucstring tempT = preparePhraseFile(tempV, false); CI18N::removeCComment(tempT); - phrase.Comments = ucstring(temp) + nl + phrase.Comments; + phrase.Comments = ucstring("// DIFF CHANGED ") + toString(addIndex) + nl + phrase.Comments; phrase.Comments = phrase.Comments + ucstring("/* OLD VALUE : ["+nl) + tabLines(1, tempT) +nl + "] */" + nl; phrase.Comments = phrase.Comments + chg; @@ -2697,13 +2695,11 @@ void CMakePhraseDiff2::onChanged(uint addIndex, uint refIndex, TPhraseDiffContex // changed element TPhrase phrase = context.Addition[addIndex]; -// char temp[1024]; - sprintf(temp, "// DIFF CHANGED"); vector tempV; tempV.push_back(context.Reference[refIndex]); ucstring tempT = preparePhraseFile(tempV, false); CI18N::removeCComment(tempT); - phrase.Comments = ucstring(temp) + nl + phrase.Comments; + phrase.Comments = ucstring("// DIFF CHANGED ") + toString(addIndex) + nl + phrase.Comments; phrase.Comments = phrase.Comments + ucstring("/* OLD VALUE : ["+nl) + tabLines(1, tempT) +nl + "] */" + nl; phrase.Comments = phrase.Comments + chg; From 9d50210e6ba9ae10199122308b100af652e54409 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:10 +0100 Subject: [PATCH 142/175] Enable crash report tool in debugging sample application --HG-- branch : feature-crashreport --- code/nel/samples/misc/debug/main.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/code/nel/samples/misc/debug/main.cpp b/code/nel/samples/misc/debug/main.cpp index 6ee31754f..85cd4edc9 100644 --- a/code/nel/samples/misc/debug/main.cpp +++ b/code/nel/samples/misc/debug/main.cpp @@ -18,11 +18,9 @@ #include // contains all debug features -#include "nel/misc/debug.h" +#include -using namespace NLMISC; - -int main (int /* argc */, char ** /* argv */) +int main(int /* argc */, char ** /* argv */) { // all debug functions have different behaviors in debug and in release mode. // in general, in debug mode, all debug functions are active, they display @@ -36,20 +34,23 @@ int main (int /* argc */, char ** /* argv */) // in release mode, this function does nothing by default. you have to add a displayer // manually, or put true in the parameter to say to the function that you want it to // add the default displayers - createDebug (); + NLMISC::createDebug(); + + // enable the crash report tool + NLMISC::INelContext::getInstance().setWindowedApplication(true); // display debug information, that will be skipped in release mode. - nldebug ("nldebug() %d", 1); + nldebug("nldebug() %d", 1); // display the string - nlinfo ("nlinfo() %d", 2); + nlinfo("nlinfo() %d", 2); // when something not normal, but that the program can manage, occurs, call nlwarning() - nlwarning ("nlwarning() %d", 3); + nlwarning("nlwarning() %d", 3); // nlassert() is like assert but do more powerful things. in release mode, the test is // not executed and nothing will happen. (Press F5 in Visual C++ to continue the execution) - nlassert (true == false); + nlassert(true == false); // in a switch case or when you want that the program never executes a part of code, use stop. // in release, nlstop does nothing. in debug mode, @@ -61,16 +62,16 @@ int main (int /* argc */, char ** /* argv */) // occurs. (In Visual C++ press F5 to continue) try { - nlerror ("nlerror() %d", 4); + nlerror("nlerror() %d", 4); } - catch(const EFatalError &) + catch (const NLMISC::EFatalError &) { // just continue... - nlinfo ("nlerror() generated an EFatalError exception, just ignore it"); + nlinfo("nlerror() generated an EFatalError exception, just ignore it"); } printf("\nPress to exit\n"); - getchar (); + getchar(); return EXIT_SUCCESS; } From 699e1644e71ddd760313ba9b12985abec541f7af Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:10 +0100 Subject: [PATCH 143/175] Use proper style sheet for crash report under Cinnamon --HG-- branch : feature-crashreport --- code/nel/tools/misc/crash_report/crash_report.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index 0c9e4fc93..c42f1ae6f 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -78,6 +78,19 @@ public: int main( int argc, char **argv ) { +#ifndef WIN32 + // Workaround to default -style=gtk+ on recent Cinnamon versions + char *currentDesktop = getenv("XDG_CURRENT_DESKTOP"); + if (currentDesktop) + { + printf("XDG_CURRENT_DESKTOP: %s\n", currentDesktop); + if (!strcmp(currentDesktop, "X-Cinnamon")) + { + setenv("XDG_CURRENT_DESKTOP", "gnome", 1); + } + } +#endif + QApplication app( argc, argv ); std::vector< std::pair< std::string, std::string > > params; From b896405b3dd13c83c746e097aad0dee917cc7479 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:10 +0100 Subject: [PATCH 144/175] Adjust layout --HG-- branch : feature-crashreport --- .../misc/crash_report/crash_report_widget.cpp | 25 ++++++++++++------- .../misc/crash_report/crash_report_widget.ui | 2 +- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 00b4c33bf..7ca723f44 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -122,10 +122,13 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onSendCBClicked() ) ); } + hbl->addStretch(); + QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this ); QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this ); QPushButton *abortButton = new QPushButton( tr( "Abort" ), this ); - QPushButton *breakButton = new QPushButton( tr( "Break" ), this ); + QPushButton *breakButton = new QPushButton(tr("Break"), this); + breakButton->setAutoDefault(true); hbl->addWidget( alwaysIgnoreButton ); hbl->addWidget( ignoreButton ); @@ -141,26 +144,30 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: } else { + hbl->addStretch(); + // If -host is specified, offer the send function if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() ) { + if (!m_forceSend) + { + QPushButton *cancelButton = new QPushButton(tr("Don't send report"), this); + connect(cancelButton, SIGNAL(clicked(bool)), this, SLOT(onCancelClicked())); + hbl->addWidget(cancelButton); + } + QPushButton *sendButton = new QPushButton( tr( "Send report" ), this ); + sendButton->setAutoDefault(true); connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) ); hbl->addWidget( sendButton ); - - if( !m_forceSend ) - { - QPushButton *cancelButton = new QPushButton( tr( "Don't send report" ), this ); - connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); - hbl->addWidget( cancelButton ); - } } // Otherwise only offer exit else { QPushButton *exitButton = new QPushButton( tr( "Exit" ), this ); connect( exitButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); - hbl->addWidget( exitButton ); + hbl->addWidget(exitButton); + exitButton->setAutoDefault(true); } m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 ); diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.ui b/code/nel/tools/misc/crash_report/crash_report_widget.ui index dec7e74ca..da1e38618 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.ui +++ b/code/nel/tools/misc/crash_report/crash_report_widget.ui @@ -14,7 +14,7 @@ - NeL Error Report + NeL report From 230be4d64b6d3a86c4443a7185877626bb6c065f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:10 +0100 Subject: [PATCH 145/175] Extend debugging sample --HG-- branch : feature-crashreport --- code/nel/samples/misc/debug/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/nel/samples/misc/debug/main.cpp b/code/nel/samples/misc/debug/main.cpp index 85cd4edc9..66217ac1d 100644 --- a/code/nel/samples/misc/debug/main.cpp +++ b/code/nel/samples/misc/debug/main.cpp @@ -20,6 +20,11 @@ // contains all debug features #include +void repeatederror() +{ + nlassert(false && "hit always ignore"); +} + int main(int /* argc */, char ** /* argv */) { // all debug functions have different behaviors in debug and in release mode. @@ -70,6 +75,9 @@ int main(int /* argc */, char ** /* argv */) nlinfo("nlerror() generated an EFatalError exception, just ignore it"); } + for (int i = 0; i < 32; ++i) + repeatederror(); + printf("\nPress to exit\n"); getchar(); From a9dc1a4c6800b22fcdece31f5f42db5b8de206a7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:10 +0100 Subject: [PATCH 146/175] Fix checkbox behaviour --HG-- branch : feature-crashreport --- code/nel/tools/misc/crash_report/crash_report_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/misc/crash_report/crash_report_widget.cpp b/code/nel/tools/misc/crash_report/crash_report_widget.cpp index 7ca723f44..218b3545c 100644 --- a/code/nel/tools/misc/crash_report/crash_report_widget.cpp +++ b/code/nel/tools/misc/crash_report/crash_report_widget.cpp @@ -119,7 +119,9 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std:: m_ui.gridLayout->addWidget( m_ui.emailCB, 5, 0, 1, 1 ); m_ui.gridLayout->addWidget( m_ui.emailEdit, 6, 0, 1, 1 ); - connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onSendCBClicked() ) ); + connect(cb, SIGNAL(stateChanged(int)), this, SLOT(onSendCBClicked())); + if (m_forceSend) + cb->setChecked(true); } hbl->addStretch(); From bbfc15c07af812f91d384d5065709b17ea4b5fda Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:10 +0100 Subject: [PATCH 147/175] Extend debugging sample --HG-- branch : feature-crashreport --- code/nel/samples/misc/debug/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/nel/samples/misc/debug/main.cpp b/code/nel/samples/misc/debug/main.cpp index 66217ac1d..5850cb2b3 100644 --- a/code/nel/samples/misc/debug/main.cpp +++ b/code/nel/samples/misc/debug/main.cpp @@ -19,9 +19,11 @@ // contains all debug features #include +#include void repeatederror() { + // hit always ignore to surpress this error for the duration of the program nlassert(false && "hit always ignore"); } @@ -43,6 +45,7 @@ int main(int /* argc */, char ** /* argv */) // enable the crash report tool NLMISC::INelContext::getInstance().setWindowedApplication(true); + NLMISC::setReportPostUrl("http://ryzomcore.org/crash_report/"); // display debug information, that will be skipped in release mode. nldebug("nldebug() %d", 1); @@ -75,6 +78,7 @@ int main(int /* argc */, char ** /* argv */) nlinfo("nlerror() generated an EFatalError exception, just ignore it"); } + // keep repeating the same error for (int i = 0; i < 32; ++i) repeatederror(); From 5a307cfa206a9a362ebb8faa6432a1cb36ef0f53 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:06:11 +0100 Subject: [PATCH 148/175] Replace report functionality --HG-- branch : feature-crashreport --- code/nel/include/nel/misc/report.h | 46 ++++++++++++++++++------------ code/nel/src/misc/debug.cpp | 4 +-- code/nel/src/misc/displayer.cpp | 42 ++++++++++++--------------- code/nel/src/misc/report.cpp | 1 + code/nel/src/net/service.cpp | 2 +- 5 files changed, 51 insertions(+), 44 deletions(-) diff --git a/code/nel/include/nel/misc/report.h b/code/nel/include/nel/misc/report.h index c492f4aa2..55a1c2dbf 100644 --- a/code/nel/include/nel/misc/report.h +++ b/code/nel/include/nel/misc/report.h @@ -21,28 +21,38 @@ namespace NLMISC { -enum TReportResult { ReportDebug, ReportIgnore, ReportQuit, ReportError }; - -/** Display a custom message box. - * - * \param title set the title of the report. If empty, it'll display "NeL Crash Report" or the default title set by setReportWindowTitle. - * \param header message displayed before the edit text box. If empty, it displays the default message. - * \param body message displayed in the edit text box. This string will be sent by email. - * \param debugButton 0 for disabling it, 1 for enable with default behaviors (generate a breakpoint), 2 for enable with no behavior - * +#if FINAL_VERSION +#define NL_REPORT_SYNCHRONOUS false +#define NL_REPORT_DEFAULT NLMISC::ReportAbort +#else +#define NL_REPORT_SYNCHRONOUS true +#define NL_REPORT_DEFAULT NLMISC::ReportBreak +#endif + +enum TReportResult +{ + // See also crash_report_widget.h EReturnValue + ReportAlwaysIgnore = 21, + ReportIgnore = 22, + ReportAbort = 23, + ReportBreak = 24 +}; + +/** Display a crash report * + * \param title set the title of the report. If empty, it'll display "NeL report" + * \param subject extended title of the report + * \param body message displayed in the edit text box. This string will be sent to the crash report tool + * \param attachment binary file to attach. This is a filename + * \param synchronous use system() and wait for the crash tool exit code, passes -dev flag; otherwise return defaultResult immediately + * \param sendReport hide 'dont send' button, or auto enable 'send report' checkbox * - * \return the button clicked or error + * \return the button clicked or defaultResult */ -TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const std::string &attachedFile = ""); +TReportResult report(const std::string &title, const std::string &subject, const std::string &body, const std::string &attachment, bool synchronous, bool sendReport, TReportResult defaultResult); -/// Set the Url of the web service used to post crash reports to -void setReportPostUrl(const std::string &postUrl); - -/// DEPRECATED -/** call this in the main of your appli to enable email: setReportEmailFunction (sendEmail); - */ -void setReportEmailFunction(void *emailFunction); +/// Set the Url of the web service used to post crash reports to. String is copied +void setReportPostUrl(const char *postUrl); } // NLMISC diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 86752a412..96372d124 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -553,8 +553,8 @@ public: { // yoyo: allow only to send the crash report once. Because users usually click ignore, // which create noise into list of bugs (once a player crash, it will surely continues to do it). - bool i = false; - report (progname+shortExc, "", subject, _Reason, true, 1, true, 1, !isCrashAlreadyReported(), i, NL_CRASH_DUMP_FILE); + report(progname + shortExc, subject, _Reason, NL_CRASH_DUMP_FILE, true, !isCrashAlreadyReported(), ReportAbort); + // TODO: Does this need to be synchronous? Why does this not handle the report result? // no more sent mail for crash setCrashAlreadyReported(true); diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index 86fc1d726..273ebf111 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -688,37 +688,33 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m // yoyo: allow only to send the crash report once. Because users usually click ignore, // which create noise into list of bugs (once a player crash, it will surely continues to do it). std::string filename = getLogDirectory() + NL_CRASH_DUMP_FILE; + + TReportResult reportResult = report(args.ProcessName + " NeL " + toString(logTypeToString(args.LogType, true)), + subject, body, filename, NL_REPORT_SYNCHRONOUS, !isCrashAlreadyReported(), NL_REPORT_DEFAULT); - if (ReportDebug == report (args.ProcessName + " NeL " + toString(logTypeToString(args.LogType, true)), "", subject, body, true, 2, true, 1, !isCrashAlreadyReported(), IgnoreNextTime, filename.c_str())) + switch (reportResult) { + case ReportAlwaysIgnore: + IgnoreNextTime = true; + break; + case ReportBreak: INelContext::getInstance().setDebugNeedAssert(true); + break; + case ReportAbort: +# ifdef NL_OS_WINDOWS +# ifndef NL_COMP_MINGW + // disable the Windows popup telling that the application aborted and disable the dr watson report. + _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); +# endif +# endif + abort(); + break; } // no more sent mail for crash setCrashAlreadyReported(true); } - -/* // Check the envvar NEL_IGNORE_ASSERT - if (getenv ("NEL_IGNORE_ASSERT") == NULL) - { - // Ask the user to continue, debug or ignore - int result = MessageBox (NULL, ss2.str().c_str (), logTypeToString(args.LogType, true), MB_ABORTRETRYIGNORE | MB_ICONSTOP); - if (result == IDABORT) - { - // Exit the program now - exit (EXIT_FAILURE); - } - else if (result == IDRETRY) - { - // Give the debugger a try - DebugNeedAssert = true; - } - else if (result == IDIGNORE) - { - // Continue, do nothing - } - } -*/ } + } //#endif } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 8c58234cf..96ad2fac9 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -16,6 +16,7 @@ #include "stdmisc.h" +#include #include #include "nel/misc/common.h" diff --git a/code/nel/src/net/service.cpp b/code/nel/src/net/service.cpp index f42806245..a37370b17 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.cpp @@ -606,7 +606,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName, ListeningPort = servicePort; - setReportEmailFunction ((void*)sendEmail); + // setReportEmailFunction ((void*)sendEmail); // setDefaultEmailParams ("gw.nevrax.com", "", "cado@nevrax.com"); From ee32b56d8704d59f5622a1d9012f08c841f6c239 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 19:07:25 +0100 Subject: [PATCH 149/175] Replace report functionality --HG-- branch : feature-crashreport --- code/nel/src/misc/report.cpp | 457 +++++++++++------------------------ 1 file changed, 146 insertions(+), 311 deletions(-) diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index 96ad2fac9..b388dfb31 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -24,363 +24,198 @@ #include "nel/misc/report.h" #include "nel/misc/path.h" - -#ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW -# define NOMINMAX -# endif -# include -# include -# include -#endif // NL_OS_WINDOWS - -#define NL_NO_DEBUG_FILES 1 - -using namespace std; +#include "nel/misc/file.h" #ifdef DEBUG_NEW #define new DEBUG_NEW #endif -namespace NLMISC -{ - -void setReportEmailFunction(void *emailFunction) -{ - // DEPRECATED - // no-op -} - -// Contents of crash report -static string ReportBody; -// Host url for crash report -static std::string ReportPostUrl = ""; -// Title for the crash report window -static std::string ReportWindowTitle = ""; +#define NL_REPORT_POST_URL_ENVVAR "NL_REPORT_POST_URL" +#ifdef NL_OS_WINDOWS +#define NL_CRASH_REPORT_TOOL "crash_report.exe" +#else +#define NL_CRASH_REPORT_TOOL "crash_report" +#endif +#define NL_DEBUG_REPORT 0 +// Set to 1 if you want command line report tool +#define NL_REPORT_CONSOLE 0 +// Set to 1 if you want command line report tool even when the debugger is present +#define NL_REPORT_CONSOLE_DEBUGGER 1 -void setReportPostUrl(const std::string &postUrl) +namespace NLMISC { - ReportPostUrl = postUrl; -} -// Launch the crash report application -static void doSendReport() +void setReportPostUrl(const char *postUrl) { - std::string filename; - - filename = /*getLogDirectory() + */ "report_"; // FIXME: Should use log directory - filename += NLMISC::toString( int( time( NULL ) ) ); - filename += ".txt"; - - std::stringstream params; - params << "-log "; - params << filename; // FIXME: Escape the filepath with quotes - if (!ReportPostUrl.empty()) - { - params << " -host "; - params << ReportPostUrl; - } - if (!ReportWindowTitle.empty()) - { - params << " -title "; - params << ReportWindowTitle; // FIXME: Escape the title with quotes and test - } - - std::ofstream f; - f.open( filename.c_str() ); - if( !f.good() ) - return; - - f << ReportBody; - - f.close(); - +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised()) + nldebug("Set report post url to '%s'", postUrl); +#endif #ifdef NL_OS_WINDOWS - NLMISC::launchProgram( "crash_report.exe", params.str() ); + SetEnvironmentVariableA(NL_REPORT_POST_URL_ENVVAR, postUrl); #else - NLMISC::launchProgram( "crash_report", params.str() ); + setenv(NL_REPORT_POST_URL_ENVVAR, postUrl, 1); #endif - - // Added because NLSMIC::launcProgram needs time to launch - nlSleep( 2 * 1000 ); - } -#if defined(FINAL_VERSION) || !defined(NL_OS_WINDOWS) - -// For FINAL_VERSION, simply launch the crash report and exit the application -TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) +inline const char *getReportPostURL() { - ReportWindowTitle = title.empty() ? "Nel Crash Report" : title; - ReportBody = addSlashR(body); - - doSendReport(); - -# if defined(FINAL_VERSION) // TODO: This behaviour is used in the old report code when Quitting the application is the default crash report behaviour. Needs testing. -# ifdef NL_OS_WINDOWS -# ifndef NL_COMP_MINGW - // disable the Windows popup telling that the application aborted and disable the dr watson report. - _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); -# endif -# endif - // quit without calling atexit or static object dtors. - abort(); -# endif - - return ReportQuit; -} - +#ifdef NL_OS_WINDOWS + static char buf[512]; + buf[0] = '\0'; + int res = GetEnvironmentVariableA(NL_REPORT_POST_URL_ENVVAR, buf, sizeof(buf)); + if (res <= 0 || res > 511) return NULL; + if (buf[0] == '\0') return NULL; + return buf; #else - -// Windows specific version for DEV builds, first shows a dialog box for debugging - -static HWND sendReport=NULL; -#define DELETE_OBJECT(a) if((a)!=NULL) { DeleteObject (a); a = NULL; } - -static HWND checkIgnore = NULL; -static HWND debug = NULL; -static HWND ignore = NULL; -static HWND quit = NULL; -static HWND dialog = NULL; - -static bool NeedExit; -static TReportResult Result; -static bool IgnoreNextTime; -static bool CanSendMailReport = false; - -static bool DebugDefaultBehavior, QuitDefaultBehavior; - -static void maybeSendReport() -{ - if (CanSendMailReport && SendMessage(sendReport, BM_GETCHECK, 0, 0) != BST_CHECKED) - { - doSendReport(); -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_sent"); -#endif - } - else - { -#ifndef NL_NO_DEBUG_FILES - CFile::createEmptyFile(getLogDirectory() + "report_refused"); + char *res = getenv(NL_REPORT_POST_URL_ENVVAR); + if (res == NULL || res[0] == '\0') return NULL; + return res; #endif -- } } -static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +TReportResult report(const std::string &title, const std::string &subject, const std::string &body, const std::string &attachment, bool synchronous, bool sendReport, TReportResult defaultResult) { - //MSGFILTER *pmf; - - if (message == WM_COMMAND && HIWORD(wParam) == BN_CLICKED) + std::string reportPath; + if (!body.empty()) { - if ((HWND) lParam == checkIgnore) - { - IgnoreNextTime = !IgnoreNextTime; - } - else if ((HWND) lParam == debug) - { - maybeSendReport(); - NeedExit = true; - Result = ReportDebug; - if (DebugDefaultBehavior) - { - NLMISC_BREAKPOINT; - } - } - else if ((HWND) lParam == ignore) - { - maybeSendReport(); - NeedExit = true; - Result = ReportIgnore; - } - else if ((HWND) lParam == quit) + std::stringstream reportFile; + reportFile << getLogDirectory(); + reportFile << "nel_report_"; + reportFile << (int)time(NULL); + reportFile << ".log"; + reportPath = CFile::findNewFile(reportFile.str()); + std::ofstream f; + f.open(reportPath.c_str()); + if (!f.good()) { - maybeSendReport(); - NeedExit = true; - Result = ReportQuit; - - if (QuitDefaultBehavior) - { - // ace: we cannot call exit() because it's call the static object dtor and can crash the application - // if the dtor call order is not good. - //exit(EXIT_SUCCESS); -#ifdef NL_OS_WINDOWS -#ifndef NL_COMP_MINGW - // disable the Windows popup telling that the application aborted and disable the dr watson report. - _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); -#endif +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised()) + nldebug("Failed to write report log to '%s'", reportPath.c_str()); #endif - // quit without calling atexit or static object dtors. - abort(); - } + reportPath.clear(); } - } - else if (message == WM_CHAR) - { - if (wParam == 27) + else { - // ESC -> ignore - maybeSendReport(); - NeedExit = true; - Result = ReportIgnore; + f << body; + f.close(); } } - return DefWindowProc(hWnd, message, wParam, lParam); -} - -TReportResult report(const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) -{ - // register the window - static bool AlreadyRegister = false; - if (!AlreadyRegister) + if (INelContext::isContextInitialised() + && INelContext::getInstance().isWindowedApplication() + && CFile::isExists(NL_CRASH_REPORT_TOOL)) { - WNDCLASSW wc; - memset (&wc,0,sizeof(wc)); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = (WNDPROC)WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursor(NULL,IDC_ARROW); - wc.hbrBackground = (HBRUSH)COLOR_WINDOW; - wc.lpszClassName = L"NLReportWindow"; - wc.lpszMenuName = NULL; - if (!RegisterClassW(&wc)) return ReportError; - AlreadyRegister = true; - } + std::stringstream params; + params << NL_CRASH_REPORT_TOOL; - ReportWindowTitle = title.empty() ? "Nel Crash Report" : title; - ucstring formatedTitle = ucstring::makeFromUtf8(ReportWindowTitle); + if (!reportPath.empty()) + params << " -log \"" << reportPath << "\""; - // create the window - dialog = CreateWindowW (L"NLReportWindow", (LPCWSTR)formatedTitle.c_str(), WS_DLGFRAME | WS_CAPTION /*| WS_THICKFRAME*/, CW_USEDEFAULT, CW_USEDEFAULT, 456, 400, NULL, NULL, GetModuleHandle(NULL), NULL); + if (!subject.empty()) + params << " -attachment \"" << attachment << "\""; - // create the font - HFONT font = CreateFont (-12, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"); + if (!title.empty()) + params << " -title \"" << title << "\""; - // create the edit control - HWND edit = CreateWindowW (L"EDIT", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_READONLY | ES_LEFT | ES_MULTILINE, 7, 70, 429, 212, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (edit, WM_SETFONT, (WPARAM) font, TRUE); + if (!subject.empty()) + params << " -subject \"" << subject << "\""; - // set the edit text limit to lot of :) - SendMessage (edit, EM_LIMITTEXT, ~0U, 0); + const char *reportPostUrl = getReportPostURL(); + if (reportPostUrl) + params << " -host \"" << reportPostUrl << "\""; - ReportBody = addSlashR(body); + if (synchronous) + params << " -dev"; - // set the message in the edit text - SendMessage (edit, WM_SETTEXT, (WPARAM)0, (LPARAM)ReportBody.c_str()); + if (sendReport) + params << " -sendreport"; - if (enableCheckIgnore) - { - // create the combo box control - checkIgnore = CreateWindowW (L"BUTTON", L"Don't display this report again", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | BS_CHECKBOX, 7, 290, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (checkIgnore, WM_SETFONT, (WPARAM) font, TRUE); + std::string paramsStr = params.str(); - if(ignoreNextTime) + if (synchronous) { - SendMessage (checkIgnore, BM_SETCHECK, BST_CHECKED, 0); + TReportResult result = (TReportResult)::system(paramsStr.c_str()); + if (result != ReportAlwaysIgnore + && result != ReportIgnore + && result != ReportAbort + && result != ReportBreak) + { +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised()) + nldebug("Return default result, invalid return code %i", (int)result); +#endif + return defaultResult; + } + return result; + } + else + { + NLMISC::launchProgram(NL_CRASH_REPORT_TOOL, paramsStr); // FIXME: Don't use this function, it uses logging, etc, so may loop infinitely! + return defaultResult; } - } - - // create the debug button control - debug = CreateWindowW (L"BUTTON", L"Debug", WS_CHILD | WS_VISIBLE, 7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (debug, WM_SETFONT, (WPARAM) font, TRUE); - - if (debugButton == 0) - EnableWindow(debug, FALSE); - - // create the ignore button control - ignore = CreateWindowW (L"BUTTON", L"Ignore", WS_CHILD | WS_VISIBLE, 75+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (ignore, WM_SETFONT, (WPARAM) font, TRUE); - - if (ignoreButton == 0) - EnableWindow(ignore, FALSE); - - // create the quit button control - quit = CreateWindowW (L"BUTTON", L"Quit", WS_CHILD | WS_VISIBLE, 75+75+7+7+7, 315, 75, 25, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (quit, WM_SETFONT, (WPARAM) font, TRUE); - - if (quitButton == 0) - EnableWindow(quit, FALSE); - - // create the debug button control - sendReport = CreateWindowW (L"BUTTON", L"Don't send the report", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 7, 315+32, 429, 18, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (sendReport, WM_SETFONT, (WPARAM) font, TRUE); - - string formatedHeader; - if (header.empty()) - { - formatedHeader = "This application stopped to display this report."; } else { - formatedHeader = header; - } - - // ace don't do that because it s slow to try to send a mail - CanSendMailReport = sendReportButton && !ReportPostUrl.empty(); - - if (CanSendMailReport) - formatedHeader += " Send report will only email the contents of the box below. Please, send it to help us (it could take few minutes to send the email, be patient)."; - else - EnableWindow(sendReport, FALSE); - - ucstring uc = ucstring::makeFromUtf8(formatedHeader); - - // create the label control - HWND label = CreateWindowW (L"STATIC", (LPCWSTR)uc.c_str(), WS_CHILD | WS_VISIBLE /*| SS_WHITERECT*/, 7, 7, 429, 51, dialog, (HMENU) NULL, (HINSTANCE) GetWindowLongPtr(dialog, GWLP_HINSTANCE), NULL); - SendMessage (label, WM_SETFONT, (WPARAM) font, TRUE); - - - DebugDefaultBehavior = debugButton==1; - QuitDefaultBehavior = quitButton==1; - - IgnoreNextTime = ignoreNextTime; - - // show until the cursor really show :) - while (ShowCursor(TRUE) < 0) - ; - - SetWindowPos (dialog, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); - - SetFocus(dialog); - SetForegroundWindow(dialog); - - NeedExit = false; - - while(!NeedExit) - { - MSG msg; - while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) +#if NL_DEBUG_REPORT + if (INelContext::isContextInitialised() && !CFile::isExists(NL_CRASH_REPORT_TOOL)) + nldebug("Crash report tool '%s' does not exist", NL_CRASH_REPORT_TOOL); +#endif +#if defined(NL_OS_WINDOWS) && !FINAL_VERSION && !NL_REPORT_CONSOLE_DEBUGGER + if (IsDebuggerPresent()) + { + return defaultResult; + } + else +#endif + if (synchronous) + { +#if NL_REPORT_CONSOLE + // An interactive console based report + printf("\n"); + if (!title.empty()) + printf("%s\n", title.c_str()); + else + printf("NeL report\n"); + printf("\n"); + if (!subject.empty()) + printf("\tsubject: '%s'\n", subject.c_str()); + if (!body.empty()) + printf("\tbody: '%s'\n", reportPath.c_str()); + if (!attachment.empty()) + printf("\tattachment: '%s'\n", attachment.c_str()); + for (;;) + { + printf("\n"); + printf("Always Ignore (S), Ignore (I), Abort (A), Break (B)?\n"); // S for Surpress + printf("> "); + int c = getchar(); + getchar(); + switch (c) + { + case 'S': + case 's': + return ReportAlwaysIgnore; + case 'I': + case 'i': + return ReportIgnore; + case 'A': + case 'a': + return ReportAbort; + case 'B': + case 'b': + return ReportBreak; + } + } +#else + return defaultResult; +#endif + } + else { - TranslateMessage(&msg); - DispatchMessageW(&msg); + return defaultResult; } - nlSleep (1); } - - // set the user result - ignoreNextTime = IgnoreNextTime; - - ShowWindow(dialog, SW_HIDE); - - - - DELETE_OBJECT(sendReport) - DELETE_OBJECT(quit) - DELETE_OBJECT(ignore) - DELETE_OBJECT(debug) - DELETE_OBJECT(checkIgnore) - DELETE_OBJECT(edit) - DELETE_OBJECT(label) - DELETE_OBJECT(dialog) - - return Result; } -#endif - - } // NLMISC From 29f42ed5abad64515560dbffe1782eb2a6cc5ffa Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 21:07:12 +0100 Subject: [PATCH 150/175] Some practical improvements for the report handling --HG-- branch : develop --- code/nel/include/nel/misc/common.h | 2 +- code/nel/include/nel/misc/system_utils.h | 4 ++++ code/nel/src/misc/common.cpp | 11 +++++++---- code/nel/src/misc/debug.cpp | 5 ++--- code/nel/src/misc/report.cpp | 9 ++++++--- code/nel/src/misc/system_utils.cpp | 10 ++++++++++ 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 26458a540..c2a40cc0f 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -347,7 +347,7 @@ std::string formatThousands(const std::string& s); /// This function executes a program in the background and returns instantly (used for example to launch services in AES). /// The program will be launched in the current directory -bool launchProgram (const std::string &programName, const std::string &arguments); +bool launchProgram (const std::string &programName, const std::string &arguments, bool log = true); /// This function kills a program using his pid (on unix, it uses the kill() POSIX function) bool killProgram(uint32 pid); diff --git a/code/nel/include/nel/misc/system_utils.h b/code/nel/include/nel/misc/system_utils.h index 9b3c5a971..78fd011c6 100644 --- a/code/nel/include/nel/misc/system_utils.h +++ b/code/nel/include/nel/misc/system_utils.h @@ -77,6 +77,10 @@ public: /// Get desktop current color depth without using UDriver. static uint getCurrentColorDepth(); + + /// Detect whether the current process is a windowed application. Return true if definitely yes, false if unknown + static bool detectWindowedApplication(); + }; } // NLMISC diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 671879f2e..8183430f1 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -667,7 +667,7 @@ bool abortProgram(uint32 pid) #endif } -bool launchProgram (const std::string &programName, const std::string &arguments) +bool launchProgram(const std::string &programName, const std::string &arguments, bool log) { #ifdef NL_OS_WINDOWS @@ -719,7 +719,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments { LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); - nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), GetLastError (), lpMsgBuf); + if (log) + nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), GetLastError(), lpMsgBuf); LocalFree(lpMsgBuf); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); @@ -776,7 +777,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments if (status == -1) { char *err = strerror (errno); - nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err); + if (log) + nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err); } else if (status == 0) { @@ -796,7 +798,8 @@ bool launchProgram (const std::string &programName, const std::string &arguments return true; } #else - nlwarning ("LAUNCH: launchProgram() not implemented"); + if (log) + nlwarning ("LAUNCH: launchProgram() not implemented"); #endif return false; diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 747d12129..798161a21 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -53,6 +53,7 @@ #include "nel/misc/path.h" #include "nel/misc/variable.h" #include "nel/misc/system_info.h" +#include "nel/misc/system_utils.h" #define NL_NO_DEBUG_FILES 1 @@ -1223,10 +1224,8 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) #endif // LOG_IN_FILE DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD"); -#ifdef NL_OS_WINDOWS - if (GetConsoleWindow() == NULL) + if (NLMISC::CSystemUtils::detectWindowedApplication()) INelContext::getInstance().setWindowedApplication(true); -#endif initDebug2(logInFile); diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index b388dfb31..ef3280ef5 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -25,6 +25,7 @@ #include "nel/misc/report.h" #include "nel/misc/path.h" #include "nel/misc/file.h" +#include "nel/misc/system_utils.h" #ifdef DEBUG_NEW #define new DEBUG_NEW @@ -102,8 +103,9 @@ TReportResult report(const std::string &title, const std::string &subject, const } } - if (INelContext::isContextInitialised() - && INelContext::getInstance().isWindowedApplication() + if (((INelContext::isContextInitialised() + && INelContext::getInstance().isWindowedApplication()) + || CSystemUtils::detectWindowedApplication()) && CFile::isExists(NL_CRASH_REPORT_TOOL)) { std::stringstream params; @@ -151,7 +153,8 @@ TReportResult report(const std::string &title, const std::string &subject, const } else { - NLMISC::launchProgram(NL_CRASH_REPORT_TOOL, paramsStr); // FIXME: Don't use this function, it uses logging, etc, so may loop infinitely! + NLMISC::launchProgram(NL_CRASH_REPORT_TOOL, paramsStr, + NL_DEBUG_REPORT ? INelContext::isContextInitialised() : false); // Only log if required, avoid infinite loop return defaultResult; } } diff --git a/code/nel/src/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index e298f941c..bb1111b88 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.cpp @@ -355,4 +355,14 @@ uint CSystemUtils::getCurrentColorDepth() return depth; } +/// Detect whether the current process is a windowed application. Return true if definitely yes, false if unknown +bool CSystemUtils::detectWindowedApplication() +{ +#ifdef NL_OS_WINDOWS + if (GetConsoleWindow() == NULL) + return true; +#endif + return false; +} + } // NLMISC From 28bcfeb01c93a71bb85f4d27c40e76bc94891847 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 21:15:09 +0100 Subject: [PATCH 151/175] Flag windowed application when attempting window creation using 3D driver --HG-- branch : develop --- code/nel/src/3d/driver/direct3d/driver_direct3d.cpp | 4 ++++ code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 2ce747105..8a7be80d2 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1327,6 +1327,10 @@ const D3DFORMAT FinalPixelFormat[ITexture::UploadFormatCount][CDriverD3D::FinalP bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay) { H_AUTO_D3D(CDriver3D_setDisplay); + + if (!mode.OffScreen) + NLMISC::INelContext::getInstance().setWindowedApplication(true); + if (!_D3D) return false; #ifndef NL_NO_ASM diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 5c6cecab9..943371fd9 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -603,6 +603,9 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re { H_AUTO_OGL(CDriverGL_setDisplay) + if (!mode.OffScreen) + NLMISC::INelContext::getInstance().setWindowedApplication(true); + _win = EmptyWindow; _CurrentMode = mode; From 3c120cd398c10f78d622e06af49c413f20a227b9 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 21:17:20 +0100 Subject: [PATCH 152/175] Flag studio as windowed application --HG-- branch : develop --- code/studio/src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/studio/src/main.cpp b/code/studio/src/main.cpp index dc1e7efb6..e126e258a 100644 --- a/code/studio/src/main.cpp +++ b/code/studio/src/main.cpp @@ -120,6 +120,7 @@ int main(int argc, char **argv) { // use log.log if NEL_LOG_IN_FILE and NLQT_USE_LOG_LOG defined as 1 NLMISC::createDebug(NULL, NLQT_USE_LOG_LOG, false); + NLMISC::INelContext::getInstance().setWindowedApplication(true); #if NLQT_USE_LOG // create NLQT_LOG_FILE // filedisplayer only deletes the 001 etc From 5a297ddbe473872452d7f953a372ad80af14d2e5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 21:20:01 +0100 Subject: [PATCH 153/175] Flag max plugins as windowed --HG-- branch : develop --- .../tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp | 1 + code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp index da04de211..76592f556 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.cpp @@ -68,6 +68,7 @@ NEL_3DSMAX_SHARED_API NLMISC::INelContext &GetSharedNelContext() { new NLMISC::CApplicationContext(); NLMISC::createDebug(); + NLMISC::INelContext::getInstance().setWindowedApplication(true); } return NLMISC::INelContext::getInstance(); } diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp index 7bc128706..c5457786e 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_script.cpp @@ -957,6 +957,7 @@ protected: Value* force_quit_on_msg_displayer_cf(Value** arg_list, int count) { nlwarning("Enable force quit on NeL report msg displayer"); + NLMISC::INelContext::getInstance().setWindowedApplication(false); // disable the Windows popup telling that the application aborted and disable the dr watson report. _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); putenv("NEL_IGNORE_ASSERT=1"); From d788d224d5e0c819e5ac7e9c78f795ab41a3fa46 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 6 Mar 2015 23:39:53 +0100 Subject: [PATCH 154/175] EOL --HG-- branch : develop --- code/web/public_php/ams/templates/layout.tpl | 634 +++++++++---------- 1 file changed, 317 insertions(+), 317 deletions(-) diff --git a/code/web/public_php/ams/templates/layout.tpl b/code/web/public_php/ams/templates/layout.tpl index 33dbf3be0..9bcaa83e6 100644 --- a/code/web/public_php/ams/templates/layout.tpl +++ b/code/web/public_php/ams/templates/layout.tpl @@ -1,317 +1,317 @@ - - - - - - {$ams_title} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} - - {/if} -
-
- {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} - - - - - - -
- - {/if} - - {if isset($no_visible_elements) and $no_visible_elements eq "TRUE"} - -
- - -
- - {/if} - - {block name=content}{/block} - {if isset($hook_info)} -
- {foreach from=$hook_info key=arrkey item=element} - {if isset($smarty.get.page) and $smarty.get.page eq 'layout_plugin' and $smarty.get.name eq $arrkey} - {include file=$hook_info[$smarty.get.name]['TemplatePath']} - {/if} - {/foreach} -
- {/if} - - - {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} -
- {/if} -
- {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} -
- - - -
- {if $permission > 1}

AMS 0.11.0 Powered by: Charisma

{/if} -
- {/if} -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + {$ams_title} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} + + {/if} +
+
+ {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} + + + + + + +
+ + {/if} + + {if isset($no_visible_elements) and $no_visible_elements eq "TRUE"} + +
+ + +
+ + {/if} + + {block name=content}{/block} + {if isset($hook_info)} +
+ {foreach from=$hook_info key=arrkey item=element} + {if isset($smarty.get.page) and $smarty.get.page eq 'layout_plugin' and $smarty.get.name eq $arrkey} + {include file=$hook_info[$smarty.get.name]['TemplatePath']} + {/if} + {/foreach} +
+ {/if} + + + {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} +
+ {/if} +
+ {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} +
+ + + +
+ {if $permission > 1}

AMS 0.11.0 Powered by: Charisma

{/if} +
+ {/if} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 80874abf68bfd725dbb10af5795c4817109c36f2 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 24 Mar 2015 15:26:34 +0100 Subject: [PATCH 155/175] Fixed compilation (setReportEmailFunction doesn't exist anymore) --HG-- branch : develop --- code/ryzom/client/src/bug_report/bug_reportDlg.cpp | 4 ++-- code/ryzom/client/src/client.cpp | 6 +++--- code/ryzom/client/src/init.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/bug_report/bug_reportDlg.cpp b/code/ryzom/client/src/bug_report/bug_reportDlg.cpp index 21ab0cfb4..fce9975d0 100644 --- a/code/ryzom/client/src/bug_report/bug_reportDlg.cpp +++ b/code/ryzom/client/src/bug_report/bug_reportDlg.cpp @@ -389,8 +389,8 @@ END_MESSAGE_MAP() BOOL CBug_reportDlg::OnInitDialog() { - setReportEmailFunction ((void*)sendEmail); - setDefaultEmailParams ("gw.nevrax.com", "", "lecroart@nevrax.com"); + // setReportEmailFunction ((void*)sendEmail); + // setDefaultEmailParams ("gw.nevrax.com", "", "lecroart@nevrax.com"); CDialog::OnInitDialog(); diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 1b4285dd5..d3bb5254e 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -436,9 +436,9 @@ int main(int argc, char **argv) // Set default email value for reporting error #ifdef TEST_CRASH_COUNTER - //initCrashReport (); - setReportEmailFunction ((void*)sendEmail); - setDefaultEmailParams ("smtp.nevrax.com", "", "hulud@nevrax.com"); + // initCrashReport (); + // setReportEmailFunction ((void*)sendEmail); + // setDefaultEmailParams ("smtp.nevrax.com", "", "hulud@nevrax.com"); if (string(cmdline) == "/crash") volatile int toto = *(int*)0; diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 5484141a2..a6883eacd 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -846,8 +846,8 @@ void prelogInit() FPU_CHECKER_ONCE // Set default email value for reporting error - setReportEmailFunction ((void*)sendEmail); - setDefaultEmailParams ("smtp.nevrax.com", "", "ryzombug@nevrax.com"); + // setReportEmailFunction ((void*)sendEmail); + // setDefaultEmailParams ("smtp.nevrax.com", "", "ryzombug@nevrax.com"); // create the save dir. if (!CFile::isExists("save")) CFile::createDirectory("save"); From d76d8e52c984701bdc1fe5c8b05f036365ef42b9 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 24 Mar 2015 15:51:32 +0100 Subject: [PATCH 156/175] Fixed compilation with GCC --HG-- branch : hotfix --- code/nel/include/nel/misc/string_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index 4a455247d..d6f7eec70 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -20,6 +20,7 @@ #include "types_nl.h" #include +#include #include #include From e0d4aa1e7b014ced152ce16c71e9f57180d42935 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 03:14:06 +0200 Subject: [PATCH 157/175] Add Wang hash functions --HG-- branch : develop --- code/nel/include/nel/misc/wang_hash.h | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 code/nel/include/nel/misc/wang_hash.h diff --git a/code/nel/include/nel/misc/wang_hash.h b/code/nel/include/nel/misc/wang_hash.h new file mode 100644 index 000000000..b3069b92f --- /dev/null +++ b/code/nel/include/nel/misc/wang_hash.h @@ -0,0 +1,74 @@ +// Public domain hash functions + +#ifndef NLMISC_WANG_HASH_H +#define NLMISC_WANG_HASH_H + +#include "types_nl.h" + +namespace NLMISC { + +// http://burtleburtle.net/bob/hash/integer.html +inline uint32 wangHash(uint32 a) +{ + a = (a ^ 61) ^ (a >> 16); + a = a + (a << 3); + a = a ^ (a >> 4); + a = a * 0x27d4eb2d; + a = a ^ (a >> 15); + return a; +} + +// http://naml.us/blog/2012/03 +inline uint64 wangHash64(uint64 key) +{ + key = (~key) + (key << 21); // key = (key << 21) - key - 1; + key = key ^ (key >> 24); + key = (key + (key << 3)) + (key << 8); // key * 265 + key = key ^ (key >> 14); + key = (key + (key << 2)) + (key << 4); // key * 21 + key = key ^ (key >> 28); + key = key + (key << 31); + return key; +} + +// http://naml.us/blog/2012/03 Inverse 64-bit wang hash +inline uint64 wangHash64Inv(uint64 key) +{ + uint64 tmp; + + // Invert key = key + (key << 31) + tmp = key - (key << 31); + key = key - (tmp << 31); + + // Invert key = key ^ (key >> 28) + tmp = key^key >> 28; + key = key^tmp >> 28; + + // Invert key *= 21 + key *= 14933078535860113213u; + + // Invert key = key ^ (key >> 14) + tmp = key^key >> 14; + tmp = key^tmp >> 14; + tmp = key^tmp >> 14; + key = key^tmp >> 14; + + // Invert key *= 265 + key *= 15244667743933553977u; + + // Invert key = key ^ (key >> 24) + tmp = key^key >> 24; + key = key^tmp >> 24; + + // Invert key = (~key) + (key << 21) + tmp = ~key; + tmp = ~(key - (tmp << 21)); + tmp = ~(key - (tmp << 21)); + key = ~(key - (tmp << 21)); + + return key; +} + +} /* namespace NLMISC */ + +#endif // NLMISC_WANG_HASH_H From c760b1e3d9309092247b1108fd13939494f876b3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 29 Mar 2015 17:28:33 +0300 Subject: [PATCH 158/175] Add embolden, oblique font styles (NL3D) --HG-- branch : develop --- code/nel/include/nel/3d/font_generator.h | 4 +++- code/nel/include/nel/3d/font_manager.h | 8 +++++++ code/nel/include/nel/3d/text_context.h | 22 ++++++++++++++----- code/nel/include/nel/3d/text_context_user.h | 4 ++++ code/nel/include/nel/3d/texture_font.h | 4 ++++ code/nel/include/nel/3d/u_text_context.h | 18 ++++++++++++++++ code/nel/src/3d/font_generator.cpp | 15 +++++++++++-- code/nel/src/3d/font_manager.cpp | 12 ++++++++++- code/nel/src/3d/ps_util.cpp | 2 ++ code/nel/src/3d/text_context.cpp | 6 ++++-- code/nel/src/3d/text_context_user.cpp | 24 +++++++++++++++++++++ code/nel/src/3d/texture_font.cpp | 19 +++++++++++----- 12 files changed, 122 insertions(+), 16 deletions(-) diff --git a/code/nel/include/nel/3d/font_generator.h b/code/nel/include/nel/3d/font_generator.h index 36dbf309a..5a07733a0 100644 --- a/code/nel/include/nel/3d/font_generator.h +++ b/code/nel/include/nel/3d/font_generator.h @@ -54,11 +54,13 @@ public: /** generate and return a bitmap * \param c the unicode char * \param size size of the generated font in ??? format + * \param embolden set embolden style (bold) + * \param oblique set oblique style (slanted, italic) * \param width width of the generated bitmap, this value is set by this function * \param height height of the generated bitmap, this value is set by this function * \param pitch pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function */ - uint8 *getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex); + uint8 *getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex); /** returns the width and height of a character using a specific size and * diff --git a/code/nel/include/nel/3d/font_manager.h b/code/nel/include/nel/3d/font_manager.h index 41bb935e5..26ea02ce0 100644 --- a/code/nel/include/nel/3d/font_manager.h +++ b/code/nel/include/nel/3d/font_manager.h @@ -102,6 +102,8 @@ public: * \param fontGen font generator * \param color primitive blocks color * \param fontSize font size + * \param embolden font style bold + * \param oblique font style slanted (italic) * \param desc display descriptor (screen size, font ratio) * \param output computed string * \param keep800x600Ratio true if you want that CFontManager look at Driver window size, and resize fontSize so it keeps same size... @@ -110,6 +112,8 @@ public: CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString& output, bool keep800x600Ratio= true); @@ -121,6 +125,8 @@ public: CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio= true); @@ -132,6 +138,8 @@ public: CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio= true); diff --git a/code/nel/include/nel/3d/text_context.h b/code/nel/include/nel/3d/text_context.h index 8cf7ad7f0..156ea9f79 100644 --- a/code/nel/include/nel/3d/text_context.h +++ b/code/nel/include/nel/3d/text_context.h @@ -74,6 +74,10 @@ public: void setFontSize (uint32 fontSize) { _FontSize = fontSize; } + void setEmbolden (bool b) { _Embolden = b; } + + void setOblique (bool b) { _Oblique = b; } + void setHotSpot (CComputedString::THotSpot hotSpot) { _HotSpot = hotSpot; } void setScaleX (float scaleX) { _ScaleX = scaleX; } @@ -101,6 +105,10 @@ public: uint32 getFontSize () const { return _FontSize; } + bool getEmbolden () const { return _Embolden; } + + bool getOblique () const { return _Oblique; } + CComputedString::THotSpot getHotSpot() const { return _HotSpot; } float getScaleX() const { return _ScaleX; } @@ -240,7 +248,7 @@ public: nlassert(_FontGen); // compute the string just one time - _FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Driver, _TempString, _Keep800x600Ratio); + _FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio); // draw shaded if (_Shaded) @@ -279,7 +287,7 @@ public: // compute the string just one time char *str; NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); - _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Driver, _TempString, _Keep800x600Ratio); + _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio); // draw shaded if (_Shaded) @@ -334,7 +342,7 @@ public: */ void computeString (const std::string& s, CComputedString& output) { - _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); + _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); } /** @@ -345,12 +353,12 @@ public: */ void computeString (const ucstring& s, CComputedString& output) { - _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); + _FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); } void computeStringInfo (const ucstring& s, CComputedString& output) { - _FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Driver, output, _Keep800x600Ratio); + _FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); } /// Debug : write to the disk the texture cache @@ -381,6 +389,10 @@ private: /// Font size; uint32 _FontSize; + bool _Embolden; + + bool _Oblique; + /// Current text color NLMISC::CRGBA _Color; diff --git a/code/nel/include/nel/3d/text_context_user.h b/code/nel/include/nel/3d/text_context_user.h index 8e14dc878..b05238dbf 100644 --- a/code/nel/include/nel/3d/text_context_user.h +++ b/code/nel/include/nel/3d/text_context_user.h @@ -66,6 +66,10 @@ public: void setColor(NLMISC::CRGBA color); void setFontSize(uint32 fontSize); uint32 getFontSize() const; + void setEmbolden(bool b); + bool getEmbolden() const; + void setOblique(bool b); + bool getOblique() const; void setHotSpot(THotSpot hotSpot); THotSpot getHotSpot() const; void setScaleX(float scaleX); diff --git a/code/nel/include/nel/3d/texture_font.h b/code/nel/include/nel/3d/texture_font.h index 98e94c82f..3aeb77b65 100644 --- a/code/nel/include/nel/3d/texture_font.h +++ b/code/nel/include/nel/3d/texture_font.h @@ -43,6 +43,8 @@ public: ucchar Char; CFontGenerator *FontGenerator; sint Size; + bool Embolden; + bool Oblique; // The less recently used infos @@ -66,6 +68,8 @@ public: ucchar Char; CFontGenerator *FontGenerator; sint Size; + bool Embolden; + bool Oblique; uint32 getVal(); //bool operator < (const SLetterKey&k) const; diff --git a/code/nel/include/nel/3d/u_text_context.h b/code/nel/include/nel/3d/u_text_context.h index 1056d3839..0aa9ea2f9 100644 --- a/code/nel/include/nel/3d/u_text_context.h +++ b/code/nel/include/nel/3d/u_text_context.h @@ -137,6 +137,24 @@ public: * \return the font size */ virtual uint32 getFontSize () const = 0; + /** + * set embolden (bold) state + * \param embolden the embbolden state + */ + virtual void setEmbolden (bool b) = 0; + /** + * \return the embolden state + */ + virtual bool getEmbolden () const = 0; + /** + * set oblique (italic) state + * \param oblique the oblique state + */ + virtual void setOblique (bool b) = 0; + /** + * \return the oblique state + */ + virtual bool getOblique () const = 0; /** * set the hot spot * \param fonSize the font size diff --git a/code/nel/src/3d/font_generator.cpp b/code/nel/src/3d/font_generator.cpp index 0e268a0c2..3c73a0a20 100644 --- a/code/nel/src/3d/font_generator.cpp +++ b/code/nel/src/3d/font_generator.cpp @@ -31,6 +31,7 @@ using namespace std; #include #include FT_FREETYPE_H +#include FT_SYNTHESIS_H // for freetype 2.0 #ifdef FTERRORS_H @@ -171,7 +172,7 @@ void CFontGenerator::getSizes (ucchar c, uint32 size, uint32 &width, uint32 &hei height = _Face->glyph->metrics.height >> 6; } -uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) +uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) { FT_Error error; @@ -209,6 +210,16 @@ uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 & return NULL; } + if (embolden) + { + FT_GlyphSlot_Embolden(_Face->glyph); + } + + if (oblique) + { + FT_GlyphSlot_Oblique(_Face->glyph); + } + // convert to an anti-aliased bitmap error = FT_Render_Glyph (_Face->glyph, ft_render_mode_normal); if (error) @@ -389,7 +400,7 @@ void CFontGenerator::getSizes (ucchar c, uint32 size, uint32 &width, uint32 &hei HFONT hFont = NULL; uint32 CurrentFontSize = 0; -uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) +uint8 *CFontGenerator::getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex) { /* FT_Error error; diff --git a/code/nel/src/3d/font_manager.cpp b/code/nel/src/3d/font_manager.cpp index c589e934a..45a097b3b 100644 --- a/code/nel/src/3d/font_manager.cpp +++ b/code/nel/src/3d/font_manager.cpp @@ -64,6 +64,8 @@ void CFontManager::computeString (const std::string &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio) @@ -71,7 +73,7 @@ void CFontManager::computeString (const std::string &s, // static to avoid reallocation static ucstring ucs; ucs= s; - computeString(ucs, fontGen, color, fontSize, driver, output, keep800x600Ratio); + computeString(ucs, fontGen, color, fontSize, embolden, oblique, driver, output, keep800x600Ratio); } @@ -80,6 +82,8 @@ void CFontManager::computeString (const ucstring &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio) @@ -147,6 +151,8 @@ void CFontManager::computeString (const ucstring &s, k.Char = s[i]; k.FontGenerator = fontGen; k.Size = fontSize; + k.Embolden = embolden; + k.Oblique = oblique; CTextureFont::SLetterInfo *pLI = pTexFont->getLetterInfo (k); if(pLI != NULL) { @@ -227,6 +233,8 @@ void CFontManager::computeStringInfo ( const ucstring &s, CFontGenerator *fontGen, const NLMISC::CRGBA &color, uint32 fontSize, + bool embolden, + bool oblique, IDriver *driver, CComputedString &output, bool keep800x600Ratio ) @@ -259,6 +267,8 @@ void CFontManager::computeStringInfo ( const ucstring &s, k.Char = s[i]; k.FontGenerator = fontGen; k.Size = fontSize; + k.Embolden = embolden; + k.Oblique = oblique; pLI = pTexFont->getLetterInfo (k); if(pLI != NULL) { diff --git a/code/nel/src/3d/ps_util.cpp b/code/nel/src/3d/ps_util.cpp index 84e8c096a..a09108ed5 100644 --- a/code/nel/src/3d/ps_util.cpp +++ b/code/nel/src/3d/ps_util.cpp @@ -277,6 +277,8 @@ void CPSUtil::print(IDriver *driver, const std::string &text, CFontGenerator &fg &fg, col, 16, + false, + false, driver, cptedString); diff --git a/code/nel/src/3d/text_context.cpp b/code/nel/src/3d/text_context.cpp index 456ab77a6..1cca5145a 100644 --- a/code/nel/src/3d/text_context.cpp +++ b/code/nel/src/3d/text_context.cpp @@ -31,6 +31,8 @@ CTextContext::CTextContext() _FontGen = NULL; _FontSize = 12; + _Embolden = false; + _Oblique = false; _Color = NLMISC::CRGBA(0,0,0); @@ -81,7 +83,7 @@ uint32 CTextContext::textPush (const char *format, ...) // compute the string. uint32 index = _CacheFreePlaces[_CacheNbFreePlaces-1]; CComputedString &strToFill = _CacheStrings[index]; - _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Driver, strToFill, _Keep800x600Ratio); + _FontManager->computeString (str, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio); _CacheNbFreePlaces--; @@ -109,7 +111,7 @@ uint32 CTextContext::textPush (const ucstring &str) nlassert (index < _CacheStrings.size()); CComputedString &strToFill = _CacheStrings[index]; _FontManager->computeString (str, _FontGen, _Color - , _FontSize, _Driver, strToFill, _Keep800x600Ratio); + , _FontSize, _Embolden, _Oblique, _Driver, strToFill, _Keep800x600Ratio); _CacheNbFreePlaces--; diff --git a/code/nel/src/3d/text_context_user.cpp b/code/nel/src/3d/text_context_user.cpp index 6ee880d91..441d463f5 100644 --- a/code/nel/src/3d/text_context_user.cpp +++ b/code/nel/src/3d/text_context_user.cpp @@ -100,6 +100,30 @@ uint32 CTextContextUser::getFontSize() const return _TextContext.getFontSize(); } +void CTextContextUser::setEmbolden(bool b) +{ + H_AUTO2; + + _TextContext.setEmbolden(b); +} +bool CTextContextUser::getEmbolden() const +{ + H_AUTO2; + + return _TextContext.getEmbolden(); +} +void CTextContextUser::setOblique(bool b) +{ + H_AUTO2; + + _TextContext.setOblique(b); +} +bool CTextContextUser::getOblique() const +{ + H_AUTO2; + + return _TextContext.getOblique(); +} void CTextContextUser::setHotSpot(THotSpot hotSpot) { H_AUTO2; diff --git a/code/nel/src/3d/texture_font.cpp b/code/nel/src/3d/texture_font.cpp index f27705494..4e9e3a0a4 100644 --- a/code/nel/src/3d/texture_font.cpp +++ b/code/nel/src/3d/texture_font.cpp @@ -47,11 +47,14 @@ const int NbLine[TEXTUREFONT_NBCATEGORY] = { 4, 6, 4, 1 }; // Based on textsize // --------------------------------------------------------------------------- inline uint32 CTextureFont::SLetterKey::getVal() { - + // this limits Size to 6bits + // Large sizes already render wrong when many + // different glyphs are used due to limited texture atlas + uint8 eb = ((uint)Embolden) + ((uint)Oblique << 1); if (FontGenerator == NULL) - return Char + ((Size&255)<<16); + return Char + ((Size&255)<<16) + (eb << 22); else - return Char + ((Size&255)<<16) + ((FontGenerator->getUID()&0xFF)<<24); + return Char + ((Size&255)<<16) + (eb << 22) + ((FontGenerator->getUID()&0xFF)<<24); } // --------------------------------------------------------------------------- @@ -86,6 +89,8 @@ CTextureFont::CTextureFont() rLetter.Char = 0xffff; rLetter.FontGenerator = NULL; rLetter.Size= 0; + rLetter.Embolden = false; + rLetter.Oblique = false; // The less recently used infos if (j < Letters[i].size()-1) @@ -164,7 +169,7 @@ void CTextureFont::rebuildLetter (sint cat, sint x, sint y) sint posy = catTopY + y * Categories[cat]; uint32 pitch = 0; - uint8 *bitmap = rLetter.FontGenerator->getBitmap ( rLetter.Char, rLetter.Size, + uint8 *bitmap = rLetter.FontGenerator->getBitmap ( rLetter.Char, rLetter.Size, rLetter.Embolden, rLetter.Oblique, rLetter.CharWidth, rLetter.CharHeight, pitch, rLetter.Left, rLetter.Top, rLetter.AdvX, rLetter.GlyphIndex ); @@ -303,7 +308,7 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k) // \todo mat : Temp !!! Try to use freetype cache uint32 nPitch, nGlyphIndex; sint32 nLeft, nTop, nAdvX; - k.FontGenerator->getBitmap (k.Char, k.Size, width, height, nPitch, nLeft, nTop, + k.FontGenerator->getBitmap (k.Char, k.Size, k.Embolden, k.Oblique, width, height, nPitch, nLeft, nTop, nAdvX, nGlyphIndex ); // Add 1 pixel space for black border to get correct category @@ -323,6 +328,8 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k) k2.Char = Back[cat]->Char; k2.FontGenerator = Back[cat]->FontGenerator; k2.Size = Back[cat]->Size; + k2.Embolden = Back[cat]->Embolden; + k2.Oblique = Back[cat]->Oblique; itAccel = Accel.find (k2.getVal()); if (itAccel != Accel.end()) @@ -336,6 +343,8 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k) Back[cat]->Char = k.Char; Back[cat]->FontGenerator = k.FontGenerator; Back[cat]->Size = k.Size; + Back[cat]->Embolden = k.Embolden; + Back[cat]->Oblique = k.Oblique; Back[cat]->CharWidth = width; Back[cat]->CharHeight = height; Back[cat]->Top = nTop; From 1a5a0d5acbcf3dfb41a08ae35a78ca082514e22d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 16:58:07 +0200 Subject: [PATCH 159/175] Fix CHashCode compare operator --HG-- branch : develop --- code/ryzom/common/src/game_share/base_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/base_types.h b/code/ryzom/common/src/game_share/base_types.h index 5330537b7..f24daa69a 100644 --- a/code/ryzom/common/src/game_share/base_types.h +++ b/code/ryzom/common/src/game_share/base_types.h @@ -242,7 +242,7 @@ public: size_t operator () ( const TDataSetRow &index ) const { return index.getHashCode(); } - bool operator() (const TDataSetRow &index1, const TDataSetRow &index2) const { return index1.getHashCode() < index2.getHashCode(); } + bool operator() (const TDataSetRow &index1, const TDataSetRow &index2) const { return index1 < index2; } }; /// Warning: method to avoid (use it only when using rows as a static array) From ec307351982e30979e459ebcdbf6a67064eea696 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 16:58:07 +0200 Subject: [PATCH 160/175] Fixup some more hashes --HG-- branch : develop --- code/nel/include/nel/misc/entity_id.h | 6 +++++- code/nel/include/nel/misc/ucstring.h | 2 +- code/nel/include/nel/sound/context_sound.h | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/code/nel/include/nel/misc/entity_id.h b/code/nel/include/nel/misc/entity_id.h index b4e40909e..8c80daaba 100644 --- a/code/nel/include/nel/misc/entity_id.h +++ b/code/nel/include/nel/misc/entity_id.h @@ -580,7 +580,11 @@ struct CEntityIdHashMapTraits size_t operator() (const NLMISC::CEntityId &id ) const { uint64 hash64 = id.getUniqueId(); - return size_t(hash64) ^ size_t( hash64 >> 32 ); +#if (HAVE_X86_64) + return (size_t)hash64; +#else + return (size_t)hash64 ^ (size_t)(hash64 >> 32); +#endif //return size_t(id.getShortId()); } bool operator() (const NLMISC::CEntityId &id1, const NLMISC::CEntityId &id2) const diff --git a/code/nel/include/nel/misc/ucstring.h b/code/nel/include/nel/misc/ucstring.h index 88e599c1a..2f921f9ae 100644 --- a/code/nel/include/nel/misc/ucstring.h +++ b/code/nel/include/nel/misc/ucstring.h @@ -363,7 +363,7 @@ struct CUCStringHashMapTraits } bool operator() (const ucstring &id1, const ucstring &id2) const { - return id1.size() < id2.size(); + return id1 < id2; } }; diff --git a/code/nel/include/nel/sound/context_sound.h b/code/nel/include/nel/sound/context_sound.h index 8424ee087..eeb29b433 100644 --- a/code/nel/include/nel/sound/context_sound.h +++ b/code/nel/include/nel/sound/context_sound.h @@ -71,6 +71,19 @@ struct CContextMatcher return memcmp(JokersValues, other.JokersValues, sizeof(uint32)*NbJoker) == 0; } + bool operator<(const CContextMatcher &other) const + { + if (UseRandom) + if (RandomValue != other.RandomValue) + return RandomValue < other.RandomValue; + + int cmp = memcmp(JokersValues, other.JokersValues, sizeof(uint32) * NbJoker); + if (cmp != 0) + return cmp < 0; + + return false; + } + size_t getHashValue() const { return size_t(HashValue); @@ -89,10 +102,9 @@ struct CContextMatcher } bool operator() (const CContextMatcher &patternMatcher1, const CContextMatcher &patternMatcher2) const { - return patternMatcher1.getHashValue() < patternMatcher2.getHashValue(); + return patternMatcher1 < patternMatcher2; } }; - }; From 769d5190c545b313610a6fb96932959976060158 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 16:58:07 +0200 Subject: [PATCH 161/175] Fixes for VS2013, ref #236 --HG-- branch : develop --- .../phrase_manager/fg_prospection_phrase.cpp | 1 + .../player_manager/character.cpp | 2 +- .../player_manager/db_string_updater.h | 13 +++++++++++++ .../player_manager/player_manager.h | 1 + .../player_manager/player_manager_interface.h | 3 ++- .../src/persistant_data_service/db_manager.cpp | 2 +- 6 files changed, 19 insertions(+), 3 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp index f2fc03eb0..7721bad0c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp @@ -17,6 +17,7 @@ #include "stdpch.h" +#include #include "fg_prospection_phrase.h" #include "nel/misc/common.h" #include "nel/misc/fast_floor.h" diff --git a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp index 3c72995ea..b5cb58a07 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -8028,7 +8028,7 @@ void CCharacter::setStartStatistics( const CCreateCharMsg& createCharMsg ) } // create character start skills, skill point and money - string s = CreateCharacterStartSkillsValue; + string s = CreateCharacterStartSkillsValue.get(); if( s.size() > 0 ) { CSString skillValue = s; diff --git a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h index 7603c92e9..e9296b0ef 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/db_string_updater.h @@ -48,6 +48,15 @@ class CDBStringUpdater : public NLMISC::CSingleton { return ClientDB == other.ClientDB && Node == other.Node; } + + bool operator <(const TBDStringLeaf &other) const + { + if (ClientDB != other.ClientDB) + return ClientDB < other.ClientDB; + if (Node != other.Node) + return Node < other.Node; + return false; + } }; // hasher for the identifier @@ -58,6 +67,10 @@ class CDBStringUpdater : public NLMISC::CSingleton { return ((size_t)stringLeaf.ClientDB>>4) ^ ((size_t)stringLeaf.Node>>4); } + bool operator()(const TBDStringLeaf &left, const TBDStringLeaf &right) const + { + return left < right; + } }; // info for each string leaf diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h index ba0d1c306..5e68af4d2 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.h @@ -52,6 +52,7 @@ struct CServiceIdHash { enum { bucket_size = 4, min_buckets = 8, }; size_t operator () ( const NLNET::TServiceId &sid ) const { return sid.get(); } + bool operator()(const NLNET::TServiceId &left, const NLNET::TServiceId &right) const { return left < right; } }; class CCharIdReplaced diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h index 3e5de3130..2ebf3d50e 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager_interface.h @@ -44,7 +44,8 @@ public: struct CUint32Hash { enum { bucket_size = 4, min_buckets = 8, }; - size_t operator () ( const uint32 &i ) const { return i; } + size_t operator () (const uint32 &i) const { return i; } + bool operator()(const uint32 left, const uint32 right) const { return left < right; } }; typedef uint32 TUserId; diff --git a/code/ryzom/server/src/persistant_data_service/db_manager.cpp b/code/ryzom/server/src/persistant_data_service/db_manager.cpp index 6acdf687c..1f853a729 100644 --- a/code/ryzom/server/src/persistant_data_service/db_manager.cpp +++ b/code/ryzom/server/src/persistant_data_service/db_manager.cpp @@ -785,7 +785,7 @@ NLNET::CMessage& CDbManager::addTask(const std::string& msg, ITaskEventListener* // add listener to task listeners if (listener != NULL) - _TaskListeners[id] = std::make_pair(listener, arg); + _TaskListeners[id] = std::pair(listener, arg); return *msgrbs; } From 5bb34b12f44633274c8db2e08d928177e06b14f1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 16:58:07 +0200 Subject: [PATCH 162/175] Use unordered set and map for VS2013, ref #236 --HG-- branch : develop --- code/nel/include/nel/misc/types_nl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index 2461cb5e6..3102238bd 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -417,12 +417,12 @@ extern void operator delete[](void *p) throw(); # define CHashMap stdext::hash_map # define CHashSet stdext::hash_set # define CHashMultiMap stdext::hash_multimap -#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 120) -# include -# include -# define CHashMap ::std::hash_map -# define CHashSet ::std::hash_set -# define CHashMultiMap ::std::hash_multimap +#elif defined(NL_COMP_VC) && (NL_COMP_VC_VERSION >= 100) +# include +# include +# define CHashMap ::std::unordered_map +# define CHashSet ::std::unordered_set +# define CHashMultiMap ::std::unordered_multimap #elif defined(NL_COMP_GCC) // GCC4 # include # include From 55672485c97cb67d90319718fbfcdc971da27260 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 29 Mar 2015 18:24:16 +0300 Subject: [PATCH 163/175] Add embolden, oblique, underline, strikethrough styles to CViewText --HG-- branch : develop --- code/nel/include/nel/gui/view_text.h | 9 ++ code/nel/src/gui/view_text.cpp | 121 ++++++++++++++++++++++++++- 2 files changed, 129 insertions(+), 1 deletion(-) diff --git a/code/nel/include/nel/gui/view_text.h b/code/nel/include/nel/gui/view_text.h index d4377f38e..35069a9ea 100644 --- a/code/nel/include/nel/gui/view_text.h +++ b/code/nel/include/nel/gui/view_text.h @@ -81,6 +81,8 @@ namespace NLGUI void setText (const ucstring &text); void setFontSize (sint nFontSize); + void setEmbolden (bool nEmbolden); + void setOblique (bool nOblique); void setColor (const NLMISC::CRGBA &color); void setShadow (bool bShadow); void setShadowOutline (bool bShadowOutline); @@ -101,6 +103,8 @@ namespace NLGUI ucstring getText() const { return _Text; } sint getFontSize() const; + bool getEmbolden() { return _Embolden; } + bool getOblique() { return _Oblique; } NLMISC::CRGBA getColor() { return _Color; } bool getShadow() { return _Shadow; } bool getShadowOutline() { return _ShadowOutline; } @@ -125,6 +129,8 @@ namespace NLGUI uint getLastLineW () const; void setUnderlined (bool underlined) { _Underlined = underlined; } bool getUnderlined () const { return _Underlined; } + void setStrikeThrough (bool linethrough) { _StrikeThrough = linethrough; } + bool getStrikeThrough () const { return _StrikeThrough; } // true if the viewText is a single line clamped. bool isSingleLineTextClamped() const {return _SingleLineTextClamped;} @@ -220,6 +226,8 @@ namespace NLGUI NL3D::UTextContext::CStringInfo _Info; /// the font size sint _FontSize; + bool _Embolden; + bool _Oblique; // width of the font in pixel. Just a Hint for tabing format (computed with '_') uint _FontWidth; // height of the font in pixel. @@ -374,6 +382,7 @@ namespace NLGUI bool _TextSelection : 1; bool _InvalidTextContext : 1; bool _Underlined : 1; + bool _StrikeThrough : 1; bool _ContinuousUpdate : 1; bool _Setuped : 1; diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index db069a29d..0e3b420a0 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -44,6 +44,7 @@ namespace NLGUI { _CaseMode = CaseNormal; _Underlined = false; + _StrikeThrough = false; _ContinuousUpdate = false; _Active = true; _X = 0; @@ -58,6 +59,8 @@ namespace NLGUI _FontSize = 12 + CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32(); + _Embolden = false; + _Oblique = false; _Color = CRGBA(255,255,255,255); _Shadow = false; _ShadowOutline = false; @@ -157,6 +160,10 @@ namespace NLGUI _PosRef = vt._PosRef; _FontSize = vt._FontSize; + _Embolden = vt._Embolden; + _Oblique = vt._Oblique; + _Underlined = vt._Underlined; + _StrikeThrough = vt._StrikeThrough; _Color = vt._Color; _Shadow = vt._Shadow; _ShadowOutline = vt._ShadowOutline; @@ -221,6 +228,21 @@ namespace NLGUI ); } else + if( name == "fontweight" ) + { + if (_Embolden) + return "bold"; + + return "normal"; + } + if( name == "fontstyle" ) + { + if (_Oblique) + return "oblique"; + + return "normal"; + } + else if( name == "shadow" ) { return toString( _Shadow ); @@ -286,6 +308,11 @@ namespace NLGUI return toString( _Underlined ); } else + if( name == "strikthrough" ) + { + return toString( _StrikeThrough ); + } + else if( name == "case_mode" ) { return toString( uint32( _CaseMode ) ); @@ -358,6 +385,20 @@ namespace NLGUI return true; } else + if( name == "fontweight" ) + { + if (value == "bold") + _Embolden = true; + + return true; + } + if( name == "fontstyle" ) + { + if( value == "oblique" ) + _Oblique = true; + return true; + } + else if( name == "shadow" ) { bool b; @@ -444,6 +485,14 @@ namespace NLGUI return true; } else + if( name == "strikethrough" ) + { + bool b; + if( fromString( value, b ) ) + _StrikeThrough = b; + return true; + } + else if( name == "case_mode" ) { uint32 i; @@ -533,6 +582,16 @@ namespace NLGUI _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont ).getValSInt32() ).c_str() ); + std::string fontweight("normal"); + if (_Embolden) + fontweight = "bold"; + xmlSetProp( node, BAD_CAST "fontweight", BAD_CAST fontweight.c_str() ); + + std::string fontstyle("normal"); + if (_Oblique) + fontstyle = "oblique"; + xmlSetProp( node, BAD_CAST "fontstyle", BAD_CAST fontstyle.c_str() ); + xmlSetProp( node, BAD_CAST "shadow", BAD_CAST toString( _Shadow ).c_str() ); xmlSetProp( node, BAD_CAST "shadow_outline", BAD_CAST toString( _ShadowOutline ).c_str() ); xmlSetProp( node, BAD_CAST "shadow_color", BAD_CAST toString( _ShadowColor ).c_str() ); @@ -561,6 +620,7 @@ namespace NLGUI xmlSetProp( node, BAD_CAST "multi_line_maxw_only", BAD_CAST toString( _MultiLineMaxWOnly ).c_str() ); xmlSetProp( node, BAD_CAST "multi_max_line", BAD_CAST toString( _MultiMaxLine ).c_str() ); xmlSetProp( node, BAD_CAST "underlined", BAD_CAST toString( _Underlined ).c_str() ); + xmlSetProp( node, BAD_CAST "strikethrough", BAD_CAST toString( _StrikeThrough ).c_str() ); xmlSetProp( node, BAD_CAST "case_mode", BAD_CAST toString( uint32( _CaseMode ) ).c_str() ); xmlSetProp( node, BAD_CAST "over_extend_view_text", BAD_CAST toString( _OverExtendViewText ).c_str() ); xmlSetProp( node, BAD_CAST "over_extend_parent_rect", @@ -614,6 +674,22 @@ namespace NLGUI _FontSize += CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32(); } + prop = (char*) xmlGetProp( cur, (xmlChar*)"fontweight" ); + _Embolden = false; + if (prop) + { + if (nlstricmp("bold", (const char*)prop) == 0) _Embolden = true; + else nlwarning(" bad fontweight '%s'", (const char *)prop); + } + + prop = (char*) xmlGetProp( cur, (xmlChar*)"fontstyle" ); + _Oblique = false; + if (prop) + { + if (nlstricmp("oblique", (const char *) prop) == 0) _Oblique = true; + else nlwarning(" bad fontstyle '%s'", (const char *)prop); + } + prop = (char*) xmlGetProp( cur, (xmlChar*)"shadow" ); _Shadow = false; if (prop) @@ -668,6 +744,11 @@ namespace NLGUI if (prop) _Underlined = convertBool(prop); + prop = (char*) xmlGetProp( cur, (xmlChar*)"strikethrough" ); + _StrikeThrough = false; + if (prop) + _StrikeThrough = convertBool(prop); + prop = (char*) xmlGetProp( cur, (xmlChar*)"case_mode" ); _CaseMode = CaseNormal; if (prop) @@ -887,6 +968,8 @@ namespace NLGUI TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeColor (shcol); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); float y = (float)(_YReal) * ooh; // y is expressed in scree, coordinates [0..1] //y += _LinesInfos[_LinesInfos.size()-1].StringLine / h; @@ -953,7 +1036,7 @@ namespace NLGUI // skip spaces before current word float firstSpace = currWord.NumSpaces * currLine.getSpaceWidth(); sint line_width = 0; - if (_Underlined) + if (_Underlined || _StrikeThrough) { line_width = (sint)floorf(currLine.getWidthWithoutSpaces() + currLine.getSpaceWidth()); line_width -= (sint)floorf(firstSpace); @@ -971,6 +1054,9 @@ namespace NLGUI if (_Underlined) rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line, line_width, 1, 0, false, rVR.getBlankTextureId(), col); + if (_StrikeThrough) + rVR.drawRotFlipBitmap (_RenderLayer, (sint)floorf(px), y_line + (_FontHeight / 2), line_width, 1, 0, false, rVR.getBlankTextureId(), col); + // skip word px += currWord.Info.StringWidth; } @@ -1002,6 +1088,8 @@ namespace NLGUI TextContext->setShadeOutline (_ShadowOutline); TextContext->setShadeColor (shcol); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); if(_LetterColors!=NULL && !TextContext->isSameLetterColors(_LetterColors, _Index)) @@ -1032,6 +1120,9 @@ namespace NLGUI if (_Underlined) rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+_FontLegHeight-2, _WReal, 1, 0, false, rVR.getBlankTextureId(), col); + if (_StrikeThrough) + rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal+(_FontLegHeight/2), _WReal, 1, 0, false, rVR.getBlankTextureId(), col); + // reset selection if(_TextSelection) TextContext->resetStringSelection(_Index); @@ -1154,6 +1245,22 @@ namespace NLGUI return _FontSize - CWidgetManager::getInstance()->getSystemOption( CWidgetManager::OptionAddCoefFont).getValSInt32(); } + // *************************************************************************** + void CViewText::setEmbolden (bool embolden) + { + _Embolden = embolden; + computeFontSize (); + invalidateContent(); + } + + // *************************************************************************** + void CViewText::setOblique (bool oblique) + { + _Oblique = oblique; + computeFontSize (); + invalidateContent(); + } + // *************************************************************************** void CViewText::setColor(const NLMISC::CRGBA & color) { @@ -1679,6 +1786,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // default state _SingleLineTextClamped= false; @@ -2000,6 +2109,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // CViewRenderer &rVR = *CViewRenderer::getInstance(); height = getFontHeight(); // @@ -2132,6 +2243,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // find the line where the character is // CViewRenderer &rVR = *CViewRenderer::getInstance(); uint charPos = 0; @@ -2407,6 +2520,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); TCharPos linePos = 0; while (linePos < _Text.length()) @@ -2492,6 +2607,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // Current position in text TCharPos currPos = 0; @@ -2544,6 +2661,8 @@ namespace NLGUI TextContext->setShaded (_Shadow); TextContext->setShadeOutline (_ShadowOutline); TextContext->setFontSize (_FontSize); + TextContext->setEmbolden (_Embolden); + TextContext->setOblique (_Oblique); // Letter size UTextContext::CStringInfo si = TextContext->getStringInfo(ucstring("|")); // for now we can't now that directly from UTextContext From eeb881d49e24921910115b23ca958384a263458d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 29 Mar 2015 18:24:19 +0300 Subject: [PATCH 164/175] Add span tag and bold, italic, underline, strikethrough styles to CGroupHTML --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 56 +++++++++- code/nel/include/nel/gui/libwww.h | 7 ++ code/nel/src/gui/group_html.cpp | 144 +++++++++++++++++++++++++- code/nel/src/gui/libwww.cpp | 10 ++ 4 files changed, 213 insertions(+), 4 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 4f9bee46c..920c58948 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -425,6 +425,38 @@ namespace NLGUI return _FontSize.back(); } + std::vector _FontWeight; + inline uint getFontWeight() const + { + if (_FontWeight.empty()) + return 400; + return _FontWeight.back(); + } + + std::vector _FontOblique; + inline uint getFontOblique() const + { + if (_FontOblique.empty()) + return false; + return _FontOblique.back(); + } + + std::vector _FontUnderlined; + inline uint getFontUnderlined() const + { + if (_FontUnderlined.empty()) + return false; + return _FontUnderlined.back(); + } + + std::vector _FontStrikeThrough; + inline uint getFontStrikeThrough() const + { + if (_FontStrikeThrough.empty()) + return false; + return _FontStrikeThrough.back(); + } + // Current link std::vector _Link; inline const char *getLink() const @@ -544,6 +576,26 @@ namespace NLGUI }; std::vector _CellParams; + class CStyleParams + { + public: + CStyleParams () : TextColor(255,255,255,255) + { + FontSize=10; + FontWeight=400; + FontOblique=false; + Underlined=false; + StrikeThrough=false; + } + uint FontSize; + uint FontWeight; + bool FontOblique; + NLMISC::CRGBA TextColor; + bool Underlined; + bool StrikeThrough; + + }; + // Indentation uint _Indent; @@ -613,8 +665,10 @@ namespace NLGUI typedef std::map > TGroupHtmlByUIDMap; static TGroupHtmlByUIDMap _GroupHtmlByUID; - private: + // read style attribute + void getStyleParams(const std::string &styleString, CStyleParams &style, bool inherit = true); + private: // decode all HTML entities static ucstring decodeHTMLEntities(const ucstring &str); diff --git a/code/nel/include/nel/gui/libwww.h b/code/nel/include/nel/gui/libwww.h index bb6b2da86..b1f070ddd 100644 --- a/code/nel/include/nel/gui/libwww.h +++ b/code/nel/include/nel/gui/libwww.h @@ -218,6 +218,13 @@ namespace NLGUI HTML_ATTR(DIV,STYLE), }; + enum + { + HTML_ATTR(SPAN,CLASS) = 0, + HTML_ATTR(SPAN,ID), + HTML_ATTR(SPAN,STYLE), + }; + #undef HTML_ATTR diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 656e36ca8..4dd9ea7ac 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -485,7 +485,7 @@ namespace NLGUI string fullstyle = style[1]; for (uint j=2; j < style.size(); j++) fullstyle += ":"+style[j]; - styles[trim(style[0])] = fullstyle; + styles[trim(style[0])] = trim(fullstyle); } } @@ -894,7 +894,20 @@ namespace NLGUI switch(element_number) { case HTML_A: - _TextColor.push_back(LinkColor); + { + CStyleParams style; + style.FontSize = getFontSize(); + style.TextColor = LinkColor; + style.Underlined = true; + style.StrikeThrough = getFontStrikeThrough(); + + if (present[HTML_A_STYLE] && value[HTML_A_STYLE]) + getStyleParams(value[HTML_A_STYLE], style); + + _FontSize.push_back(style.FontSize); + _TextColor.push_back(style.TextColor); + _FontUnderlined.push_back(style.Underlined); + _FontStrikeThrough.push_back(style.StrikeThrough); _GlobalColor.push_back(LinkColorGlobalColor); _A.push_back(true); @@ -903,6 +916,7 @@ namespace NLGUI if (present[MY_HTML_A_CLASS] && value[MY_HTML_A_CLASS]) _LinkClass.push_back(value[MY_HTML_A_CLASS]); + } break; case HTML_DIV: @@ -1634,6 +1648,28 @@ namespace NLGUI _Object = true; break; + case HTML_SPAN: + { + CStyleParams style; + style.TextColor = getTextColor(); + style.FontSize = getFontSize(); + style.FontWeight = getFontWeight(); + style.FontOblique = getFontOblique(); + style.Underlined = getFontUnderlined(); + style.StrikeThrough = getFontStrikeThrough(); + + if (present[MY_HTML_SPAN_STYLE] && value[MY_HTML_SPAN_STYLE]) + getStyleParams(value[MY_HTML_SPAN_STYLE], style); + + _TextColor.push_back(style.TextColor); + _FontSize.push_back(style.FontSize); + _FontWeight.push_back(style.FontWeight); + _FontOblique.push_back(style.FontOblique); + _FontUnderlined.push_back(style.Underlined); + _FontStrikeThrough.push_back(style.StrikeThrough); + } + break; + case HTML_STYLE: _IgnoreText = true; break; @@ -1655,7 +1691,10 @@ namespace NLGUI popIfNotEmpty (_FontSize); break; case HTML_A: + popIfNotEmpty (_FontSize); popIfNotEmpty (_TextColor); + popIfNotEmpty (_FontUnderlined); + popIfNotEmpty (_FontStrikeThrough); popIfNotEmpty (_GlobalColor); popIfNotEmpty (_A); popIfNotEmpty (_Link); @@ -1763,6 +1802,14 @@ namespace NLGUI popIfNotEmpty (_UL); } break; + case HTML_SPAN: + popIfNotEmpty (_FontSize); + popIfNotEmpty (_FontWeight); + popIfNotEmpty (_FontOblique); + popIfNotEmpty (_TextColor); + popIfNotEmpty (_FontUnderlined); + popIfNotEmpty (_FontStrikeThrough); + break; case HTML_STYLE: _IgnoreText = false; break; @@ -3077,6 +3124,7 @@ namespace NLGUI // Text added ? bool added = false; + bool embolden = getFontWeight() >= 700; // Number of child in this paragraph if (_CurrentViewLink) @@ -3086,6 +3134,10 @@ namespace NLGUI if (!skipLine && (getTextColor() == _CurrentViewLink->getColor()) && (getFontSize() == (uint)_CurrentViewLink->getFontSize()) && + (getFontUnderlined() == _CurrentViewLink->getUnderlined()) && + (getFontStrikeThrough() == _CurrentViewLink->getStrikeThrough()) && + (embolden == _CurrentViewLink->getEmbolden()) && + (getFontOblique() == _CurrentViewLink->getOblique()) && (getLink() == _CurrentViewLink->Link) && (getGlobalColor() == _CurrentViewLink->getModulateGlobalColor())) { @@ -3141,12 +3193,15 @@ namespace NLGUI if (!newLink->Link.empty()) { newLink->setHTMLView (this); - newLink->setUnderlined (true); } } newLink->setText(tmpStr); newLink->setColor(getTextColor()); newLink->setFontSize(getFontSize()); + newLink->setEmbolden(embolden); + newLink->setOblique(getFontOblique()); + newLink->setUnderlined(getFontUnderlined()); + newLink->setStrikeThrough(getFontStrikeThrough()); newLink->setMultiLineSpace((uint)((float)getFontSize()*LineSpaceFontFactor)); newLink->setMultiLine(true); newLink->setModulateGlobalColor(getGlobalColor()); @@ -3422,6 +3477,10 @@ namespace NLGUI _TextColor.clear(); _GlobalColor.clear(); _FontSize.clear(); + _FontWeight.clear(); + _FontOblique.clear(); + _FontUnderlined.clear(); + _FontStrikeThrough.clear(); _Indent = 0; _LI = false; _UL.clear(); @@ -4590,5 +4649,84 @@ namespace NLGUI return result; } + + // *************************************************************************** + // CGroupHTML::CStyleParams style; + // style.FontSize; // font-size: 10px; + // style.TextColor; // color: #ABCDEF; + // style.Underlined; // text-decoration: underline; text-decoration-line: underline; + // style.StrikeThrough; // text-decoration: line-through; text-decoration-line: line-through; + void CGroupHTML::getStyleParams(const std::string &styleString, CStyleParams &style, bool inherit) + { + TStyle styles = parseStyle(styleString); + TStyle::iterator it; + for (it=styles.begin(); it != styles.end(); ++it) + { + if (it->first == "font-size") + { + float tmp; + sint size = 0; + getPercentage (size, tmp, it->second.c_str()); + if (size > 0) + style.FontSize = size; + } + else + if (it->first == "font-style") + { + if (it->second == "italic" || it->second == "oblique") + style.FontOblique = true; + } + else + if (it->first == "font-weight") + { + // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight + uint weight = 400; + if (it->second == "normal") + weight = 400; + else + if (it->second == "bold") + weight = 700; + else + if (it->second == "lighter") + { + const uint lighter[] = {100, 100, 100, 100, 100, 400, 400, 700, 700}; + int index = getFontWeight() / 100 - 1; + clamp(index, 1, 9); + weight = lighter[index-1]; + } + else + if (it->second == "bolder") + { + const uint bolder[] = {400, 400, 400, 700, 700, 900, 900, 900, 900}; + uint index = getFontWeight() / 100 + 1; + clamp(index, 1, 9); + weight = bolder[index-1]; + } + else + if (fromString(it->second, weight)) + { + weight = (weight / 100); + clamp(weight, 1, 9); + weight *= 100; + } + style.FontWeight = weight; + } + else + if (it->first == "color") + scanHTMLColor(it->second.c_str(), style.TextColor); + else + if (it->first == "text-decoration" || it->first == "text-decoration-line") + { + std::string prop(strlwr(it->second)); + style.Underlined = (prop.find("underline") != std::string::npos); + style.StrikeThrough = (prop.find("line-through") != std::string::npos); + } + } + if (inherit) + { + style.Underlined = getFontUnderlined() || style.Underlined; + style.StrikeThrough = getFontStrikeThrough() || style.StrikeThrough; + } + } } diff --git a/code/nel/src/gui/libwww.cpp b/code/nel/src/gui/libwww.cpp index b17d1cccb..14e921aea 100644 --- a/code/nel/src/gui/libwww.cpp +++ b/code/nel/src/gui/libwww.cpp @@ -233,6 +233,14 @@ namespace NLGUI { 0 } }; + HTAttr span_attr[] = + { + HTML_ATTR(SPAN,CLASS), + HTML_ATTR(SPAN,ID), + HTML_ATTR(SPAN,STYLE), + { 0 } + }; + // *************************************************************************** void _VerifyLibWWW(const char *function, bool ok, const char *file, int line) @@ -699,6 +707,8 @@ namespace NLGUI HTML_DTD->tags[HTML_I].number_of_attributes = 0; HTML_DTD->tags[HTML_DIV].attributes = div_attr; HTML_DTD->tags[HTML_DIV].number_of_attributes = sizeof(div_attr) / sizeof(HTAttr) - 1; + HTML_DTD->tags[HTML_SPAN].attributes = span_attr; + HTML_DTD->tags[HTML_SPAN].number_of_attributes = sizeof(span_attr) / sizeof(HTAttr) - 1; // Set a request timeout // HTHost_setEventTimeout (30000); From 2da42040ef118b0d54f87b445c557543c20e28a1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 30 Mar 2015 11:22:25 +0200 Subject: [PATCH 165/175] Apply bayer dither to TGA16 export for smoother lightmaps --HG-- branch : develop --- code/nel/tools/3d/tga_2_dds/tga2dds.cpp | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp index 292280349..19fd70d32 100644 --- a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp +++ b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp @@ -359,6 +359,13 @@ void dividSize (CBitmap &bitmap) } } +const int bayerDiv8[4][4] = { + 0, 4, 1, 5, + 6, 2, 7, 3, + 1, 5, 0, 4, + 7, 3, 6, 2, +}; + // *************************************************************************** int main(int argc, char **argv) { @@ -601,6 +608,26 @@ int main(int argc, char **argv) Reduce--; } + if (algo == TGA16) + { + // Apply bayer dither + CObjectVector &rgba = picSrc.getPixels(0); + const uint32 w = picSrc.getWidth(0); + uint32 x = 0; + uint32 y = 0; + for (uint32 i = 0; i < rgba.size(); i += 4) + { + NLMISC::CRGBA &c = reinterpret_cast(rgba[i]); + c.R = (uint8)std::min(255, (int)c.R + bayerDiv8[x % 4][y % 4]); + c.G = (uint8)std::min(255, (int)c.G + bayerDiv8[x % 4][y % 4]); + c.B = (uint8)std::min(255, (int)c.B + bayerDiv8[x % 4][y % 4]); + ++x; + x %= w; + if (x == 0) + ++y; + } + } + // 8 or 16 bits TGA or PNG ? if ((algo == TGA16) || (algo == TGA8) || (algo == PNG16) || (algo == PNG8)) { From 2d74de8a361d38982c5121354f6071df5ea3d78e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 30 Mar 2015 12:04:35 +0200 Subject: [PATCH 166/175] Separate dither matrix per color channel --HG-- branch : develop --- code/nel/tools/3d/tga_2_dds/tga2dds.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp index 19fd70d32..34b47735f 100644 --- a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp +++ b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp @@ -359,13 +359,27 @@ void dividSize (CBitmap &bitmap) } } -const int bayerDiv8[4][4] = { +const int bayerDiv8R[4][4] = { + 7, 3, 6, 2, + 1, 5, 0, 4, + 6, 2, 7, 3, + 0, 4, 1, 5, +}; + +const int bayerDiv8G[4][4] = { 0, 4, 1, 5, 6, 2, 7, 3, 1, 5, 0, 4, 7, 3, 6, 2, }; +const int bayerDiv8B[4][4] = { + 5, 1, 4, 0, + 3, 7, 2, 6, + 4, 0, 5, 1, + 2, 6, 3, 7, +}; + // *************************************************************************** int main(int argc, char **argv) { @@ -618,9 +632,9 @@ int main(int argc, char **argv) for (uint32 i = 0; i < rgba.size(); i += 4) { NLMISC::CRGBA &c = reinterpret_cast(rgba[i]); - c.R = (uint8)std::min(255, (int)c.R + bayerDiv8[x % 4][y % 4]); - c.G = (uint8)std::min(255, (int)c.G + bayerDiv8[x % 4][y % 4]); - c.B = (uint8)std::min(255, (int)c.B + bayerDiv8[x % 4][y % 4]); + c.R = (uint8)std::min(255, (int)c.R + bayerDiv8R[x % 4][y % 4]); + c.G = (uint8)std::min(255, (int)c.G + bayerDiv8G[x % 4][y % 4]); + c.B = (uint8)std::min(255, (int)c.B + bayerDiv8B[x % 4][y % 4]); ++x; x %= w; if (x == 0) From f2b857dc7a7ed6812f060f329e8d566f6ef68a3f Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Apr 2015 18:44:26 +0200 Subject: [PATCH 167/175] Added Debian/Ubuntu packaging files --HG-- branch : develop --- dist/debian/precise/debian/changelog | 414 +++++++++++++ dist/debian/precise/debian/client_default.cfg | 567 ++++++++++++++++++ dist/debian/precise/debian/compat | 1 + dist/debian/precise/debian/control | 212 +++++++ dist/debian/precise/debian/copyright | 53 ++ dist/debian/precise/debian/docs | 2 + dist/debian/precise/debian/libnel-dev.docs | 2 + dist/debian/precise/debian/libnel-dev.install | 11 + .../debian/precise/debian/libnel-dev.manpages | 1 + .../precise/debian/libnel-doc.doc-base.nel | 9 + dist/debian/precise/debian/libnel-doc.install | 1 + dist/debian/precise/debian/libnel0.install | 3 + .../debian/libryzom-clientsheets0.install | 2 + .../debian/libryzom-gameshare0.install | 2 + .../precise/debian/libryzom-sevenzip0.install | 2 + dist/debian/precise/debian/nel-config.1 | 37 ++ dist/debian/precise/debian/nel-tools.install | 91 +++ dist/debian/precise/debian/rules | 19 + dist/debian/precise/debian/ryzom | 116 ++++ .../debian/ryzom-client-config.install | 1 + dist/debian/precise/debian/ryzom-client.dirs | 4 + .../precise/debian/ryzom-client.install | 4 + dist/debian/precise/debian/ryzom-client.menu | 6 + .../precise/debian/ryzom-client.postinst | 10 + .../debian/precise/debian/ryzom-client.postrm | 49 ++ .../debian/precise/debian/ryzom-tools.install | 26 + .../precise/debian/ryzom_client.desktop | 11 + dist/debian/precise/debian/source/format | 2 + dist/debian/readme.txt | 4 + dist/debian/ryzom_version.sh | 37 ++ dist/debian/trusty/debian/changelog | 408 +++++++++++++ dist/debian/trusty/debian/client_default.cfg | 567 ++++++++++++++++++ dist/debian/trusty/debian/compat | 1 + dist/debian/trusty/debian/control | 212 +++++++ dist/debian/trusty/debian/copyright | 53 ++ dist/debian/trusty/debian/docs | 2 + dist/debian/trusty/debian/libnel-dev.docs | 2 + dist/debian/trusty/debian/libnel-dev.install | 3 + dist/debian/trusty/debian/libnel-dev.manpages | 1 + .../trusty/debian/libnel-doc.doc-base.nel | 9 + dist/debian/trusty/debian/libnel-doc.install | 1 + dist/debian/trusty/debian/libnel0.install | 3 + .../debian/libryzom-clientsheets0.install | 2 + .../trusty/debian/libryzom-gameshare0.install | 2 + .../trusty/debian/libryzom-sevenzip0.install | 2 + dist/debian/trusty/debian/nel-config.1 | 37 ++ dist/debian/trusty/debian/nel-tools.install | 91 +++ dist/debian/trusty/debian/rules | 19 + dist/debian/trusty/debian/ryzom | 116 ++++ .../trusty/debian/ryzom-client-config.install | 1 + dist/debian/trusty/debian/ryzom-client.dirs | 4 + .../debian/trusty/debian/ryzom-client.install | 4 + dist/debian/trusty/debian/ryzom-client.menu | 6 + .../trusty/debian/ryzom-client.postinst | 10 + dist/debian/trusty/debian/ryzom-client.postrm | 49 ++ dist/debian/trusty/debian/ryzom-tools.install | 26 + .../debian/trusty/debian/ryzom_client.desktop | 11 + dist/debian/trusty/debian/source/format | 2 + dist/debian/update.sh | 47 ++ dist/debian/update_debian.sh | 88 +++ dist/debian/utopic/debian/changelog | 408 +++++++++++++ dist/debian/utopic/debian/client_default.cfg | 567 ++++++++++++++++++ dist/debian/utopic/debian/compat | 1 + dist/debian/utopic/debian/control | 212 +++++++ dist/debian/utopic/debian/copyright | 53 ++ dist/debian/utopic/debian/docs | 2 + dist/debian/utopic/debian/libnel-dev.docs | 2 + dist/debian/utopic/debian/libnel-dev.install | 3 + dist/debian/utopic/debian/libnel-dev.manpages | 1 + .../utopic/debian/libnel-doc.doc-base.nel | 9 + dist/debian/utopic/debian/libnel-doc.install | 1 + dist/debian/utopic/debian/libnel0.install | 3 + .../debian/libryzom-clientsheets0.install | 2 + .../utopic/debian/libryzom-gameshare0.install | 2 + .../utopic/debian/libryzom-sevenzip0.install | 2 + dist/debian/utopic/debian/nel-config.1 | 37 ++ dist/debian/utopic/debian/nel-tools.install | 91 +++ dist/debian/utopic/debian/rules | 19 + dist/debian/utopic/debian/ryzom | 116 ++++ .../utopic/debian/ryzom-client-config.install | 1 + dist/debian/utopic/debian/ryzom-client.dirs | 4 + .../debian/utopic/debian/ryzom-client.install | 4 + dist/debian/utopic/debian/ryzom-client.menu | 6 + .../utopic/debian/ryzom-client.postinst | 10 + dist/debian/utopic/debian/ryzom-client.postrm | 49 ++ dist/debian/utopic/debian/ryzom-tools.install | 26 + .../debian/utopic/debian/ryzom_client.desktop | 11 + dist/debian/utopic/debian/source/format | 2 + dist/debian/vivid/debian/changelog | 408 +++++++++++++ dist/debian/vivid/debian/client_default.cfg | 567 ++++++++++++++++++ dist/debian/vivid/debian/compat | 1 + dist/debian/vivid/debian/control | 212 +++++++ dist/debian/vivid/debian/copyright | 53 ++ dist/debian/vivid/debian/docs | 2 + dist/debian/vivid/debian/libnel-dev.docs | 2 + dist/debian/vivid/debian/libnel-dev.install | 3 + dist/debian/vivid/debian/libnel-dev.manpages | 1 + .../vivid/debian/libnel-doc.doc-base.nel | 9 + dist/debian/vivid/debian/libnel-doc.install | 1 + dist/debian/vivid/debian/libnel0.install | 3 + .../debian/libryzom-clientsheets0.install | 2 + .../vivid/debian/libryzom-gameshare0.install | 2 + .../vivid/debian/libryzom-sevenzip0.install | 2 + dist/debian/vivid/debian/nel-config.1 | 37 ++ dist/debian/vivid/debian/nel-tools.install | 91 +++ dist/debian/vivid/debian/rules | 19 + dist/debian/vivid/debian/ryzom | 116 ++++ .../vivid/debian/ryzom-client-config.install | 1 + dist/debian/vivid/debian/ryzom-client.dirs | 4 + dist/debian/vivid/debian/ryzom-client.install | 4 + dist/debian/vivid/debian/ryzom-client.menu | 6 + .../debian/vivid/debian/ryzom-client.postinst | 10 + dist/debian/vivid/debian/ryzom-client.postrm | 49 ++ dist/debian/vivid/debian/ryzom-tools.install | 26 + dist/debian/vivid/debian/ryzom_client.desktop | 11 + dist/debian/vivid/debian/source/format | 2 + 116 files changed, 6766 insertions(+) create mode 100644 dist/debian/precise/debian/changelog create mode 100644 dist/debian/precise/debian/client_default.cfg create mode 100644 dist/debian/precise/debian/compat create mode 100644 dist/debian/precise/debian/control create mode 100644 dist/debian/precise/debian/copyright create mode 100644 dist/debian/precise/debian/docs create mode 100644 dist/debian/precise/debian/libnel-dev.docs create mode 100644 dist/debian/precise/debian/libnel-dev.install create mode 100644 dist/debian/precise/debian/libnel-dev.manpages create mode 100644 dist/debian/precise/debian/libnel-doc.doc-base.nel create mode 100644 dist/debian/precise/debian/libnel-doc.install create mode 100644 dist/debian/precise/debian/libnel0.install create mode 100644 dist/debian/precise/debian/libryzom-clientsheets0.install create mode 100644 dist/debian/precise/debian/libryzom-gameshare0.install create mode 100644 dist/debian/precise/debian/libryzom-sevenzip0.install create mode 100644 dist/debian/precise/debian/nel-config.1 create mode 100644 dist/debian/precise/debian/nel-tools.install create mode 100644 dist/debian/precise/debian/rules create mode 100644 dist/debian/precise/debian/ryzom create mode 100644 dist/debian/precise/debian/ryzom-client-config.install create mode 100644 dist/debian/precise/debian/ryzom-client.dirs create mode 100644 dist/debian/precise/debian/ryzom-client.install create mode 100644 dist/debian/precise/debian/ryzom-client.menu create mode 100644 dist/debian/precise/debian/ryzom-client.postinst create mode 100644 dist/debian/precise/debian/ryzom-client.postrm create mode 100644 dist/debian/precise/debian/ryzom-tools.install create mode 100644 dist/debian/precise/debian/ryzom_client.desktop create mode 100644 dist/debian/precise/debian/source/format create mode 100644 dist/debian/readme.txt create mode 100644 dist/debian/ryzom_version.sh create mode 100644 dist/debian/trusty/debian/changelog create mode 100644 dist/debian/trusty/debian/client_default.cfg create mode 100644 dist/debian/trusty/debian/compat create mode 100644 dist/debian/trusty/debian/control create mode 100644 dist/debian/trusty/debian/copyright create mode 100644 dist/debian/trusty/debian/docs create mode 100644 dist/debian/trusty/debian/libnel-dev.docs create mode 100644 dist/debian/trusty/debian/libnel-dev.install create mode 100644 dist/debian/trusty/debian/libnel-dev.manpages create mode 100644 dist/debian/trusty/debian/libnel-doc.doc-base.nel create mode 100644 dist/debian/trusty/debian/libnel-doc.install create mode 100644 dist/debian/trusty/debian/libnel0.install create mode 100644 dist/debian/trusty/debian/libryzom-clientsheets0.install create mode 100644 dist/debian/trusty/debian/libryzom-gameshare0.install create mode 100644 dist/debian/trusty/debian/libryzom-sevenzip0.install create mode 100644 dist/debian/trusty/debian/nel-config.1 create mode 100644 dist/debian/trusty/debian/nel-tools.install create mode 100644 dist/debian/trusty/debian/rules create mode 100644 dist/debian/trusty/debian/ryzom create mode 100644 dist/debian/trusty/debian/ryzom-client-config.install create mode 100644 dist/debian/trusty/debian/ryzom-client.dirs create mode 100644 dist/debian/trusty/debian/ryzom-client.install create mode 100644 dist/debian/trusty/debian/ryzom-client.menu create mode 100644 dist/debian/trusty/debian/ryzom-client.postinst create mode 100644 dist/debian/trusty/debian/ryzom-client.postrm create mode 100644 dist/debian/trusty/debian/ryzom-tools.install create mode 100644 dist/debian/trusty/debian/ryzom_client.desktop create mode 100644 dist/debian/trusty/debian/source/format create mode 100644 dist/debian/update.sh create mode 100644 dist/debian/update_debian.sh create mode 100644 dist/debian/utopic/debian/changelog create mode 100644 dist/debian/utopic/debian/client_default.cfg create mode 100644 dist/debian/utopic/debian/compat create mode 100644 dist/debian/utopic/debian/control create mode 100644 dist/debian/utopic/debian/copyright create mode 100644 dist/debian/utopic/debian/docs create mode 100644 dist/debian/utopic/debian/libnel-dev.docs create mode 100644 dist/debian/utopic/debian/libnel-dev.install create mode 100644 dist/debian/utopic/debian/libnel-dev.manpages create mode 100644 dist/debian/utopic/debian/libnel-doc.doc-base.nel create mode 100644 dist/debian/utopic/debian/libnel-doc.install create mode 100644 dist/debian/utopic/debian/libnel0.install create mode 100644 dist/debian/utopic/debian/libryzom-clientsheets0.install create mode 100644 dist/debian/utopic/debian/libryzom-gameshare0.install create mode 100644 dist/debian/utopic/debian/libryzom-sevenzip0.install create mode 100644 dist/debian/utopic/debian/nel-config.1 create mode 100644 dist/debian/utopic/debian/nel-tools.install create mode 100644 dist/debian/utopic/debian/rules create mode 100644 dist/debian/utopic/debian/ryzom create mode 100644 dist/debian/utopic/debian/ryzom-client-config.install create mode 100644 dist/debian/utopic/debian/ryzom-client.dirs create mode 100644 dist/debian/utopic/debian/ryzom-client.install create mode 100644 dist/debian/utopic/debian/ryzom-client.menu create mode 100644 dist/debian/utopic/debian/ryzom-client.postinst create mode 100644 dist/debian/utopic/debian/ryzom-client.postrm create mode 100644 dist/debian/utopic/debian/ryzom-tools.install create mode 100644 dist/debian/utopic/debian/ryzom_client.desktop create mode 100644 dist/debian/utopic/debian/source/format create mode 100644 dist/debian/vivid/debian/changelog create mode 100644 dist/debian/vivid/debian/client_default.cfg create mode 100644 dist/debian/vivid/debian/compat create mode 100644 dist/debian/vivid/debian/control create mode 100644 dist/debian/vivid/debian/copyright create mode 100644 dist/debian/vivid/debian/docs create mode 100644 dist/debian/vivid/debian/libnel-dev.docs create mode 100644 dist/debian/vivid/debian/libnel-dev.install create mode 100644 dist/debian/vivid/debian/libnel-dev.manpages create mode 100644 dist/debian/vivid/debian/libnel-doc.doc-base.nel create mode 100644 dist/debian/vivid/debian/libnel-doc.install create mode 100644 dist/debian/vivid/debian/libnel0.install create mode 100644 dist/debian/vivid/debian/libryzom-clientsheets0.install create mode 100644 dist/debian/vivid/debian/libryzom-gameshare0.install create mode 100644 dist/debian/vivid/debian/libryzom-sevenzip0.install create mode 100644 dist/debian/vivid/debian/nel-config.1 create mode 100644 dist/debian/vivid/debian/nel-tools.install create mode 100644 dist/debian/vivid/debian/rules create mode 100644 dist/debian/vivid/debian/ryzom create mode 100644 dist/debian/vivid/debian/ryzom-client-config.install create mode 100644 dist/debian/vivid/debian/ryzom-client.dirs create mode 100644 dist/debian/vivid/debian/ryzom-client.install create mode 100644 dist/debian/vivid/debian/ryzom-client.menu create mode 100644 dist/debian/vivid/debian/ryzom-client.postinst create mode 100644 dist/debian/vivid/debian/ryzom-client.postrm create mode 100644 dist/debian/vivid/debian/ryzom-tools.install create mode 100644 dist/debian/vivid/debian/ryzom_client.desktop create mode 100644 dist/debian/vivid/debian/source/format diff --git a/dist/debian/precise/debian/changelog b/dist/debian/precise/debian/changelog new file mode 100644 index 000000000..943b56deb --- /dev/null +++ b/dist/debian/precise/debian/changelog @@ -0,0 +1,414 @@ +ryzom-core (0.8.2802~precise1) precise; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Sun, 09 Dec 2012 14:19:29 +0100 + +ryzom-core (0.8.2801~precise1) precise; urgency=low + + * New upstream release (revision 2801) + + -- Cédric OCHS Sat, 08 Dec 2012 14:08:35 +0100 + +ryzom-core (0.8.2786~precise1) precise; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 17:18:02 +0100 + +ryzom-core (0.8.2691~precise1) precise; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 10:00:31 +0200 + +ryzom-core (0.8.2683~precise2) precise; urgency=low + + * New upstream release (revision 2683) + + -- Cédric OCHS Thu, 04 Oct 2012 10:11:23 +0200 + +ryzom-core (0.8.2683~precise1) precise; urgency=low + + * New upstream release (revision 2683) + + -- Cédric OCHS Wed, 03 Oct 2012 22:37:14 +0200 + +ryzom-core (0.8.2682~precise1) precise; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 19:02:23 +0200 + +ryzom-core (0.8.2681~precise2) precise; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 23:06:36 +0200 + +ryzom-core (0.8.2681~precise1) precise; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:19:25 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal ÄŒihaÅ™ ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ LuboÅ¡ Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- LuboÅ¡ Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/precise/debian/client_default.cfg b/dist/debian/precise/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/precise/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/precise/debian/compat b/dist/debian/precise/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/precise/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/precise/debian/control b/dist/debian/precise/debian/control new file mode 100644 index 000000000..cf8840bb2 --- /dev/null +++ b/dist/debian/precise/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: LuboÅ¡ Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.3 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/precise/debian/copyright b/dist/debian/precise/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/precise/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/precise/debian/docs b/dist/debian/precise/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/precise/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/precise/debian/libnel-dev.docs b/dist/debian/precise/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/precise/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/precise/debian/libnel-dev.install b/dist/debian/precise/debian/libnel-dev.install new file mode 100644 index 000000000..d8873ec28 --- /dev/null +++ b/dist/debian/precise/debian/libnel-dev.install @@ -0,0 +1,11 @@ +usr/include/* +usr/lib/*/libnel3d.so +usr/lib/*/libnelgeorges.so +usr/lib/*/libnelligo.so +usr/lib/*/libnellogic.so +usr/lib/*/libnelmisc.so +usr/lib/*/libnelnet.so +usr/lib/*/libnelpacs.so +usr/lib/*/libnelsnd_lowlevel.so +usr/lib/*/libnelsound.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/precise/debian/libnel-dev.manpages b/dist/debian/precise/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/precise/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/precise/debian/libnel-doc.doc-base.nel b/dist/debian/precise/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/precise/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/precise/debian/libnel-doc.install b/dist/debian/precise/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/precise/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/precise/debian/libnel0.install b/dist/debian/precise/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/precise/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/precise/debian/libryzom-clientsheets0.install b/dist/debian/precise/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/precise/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/precise/debian/libryzom-gameshare0.install b/dist/debian/precise/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/precise/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/precise/debian/libryzom-sevenzip0.install b/dist/debian/precise/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/precise/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/precise/debian/nel-config.1 b/dist/debian/precise/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/precise/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/precise/debian/nel-tools.install b/dist/debian/precise/debian/nel-tools.install new file mode 100644 index 000000000..7625eea68 --- /dev/null +++ b/dist/debian/precise/debian/nel-tools.install @@ -0,0 +1,91 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/object_viewer_qt +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libovqt_plugin_core.* +usr/lib/*/libs3tc_compressor.so.* +usr/lib/*/object_viewer_qt +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/object_viewer_qt +usr/share/nel/zviewer diff --git a/dist/debian/precise/debian/rules b/dist/debian/precise/debian/rules new file mode 100644 index 000000000..2b329f3be --- /dev/null +++ b/dist/debian/precise/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/precise/debian/ryzom b/dist/debian/precise/debian/ryzom new file mode 100644 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/precise/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/precise/debian/ryzom-client-config.install b/dist/debian/precise/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/precise/debian/ryzom-client.dirs b/dist/debian/precise/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/precise/debian/ryzom-client.install b/dist/debian/precise/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/precise/debian/ryzom-client.menu b/dist/debian/precise/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/precise/debian/ryzom-client.postinst b/dist/debian/precise/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/precise/debian/ryzom-client.postrm b/dist/debian/precise/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/precise/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/precise/debian/ryzom-tools.install b/dist/debian/precise/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/precise/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/precise/debian/ryzom_client.desktop b/dist/debian/precise/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/precise/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/precise/debian/source/format b/dist/debian/precise/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/precise/debian/source/format @@ -0,0 +1,2 @@ +1.0 + diff --git a/dist/debian/readme.txt b/dist/debian/readme.txt new file mode 100644 index 000000000..2c43c9414 --- /dev/null +++ b/dist/debian/readme.txt @@ -0,0 +1,4 @@ +To create a official Ryzom Core package, you have to do: + +- launch ./update.sh to update Ryzom Core to last version and create the .orig directory +- launch ./update_debian.sh to update packaging stuff for , create the final directory and upload source package diff --git a/dist/debian/ryzom_version.sh b/dist/debian/ryzom_version.sh new file mode 100644 index 000000000..c072095f2 --- /dev/null +++ b/dist/debian/ryzom_version.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +CODEROOT=../../code + +VERSION_FILE=$CODEROOT/CMakeLists.txt + +if [ ! -f $VERSION_FILE ] +then + echo "Unable to find $VERSION_FILE" + exit 1 +fi + +parse_version() +{ + FILE=$1 + VAR=$2 + + V=$(grep -o -P "NL_$VAR [0-9]+" $FILE | awk '{print $2}' | head -n 1) + + if [ -z "$V" ] + then + echo "Can't parse $VAR from $FILE, aborting..." + exit 1 + fi + + export $VAR=$V +} + +parse_version $VERSION_FILE VERSION_MAJOR +parse_version $VERSION_FILE VERSION_MINOR +parse_version $VERSION_FILE VERSION_PATCH + +VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH + +echo $VERSION + +exit 0 diff --git a/dist/debian/trusty/debian/changelog b/dist/debian/trusty/debian/changelog new file mode 100644 index 000000000..44f3e244e --- /dev/null +++ b/dist/debian/trusty/debian/changelog @@ -0,0 +1,408 @@ +ryzom-core (0.8.2802~raring1) raring; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Mon, 10 Dec 2012 11:12:17 +0100 + +ryzom-core (0.8.2786~raring1) raring; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 16:33:15 +0100 + +ryzom-core (0.8.2691~quantal1) quantal; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 09:46:56 +0200 + +ryzom-core (0.8.2682~quantal1) quantal; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 15:59:54 +0200 + +ryzom-core (0.8.2681~quantal2) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:42:23 +0200 + +ryzom-core (0.8.2681~quantal1) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:13:57 +0200 + +ryzom-core (0.8.2650~quantal2) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 22:06:37 +0200 + +ryzom-core (0.8.2650~quantal1) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 20:55:19 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal ÄŒihaÅ™ ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ LuboÅ¡ Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- LuboÅ¡ Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/trusty/debian/client_default.cfg b/dist/debian/trusty/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/trusty/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/trusty/debian/compat b/dist/debian/trusty/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/trusty/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/trusty/debian/control b/dist/debian/trusty/debian/control new file mode 100644 index 000000000..cf8840bb2 --- /dev/null +++ b/dist/debian/trusty/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: LuboÅ¡ Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.3 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/trusty/debian/copyright b/dist/debian/trusty/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/trusty/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/trusty/debian/docs b/dist/debian/trusty/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/trusty/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/trusty/debian/libnel-dev.docs b/dist/debian/trusty/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/trusty/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/trusty/debian/libnel-dev.install b/dist/debian/trusty/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/trusty/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/trusty/debian/libnel-dev.manpages b/dist/debian/trusty/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/trusty/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/trusty/debian/libnel-doc.doc-base.nel b/dist/debian/trusty/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/trusty/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/trusty/debian/libnel-doc.install b/dist/debian/trusty/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/trusty/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/trusty/debian/libnel0.install b/dist/debian/trusty/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/trusty/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/trusty/debian/libryzom-clientsheets0.install b/dist/debian/trusty/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/trusty/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/trusty/debian/libryzom-gameshare0.install b/dist/debian/trusty/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/trusty/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/trusty/debian/libryzom-sevenzip0.install b/dist/debian/trusty/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/trusty/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/trusty/debian/nel-config.1 b/dist/debian/trusty/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/trusty/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/trusty/debian/nel-tools.install b/dist/debian/trusty/debian/nel-tools.install new file mode 100644 index 000000000..7625eea68 --- /dev/null +++ b/dist/debian/trusty/debian/nel-tools.install @@ -0,0 +1,91 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/object_viewer_qt +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libovqt_plugin_core.* +usr/lib/*/libs3tc_compressor.so.* +usr/lib/*/object_viewer_qt +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/object_viewer_qt +usr/share/nel/zviewer diff --git a/dist/debian/trusty/debian/rules b/dist/debian/trusty/debian/rules new file mode 100644 index 000000000..26ace8254 --- /dev/null +++ b/dist/debian/trusty/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/trusty/debian/ryzom b/dist/debian/trusty/debian/ryzom new file mode 100644 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/trusty/debian/ryzom-client-config.install b/dist/debian/trusty/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/trusty/debian/ryzom-client.dirs b/dist/debian/trusty/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/trusty/debian/ryzom-client.install b/dist/debian/trusty/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/trusty/debian/ryzom-client.menu b/dist/debian/trusty/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/trusty/debian/ryzom-client.postinst b/dist/debian/trusty/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/trusty/debian/ryzom-client.postrm b/dist/debian/trusty/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/trusty/debian/ryzom-tools.install b/dist/debian/trusty/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/trusty/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/trusty/debian/ryzom_client.desktop b/dist/debian/trusty/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/trusty/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/trusty/debian/source/format b/dist/debian/trusty/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/trusty/debian/source/format @@ -0,0 +1,2 @@ +1.0 + diff --git a/dist/debian/update.sh b/dist/debian/update.sh new file mode 100644 index 000000000..2086a5247 --- /dev/null +++ b/dist/debian/update.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +HGBIN="/usr/bin/hg" +CODEROOT=../.. + +# download packaging stuff +echo "Updating packaging files..." +$HGBIN pull && $HGBIN update + +echo "Generating changelogs..." +$HGBIN log -M --style $CODEROOT/changelog.template > $CODEROOT/changelog + +REVISION=`$HGBIN identify -n` +echo "Found revision $REVISION" + +REVISION_H=$CODEROOT/revision.h + +# Copy revision.h template +cp $REVISION_H.in $REVISION_H + +DATE=$(date "+%Y-%m-%d %H:%M:%S") + +# Update revision.h with revision and build date +sed -i 's/#cmakedefine/#define/g' $REVISION_H +sed -i 's/${REVISION}/'$REVISION'/g' $REVISION_H +sed -i 's/${BUILD_DATE}/'"$DATE"'/g' $REVISION_H + +VERSION=$(./ryzomcore_version.sh) + +if [ -z "$VERSION" ] +then + echo "Can't parse version from $VERSION_FILE, aborting..." + exit 1 +fi + +DSTFOLDER=ryzom-core-$VERSION.$REVISION + +# remove destination folder if present +rm -rf $DSTFOLDER.orig +# copy all files +echo "Copying files to $DSTFOLDER..." +cp -r -p $CODEROOT $DSTFOLDER.orig + +echo "Removing web files, because we don't need them and they generate lintian errors..." +rm -rf $DSTFOLDER.orig/web + +echo "Done. Now launch ./update_debian.sh " diff --git a/dist/debian/update_debian.sh b/dist/debian/update_debian.sh new file mode 100644 index 000000000..b74dd862a --- /dev/null +++ b/dist/debian/update_debian.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +HGBIN="/usr/bin/hg" +DCHBIN="/usr/bin/dch" + +if [ ! -e $DCHBIN ] +then + apt-get install devscripts debhelper +fi + +DISTRIB=$1 +MINORDISTRIB=$2 + +if [ -z "$DISTRIB" ] +then + echo "You must specify a distribution" + exit 1 +fi + +if [ -z "$MINORDISTRIB" ] +then + MINORDISTRIB=1 +fi + +if [ ! -d "$DISTRIB" ] +then + echo "$DISTRIB is not supported, you can create the folder or compile for another version." + exit 1 +fi + +echo "Targetting $DISTRIB..." + +VERSION=$(./ryzomcore_version.sh) + +if [ -z "$VERSION" ] +then + echo "Can't parse version from $VERSION_FILE, aborting..." + exit 1 +fi + +REVISION=`$HGBIN identify -n` + +DSTFOLDER=ryzom-core-$VERSION.$REVISION + +if [ ! -d "$DSTFOLDER.orig" ] +then + echo "$DSTFOLDER.orig doesn't exist, did you forget to launch ./update.sh?" + exit 1 +fi + +# copy files if directory doesn't exist +if [ ! -d $DSTFOLDER ] +then + # copy all files + echo "Copying files to $DSTFOLDER..." + cp -r -p $DSTFOLDER.orig $DSTFOLDER +fi + +cd $DSTFOLDER + +echo "Copying debian directory..." +# delete debian directory if present +rm -rf debian +# create debian folder +mkdir -p debian +# copy debian folder +cp -r -p ../$DISTRIB/debian . + +# returning the line with the version +LAST_VERSION=`grep $VERSION.$REVISION debian/changelog` +FULL_VERSION=$VERSION.$REVISION-1~$DISTRIB$MINORDISTRIB + +# adding the new version to changelog +if [ -z "$LAST_VERSION" ] +then + echo "Adding $FULL_VERSION to debian/changelog for $DISTRIB" + $DCHBIN --force-distribution -b -v $FULL_VERSION -D $DISTRIB "New upstream release (revision $REVISION)" +else + echo "Last version is $LAST_VERSION" +fi + +echo "Creating source package..." +debuild -S + +cd .. + +echo "Done." +echo "If you want to upload source to your PPA, type: dput ryzom-core_"$FULL_VERSION"_source.changes" diff --git a/dist/debian/utopic/debian/changelog b/dist/debian/utopic/debian/changelog new file mode 100644 index 000000000..44f3e244e --- /dev/null +++ b/dist/debian/utopic/debian/changelog @@ -0,0 +1,408 @@ +ryzom-core (0.8.2802~raring1) raring; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Mon, 10 Dec 2012 11:12:17 +0100 + +ryzom-core (0.8.2786~raring1) raring; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 16:33:15 +0100 + +ryzom-core (0.8.2691~quantal1) quantal; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 09:46:56 +0200 + +ryzom-core (0.8.2682~quantal1) quantal; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 15:59:54 +0200 + +ryzom-core (0.8.2681~quantal2) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:42:23 +0200 + +ryzom-core (0.8.2681~quantal1) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:13:57 +0200 + +ryzom-core (0.8.2650~quantal2) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 22:06:37 +0200 + +ryzom-core (0.8.2650~quantal1) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 20:55:19 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal ÄŒihaÅ™ ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ LuboÅ¡ Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- LuboÅ¡ Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/utopic/debian/client_default.cfg b/dist/debian/utopic/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/utopic/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/utopic/debian/compat b/dist/debian/utopic/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/utopic/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/utopic/debian/control b/dist/debian/utopic/debian/control new file mode 100644 index 000000000..cf8840bb2 --- /dev/null +++ b/dist/debian/utopic/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: LuboÅ¡ Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.3 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/utopic/debian/copyright b/dist/debian/utopic/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/utopic/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/utopic/debian/docs b/dist/debian/utopic/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/utopic/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/utopic/debian/libnel-dev.docs b/dist/debian/utopic/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/utopic/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/utopic/debian/libnel-dev.install b/dist/debian/utopic/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/utopic/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/utopic/debian/libnel-dev.manpages b/dist/debian/utopic/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/utopic/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/utopic/debian/libnel-doc.doc-base.nel b/dist/debian/utopic/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/utopic/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/utopic/debian/libnel-doc.install b/dist/debian/utopic/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/utopic/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/utopic/debian/libnel0.install b/dist/debian/utopic/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/utopic/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/utopic/debian/libryzom-clientsheets0.install b/dist/debian/utopic/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/utopic/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/utopic/debian/libryzom-gameshare0.install b/dist/debian/utopic/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/utopic/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/utopic/debian/libryzom-sevenzip0.install b/dist/debian/utopic/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/utopic/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/utopic/debian/nel-config.1 b/dist/debian/utopic/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/utopic/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/utopic/debian/nel-tools.install b/dist/debian/utopic/debian/nel-tools.install new file mode 100644 index 000000000..7625eea68 --- /dev/null +++ b/dist/debian/utopic/debian/nel-tools.install @@ -0,0 +1,91 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/object_viewer_qt +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libovqt_plugin_core.* +usr/lib/*/libs3tc_compressor.so.* +usr/lib/*/object_viewer_qt +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/object_viewer_qt +usr/share/nel/zviewer diff --git a/dist/debian/utopic/debian/rules b/dist/debian/utopic/debian/rules new file mode 100644 index 000000000..26ace8254 --- /dev/null +++ b/dist/debian/utopic/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/utopic/debian/ryzom b/dist/debian/utopic/debian/ryzom new file mode 100644 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/utopic/debian/ryzom-client-config.install b/dist/debian/utopic/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/utopic/debian/ryzom-client.dirs b/dist/debian/utopic/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/utopic/debian/ryzom-client.install b/dist/debian/utopic/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/utopic/debian/ryzom-client.menu b/dist/debian/utopic/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/utopic/debian/ryzom-client.postinst b/dist/debian/utopic/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/utopic/debian/ryzom-client.postrm b/dist/debian/utopic/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/utopic/debian/ryzom-tools.install b/dist/debian/utopic/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/utopic/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/utopic/debian/ryzom_client.desktop b/dist/debian/utopic/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/utopic/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/utopic/debian/source/format b/dist/debian/utopic/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/utopic/debian/source/format @@ -0,0 +1,2 @@ +1.0 + diff --git a/dist/debian/vivid/debian/changelog b/dist/debian/vivid/debian/changelog new file mode 100644 index 000000000..44f3e244e --- /dev/null +++ b/dist/debian/vivid/debian/changelog @@ -0,0 +1,408 @@ +ryzom-core (0.8.2802~raring1) raring; urgency=low + + * New upstream release (revision 2802) + + -- Cédric OCHS Mon, 10 Dec 2012 11:12:17 +0100 + +ryzom-core (0.8.2786~raring1) raring; urgency=low + + * New upstream release (revision 2786) + + -- Cédric OCHS Fri, 07 Dec 2012 16:33:15 +0100 + +ryzom-core (0.8.2691~quantal1) quantal; urgency=low + + * New upstream release (revision 2691) + + -- Cédric OCHS Sun, 07 Oct 2012 09:46:56 +0200 + +ryzom-core (0.8.2682~quantal1) quantal; urgency=low + + * New upstream release (revision 2682) + + -- Cédric OCHS Wed, 03 Oct 2012 15:59:54 +0200 + +ryzom-core (0.8.2681~quantal2) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:42:23 +0200 + +ryzom-core (0.8.2681~quantal1) quantal; urgency=low + + * New upstream release (revision 2681) + + -- Cédric OCHS Tue, 02 Oct 2012 17:13:57 +0200 + +ryzom-core (0.8.2650~quantal2) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 22:06:37 +0200 + +ryzom-core (0.8.2650~quantal1) quantal; urgency=low + + * New upstream release (revision 2650) + + -- Cédric OCHS Mon, 24 Sep 2012 20:55:19 +0200 + +ryzom-core (0.8.2025~precise1) precise; urgency=low + + * New upstream release (revision 2025) + + -- Cédric OCHS Sat, 10 Mar 2012 22:23:49 +0100 + +ryzom-core (0.8.2024~precise1) precise; urgency=low + + * New upstream release (revision 2024) + + -- Cédric OCHS Sat, 10 Mar 2012 11:16:08 +0100 + +ryzom-core (0.8.1847~natty1) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Mon, 17 Oct 2011 09:33:45 +0200 + +ryzom-core (0.8.1847~natty0) natty; urgency=low + + * New upstream release (revision 1847) + + -- Cédric OCHS Sun, 16 Oct 2011 18:45:27 +0200 + +ryzom-core (0.8.1758~natty0) natty; urgency=low + + * New upstream release (revision 1758) + + -- Cédric OCHS Tue, 16 Aug 2011 09:02:55 +0200 + +ryzom-core (0.8.1752~natty0) natty; urgency=low + + * New upstream release (revision 1752) + + -- Cédric OCHS Sun, 14 Aug 2011 16:07:29 +0200 + +ryzom-core (0.8.1751~natty0) natty; urgency=low + + * New upstream release (revision 1751) + + -- Cédric OCHS Sun, 14 Aug 2011 14:16:24 +0200 + +ryzom-core (0.8.1750~natty0) natty; urgency=low + + * New upstream release (revision 1750) + + -- Cédric OCHS Sun, 14 Aug 2011 12:30:18 +0200 + +ryzom-core (0.8.1744~natty0) natty; urgency=low + + * New upstream release (revision 1744) + + -- Cédric OCHS Sat, 13 Aug 2011 20:24:49 +0200 + +ryzom-core (0.8.1742~natty0) natty; urgency=low + + * New upstream release (revision 1742) + + -- Cédric OCHS Fri, 12 Aug 2011 18:11:07 +0200 + +ryzom-core (0.8.1628~natty0) natty; urgency=low + + * New upstream release (revision 1628) + + -- Cédric OCHS Fri, 17 Jun 2011 12:56:17 +0200 + +ryzom-core (0.8.1627~natty0) natty; urgency=low + + * New upstream release (revision 1627) + + -- Cédric OCHS Tue, 14 Jun 2011 20:37:05 +0200 + +ryzom-core (0.8.1611~natty0) natty; urgency=low + + * New upstream release (revision 1611) + + -- Cédric OCHS Wed, 08 Jun 2011 19:53:44 +0200 + +ryzom-core (0.8.1596~natty1) natty; urgency=low + + * New upstream release (revision 1596) + + -- Cédric OCHS Sat, 04 Jun 2011 18:11:45 +0200 + +ryzom-core (0.7.1406~natty0) natty; urgency=low + + * New upstream release (revision 1406) + + -- Kervala Sun, 13 Mar 2011 19:07:44 +0100 + +ryzom-core (0.7.1404~karmic0) karmic; urgency=low + + * New upstream release (revision 1404) + + -- Kervala Thu, 10 Mar 2011 20:13:35 +0100 + +ryzom-core (0.7.1122~karmic0) karmic; urgency=low + + * New upstream release (revision 1122) + + -- Kervala Thu, 25 Nov 2010 13:18:41 +0100 + +ryzom-core (0.7.992~karmic0) karmic; urgency=low + + * New upstream release (revision 992) + + -- Kervala Tue, 19 Oct 2010 13:44:23 +0200 + +ryzom-core (0.7.941~karmic0) karmic; urgency=low + + * New upstream release (revision 941) + + -- Kervala Sat, 16 Oct 2010 14:59:36 +0200 + +ryzom-core (0.7.933~karmic0) karmic; urgency=low + + * New upstream release (revision 933) + + -- Kervala Fri, 15 Oct 2010 22:29:44 +0200 + +ryzom-core (0.7.932~karmic0) karmic; urgency=low + + * New upstream release (revision 932) + + -- Kervala Fri, 15 Oct 2010 19:53:47 +0200 + +ryzom-core (0.7.666~karmic0) karmic; urgency=low + + * New upstream release (revision 666) + + -- Kervala Sun, 29 Aug 2010 17:56:06 +0200 + +ryzom-core (0.7.631~karmic0) karmic; urgency=low + + * New upstream release (revision 631) + + -- Kervala Thu, 12 Aug 2010 16:57:30 +0200 + +ryzom-core (0.7.614~lucid1) lucid; urgency=low + + * Fixed dependencies + + -- Kervala Sun, 08 Aug 2010 22:42:50 +0200 + +ryzom-core (0.7.614~lucid0) lucid; urgency=low + + * New upstream release (revision 614) + + -- Kervala Sun, 08 Aug 2010 21:53:00 +0200 + +ryzom-core (0.7.583~lucid1) lucid; urgency=low + + * Added dependency on libogg and libvorbis + + -- Kervala Sun, 01 Aug 2010 15:38:40 +0200 + +ryzom-core (0.7.583~lucid0) lucid; urgency=low + + * New upstream release (revision 583) + + -- Kervala Sun, 01 Aug 2010 14:43:28 +0200 + +ryzom-core (0.7.530~lucid0) lucid; urgency=low + + * New upstream release (revision 530) + + -- Kervala Sun, 25 Jul 2010 16:50:57 +0200 + +ryzom-core (0.7.519~lucid0) lucid; urgency=low + + * New upstream release (revision 519) + + -- Kervala Mon, 19 Jul 2010 22:24:05 +0200 + +ryzom-core (0.7.507~lucid0) lucid; urgency=low + + * New upstream release (revision 507) + + -- Kervala Sat, 17 Jul 2010 19:56:35 +0200 + +ryzom-core (0.7.474~lucid0) lucid; urgency=low + + * New upstream release (revision 474) + + -- Kervala Tue, 13 Jul 2010 08:56:24 +0200 + +ryzom-core (0.7.473~lucid1) lucid; urgency=low + + * Some fixes + + -- Kervala Mon, 12 Jul 2010 22:46:16 +0200 + +ryzom-core (0.7.473~lucid0) lucid; urgency=low + + * New upstream release (revision 473) + + -- Kervala Mon, 12 Jul 2010 22:04:30 +0200 + +ryzom-core (0.7.437~lucid1) lucid; urgency=low + + * Fixed drivers installation + + -- Kervala Thu, 08 Jul 2010 08:54:02 +0200 + +ryzom-core (0.7.437~lucid0) lucid; urgency=low + + * New upstream release (revision 437) + + -- Kervala Thu, 01 Jul 2010 20:07:14 +0200 + +ryzom-core (0.7.419~lucid0) lucid; urgency=low + + * New upstream release (revision 419) + + -- Kervala Sat, 26 Jun 2010 18:58:36 +0200 + +ryzom-core (0.7.411~lucid0) lucid; urgency=low + + * New upstream release (revision 411) + + -- Kervala Sat, 26 Jun 2010 11:00:47 +0200 + +ryzom-core (0.7.404~lucid1) lucid; urgency=low + + * Fix OpenAL driver + + -- Kervala Thu, 24 Jun 2010 23:06:51 +0200 + +ryzom-core (0.7.404~lucid0) lucid; urgency=low + + * New upstream release (revision 404) + + -- Kervala Thu, 24 Jun 2010 22:17:36 +0200 + +ryzom-core (0.7.394~lucid0) lucid; urgency=low + + * New upstream release (revision 394) + + -- Kervala Tue, 22 Jun 2010 06:53:15 +0200 + +ryzom-core (0.7.375~lucid0) lucid; urgency=low + + * New upstream release (revision 375) + + -- Kervala Wed, 16 Jun 2010 12:46:51 +0200 + +ryzom-core (0.7.371~lucid0) lucid; urgency=low + + * New upstream release (revision 371) + + -- Kervala Mon, 14 Jun 2010 22:48:27 +0200 + +ryzom-core (0.7.359~lucid0) lucid; urgency=low + + * New upstream release (revision 359) + + -- Kervala Sun, 13 Jun 2010 21:31:29 +0200 + +ryzom-core (0.7.350~lucid1) lucid; urgency=low + + * Fixes problem with "copy" files + + -- Kervala Sun, 13 Jun 2010 10:36:30 +0200 + +ryzom-core (0.7.350~lucid0) lucid; urgency=low + + * New upstream release (revision 350) + + -- Kervala Sun, 13 Jun 2010 09:55:38 +0200 + +ryzom-core (0.7.332~lucid0) lucid; urgency=low + + * New upstream release (revision 332) + + -- Kervala Sat, 12 Jun 2010 09:09:21 +0200 + +ryzom-core (0.7.317~lucid0) lucid; urgency=low + + * New upstream release (revision 317) + + -- Kervala Thu, 10 Jun 2010 13:11:28 +0200 + +ryzom-core (0.7.315~lucid0) lucid; urgency=low + + * Fixed pkg-config installation again + + -- Kervala Thu, 10 Jun 2010 08:19:44 +0200 + +ryzom-core (0.7.311~lucid2) lucid; urgency=low + + * Fixed pkg-config files + + -- Kervala Wed, 09 Jun 2010 22:58:15 +0200 + +ryzom-core (0.7.311~lucid1) lucid; urgency=low + + * Fixed dependencies versions + + -- Kervala Wed, 09 Jun 2010 22:27:00 +0200 + +ryzom-core (0.7.311~lucid0) lucid; urgency=low + + * New upstream version (revision 311). + + -- Kervala Wed, 09 Jun 2010 21:15:42 +0200 + +ryzom-core (0.7.304~lucid0) lucid; urgency=low + + * New upstream version (revision 304). + + -- Kervala Wed, 09 Jun 2010 08:34:10 +0200 + +ryzom-core (0.7.0-1) unstable; urgency=low + + [ Gürkan Sengün ] + * New upstream version. (Closes: #553248) + * Updated build dependencies. + + [ Michal ÄŒihaÅ™ ] + * Convert to dh with cmake support. + * Bump standards to 3.8.4. + + [ LuboÅ¡ Novák ] + * Change maintainer to 'Debian Games Team' + * ftbfs_gcc_4.5.path: Fix build with g++-4.5. (Closes: #565104) + * Converted direct changes in source to patches. + * Enable building CEGUI renderer. + * Add package libnel-doc with documentation. + * debian/control + + Changed priority of libnel-dbg to extra. + + Remove duplicate Section in libnel0. + + Update short descriptions. + + Replace obsolete package xlibmesa-gl-dev with libgl1-mesa-dev + in build-depends. + + Add libpng-dev to build-depends. + + Remove libalut-dev from build-depends. + + New homepage. + + Supported architectures are i386 and amd64. + * debian/libnel-dev.dirs + + Remove empty dir usr/lib/nel. + * debian/copyright + + Update redistribution licence from GPL to GPL-2. + * debian/rules + + Disable building unit test, samples and tools. + + -- LuboÅ¡ Novák Tue, 30 Mar 2010 10:29:23 +0100 + +ryzom-core (0.5.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Depends: libstlport5.2-dev. (Closes: #521762) + + -- Torsten Werner Sun, 28 Jun 2009 11:54:05 +0200 + +ryzom-core (0.5.0-1) unstable; urgency=low + + * Initial release. (Closes: #448067) + + -- Gürkan Sengün Tue, 23 Oct 2007 12:56:45 +0200 + diff --git a/dist/debian/vivid/debian/client_default.cfg b/dist/debian/vivid/debian/client_default.cfg new file mode 100644 index 000000000..d09cbbb9c --- /dev/null +++ b/dist/debian/vivid/debian/client_default.cfg @@ -0,0 +1,567 @@ +////////////////////////// +////////////////////////// +/// CLIENT CONFIG FILE /// +////////////////////////// +////////////////////////// + + +// If you set this variable to 1, your client.cfg will be overwritten when you quit the client. +// You will loose all the comments and identation in this file. +SaveConfig = 1; + +/////////////////// +// WINDOW CONFIG // +/////////////////// + +Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2" + // "Auto" will choose the best suited driver depending on hardware +FullScreen = 0; +Width = 1024; +Height = 768; +PositionX = 0; +PositionY = 0; +Frequency = 60; +Depth = 32; +Sleep = -1; +ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time +Contrast = 0.0; // -1.0 ~ 1.0 +Luminosity = 0.0; // -1.0 ~ 1.0 +Gamma = 0.0; // -1.0 ~ 1.0 +Contrast_min = -1.0; +Luminosity_min = -1.0; +Gamma_min = -1.0; +Contrast_max = 1.0; +Luminosity_max = 1.0; +Gamma_max = 1.0; + + +///////////// +// NETWORK // +///////////// + +Application = { "ryzom_live", "./client_ryzom_r.exe", "./" }; +BackgroundDownloader = 0; +PatchServer = "http://dl.ryzom.com/patch_live"; +SignUpURL = "http://www.ryzom.com/subscribe"; +StartupHost = "shard.ryzom.com:40916"; +StartupPage = "/login/r2_login.php"; +InstallStatsUrl = "http://shard.ryzom.com:50000/stats/stats.php"; +CreateAccountURL = "https://secure.ryzom.com/signup/from_client.php"; +InstallWebPage = "http://dl.ryzom.com/installer/"; + + +//////////////// +// INTERFACES // +//////////////// + +// the language to use as in ISO 639-2 +LanguageCode = "en"; // english + +XMLInputFile = "input_config_v3.xml"; + +XMLLoginInterfaceFiles = { + "login_config.xml", + "login_widgets.xml", + "login_main.xml", + "login_keys.xml", +}; + +XMLOutGameInterfaceFiles = { + "out_v2_config.xml", + "out_v2_widgets.xml", + "out_v2_connect.xml", + "out_v2_intro.xml", + "out_v2_select.xml", + "out_v2_appear.xml", + "out_v2_location.xml", + "out_v2_crash.xml", + "out_v2_hierarchy.xml", + "out_v2_keys.xml", +}; + +// The ligo primitive class file +LigoPrimitiveClass = "world_editor_classes.xml"; + +VerboseLog = 1; + +/////////// +// MOUSE // +/////////// +HardwareCursor = 1; + +CursorSpeed = 1.0; // In pixels per mickey +CursorSpeed_min = 0.5; +CursorSpeed_max = 2.0; + +CursorAcceleration = 40; // Threshold in mickey +CursorAcceleration_min = 20; +CursorAcceleration_max = 80; + +FreeLookSpeed = 0.004; // In radian per mickey +FreeLookSpeed_min = 0.0001; +FreeLookSpeed_max = 0.01; + +FreeLookAcceleration = 40; // Threshold in mickey +FreeLookAcceleration_min = 20; +FreeLookAcceleration_max = 80; + +FreeLookInverted = 0; +AutomaticCamera = 0; +DblClickMode = 1; +AutoEquipTool = 1; + +/////////////////// +// RENDER CONFIG // +/////////////////// + +// NB: thoses variables configure also the InGameConfigurator: +// _min and _max define the bounds +// _step defines the step (NB: take care of _min and _max!!) +// _ps0 is the LOW preset, _ps1 is the MEDIUM preset, _ps2 is the NORMAL Preset, and _ps3 is the HIGH one + + +// *** LANDSCAPE +LandscapeTileNear = 150.000000; +LandscapeTileNear_min = 20.000000; +LandscapeTileNear_max = 250.000000; +LandscapeTileNear_step = 10.0; +LandscapeTileNear_ps0 = 20.0; +LandscapeTileNear_ps1 = 100.0; +LandscapeTileNear_ps2 = 150.0; +LandscapeTileNear_ps3 = 200.0; + +// NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible +LandscapeThreshold = 2000.0; +LandscapeThreshold_min = 100.0; // Low quality => 0.01 threshold +LandscapeThreshold_max = 4000.0; // High quality => 0.0005 threshold +LandscapeThreshold_step = 100.0; +LandscapeThreshold_ps0 = 100.0; +LandscapeThreshold_ps1 = 1000.0; +LandscapeThreshold_ps2 = 2000.0; +LandscapeThreshold_ps3 = 3000.0; + +Vision = 500.000000; +Vision_min = 200.000000; +Vision_max = 800.000000; +Vision_step = 100.000000; +Vision_ps0 = 200.0; +Vision_ps1 = 400.0; +Vision_ps2 = 500.0; +Vision_ps3 = 800.0; + +MicroVeget = 1; // Enable/Disable MicroVeget. +MicroVeget_ps0 = 0; +MicroVeget_ps1 = 1; +MicroVeget_ps2 = 1; +MicroVeget_ps3 = 1; + +MicroVegetDensity = 80.0; +MicroVegetDensity_min = 10.0; +MicroVegetDensity_max = 100.0; +MicroVegetDensity_step = 10.0; +MicroVegetDensity_ps0 = 10.0; // not used since disabled! +MicroVegetDensity_ps1 = 30.0; +MicroVegetDensity_ps2 = 80.0; +MicroVegetDensity_ps3 = 100.0; + + +// *** FX +FxNbMaxPoly = 20000; +FxNbMaxPoly_min = 2000; +FxNbMaxPoly_max = 50000; +FxNbMaxPoly_step= 2000; +FxNbMaxPoly_ps0 = 2000; +FxNbMaxPoly_ps1 = 10000; +FxNbMaxPoly_ps2 = 20000; +FxNbMaxPoly_ps3 = 50000; + +Cloud = 1; +Cloud_ps0 = 0 ; +Cloud_ps1 = 1 ; +Cloud_ps2 = 1 ; +Cloud_ps3 = 1 ; + +CloudQuality = 160.0; +CloudQuality_min = 80.0; +CloudQuality_max = 320.0; +CloudQuality_step = 20.0; +CloudQuality_ps0 = 80.0; // not used since disabled! +CloudQuality_ps1 = 80.0; +CloudQuality_ps2 = 160.0; +CloudQuality_ps3 = 320.0; + +CloudUpdate = 1; +CloudUpdate_min = 1; +CloudUpdate_max = 8; +CloudUpdate_step= 1; +CloudUpdate_ps0 = 1; // not used since disabled! +CloudUpdate_ps1 = 1; +CloudUpdate_ps2 = 1; +CloudUpdate_ps3 = 3; + +Shadows = 1; +Shadows_ps0 = 0; +Shadows_ps1 = 1; +Shadows_ps2 = 1; +Shadows_ps3 = 1; + +Bloom = 0; +Bloom_ps0 = 0; +Bloom_ps1 = 1; +Bloom_ps2 = 1; +Bloom_ps3 = 1; + +SquareBloom = 1; +SquareBloom_ps0 = 0; +SquareBloom_ps1 = 1; +SquareBloom_ps2 = 1; +SquareBloom_ps3 = 1; + +DensityBloom = 255.0; +DensityBloom_min = 0.0; +DensityBloom_max = 255.0; +DensityBloom_step = 1.0; +DensityBloom_ps0 = 255.0; +DensityBloom_ps1 = 255.0; +DensityBloom_ps2 = 255.0; +DensityBloom_ps3 = 255.0; + + +// *** CHARACTERS +SkinNbMaxPoly = 100000; +SkinNbMaxPoly_min = 5000; +SkinNbMaxPoly_max = 250000; +SkinNbMaxPoly_step = 5000; +SkinNbMaxPoly_ps0 = 10000; +SkinNbMaxPoly_ps1 = 70000; +SkinNbMaxPoly_ps2 = 100000; +SkinNbMaxPoly_ps3 = 200000; + +NbMaxSkeletonNotCLod = 125; +NbMaxSkeletonNotCLod_min = 5; +NbMaxSkeletonNotCLod_max = 255; +NbMaxSkeletonNotCLod_step = 5; +NbMaxSkeletonNotCLod_ps0 = 10; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; + +CharacterFarClip = 200.0; +CharacterFarClip_min = 50.0; +CharacterFarClip_max = 500.0; +CharacterFarClip_step = 10.0; +CharacterFarClip_ps0 = 50.0; +CharacterFarClip_ps1 = 100.0; +CharacterFarClip_ps2 = 200.0; +CharacterFarClip_ps3 = 500.0; + +EnableRacialAnimation = 1; + +// *** MISC +// This is the actual aspect ratio of your screen (no relation with the resolution!!). Set 1.7777 if you got a 16/9 screen for instance +ScreenAspectRatio = 0.0; +ForceDXTC = 1; // Enable/Disable DXTC. +DivideTextureSizeBy2= 0; // Divide texture size +DisableVtxProgram = 0; // Disable Hardware Vertex Program. +DisableVtxAGP = 0; // Disable Hardware Vertex AGP. +DisableTextureShdr = 0; // Disable Hardware Texture Shader. +HDEntityTexture = 0; +HDTextureInstalled = 1; +WaitVBL = 0; // 0 or 1 to wait Vertical Sync. + +////////////////// +// GAME OPTIONS // +////////////////// +SelectWithRClick = 1; +DisplayWeapons = 1; +RotKeySpeedMax = 2.0; +RotKeySpeedMax_min = 1.0; +RotKeySpeedMax_max = 4.0; +RotKeySpeedMin = 1.0; +RotKeySpeedMin_min = 0.5; +RotKeySpeedMin_max = 2.0; +RotAccel = 3.0; +FollowOnAtk = 0; +AtkOnSelect = 0; +ZCPacsPrim = "gen_bt_col_ext.pacs_prim"; + +///////////////// +// PREFERENCES // +///////////////// +FPV = 0; // FPV(First Person View) : default is false (Third Person View). +CameraHeight = 2.2; // Camera Height (in meter) from the ground (for the Third Person View). +CameraDistance = 3.0; // Camera Distance(in meter) from the user (for the Third Person View). +CameraDistStep = 1.0; +CameraDistMin = 1.0; +CameraDistMax = 25.0; +CameraAccel = 5.0; +CameraSpeedMin = 2.0; +CameraSpeedMax = 100.0; +CameraResetSpeed = 10.0; // Speed in radian/s + +////////////////// +// SOUND CONFIG // +////////////////// +SoundForceSoftwareBuffer= 1; +SoundOn = 1; +UseEax = 0; + +MaxTrack = 32; +MaxTrack_min = 4; +MaxTrack_max = 32; +MaxTrack_step = 4; + +// This is the volume for "InGame" sound FXs +SoundSFXVolume = 1.0; +SoundSFXVolume_min = 0.0; +SoundSFXVolume_max = 1.0; +SoundSFXVolume_step = 0.001; + +// This is volume for "InGame" music. Does not affect the MP3 player +SoundGameMusicVolume = 0.5; +SoundGameMusicVolume_min = 0.0; +SoundGameMusicVolume_max = 1.0; +SoundGameMusicVolume_step = 0.001; + +// MISC +PreDataPath = { "user", "patch", "examples", "data/fonts", "data/gamedev.bnp" }; +DataPath = { "data" }; +NeedComputeVS = 0; + +NegFiltersDebug = {"Update DB", "Reading:", "Read Value :", "impulseCallBack", "CLIMPD:", "LNET" }; +NegFiltersInfo = { "CLIMPD:", "CPath::lookup" , "LNET" }; +NegFiltersWarning = { "'basics.Equipment Slot'.", "_usercolor.tga", "PACS" }; + +// Big screen shot +ScreenShotWidth = 0; +ScreenShotHeight = 0; +ScreenShotFullDetail = 1; // 1 to switch full detail mode for characters (both standard & big screenshots) + +// Read : "ID", "R G B A MODE [FX]" +SystemInfoColors = +{ +// OLD STUFF Here for compatibility +"RG", "0 0 0 255 normal", // Black to see when there is an error +"BC", "0 0 0 255 normal", // Black to see when there is an error +"JA", "0 0 0 255 normal", // Black to see when there is an error +"BL", "0 0 0 255 normal", // Black to see when there is an error +"VE", "0 0 0 255 normal", // Black to see when there is an error +"VI", "0 0 0 255 normal", // Black to see when there is an error + +// NEW System Info Categories +"SYS", "255 255 255 255 normal", // Default system messages +"BC", "255 255 255 255 centeraround", // Broadcast messages +"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged +"XP", "255 255 64 255 over", // XP Gain +"SP", "255 255 64 255 over", // SP Gain +"TTL", "255 255 64 255 over", // Title +"TSK", "255 255 255 255 over", // Task +"ZON", "255 255 255 255 center", // Zone +"DG", "255 0 0 255 normal", // Damage to me +"DMG", "255 0 0 255 normal", // Damage to me +"DGP", "200 0 0 255 normal", // Damage to me from player +"DGM", "255 128 64 255 normal", // Damage from me +"MIS", "150 150 150 255 normal", // The opponent misses +"MISM", "255 255 255 255 normal", // I miss +"ITM", "0 200 0 255 over", // Item +"ITMO", "170 170 255 255 overonly", // Item other in group +"ITMF", "220 0 220 255 over", // Item failed +"SPL", "50 50 250 255 normal", // Spell to me +"SPLM", "50 150 250 255 normal", // Spell from me +"EMT", "255 150 150 255 normal", // Emote +"MTD", "255 255 0 255 over", // Message Of The Day +"FORLD","64 255 64 255 overonly", // Forage Locate Deposit +"CHK", "255 120 60 255 center", // Tous ce qui ne remplit pas une condition +"CHKCB","255 255 0 255 center", // Tous ce qui ne remplit pas une condition en combat (trop loin, cible invalide, pas assez de mana, etc.) +"PVPTM","255 120 60 255 overonly", // PVP timer +"THM", "255 255 64 255 over misc_levelup.ps", // Thema finished +"AMB", "255 255 64 255 center", // Ambiance +"ISE", "192 208 255 255 normal", // Item special effect +"ISE2", "192 208 255 255 center", // Item special effect with center text (for effects without flying text) +"OSM", "128 160 255 255 center", // Outpost state message +"AROUND","255 255 0 255 around", // Only in around channel +"R2_INVITE","0 255 0 255 around", // Ring invitation +}; + +PrintfCommands = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +PrintfCommandsFreeTrial = { + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", + "428", "0 0 0 255", "18", "", "624", "378", + "0 0 0 255", "14", "", "644", "278", "0 0 0 255", + "18", "", "52", "17", "255 255 255 255", "28", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", + "622", "380", "255 255 255 255", "14", "", "642", + "280", "255 255 255 255", "18", "" +}; + +DisplayMissingAnimFile = 0; + +LoadingStringCount = 54; + + +// Some R2 parameters ... + +R2Mode = 1; +R2EDEnabled = 1; +R2EDExtendedDebug = 0; +R2EDLightPalette = 0; +R2ClientGw = "r2linux01"; +LoadLuaDebugger = 0; +CheckR2ScenarioMD5 = 1; +LevelDesignEnabled = 0; + +DmCameraDistMax = 25; +DmRun = 20; +DmWalk = 6; + +R2EDReloadFiles = { + "r2ed.xml", + "r2_basic_bricks.lua", + "r2_components.lua", + "r2_core.lua", + "r2_features_default.lua", + "r2_features_fauna.lua", + "r2_features_npc_groups.lua", + "r2_palette.lua", + "r2_scenario.lua", + "r2_ui.lua" +}; + +XMLInterfaceFiles = { + "config.xml", + "widgets.xml", + "webig_widgets.xml", + "player.xml", + "inventory.xml", + "interaction.xml", + "phrase.xml", + "harvest.xml", + "macros.xml", + "info_player.xml", + "outpost.xml", + "guild.xml", + "taskbar.xml", + "game_config.xml", + "game_context_menu.xml", + "player_trade.xml", + "bot_chat_v4.xml", + "compass.xml", + "map.xml", + "hierarchy.xml", + "reset.xml", + "actions.xml", + "help.xml", + "encyclopedia.xml", + "commands.xml", + "commands2.xml", + "ring_access_point_filter.xml", + "ring_window.xml", + "bg_downloader.xml" +}; + +XMLR2EDInterfaceFiles = +{ + "r2ed.xml", + "r2_triggers.xml", + "r2_logic_entities.xml", + "r2ed_acts.xml", + "r2ed_scenario.xml", + "r2ed_connect.xml" +}; + +FogDistAndDepthLookupBias = 20; // bias for lookup of fog distance and depth + + +// Hardware cursor textures +// These will be extracted from the corresponding packed ui .tga files when they are loaded +// * +// * individual .tga files for hardware cursor bitmap not looked for, and not supported yet +HardwareCursors = +{ + "curs_can_pan.tga", + "curs_can_pan_dup.tga", + "curs_create.tga", + "curs_create_multi.tga", + "curs_create_vertex_invalid.tga", + "curs_default.tga", + "curs_dup.tga", + "curs_L.tga", + "curs_M.tga", + "curs_pan.tga", + "curs_pan_dup.tga", + "curs_pick.tga", + "curs_pick_dup.tga", + "curs_R.tga", + "curs_resize_BL_TR.tga", + "curs_resize_BR_TL.tga", + "curs_resize_LR.tga", + "curs_resize_TB.tga", + "curs_rotate.tga", + "curs_scale.tga", + "curs_stop.tga", + "text_cursor.tga", + "r2_hand_can_pan.tga", + "r2_hand_pan.tga", + "r2ed_tool_can_pick.tga", + "r2ed_tool_can_rotate.tga", + "r2ed_tool_pick.tga", + "r2ed_tool_rotate.tga", + "r2ed_tool_rotating.tga" +}; + +Loading_BG = "new_loading_bg.tga"; // Default name for the loading background file. +Launch_BG = "new_launcher_bg.tga"; // Default name for the launch background file. +TeleportKami_BG = "new_teleport_kami_bg.tga"; +TeleportKaravan_BG = "new_teleport_caravan_bg.tga"; +Elevator_BG = "new_elevator_bg.tga"; // Default name for the loading background file. +ResurectKami_BG = "new_resurect_kami_bg.tga"; +ResurectKaravan_BG = "new_resurect_caravane_bg.tga"; +End_BG = "end_bg.tga"; // Default name for the last background file. + +ScenarioSavePath = "./my_scenarios/"; + +// list ofpredefined keyset +// name will be looked up in the translation file by searching 'uiCP_KeysetName_" + id +// tooltip will be looked up in the translation file by searching 'uiCP_KeysetTooltip_" + id +// 'bi.' stands for built-in +// note : we add a dot in the name to be sure that there cannot be a conflict with character keyset name +BuiltInKeySets = +{ + "", // default ryzom keyboard layout + "bi.zqsd", // european keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is french or belgian) + "bi.wasd", // english keyboard fps displacement style (NB : don't change this layout name, ryzom will automatically select it if keyboard is not french nor belgian) + "bi.wow_alike" // 'world of warcraft' like keyboard style. (NB : not available for ring) +}; + +// "Newbie Training", "Story Telling", "Mistery", "Hack & Slash", "Guild Training", "Other" +ScenarioTypes = {"so_newbie_training","so_story_telling","so_mistery","so_hack_slash","so_guild_training","so_other"}; + +ScenarioLanguages = {"fr","de","en","other_lang"}; + +// Map each language to a forum help page +HelpPages = +{ + "fr=http://forums.ryzom.com/forum/showthread.php?t=29130", + "en=http://forums.ryzom.com/forum/showthread.php?t=29129", + "wk=http://forums.ryzom.com/forum/showthread.php?t=29129", + "de=http://forums.ryzom.com/forum/showthread.php?t=29131" +}; + +WebIgMainDomain = "app.ryzom.com"; +WebIgTrustedDomains = { + "api.ryzom.com", "app.ryzom.com" +}; +PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload"; + +SelectedSlot = 0; + +BuildName = "RELEASE_HEAD"; diff --git a/dist/debian/vivid/debian/compat b/dist/debian/vivid/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/dist/debian/vivid/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dist/debian/vivid/debian/control b/dist/debian/vivid/debian/control new file mode 100644 index 000000000..cf8840bb2 --- /dev/null +++ b/dist/debian/vivid/debian/control @@ -0,0 +1,212 @@ +Source: ryzom-core +Priority: extra +Maintainer: Debian Games Team +Uploaders: LuboÅ¡ Novák , Cédric OCHS +Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, + libgl1-mesa-dev, libjpeg8-dev | libjpeg62-dev, libpng12-dev, libopenal-dev, + libfreetype6-dev, libxxf86vm-dev, libxrandr-dev, libxrender-dev, + libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, + libboost-dev, libwww-dev, libmysqlclient-dev, + libcpptest-dev, libqt4-dev, libqt4-opengl-dev +Standards-Version: 3.9.3 +Section: games +Bugs: http://dev.ryzom.com/projects/ryzom/issues +Homepage: http://dev.ryzom.com +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/nel/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/nel/?op=log + +Package: libnel0 +Section: libdevel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Massive multi-user 3D game environments library (shared library) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the shared library. + +Package: libnel-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (development files) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the headers. + +Package: libnel0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the debugging symbols. + +Package: nel-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools. + +Package: nel-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, nel-tools (= ${binary:Version}) +Description: Massive multi-user 3D game environments library (tools debugging symbols) + This is a software platform for creating and running massively multi-user + entertainment in a 3D environment over the Internet. + . + This library is further divided into specific modules: network, ai, 3d + and misc. If you want to use any of these, you also need to use the misc + part of the library, but ai, 3d and network are totally independent from + each other so you can use only the parts you really need in your project. + . + This package contains the tools debugging symbols. + +Package: libryzom-sevenzip0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Ryzom science-fantasy MMORPG (decompression library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library. + +Package: libryzom-sevenzip0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-sevenzip0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (decompression library debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the decompression shared library debugging symbols. + +Package: libryzom-gameshare0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libnel0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common shared library. + +Package: libryzom-gameshare0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (common debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game common debugging symbols. + +Package: libryzom-clientsheets0 +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets shared library) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets shared library. + +Package: libryzom-clientsheets0-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client sheets debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client sheets debugging symbols. + +Package: ryzom-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}), + ryzom-client-config (>= ${source:Version}), rsync, wget, p7zip-full +Description: Ryzom science-fantasy MMORPG (client) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the game client. + +Package: ryzom-client-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-client (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (client debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client debugging symbols. + +Package: ryzom-tools +Section: devel +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, libryzom-gameshare0 (= ${binary:Version}), + libryzom-clientsheets0 (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools. + +Package: ryzom-tools-dbg +Section: debug +Architecture: any +Depends: ${misc:Depends}, ryzom-tools (= ${binary:Version}) +Description: Ryzom science-fantasy MMORPG (tools debugging symbols) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the tools debugging symbols. + +Package: ryzom-client-config +Architecture: all +Depends: ${misc:Depends} +Description: Ryzom science-fantasy MMORPG (client configuration) + Ryzom Core provides the base technologies and a set of development + methodologies for the development of both client and server code. + . + This package contains the client configuration. diff --git a/dist/debian/vivid/debian/copyright b/dist/debian/vivid/debian/copyright new file mode 100644 index 000000000..d5a0f2f10 --- /dev/null +++ b/dist/debian/vivid/debian/copyright @@ -0,0 +1,53 @@ +This package was debianized by Gürkan Sengün on +Tue, 23 Oct 2007 12:56:45 +0200. + +It was downloaded from + +Upstream Authors: + + Olivier Cado + Bertram Felgenhauer + Krzysztof Kotlenga + Henri Kuuste + Vianney Lecroart + Namine + Cédric Ochs + Guillaume Puzin + Matt Raykowski + Robert Timm + Titegus + Ulukyn + Robert Wetzel + Zorglor + TODO: take names from Ryzom credits + +Copyright: + + Copyright (C) 2003-2009 Vianney Lecroart + Copyright (C) 2003-2009 Matt Raykowski + Copyright (C) 2000-2006 Nevrax Ltd. + Copyright (C) 2006-2007 Gameforge France + Copyright (C) 2008-2010 Winch Gate Property Limited + +License: + + 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 . + +The Debian packaging is: + + Copyright (C) 2007 Gürkan Sengün + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. + diff --git a/dist/debian/vivid/debian/docs b/dist/debian/vivid/debian/docs new file mode 100644 index 000000000..58e5e3e76 --- /dev/null +++ b/dist/debian/vivid/debian/docs @@ -0,0 +1,2 @@ +changelog +README diff --git a/dist/debian/vivid/debian/libnel-dev.docs b/dist/debian/vivid/debian/libnel-dev.docs new file mode 100644 index 000000000..ba8894c15 --- /dev/null +++ b/dist/debian/vivid/debian/libnel-dev.docs @@ -0,0 +1,2 @@ +README + diff --git a/dist/debian/vivid/debian/libnel-dev.install b/dist/debian/vivid/debian/libnel-dev.install new file mode 100644 index 000000000..9f9310cee --- /dev/null +++ b/dist/debian/vivid/debian/libnel-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/libnel*.so +usr/lib/*/pkgconfig/* diff --git a/dist/debian/vivid/debian/libnel-dev.manpages b/dist/debian/vivid/debian/libnel-dev.manpages new file mode 100644 index 000000000..bb4027ca9 --- /dev/null +++ b/dist/debian/vivid/debian/libnel-dev.manpages @@ -0,0 +1 @@ +debian/nel-config.1 diff --git a/dist/debian/vivid/debian/libnel-doc.doc-base.nel b/dist/debian/vivid/debian/libnel-doc.doc-base.nel new file mode 100644 index 000000000..6ae95fc9f --- /dev/null +++ b/dist/debian/vivid/debian/libnel-doc.doc-base.nel @@ -0,0 +1,9 @@ +Document: nel +Title: NeL Reference Manual +Author: Nevrax +Abstract: This is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libnel-doc/html/index.html +Files: /usr/share/doc/libnel-doc/html/*.html diff --git a/dist/debian/vivid/debian/libnel-doc.install b/dist/debian/vivid/debian/libnel-doc.install new file mode 100644 index 000000000..bf3f02a61 --- /dev/null +++ b/dist/debian/vivid/debian/libnel-doc.install @@ -0,0 +1 @@ +usr/share/doc/libnel-doc/html/* diff --git a/dist/debian/vivid/debian/libnel0.install b/dist/debian/vivid/debian/libnel0.install new file mode 100644 index 000000000..4273c0ad1 --- /dev/null +++ b/dist/debian/vivid/debian/libnel0.install @@ -0,0 +1,3 @@ +usr/lib/*/libnel*.so.* +usr/lib/*/nel/libnel_drv_openal.so +usr/lib/*/nel/libnel_drv_opengl.so diff --git a/dist/debian/vivid/debian/libryzom-clientsheets0.install b/dist/debian/vivid/debian/libryzom-clientsheets0.install new file mode 100644 index 000000000..b5ea5b79c --- /dev/null +++ b/dist/debian/vivid/debian/libryzom-clientsheets0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_clientsheets.so.* + diff --git a/dist/debian/vivid/debian/libryzom-gameshare0.install b/dist/debian/vivid/debian/libryzom-gameshare0.install new file mode 100644 index 000000000..2f51b0804 --- /dev/null +++ b/dist/debian/vivid/debian/libryzom-gameshare0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_gameshare.so.* + diff --git a/dist/debian/vivid/debian/libryzom-sevenzip0.install b/dist/debian/vivid/debian/libryzom-sevenzip0.install new file mode 100644 index 000000000..1edced3f8 --- /dev/null +++ b/dist/debian/vivid/debian/libryzom-sevenzip0.install @@ -0,0 +1,2 @@ +usr/lib/*/libryzom_sevenzip.so.* + diff --git a/dist/debian/vivid/debian/nel-config.1 b/dist/debian/vivid/debian/nel-config.1 new file mode 100644 index 000000000..be47bf496 --- /dev/null +++ b/dist/debian/vivid/debian/nel-config.1 @@ -0,0 +1,37 @@ +.TH nel-config 1 "26 Oct 2007" +.SH NAME +nel-config \- Get information about a libnel installation +.SH SYNOPSIS +.B nel-config [options] +.SH DESCRIPTION +.B nel-config +displays information about a libnel installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnel. Currently that is only thw include path to the nel include files. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnel. +.IP "--prefix" +This is the prefix used when libnel was installed. libnel is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure \-\-prefix". +.IP "--version" +Outputs version information about the installed libnel. +.SH "EXAMPLES" +What linker options do I need when I link with libnel? + + $ nel-config \-\-libs + +What compiler options do I need when I compile using libnel functions? + + $ nel-config \-\-cflags + +What's the installed libnel version? + + $ nel-config \-\-version +.SH AUTHOR +.PP +This manual page was written by G\[:u]rkan Seng\[:u]n +,for the Debian project (but may be used by others). diff --git a/dist/debian/vivid/debian/nel-tools.install b/dist/debian/vivid/debian/nel-tools.install new file mode 100644 index 000000000..7625eea68 --- /dev/null +++ b/dist/debian/vivid/debian/nel-tools.install @@ -0,0 +1,91 @@ +etc/nel/build_ig_boxes.cfg +etc/nel/build_indoor_rbank.cfg +etc/nel/build_rbank.cfg +etc/nel/make_sheet_id.cfg +etc/nel/words_dic.cfg +etc/nel/zviewer.cfg +usr/bin/animation_set_builder +usr/bin/anim_builder +usr/bin/bnp_make +usr/bin/build_clod_bank +usr/bin/build_clodtex +usr/bin/build_coarse_mesh +usr/bin/build_far_bank +usr/bin/build_ig_boxes +usr/bin/build_indoor_rbank +usr/bin/build_interface +usr/bin/build_rbank +usr/bin/build_samplebank +usr/bin/build_shadow_skin +usr/bin/build_smallbank +usr/bin/build_sound +usr/bin/build_soundbank +usr/bin/cluster_viewer +usr/bin/disp_sheet_id +usr/bin/extract_filename +usr/bin/file_info +usr/bin/georges2csv +usr/bin/get_neighbors +usr/bin/hls_bank_maker +usr/bin/ig_add +usr/bin/ig_info +usr/bin/ig_lighter +usr/bin/lock +usr/bin/make_sheet_id +usr/bin/memlog +usr/bin/message_box_qt +usr/bin/nl_probe_timers +usr/bin/nl_sample_chatclient +usr/bin/nl_sample_chatserver +usr/bin/nl_sample_clusterview +usr/bin/nl_sample_command +usr/bin/nl_sample_configfile +usr/bin/nl_sample_ct_ai_service +usr/bin/nl_sample_ct_gd_service +usr/bin/nl_sample_debug +usr/bin/nl_sample_font +usr/bin/nl_sample_georges +usr/bin/nl_sample_i18n +usr/bin/nl_sample_log +usr/bin/nl_sample_ls_client +usr/bin/nl_sample_ls_fes +usr/bin/nl_sample_pacs +usr/bin/nl_sample_shapeview +usr/bin/nl_sample_sound_sources +usr/bin/nl_sample_stream_file +usr/bin/nl_sample_stream_ogg_vorbis +usr/bin/nl_sample_strings +usr/bin/nl_sample_udpclient +usr/bin/nl_sample_udpserver +usr/bin/object_viewer_qt +usr/bin/panoply_maker +usr/bin/shapes_exporter +usr/bin/tga2dds +usr/bin/tga_cut +usr/bin/tga_resize +usr/bin/tile_edit_qt +usr/bin/words_dic_qt +usr/bin/xml_packer +usr/bin/zone_check_bind +usr/bin/zone_dependencies +usr/bin/zone_dump +usr/bin/zone_ig_lighter +usr/bin/zone_lighter +usr/bin/zone_welder +usr/bin/zviewer +usr/lib/*/libovqt_plugin_core.* +usr/lib/*/libs3tc_compressor.so.* +usr/lib/*/object_viewer_qt +usr/share/nel/nl_sample_chat +usr/share/nel/nl_sample_class_transport +usr/share/nel/nl_sample_clusterview +usr/share/nel/nl_sample_configfile +usr/share/nel/nl_sample_font +usr/share/nel/nl_sample_georges +usr/share/nel/nl_sample_i18n +usr/share/nel/nl_sample_login_system +usr/share/nel/nl_sample_pacs +usr/share/nel/nl_sample_sound +usr/share/nel/nl_sample_udp +usr/share/nel/object_viewer_qt +usr/share/nel/zviewer diff --git a/dist/debian/vivid/debian/rules b/dist/debian/vivid/debian/rules new file mode 100644 index 000000000..2b329f3be --- /dev/null +++ b/dist/debian/vivid/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +%: + dh $@ --buildsystem=cmake --parallel + +override_dh_strip: + dh_strip -plibnel0 --dbg-package=libnel0-dbg + dh_strip -pnel-tools --dbg-package=nel-tools-dbg + dh_strip -plibryzom-sevenzip0 --dbg-package=libryzom-sevenzip0-dbg + dh_strip -plibryzom-gameshare0 --dbg-package=libryzom-gameshare0-dbg + dh_strip -plibryzom-clientsheets0 --dbg-package=libryzom-clientsheets0-dbg + dh_strip -pryzom-client --dbg-package=ryzom-client-dbg + dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg + +override_dh_auto_configure: + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON + +override_dh_install: + dh_install + install -m755 debian/ryzom debian/ryzom-client/usr/games/ryzom diff --git a/dist/debian/vivid/debian/ryzom b/dist/debian/vivid/debian/ryzom new file mode 100644 index 000000000..79923e9e9 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom @@ -0,0 +1,116 @@ +#!/bin/sh + +P7ZIP=/usr/bin/7z +RSYNC=/usr/bin/rsync +WGET=/usr/bin/wget +RYZOM_CLIENT=/usr/games/ryzom_client +RYZOM_CONFIG_DEFAULT=/etc/ryzom/client_default.cfg +RYZOM_CONFIG=~/.ryzom/client.cfg + +RYZOM_DIR=~/.ryzom +DATA_DIR=$RYZOM_DIR/data + +mkdir -p $RYZOM_DIR + +if [ ! -d "$DATA_DIR" ] +then + # symlink user's data dir to ryzom data cache + ln -s /var/cache/ryzom/data $DATA_DIR +fi + +# Check if a directory contains Ryzom data +ryzom_data_found() +{ + # Check for directory, gamedev.bnp and ryzom.ttf + COUNT=0 + + if [ -d $1 ] + then + # If there are a least 220 bnp files, we could use this directory + # There are 226 bnp files in last version + COUNT=$(find -L $1 -name *.bnp | wc -l) + fi + + echo $COUNT +} + +COUNT=$(ryzom_data_found $DATA_DIR) + +echo "Found $COUNT BNP files in $DATA_DIR" + +if [ $COUNT -lt 220 ] && [ -f $WGET ] && [ -f $P7ZIP ] +then + mkdir -p "$DATA_DIR/tmp" + + # Check free diskspace + echo "Checking for free disk space..." + DISKSPACE=$(df "$DATA_DIR/tmp" | grep "/dev" | awk '{print $4}') + if [ $? -ne 0 ] + then + exit 1 + fi + if [ "$DISKSPACE" -lt "8000000" ] + then + echo "You don't have enough free space to download and uncompress Ryzom client data." + exit 1 + fi + + # Download + echo "Downloading ryzom_client.7z from sourceforge..." + # wget + $WGET -c http://sourceforge.net/projects/ryzom/files/ryzom_client.7z -O "$DATA_DIR/tmp/ryzom_client.7z" + if [ $? -ne 0 ] + then + exit 1 + fi + + # Extract data + echo "Extracting data from ryzom_client.7z..." + cd "$DATA_DIR/tmp" + # 7z + $P7ZIP x ryzom_client.7z + if [ $? -ne 0 ] + then + exit 1 + fi + cd .. + mv -uf tmp/ryzom/data/* . + # Delete temporary downloaded files + rm -rf tmp +fi + +if [ -f $RYZOM_CONFIG ] +then + echo "Updating $RYZOM_CONFIG..." + + # Escape path for sed using bash find and replace + RYZOM_CONFIG_DEFAULT_ESCAPED=$(echo $RYZOM_CONFIG_DEFAULT | sed 's/\//\\\//g') + + # Update RootConfigFilename to be sure it's using the right default config + sed -i 's/RootConfigFilename.*/RootConfigFilename = \"'$RYZOM_CONFIG_DEFAULT_ESCAPED'\"/g' $RYZOM_CONFIG +fi + +if [ -f $RSYNC ] +then + echo "Patching Ryzom data..." + + # Rsync + $RSYNC -rOtzv --progress --stats www.ryzom.com::ryzom/data/ $DATA_DIR + if [ $? -ne 0 ] + then + exit 1 + fi +fi + +# Launch Ryzom client if it exists +if [ -f $RYZOM_CLIENT ] +then + echo "Launching Ryzom..." + + nohup $RYZOM_CLIENT $1 $2 $3 2> /dev/null & +fi + +# Wait until all previous commands are executed and displayed before exiting +sync + +exit 0 diff --git a/dist/debian/vivid/debian/ryzom-client-config.install b/dist/debian/vivid/debian/ryzom-client-config.install new file mode 100644 index 000000000..bef3f53dd --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client-config.install @@ -0,0 +1 @@ +debian/client_default.cfg etc/ryzom diff --git a/dist/debian/vivid/debian/ryzom-client.dirs b/dist/debian/vivid/debian/ryzom-client.dirs new file mode 100644 index 000000000..d1571095c --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.dirs @@ -0,0 +1,4 @@ +usr/games +usr/share/applications +usr/share/pixmaps +var/cache/ryzom/data diff --git a/dist/debian/vivid/debian/ryzom-client.install b/dist/debian/vivid/debian/ryzom-client.install new file mode 100644 index 000000000..be142a6be --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.install @@ -0,0 +1,4 @@ +usr/games/ryzom_client +usr/share/icons +usr/share/pixmaps +debian/ryzom_client.desktop usr/share/applications diff --git a/dist/debian/vivid/debian/ryzom-client.menu b/dist/debian/vivid/debian/ryzom-client.menu new file mode 100644 index 000000000..5e15bf577 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.menu @@ -0,0 +1,6 @@ +?package(ryzom-client): \ + needs="x11" \ + section="Games/Adventure" \ + icon="/usr/share/pixmaps/ryzom.xpm" \ + title="Ryzom" \ + command="/usr/games/ryzom" diff --git a/dist/debian/vivid/debian/ryzom-client.postinst b/dist/debian/vivid/debian/ryzom-client.postinst new file mode 100644 index 000000000..51570a3dc --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! getent group ryzom ; then + addgroup --system ryzom +fi + +chgrp -R ryzom /var/cache/ryzom/data +chmod -R g+wrxs /var/cache/ryzom/data + +#DEBHELPER# diff --git a/dist/debian/vivid/debian/ryzom-client.postrm b/dist/debian/vivid/debian/ryzom-client.postrm new file mode 100644 index 000000000..828871eb4 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-client.postrm @@ -0,0 +1,49 @@ +#! /bin/sh +# postrm script for ryzom-client +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge) + + FILES=/home/* + + for f in $FILES + do + FOLDER="$f/.ryzom/data" + + if [ -d $FOLDER ] + then + rm -rf $FOLDER + echo "Deleting $FOLDER..." + fi + done + + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/vivid/debian/ryzom-tools.install b/dist/debian/vivid/debian/ryzom-tools.install new file mode 100644 index 000000000..c468e32d8 --- /dev/null +++ b/dist/debian/vivid/debian/ryzom-tools.install @@ -0,0 +1,26 @@ +usr/bin/7zDec +usr/bin/alias_synchronizer +usr/bin/assoc_mem +usr/bin/csv_transform +usr/bin/georges_editor_qt +usr/bin/icon_search +usr/bin/make_alias_file +usr/bin/make_anim_by_race +usr/bin/make_anim_melee_impact +usr/bin/mp_generator +usr/bin/named2csv +usr/bin/patch_gen +usr/bin/patch_gen_service +usr/bin/pd_parser +usr/bin/pdr_util +usr/bin/prim_export +usr/bin/ryzom_mission_compiler +usr/bin/sheets_packer +usr/bin/skill_extractor +usr/bin/stats_scan +usr/bin/translation_tools +usr/bin/uni_conv +usr/games/ryzom_client_patcher +usr/lib/*/libryzom_mission_compiler_lib.so.* +usr/share/games/ryzom/data_leveldesign +usr/share/games/ryzom/georges_editor_qt diff --git a/dist/debian/vivid/debian/ryzom_client.desktop b/dist/debian/vivid/debian/ryzom_client.desktop new file mode 100644 index 000000000..1c62d1b6a --- /dev/null +++ b/dist/debian/vivid/debian/ryzom_client.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Ryzom +Name[ru]=Ризом +Type=Application +GenericName=ryzom_client +Exec=/usr/games/ryzom +Icon=ryzom_client +Terminal=true +Hidden=false +Categories=Game;RolePlaying; diff --git a/dist/debian/vivid/debian/source/format b/dist/debian/vivid/debian/source/format new file mode 100644 index 000000000..b9b023757 --- /dev/null +++ b/dist/debian/vivid/debian/source/format @@ -0,0 +1,2 @@ +1.0 + From 78515477e93dfc0b0ff50730e66e9e80e906d2db Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Apr 2015 18:53:22 +0200 Subject: [PATCH 168/175] Set executable flag for Debian packaging scripts --HG-- branch : develop --- dist/debian/precise/debian/rules | 0 dist/debian/ryzom_version.sh | 0 dist/debian/trusty/debian/rules | 0 dist/debian/update.sh | 0 dist/debian/update_debian.sh | 0 dist/debian/utopic/debian/rules | 0 dist/debian/vivid/debian/rules | 0 7 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 dist/debian/precise/debian/rules mode change 100644 => 100755 dist/debian/ryzom_version.sh mode change 100644 => 100755 dist/debian/trusty/debian/rules mode change 100644 => 100755 dist/debian/update.sh mode change 100644 => 100755 dist/debian/update_debian.sh mode change 100644 => 100755 dist/debian/utopic/debian/rules mode change 100644 => 100755 dist/debian/vivid/debian/rules diff --git a/dist/debian/precise/debian/rules b/dist/debian/precise/debian/rules old mode 100644 new mode 100755 diff --git a/dist/debian/ryzom_version.sh b/dist/debian/ryzom_version.sh old mode 100644 new mode 100755 diff --git a/dist/debian/trusty/debian/rules b/dist/debian/trusty/debian/rules old mode 100644 new mode 100755 diff --git a/dist/debian/update.sh b/dist/debian/update.sh old mode 100644 new mode 100755 diff --git a/dist/debian/update_debian.sh b/dist/debian/update_debian.sh old mode 100644 new mode 100755 diff --git a/dist/debian/utopic/debian/rules b/dist/debian/utopic/debian/rules old mode 100644 new mode 100755 diff --git a/dist/debian/vivid/debian/rules b/dist/debian/vivid/debian/rules old mode 100644 new mode 100755 From bf388216673fad9cc908f5c2bebfb515dff8e042 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Apr 2015 19:03:03 +0200 Subject: [PATCH 169/175] Fixed Debian packaging stuff --HG-- branch : develop --- dist/debian/precise/debian/ryzom | 0 dist/debian/{ryzom_version.sh => ryzomcore_version.sh} | 0 dist/debian/trusty/debian/control | 2 +- dist/debian/trusty/debian/ryzom | 0 dist/debian/update.sh | 8 ++------ dist/debian/update_debian.sh | 2 +- dist/debian/utopic/debian/ryzom | 0 dist/debian/vivid/debian/ryzom | 0 8 files changed, 4 insertions(+), 8 deletions(-) mode change 100644 => 100755 dist/debian/precise/debian/ryzom rename dist/debian/{ryzom_version.sh => ryzomcore_version.sh} (100%) mode change 100644 => 100755 dist/debian/trusty/debian/ryzom mode change 100644 => 100755 dist/debian/utopic/debian/ryzom mode change 100644 => 100755 dist/debian/vivid/debian/ryzom diff --git a/dist/debian/precise/debian/ryzom b/dist/debian/precise/debian/ryzom old mode 100644 new mode 100755 diff --git a/dist/debian/ryzom_version.sh b/dist/debian/ryzomcore_version.sh similarity index 100% rename from dist/debian/ryzom_version.sh rename to dist/debian/ryzomcore_version.sh diff --git a/dist/debian/trusty/debian/control b/dist/debian/trusty/debian/control index cf8840bb2..e662d1f37 100644 --- a/dist/debian/trusty/debian/control +++ b/dist/debian/trusty/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, libboost-dev, libwww-dev, libmysqlclient-dev, libcpptest-dev, libqt4-dev, libqt4-opengl-dev -Standards-Version: 3.9.3 +Standards-Version: 3.9.5 Section: games Bugs: http://dev.ryzom.com/projects/ryzom/issues Homepage: http://dev.ryzom.com diff --git a/dist/debian/trusty/debian/ryzom b/dist/debian/trusty/debian/ryzom old mode 100644 new mode 100755 diff --git a/dist/debian/update.sh b/dist/debian/update.sh index 2086a5247..a68d3edb4 100755 --- a/dist/debian/update.sh +++ b/dist/debian/update.sh @@ -1,16 +1,12 @@ #!/bin/sh HGBIN="/usr/bin/hg" -CODEROOT=../.. - -# download packaging stuff -echo "Updating packaging files..." -$HGBIN pull && $HGBIN update +CODEROOT=../../code echo "Generating changelogs..." $HGBIN log -M --style $CODEROOT/changelog.template > $CODEROOT/changelog -REVISION=`$HGBIN identify -n` +REVISION=$($HGBIN identify -n | grep -o -P "[0-9]+") echo "Found revision $REVISION" REVISION_H=$CODEROOT/revision.h diff --git a/dist/debian/update_debian.sh b/dist/debian/update_debian.sh index b74dd862a..8c2c5dd7d 100755 --- a/dist/debian/update_debian.sh +++ b/dist/debian/update_debian.sh @@ -38,7 +38,7 @@ then exit 1 fi -REVISION=`$HGBIN identify -n` +REVISION=$($HGBIN identify -n | grep -o -P "[0-9]+") DSTFOLDER=ryzom-core-$VERSION.$REVISION diff --git a/dist/debian/utopic/debian/ryzom b/dist/debian/utopic/debian/ryzom old mode 100644 new mode 100755 diff --git a/dist/debian/vivid/debian/ryzom b/dist/debian/vivid/debian/ryzom old mode 100644 new mode 100755 From 87c198efbe02ff3a3d36239e6d04b5db5fcf671c Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Apr 2015 13:52:05 +0200 Subject: [PATCH 170/175] Fixed compilation of font sample --HG-- branch : develop --- code/nel/samples/3d/font/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/samples/3d/font/main.cpp b/code/nel/samples/3d/font/main.cpp index b4b5cc3c9..bd1a91a09 100644 --- a/code/nel/samples/3d/font/main.cpp +++ b/code/nel/samples/3d/font/main.cpp @@ -79,16 +79,16 @@ int main(int argc, char **argv) // 4th is the size of the font. 5th is a pointer to the video driver. // 6th is the resulting computed string. CComputedString csRotation; - fontManager.computeString ("cs Rotation", tc.getFontGenerator(), CRGBA(255,255,255), 70, CNELU::Driver, csRotation); + fontManager.computeString ("cs Rotation", tc.getFontGenerator(), CRGBA(255,255,255), 70, false, false, CNELU::Driver, csRotation); CComputedString cs3d; - fontManager.computeString ("cs 3d", tc.getFontGenerator(), CRGBA(255,127,0), 75, CNELU::Driver, cs3d); + fontManager.computeString ("cs 3d", tc.getFontGenerator(), CRGBA(255,127,0), 75, false, false, CNELU::Driver, cs3d); // generate an Unicode string. ucstring ucs("cs Unicode String"); CComputedString csUnicode; - fontManager.computeString (ucs, tc.getFontGenerator(), CRGBA(32,64,127), 75, CNELU::Driver, csUnicode); + fontManager.computeString (ucs, tc.getFontGenerator(), CRGBA(32,64,127), 75, false, false, CNELU::Driver, csUnicode); // look at event example CNELU::EventServer.addEmitter(CNELU::Driver->getEventEmitter()); From 7123687d5a4735b0cab6831a3df531445bb1ad72 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Apr 2015 16:21:21 +0200 Subject: [PATCH 171/175] Removed old object_viewer_qt files --HG-- branch : develop --- dist/debian/precise/debian/nel-tools.install | 4 ---- dist/debian/trusty/debian/nel-tools.install | 4 ---- dist/debian/utopic/debian/nel-tools.install | 4 ---- dist/debian/vivid/debian/nel-tools.install | 4 ---- 4 files changed, 16 deletions(-) diff --git a/dist/debian/precise/debian/nel-tools.install b/dist/debian/precise/debian/nel-tools.install index 7625eea68..4ca03208c 100644 --- a/dist/debian/precise/debian/nel-tools.install +++ b/dist/debian/precise/debian/nel-tools.install @@ -57,7 +57,6 @@ usr/bin/nl_sample_stream_ogg_vorbis usr/bin/nl_sample_strings usr/bin/nl_sample_udpclient usr/bin/nl_sample_udpserver -usr/bin/object_viewer_qt usr/bin/panoply_maker usr/bin/shapes_exporter usr/bin/tga2dds @@ -73,9 +72,7 @@ usr/bin/zone_ig_lighter usr/bin/zone_lighter usr/bin/zone_welder usr/bin/zviewer -usr/lib/*/libovqt_plugin_core.* usr/lib/*/libs3tc_compressor.so.* -usr/lib/*/object_viewer_qt usr/share/nel/nl_sample_chat usr/share/nel/nl_sample_class_transport usr/share/nel/nl_sample_clusterview @@ -87,5 +84,4 @@ usr/share/nel/nl_sample_login_system usr/share/nel/nl_sample_pacs usr/share/nel/nl_sample_sound usr/share/nel/nl_sample_udp -usr/share/nel/object_viewer_qt usr/share/nel/zviewer diff --git a/dist/debian/trusty/debian/nel-tools.install b/dist/debian/trusty/debian/nel-tools.install index 7625eea68..4ca03208c 100644 --- a/dist/debian/trusty/debian/nel-tools.install +++ b/dist/debian/trusty/debian/nel-tools.install @@ -57,7 +57,6 @@ usr/bin/nl_sample_stream_ogg_vorbis usr/bin/nl_sample_strings usr/bin/nl_sample_udpclient usr/bin/nl_sample_udpserver -usr/bin/object_viewer_qt usr/bin/panoply_maker usr/bin/shapes_exporter usr/bin/tga2dds @@ -73,9 +72,7 @@ usr/bin/zone_ig_lighter usr/bin/zone_lighter usr/bin/zone_welder usr/bin/zviewer -usr/lib/*/libovqt_plugin_core.* usr/lib/*/libs3tc_compressor.so.* -usr/lib/*/object_viewer_qt usr/share/nel/nl_sample_chat usr/share/nel/nl_sample_class_transport usr/share/nel/nl_sample_clusterview @@ -87,5 +84,4 @@ usr/share/nel/nl_sample_login_system usr/share/nel/nl_sample_pacs usr/share/nel/nl_sample_sound usr/share/nel/nl_sample_udp -usr/share/nel/object_viewer_qt usr/share/nel/zviewer diff --git a/dist/debian/utopic/debian/nel-tools.install b/dist/debian/utopic/debian/nel-tools.install index 7625eea68..4ca03208c 100644 --- a/dist/debian/utopic/debian/nel-tools.install +++ b/dist/debian/utopic/debian/nel-tools.install @@ -57,7 +57,6 @@ usr/bin/nl_sample_stream_ogg_vorbis usr/bin/nl_sample_strings usr/bin/nl_sample_udpclient usr/bin/nl_sample_udpserver -usr/bin/object_viewer_qt usr/bin/panoply_maker usr/bin/shapes_exporter usr/bin/tga2dds @@ -73,9 +72,7 @@ usr/bin/zone_ig_lighter usr/bin/zone_lighter usr/bin/zone_welder usr/bin/zviewer -usr/lib/*/libovqt_plugin_core.* usr/lib/*/libs3tc_compressor.so.* -usr/lib/*/object_viewer_qt usr/share/nel/nl_sample_chat usr/share/nel/nl_sample_class_transport usr/share/nel/nl_sample_clusterview @@ -87,5 +84,4 @@ usr/share/nel/nl_sample_login_system usr/share/nel/nl_sample_pacs usr/share/nel/nl_sample_sound usr/share/nel/nl_sample_udp -usr/share/nel/object_viewer_qt usr/share/nel/zviewer diff --git a/dist/debian/vivid/debian/nel-tools.install b/dist/debian/vivid/debian/nel-tools.install index 7625eea68..4ca03208c 100644 --- a/dist/debian/vivid/debian/nel-tools.install +++ b/dist/debian/vivid/debian/nel-tools.install @@ -57,7 +57,6 @@ usr/bin/nl_sample_stream_ogg_vorbis usr/bin/nl_sample_strings usr/bin/nl_sample_udpclient usr/bin/nl_sample_udpserver -usr/bin/object_viewer_qt usr/bin/panoply_maker usr/bin/shapes_exporter usr/bin/tga2dds @@ -73,9 +72,7 @@ usr/bin/zone_ig_lighter usr/bin/zone_lighter usr/bin/zone_welder usr/bin/zviewer -usr/lib/*/libovqt_plugin_core.* usr/lib/*/libs3tc_compressor.so.* -usr/lib/*/object_viewer_qt usr/share/nel/nl_sample_chat usr/share/nel/nl_sample_class_transport usr/share/nel/nl_sample_clusterview @@ -87,5 +84,4 @@ usr/share/nel/nl_sample_login_system usr/share/nel/nl_sample_pacs usr/share/nel/nl_sample_sound usr/share/nel/nl_sample_udp -usr/share/nel/object_viewer_qt usr/share/nel/zviewer From cbbfd4d9761da60518e4df8942d91cab2d7107fd Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Apr 2015 16:21:38 +0200 Subject: [PATCH 172/175] Updated Standards-Version --HG-- branch : develop --- dist/debian/utopic/debian/control | 2 +- dist/debian/vivid/debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/debian/utopic/debian/control b/dist/debian/utopic/debian/control index cf8840bb2..e662d1f37 100644 --- a/dist/debian/utopic/debian/control +++ b/dist/debian/utopic/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, libboost-dev, libwww-dev, libmysqlclient-dev, libcpptest-dev, libqt4-dev, libqt4-opengl-dev -Standards-Version: 3.9.3 +Standards-Version: 3.9.5 Section: games Bugs: http://dev.ryzom.com/projects/ryzom/issues Homepage: http://dev.ryzom.com diff --git a/dist/debian/vivid/debian/control b/dist/debian/vivid/debian/control index cf8840bb2..e662d1f37 100644 --- a/dist/debian/vivid/debian/control +++ b/dist/debian/vivid/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 9), cmake(>= 2.6), libxml2-dev, libvorbis-dev, libsquish-dev, libcurl4-openssl-dev, libluabind-dev, libboost-dev, libwww-dev, libmysqlclient-dev, libcpptest-dev, libqt4-dev, libqt4-opengl-dev -Standards-Version: 3.9.3 +Standards-Version: 3.9.5 Section: games Bugs: http://dev.ryzom.com/projects/ryzom/issues Homepage: http://dev.ryzom.com From d6d4cc9155c4d9dad7b634698ced064de46eb1c9 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Apr 2015 16:21:58 +0200 Subject: [PATCH 173/175] Use static version of libwww --HG-- branch : develop --- dist/debian/trusty/debian/rules | 2 +- dist/debian/utopic/debian/rules | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/debian/trusty/debian/rules b/dist/debian/trusty/debian/rules index 26ace8254..2b329f3be 100755 --- a/dist/debian/trusty/debian/rules +++ b/dist/debian/trusty/debian/rules @@ -12,7 +12,7 @@ override_dh_strip: dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg override_dh_auto_configure: - dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_QT=ON + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON override_dh_install: dh_install diff --git a/dist/debian/utopic/debian/rules b/dist/debian/utopic/debian/rules index 26ace8254..2b329f3be 100755 --- a/dist/debian/utopic/debian/rules +++ b/dist/debian/utopic/debian/rules @@ -12,7 +12,7 @@ override_dh_strip: dh_strip -pryzom-tools --dbg-package=ryzom-tools-dbg override_dh_auto_configure: - dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_QT=ON + dh_auto_configure -- -DLIBRARY_ARCHITECTURE=$(DEB_HOST_MULTIARCH) -DTARGET_CPU=$(DEB_HOST_GNU_CPU) -DWITH_SYMBOLS=ON -DNL_ETC_PREFIX=/etc/nel -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/games/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/games -DWITH_RYZOM_SERVER=OFF -DWITH_NEL_TESTS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_QT=ON override_dh_install: dh_install From 9fd524f9c6d74b7923e60ae9942dca69768a4990 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 5 Apr 2015 16:22:23 +0200 Subject: [PATCH 174/175] Simplify libnel filenames --HG-- branch : develop --- dist/debian/precise/debian/libnel-dev.install | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dist/debian/precise/debian/libnel-dev.install b/dist/debian/precise/debian/libnel-dev.install index d8873ec28..9f9310cee 100644 --- a/dist/debian/precise/debian/libnel-dev.install +++ b/dist/debian/precise/debian/libnel-dev.install @@ -1,11 +1,3 @@ usr/include/* -usr/lib/*/libnel3d.so -usr/lib/*/libnelgeorges.so -usr/lib/*/libnelligo.so -usr/lib/*/libnellogic.so -usr/lib/*/libnelmisc.so -usr/lib/*/libnelnet.so -usr/lib/*/libnelpacs.so -usr/lib/*/libnelsnd_lowlevel.so -usr/lib/*/libnelsound.so +usr/lib/*/libnel*.so usr/lib/*/pkgconfig/* From d9f3efc4e39159d58d4bbf31ca8ababe45684ebe Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 14 Apr 2015 11:55:08 +0200 Subject: [PATCH 175/175] ryzomcore/v0.12.0 --HG-- branch : develop --- code/CMakeLists.txt | 6 +++--- code/nel/tools/3d/plugin_max/nel_export/nel_export.rc | 8 ++++---- .../plugin_max/nel_patch_converter/nel_patch_converter.rc | 8 ++++---- code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc | 8 ++++---- .../3d/plugin_max/nel_patch_paint/nel_patch_paint.rc | 8 ++++---- .../plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc | 8 ++++---- code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc | 8 ++++---- code/ryzom/common/src/game_share/ryzom_version.h | 2 +- code/tool/increment_version/increment_version.py | 4 ++-- code/web/public_php/ams/templates/layout.tpl | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 9d607579c..05286fb4c 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -2,7 +2,7 @@ # # Ryzom Core # Authors: Nevrax and the Ryzom Core Community -# Version: 0.11.3 +# Version: 0.12.0 # # Notes: # * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path @@ -47,8 +47,8 @@ CHECK_OUT_OF_SOURCE() CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 0) -SET(NL_VERSION_MINOR 11) -SET(NL_VERSION_PATCH 3) +SET(NL_VERSION_MINOR 12) +SET(NL_VERSION_PATCH 0) SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") #----------------------------------------------------------------------------- diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc index 31a258fb9..e42b888ea 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc @@ -575,8 +575,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 3, 0 - PRODUCTVERSION 0, 11, 3, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -593,14 +593,14 @@ BEGIN BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.11.3\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "CNelExport\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "CNelExport.dlu\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.3\0" + VALUE "ProductVersion", "0.12.0\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc index 068bddea0..50fc5a48d 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc @@ -85,8 +85,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 3, 0 - PRODUCTVERSION 0, 11, 3, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -103,12 +103,12 @@ BEGIN BEGIN VALUE "Comments", "http://www.ryzomcore.org/" VALUE "FileDescription", "PatchMesh to RykolPatchMesh" - VALUE "FileVersion", "0.11.3" + VALUE "FileVersion", "0.12.0" VALUE "InternalName", "PatchMesh to RykolPatchMesh" VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd." VALUE "OriginalFilename", "nel_convert_patch.dlm" VALUE "ProductName", "NeL Patch Converter" - VALUE "ProductVersion", "0.11.3" + VALUE "ProductVersion", "0.12.0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc index d49d40a82..c687fdd49 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc @@ -514,8 +514,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 3, 0 - PRODUCTVERSION 0, 11, 3, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -533,13 +533,13 @@ BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core" VALUE "FileDescription", "NeL Patch Edit" - VALUE "FileVersion", "0.11.3" + VALUE "FileVersion", "0.12.0" VALUE "InternalName", "neleditpatch" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc." VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF." VALUE "OriginalFilename", "neleditpatch.dlm" VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", "0.11.3" + VALUE "ProductVersion", "0.12.0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc index 6b8d7f88e..0093248c4 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc @@ -96,8 +96,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 3, 0 - PRODUCTVERSION 0, 11, 3, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -116,14 +116,14 @@ BEGIN VALUE "Comments", "TECH: cyril.corvazier\0" VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "NeL Patch Paint\0" - VALUE "FileVersion", "0.11.3\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "mods\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "nelpatchpaint.dlm\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.3\0" + VALUE "ProductVersion", "0.12.0\0" VALUE "SpecialBuild", "\0" END END diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc index 8620d6170..fdf00449c 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc @@ -125,8 +125,8 @@ IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 3, 0 - PRODUCTVERSION 0, 11, 3, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -145,13 +145,13 @@ BEGIN VALUE "Comments", "TECH: \0" VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "Vertex Tree Paint\0" - VALUE "FileVersion", "0.11.3\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "VertexTreePaint\0" VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0" VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0" VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.3\0" + VALUE "ProductVersion", "0.12.0\0" END END BLOCK "VarFileInfo" diff --git a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc index 315747354..cec8df28b 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc @@ -124,8 +124,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 11, 3, 0 - PRODUCTVERSION 0, 11, 3, 0 + FILEVERSION 0, 12, 0, 0 + PRODUCTVERSION 0, 12, 0, 0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -142,12 +142,12 @@ BEGIN BEGIN VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.11.3\0" + VALUE "FileVersion", "0.12.0\0" VALUE "InternalName", "Tile_utility\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Tile_utility.dlu\0" VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.11.3\0" + VALUE "ProductVersion", "0.12.0\0" VALUE "FileDescription", "Create material for tiles\0" VALUE "Comments", "TECH: \0" VALUE "LegalTrademarks", "\0" diff --git a/code/ryzom/common/src/game_share/ryzom_version.h b/code/ryzom/common/src/game_share/ryzom_version.h index 34d96d610..9c9cdb504 100644 --- a/code/ryzom/common/src/game_share/ryzom_version.h +++ b/code/ryzom/common/src/game_share/ryzom_version.h @@ -19,7 +19,7 @@ #define RYZOM_VERSION "ryzomcore" \ "/" \ - "v0.11.3" \ + "v0.12.0" \ "-dev" #endif // RYZOM_VERSION_H diff --git a/code/tool/increment_version/increment_version.py b/code/tool/increment_version/increment_version.py index 43afec9ee..3b1d61ad9 100644 --- a/code/tool/increment_version/increment_version.py +++ b/code/tool/increment_version/increment_version.py @@ -31,8 +31,8 @@ os.chdir('../../') RootDir = os.getcwd(); MajorVersion = 0 -MinorVersion = 11 -PatchVersion = 3 +MinorVersion = 12 +PatchVersion = 0 Revision = 0 VersionString = str(MajorVersion) + "." + str(MinorVersion) + "." + str(PatchVersion) diff --git a/code/web/public_php/ams/templates/layout.tpl b/code/web/public_php/ams/templates/layout.tpl index 94cf0b4dd..7720ca65c 100644 --- a/code/web/public_php/ams/templates/layout.tpl +++ b/code/web/public_php/ams/templates/layout.tpl @@ -167,7 +167,7 @@
- {if $permission > 1}

AMS 0.11.3 Powered by: Charisma

{/if} + {if $permission > 1}

AMS 0.12.0 Powered by: Charisma

{/if}
{/if}