From a046a06db32bc825f40ba0b662646b0b2f20a429 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 3 Jan 2016 18:16:07 +0100 Subject: [PATCH] Merge with develop --- code/CMakeLists.txt | 22 +++++++++++ code/nel/src/misc/bitmap.cpp | 6 +-- code/nel/src/misc/common.cpp | 33 ++++++----------- code/nel/src/misc/log.cpp | 3 +- .../tools/3d/panoply_maker/color_modifier.cpp | 8 ++-- .../panoply_maker/hls_bank_texture_info.cpp | 11 ++---- .../tools/3d/panoply_maker/panoply_maker.cpp | 35 ++++++++++++++++-- .../tools/misc/crash_report/CMakeLists.txt | 22 ++++++++--- .../tools/misc/crash_report/crash_report.cpp | 6 ++- .../tools/misc/crash_report/crash_report.rc | 35 ++++++++++++++++++ .../tools/misc/crash_report/nevraxpill.ico | Bin 0 -> 3638 bytes .../nel/tools/misc/crash_report/resources.qrc | 5 +++ code/ryzom/client/src/CMakeLists.txt | 23 +----------- code/ryzom/client/src/client.cpp | 12 ------ code/ryzom/client/src/init.cpp | 23 ++++++++++-- .../client/client_config_qt/CMakeLists.txt | 8 ++++ .../client/client_patcher/CMakeLists.txt | 8 ++++ 17 files changed, 176 insertions(+), 84 deletions(-) create mode 100644 code/nel/tools/misc/crash_report/crash_report.rc create mode 100644 code/nel/tools/misc/crash_report/nevraxpill.ico create mode 100644 code/nel/tools/misc/crash_report/resources.qrc diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 3b37ee7b6..db5aa2ef5 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -144,6 +144,28 @@ IF(WITH_SSE2) ENDIF(WITH_SSE3) ENDIF(WITH_SSE2) +IF(APPLE_CERTIFICATE) + # Find codesign_allocate + + # Xcode 7.0 and later versions + SET(CODESIGN_ALLOCATE ${OSX_DEVELOPER_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate) + + IF(NOT EXISTS "${CODESIGN_ALLOCATE}") + # Xcode 6.4 and previous versions + SET(CODESIGN_ALLOCATE ${CMAKE_OSX_SYSROOT}/usr/bin/codesign_allocate) + ENDIF() + + IF(NOT EXISTS "${CODESIGN_ALLOCATE}") + # System path + SET(CODESIGN_ALLOCATE /usr/bin/codesign_allocate) + ENDIF() + + IF(NOT EXISTS "${CODESIGN_ALLOCATE}") + MESSAGE(WARNING "Unable to find codesign_allocate in standard directories") + SET(CODESIGN_ALLOCATE) + ENDIF() +ENDIF() + MACRO(ADD_QT_LIBRARY _NAME) IF(WIN32) SET(_PREFIX "Qt5") diff --git a/code/nel/src/misc/bitmap.cpp b/code/nel/src/misc/bitmap.cpp index 107f79e55..eef7386f7 100644 --- a/code/nel/src/misc/bitmap.cpp +++ b/code/nel/src/misc/bitmap.cpp @@ -443,14 +443,14 @@ bool CBitmap::isGrayscale() const uint32 *data = (uint32*)_Data[0].getPtr(); uint32 *endData = (uint32*)((uint8*)data + size); - NLMISC::CRGBA color; + NLMISC::CRGBA *color = NULL; // check if all alphas have the same value while(data < endData) { - color.set8888(*data); + color = (NLMISC::CRGBA*)data; - if (!color.isGray()) return false; + if (!color->isGray()) return false; ++data; } diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 8ad3488f6..4799ac10e 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -784,12 +784,6 @@ bool launchProgram(const std::string &programName, const std::string &arguments, } argv[i+1] = NULL; - // save LD_LIBRARY_PATH - const char *previousEnv = getenv("LD_LIBRARY_PATH"); - - // clear LD_LIBRARY_PATH to avoid problems with Steam Runtime - setenv("LD_LIBRARY_PATH", "", 1); - int status = vfork (); ///////////////////////////////////////////////////////// /// WARNING : NO MORE INSTRUCTION AFTER VFORK ! @@ -800,9 +794,6 @@ bool launchProgram(const std::string &programName, const std::string &arguments, char *err = strerror (errno); if (log) nlwarning("LAUNCH: Failed launched '%s' with arg '%s' err %d: '%s'", programName.c_str(), arguments.c_str(), errno, err); - - // restore previous LD_LIBRARY_PATH - setenv("LD_LIBRARY_PATH", previousEnv, 1); } else if (status == 0) { @@ -818,9 +809,6 @@ bool launchProgram(const std::string &programName, const std::string &arguments, else { //nldebug("LAUNCH: Successful launch '%s' with arg '%s'", programName.c_str(), arguments.c_str()); - - // restore previous LD_LIBRARY_PATH - setenv("LD_LIBRARY_PATH", previousEnv, 1); return true; } @@ -890,12 +878,6 @@ sint launchProgramAndWaitForResult(const std::string &programName, const std::st CloseHandle(pi.hThread); } #else - // save LD_LIBRARY_PATH - const char *previousEnv = getenv("LD_LIBRARY_PATH"); - - // clear LD_LIBRARY_PATH to avoid problems with Steam Runtime - setenv("LD_LIBRARY_PATH", "", 1); - // program name is the only required string std::string command = programName; @@ -905,9 +887,6 @@ sint launchProgramAndWaitForResult(const std::string &programName, const std::st // execute the command res = system(command.c_str()); - // restore previous LD_LIBRARY_PATH - setenv("LD_LIBRARY_PATH", previousEnv, 1); - if (res && log) nlwarning ("LAUNCH: Failed launched '%s' with arg '%s' return code %d", programName.c_str(), arguments.c_str(), res); #endif @@ -1253,8 +1232,18 @@ static bool openDocWithExtension (const char *document, const char *ext) return false; } - return launchProgram(command, document); + // save LD_LIBRARY_PATH + const char *previousEnv = getenv("LD_LIBRARY_PATH"); + // clear LD_LIBRARY_PATH to avoid problems with Steam Runtime + setenv("LD_LIBRARY_PATH", "", 1); + + bool res = launchProgram(command, document); + + // restore previous LD_LIBRARY_PATH + setenv("LD_LIBRARY_PATH", previousEnv, 1); + + return res; #endif // NL_OS_WINDOWS return false; diff --git a/code/nel/src/misc/log.cpp b/code/nel/src/misc/log.cpp index f0e3e36f8..2e7146fb6 100644 --- a/code/nel/src/misc/log.cpp +++ b/code/nel/src/misc/log.cpp @@ -83,7 +83,8 @@ void CLog::setProcessName (const std::string &processName) } } - *_ProcessName = processName; + // keep only filename without path + *_ProcessName = CFile::getFilename(processName); } void CLog::setPosition (sint line, const char *fileName, const char *funcName) diff --git a/code/nel/tools/3d/panoply_maker/color_modifier.cpp b/code/nel/tools/3d/panoply_maker/color_modifier.cpp index a55936b7c..b34e021ed 100644 --- a/code/nel/tools/3d/panoply_maker/color_modifier.cpp +++ b/code/nel/tools/3d/panoply_maker/color_modifier.cpp @@ -46,7 +46,7 @@ void CColorModifier::convertBitmap(NLMISC::CBitmap &destBitmap, const NLMISC::CB const NLMISC::CRGBA *src = (NLMISC::CRGBA *) &srcBitmap.getPixels()[0]; - const NLMISC::CRGBA *mask = (NLMISC::CRGBA *) &maskBitmap.getPixels()[0]; + const uint8 *mask = &maskBitmap.getPixels()[0]; NLMISC::CRGBA *dest = (NLMISC::CRGBA *) &destBitmap.getPixels()[0]; @@ -69,7 +69,7 @@ void CColorModifier::convertBitmap(NLMISC::CBitmap &destBitmap, const NLMISC::CB result.B = CalcBrightnessContrast(result.B, Luminosity, Contrast, grey); // blend to the destination by using the mask alpha - result.blendFromui(*dest, result, mask->R); + result.blendFromui(*dest, result, *mask); /// keep alpha from the source dest->R = result.R; @@ -111,7 +111,7 @@ void CColorModifier::evalBitmapStats(const NLMISC::CBitmap &srcBitmap, float gTotal = 0; const NLMISC::CRGBA *src = (NLMISC::CRGBA *) &srcBitmap.getPixels()[0]; - const NLMISC::CRGBA *mask = (NLMISC::CRGBA *) &maskBitmap.getPixels()[0]; + const uint8 *mask = &maskBitmap.getPixels()[0]; for (uint y = 0; y < srcBitmap.getHeight(); ++y) { @@ -119,7 +119,7 @@ void CColorModifier::evalBitmapStats(const NLMISC::CBitmap &srcBitmap, { float h, l, s; - float intensity = mask->R * (1.f / 255.f); + float intensity = *mask * (1.f / 255.f); bool achromatic = src->convertToHLS(h, l, s); float grey = 0.299f * src->R + 0.587f * src->G + 0.114f * src->B; diff --git a/code/nel/tools/3d/panoply_maker/hls_bank_texture_info.cpp b/code/nel/tools/3d/panoply_maker/hls_bank_texture_info.cpp index 2fc50d28f..4e6a1693a 100644 --- a/code/nel/tools/3d/panoply_maker/hls_bank_texture_info.cpp +++ b/code/nel/tools/3d/panoply_maker/hls_bank_texture_info.cpp @@ -43,18 +43,15 @@ void CHLSBankTextureInfo::serial(NLMISC::IStream &f) // *************************************************************************** void CHLSBankTextureInfo::CMaskBitmap::build(const NLMISC::CBitmap &src) { - nlassert(src.getPixelFormat()==CBitmap::RGBA); + nlassert(src.getPixelFormat()==CBitmap::Luminance); Width= src.getWidth(); Height= src.getHeight(); Pixels.resize(Width*Height); if(!Pixels.empty()) { - CRGBA *pSrc= (CRGBA*)(&src.getPixels()[0]); - uint8 *pDst= &Pixels[0]; - for(uint i=0; i 0 && maskDepth > 8) { + if (!li.Mask.isGrayscale()) + { + nlwarning("Mask %s is using colors, results may by incorrect! Use OptimizeTextures = 2 to fix it.", maskFileName.c_str()); + } + if (bi.OptimizeTextures > 1) { + // get a pointer on original data + uint32 size = li.Mask.getPixels().size(); + uint32 *data = (uint32*)li.Mask.getPixels().getPtr(); + uint32 *endData = (uint32*)((uint8*)data + size); + + NLMISC::CRGBA *color = NULL; + + // process all pixels + while(data < endData) + { + color = (NLMISC::CRGBA*)data; + + // copy red value to green and blue, + // because only red is used for mask + color->B = color->G = color->R; + + // make opaque + color->A = 255; + + ++data; + } + + // convert image to real grayscale + li.Mask.convertToType(NLMISC::CBitmap::Luminance); + NLMISC::COFile os; if (os.open(maskFileName)) @@ -826,9 +856,9 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str } } - if (li.Mask.PixelFormat != NLMISC::CBitmap::RGBA) + if (li.Mask.PixelFormat != NLMISC::CBitmap::Luminance) { - li.Mask.convertToType(NLMISC::CBitmap::RGBA); + li.Mask.convertToType(NLMISC::CBitmap::Luminance); } /// make sure the mask has the same size @@ -969,5 +999,4 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str { nlerror("Couldn't write %s", fullHlsInfoPath.c_str()); } - } diff --git a/code/nel/tools/misc/crash_report/CMakeLists.txt b/code/nel/tools/misc/crash_report/CMakeLists.txt index c1dc661ae..221f7cabe 100644 --- a/code/nel/tools/misc/crash_report/CMakeLists.txt +++ b/code/nel/tools/misc/crash_report/CMakeLists.txt @@ -1,7 +1,9 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR}) -FILE(GLOB CRASHREPORT_SRC *.cpp) +FILE(GLOB CRASHREPORT_SRC *.cpp *.rc) FILE(GLOB CRASHREPORT_HDR *.h) +SET(CRASHREPORT_QRC resources.qrc) + SET(CRASHREPORT_MOC_HDR crash_report_socket.h crash_report_widget.h @@ -22,25 +24,35 @@ IF(WITH_QT) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(${QT_DEFINITIONS}) + QT4_ADD_RESOURCES(CRASHREPORT_QRC_SRCS ${CRASHREPORT_QRC}) QT4_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) QT4_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) - + SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) ELSE() + QT5_ADD_RESOURCES(CRASHREPORT_QRC_SRCS ${CRASHREPORT_QRC}) QT5_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) QT5_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) ENDIF() -SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI}) +SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI} ${CRASHREPORT_QRC_SRCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${CRASHREPORT_UI_HDR}) -SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${CRASHREPORT_MOC_SRC}) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${CRASHREPORT_MOC_SRC}) SOURCE_GROUP("source files" FILES ${CRASHREPORT_SRC}) SOURCE_GROUP("header files" FILES ${CRASHREPORT_HDR}) -ADD_EXECUTABLE(crash_report WIN32 ${CRASHREPORT_SRC} ${CRASHREPORT_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR}) +ADD_EXECUTABLE(crash_report WIN32 ${CRASHREPORT_SRC} ${CRASHREPORT_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR} ${CRASHREPORT_QRC_SRCS}) TARGET_LINK_LIBRARIES(crash_report ${QT_LIBRARIES}) NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report") NL_ADD_RUNTIME_FLAGS(crash_report) INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX}) + +IF(WITH_RYZOM_CLIENT AND APPLE) + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET crash_report POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crash_report" COMMENT "Signing crash_report executable...") + ENDIF() + + ADD_CUSTOM_COMMAND(TARGET crash_report POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crash_report ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app/Contents/MacOS/CrashReport) +ENDIF() diff --git a/code/nel/tools/misc/crash_report/crash_report.cpp b/code/nel/tools/misc/crash_report/crash_report.cpp index c6012a06b..f9191fde7 100644 --- a/code/nel/tools/misc/crash_report/crash_report.cpp +++ b/code/nel/tools/misc/crash_report/crash_report.cpp @@ -31,7 +31,7 @@ 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 key; std::string value; for( int i = argc - 1 ; i >= 0; i-- ) @@ -105,7 +105,9 @@ int main(int argc, char **argv) } #endif - QApplication app( argc, argv ); + QApplication app(argc, argv); + + QApplication::setWindowIcon(QIcon(":/icons/nevraxpill.ico")); std::vector< std::pair< std::string, std::string > > params; diff --git a/code/nel/tools/misc/crash_report/crash_report.rc b/code/nel/tools/misc/crash_report/crash_report.rc new file mode 100644 index 000000000..e4949fd8f --- /dev/null +++ b/code/nel/tools/misc/crash_report/crash_report.rc @@ -0,0 +1,35 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "nevraxpill.ico" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION NL_VERSION_RC +PRODUCTVERSION NL_VERSION_RC +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#else +FILEFLAGS 0x0L +#endif +FILEOS VOS__WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "Crash Report" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "crash_report.exe" + VALUE "ProductName", "Ryzom Core" + VALUE "ProductVersion", NL_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END diff --git a/code/nel/tools/misc/crash_report/nevraxpill.ico b/code/nel/tools/misc/crash_report/nevraxpill.ico new file mode 100644 index 0000000000000000000000000000000000000000..c5f25058384f0aba7d5193400e74efdc8a65ccc1 GIT binary patch literal 3638 zcmeH}y>1gh5Xb-b{cRiAJMh>Nt}K+7NFISE?|@SH73|6-RchB!9>8rZS|nF4DbnB) z(Sby<%H4cK7u6-OK?FTnq*W-}h&Vmg&O5@DCM`cfa~;R86ywdTvmqp;Chyl|)QZ zs;uYi?C7Qbc_y*fanJ8UMsY(vA;G8~O0gX#uiuN9@SB}s>pK(=w&_C=|0iQ|;x z^rFu^YfzN97T=cy>i3Gg==E*88&Lhp&Cj6g#|g)Kc@{-k#;q + + nevraxpill.ico + + diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 9044fe74e..5f7242f24 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -79,27 +79,8 @@ IF(WITH_RYZOM_CLIENT) ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR}) ENDIF() - IF(APPLE_CERTIFICATE) - # Find codesign_allocate - - # Xcode 7.0 and later versions - SET(CODESIGN_ALLOCATE ${OSX_DEVELOPER_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate) - - IF(NOT EXISTS "${CODESIGN_ALLOCATE}") - # Xcode 6.4 and previous versions - SET(CODESIGN_ALLOCATE ${CMAKE_OSX_SYSROOT}/usr/bin/codesign_allocate) - ENDIF() - - IF(NOT EXISTS "${CODESIGN_ALLOCATE}") - # System path - SET(CODESIGN_ALLOCATE /usr/bin/codesign_allocate) - ENDIF() - - IF(NOT EXISTS "${CODESIGN_ALLOCATE}") - MESSAGE(WARNING "Unable to find codesign_allocate in standard directories") - ELSE() - ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...") - ENDIF() + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...") ENDIF() IF(WITH_RYZOM_STEAM) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 1c5476b39..61b30b4c9 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -106,15 +106,6 @@ void quitCrashReport () contReset(CrashCounterSock); } -#ifndef NL_OS_WINDOWS -static void sigHandler(int Sig) -{ - // redirect the signal for the next time - signal(Sig, sigHandler); - nlwarning("Ignoring signal SIGPIPE"); -} -#endif - //--------------------------------------------------- // MAIN : // Entry for the Application. @@ -548,9 +539,6 @@ int main(int argc, char **argv) // set process name for logs CLog::setProcessName(filename); - // ignore signal SIGPIPE generated by libwww - signal(SIGPIPE, sigHandler); - // Delete the .sh file because it s not useful anymore if (NLMISC::CFile::fileExists("updt_nl.sh")) NLMISC::CFile::deleteFile("updt_nl.sh"); diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 6e81a4203..fec51a93e 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -990,11 +990,26 @@ void prelogInit() // Check the driver is not is 16 bits checkDriverDepth (); - // For login phase, MUST be in windowed UDriver::CMode mode; - mode.Width = 1024; - mode.Height = 768; - mode.Windowed = true; + + bool forceWindowed1024x768 = true; + + if (Driver->getCurrentScreenMode(mode)) + { + // if screen mode lower than 1024x768, use same mode in fullscreen + if (mode.Width <= 1024 && mode.Height <= 768) + { + mode.Windowed = false; + forceWindowed1024x768 = false; + } + } + + if (forceWindowed1024x768) + { + mode.Width = 1024; + mode.Height = 768; + mode.Windowed = true; + } // Disable Hardware Vertex Program. if(ClientCfg.DisableVtxProgram) diff --git a/code/ryzom/tools/client/client_config_qt/CMakeLists.txt b/code/ryzom/tools/client/client_config_qt/CMakeLists.txt index f0bb295b3..f27589afa 100644 --- a/code/ryzom/tools/client/client_config_qt/CMakeLists.txt +++ b/code/ryzom/tools/client/client_config_qt/CMakeLists.txt @@ -69,3 +69,11 @@ IF(WITH_PCH) ENDIF() INSTALL(TARGETS ryzom_configuration_qt RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client) + +IF(WITH_RYZOM_CLIENT AND APPLE) + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET ryzom_configuration_qt POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_configuration_qt" COMMENT "Signing ryzom_configuration_qt executable...") + ENDIF() + + ADD_CUSTOM_COMMAND(TARGET ryzom_configuration_qt POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_configuration_qt ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app/Contents/MacOS/RyzomConfiguration) +ENDIF() diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index ce7d4d67a..f71f21a35 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -43,3 +43,11 @@ IF(WITH_PCH) ENDIF(WITH_PCH) INSTALL(TARGETS ryzom_client_patcher RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications) + +IF(WITH_RYZOM_CLIENT AND APPLE) + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET ryzom_client_patcher POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_client_patcher" COMMENT "Signing ryzom_client_patcher executable...") + ENDIF() + + ADD_CUSTOM_COMMAND(TARGET ryzom_client_patcher POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_client_patcher ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app/Contents/MacOS/RyzomClientPatcher) +ENDIF()