mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 10:20:54 +00:00
Changed: Compile client_config_qt with Qt 5
--HG-- branch : develop
This commit is contained in:
parent
5e686dfc60
commit
9fdb287175
6 changed files with 103 additions and 40 deletions
|
@ -1,7 +1,7 @@
|
||||||
IF(WITH_RYZOM_CLIENT)
|
IF(WITH_RYZOM_CLIENT)
|
||||||
ADD_SUBDIRECTORY(client_patcher)
|
ADD_SUBDIRECTORY(client_patcher)
|
||||||
|
|
||||||
IF(WITH_QT)
|
IF(WITH_QT OR WITH_QT5)
|
||||||
ADD_SUBDIRECTORY(client_config_qt)
|
ADD_SUBDIRECTORY(client_config_qt)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR})
|
||||||
INCLUDE( ${QT_USE_FILE} )
|
|
||||||
|
|
||||||
FILE( GLOB SRC *.cpp *.h )
|
FILE(GLOB SRC *.cpp *.h resources/*.rc)
|
||||||
|
|
||||||
SET( CLIENT_CONFIG_HDR
|
SET(CLIENT_CONFIG_HDR
|
||||||
client_config_dialog.h
|
client_config_dialog.h
|
||||||
display_settings_advanced_widget.h
|
display_settings_advanced_widget.h
|
||||||
display_settings_details_widget.h
|
display_settings_details_widget.h
|
||||||
|
@ -16,7 +15,7 @@ SET( CLIENT_CONFIG_HDR
|
||||||
widget_base.h
|
widget_base.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET( CLIENT_CONFIG_UIS
|
SET(CLIENT_CONFIG_UIS
|
||||||
client_config_dialog.ui
|
client_config_dialog.ui
|
||||||
display_settings_advanced_widget.ui
|
display_settings_advanced_widget.ui
|
||||||
display_settings_details_widget.ui
|
display_settings_details_widget.ui
|
||||||
|
@ -34,26 +33,42 @@ SET(CLIENT_CONFIG_TRANS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/translations/ryzom_configuration_hu.ts
|
${CMAKE_CURRENT_SOURCE_DIR}/translations/ryzom_configuration_hu.ts
|
||||||
)
|
)
|
||||||
|
|
||||||
CONFIGURE_FILE( translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY )
|
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
|
||||||
SET( CLIENT_CONFIG_RCS resources.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc )
|
SET(CLIENT_CONFIG_RCS resources.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc )
|
||||||
QT4_ADD_TRANSLATION( CLIENT_CONFIG_QM ${CLIENT_CONFIG_TRANS} )
|
|
||||||
QT4_ADD_RESOURCES( CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS} )
|
IF(WITH_QT)
|
||||||
QT4_WRAP_CPP( CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR} )
|
INCLUDE_DIRECTORIES(${QT_INCLUDES})
|
||||||
QT4_WRAP_UI( CLIENT_CONFIG_UI_HDRS ${CLIENT_CONFIG_UIS} )
|
INCLUDE(${QT_USE_FILE})
|
||||||
SOURCE_GROUP( "Resources" FILES ${CLIENT_CONFIG_RCS} )
|
|
||||||
SOURCE_GROUP( "Forms" FILES ${CLIENT_CONFIG_UIS} )
|
QT4_ADD_TRANSLATION(CLIENT_CONFIG_QM ${CLIENT_CONFIG_TRANS})
|
||||||
SOURCE_GROUP( "Generated Files" FILES ${CLIENT_CONFIG_UI_HDRS} ${CLIENT_CONFIG_MOC_SRC} )
|
QT4_ADD_RESOURCES(CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS})
|
||||||
SOURCE_GROUP( "Translation Files" FILES ${CLIENT_CONFIG_TRANS} )
|
QT4_WRAP_CPP(CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR})
|
||||||
ADD_DEFINITIONS( ${QT_DEFINITIONS} )
|
QT4_WRAP_UI(CLIENT_CONFIG_UI_HDRS ${CLIENT_CONFIG_UIS})
|
||||||
ADD_EXECUTABLE( ryzom_configuration_qt WIN32 MACOSX_BUNDLE ${SRC} ${CLIENT_CONFIG_MOC_SRC} ${CLIENT_CONFIG_UI_HDRS} ${CLIENT_CONFIG_RC_SRCS} ${CLIENT_CONFIG_TRANS} )
|
|
||||||
NL_DEFAULT_PROPS( ryzom_configuration_qt "Ryzom, Tools: Ryzom Configuration Qt" )
|
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
||||||
|
ELSE()
|
||||||
|
QT5_ADD_TRANSLATION(CLIENT_CONFIG_QM ${CLIENT_CONFIG_TRANS})
|
||||||
|
QT5_ADD_RESOURCES(CLIENT_CONFIG_RC_SRCS ${CLIENT_CONFIG_RCS})
|
||||||
|
QT5_WRAP_CPP(CLIENT_CONFIG_MOC_SRC ${CLIENT_CONFIG_HDR})
|
||||||
|
QT5_WRAP_UI(CLIENT_CONFIG_UI_HDRS ${CLIENT_CONFIG_UIS})
|
||||||
|
|
||||||
|
SET(QT_LIBRARIES Qt5::Widgets Qt5::Core Qt5::Gui Qt5::OpenGL)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SOURCE_GROUP("Resources" FILES ${CLIENT_CONFIG_RCS})
|
||||||
|
SOURCE_GROUP("Forms" FILES ${CLIENT_CONFIG_UIS})
|
||||||
|
SOURCE_GROUP("Generated Files" FILES ${CLIENT_CONFIG_UI_HDRS} ${CLIENT_CONFIG_MOC_SRC})
|
||||||
|
SOURCE_GROUP("Translation Files" FILES ${CLIENT_CONFIG_TRANS} )
|
||||||
|
|
||||||
|
ADD_EXECUTABLE(ryzom_configuration_qt WIN32 MACOSX_BUNDLE ${SRC} ${CLIENT_CONFIG_MOC_SRC} ${CLIENT_CONFIG_UI_HDRS} ${CLIENT_CONFIG_RC_SRCS} ${CLIENT_CONFIG_TRANS} ${CLIENT_CONFIG_QM})
|
||||||
|
NL_DEFAULT_PROPS(ryzom_configuration_qt "Ryzom, Tools: Ryzom Configuration Qt" )
|
||||||
NL_ADD_RUNTIME_FLAGS( ryzom_configuration_qt )
|
NL_ADD_RUNTIME_FLAGS( ryzom_configuration_qt )
|
||||||
NL_ADD_LIB_SUFFIX( ryzom_configuration_qt )
|
NL_ADD_LIB_SUFFIX( ryzom_configuration_qt )
|
||||||
TARGET_LINK_LIBRARIES( ryzom_configuration_qt nelmisc nel3d ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY})
|
TARGET_LINK_LIBRARIES( ryzom_configuration_qt nelmisc nel3d ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY})
|
||||||
|
|
||||||
IF(WITH_PCH)
|
IF(WITH_PCH)
|
||||||
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_configuration_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_configuration_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
|
||||||
ENDIF(WITH_PCH)
|
ENDIF()
|
||||||
|
|
||||||
INSTALL(TARGETS ryzom_configuration_qt RUNTIME DESTINATION games COMPONENT client BUNDLE DESTINATION /Applications)
|
INSTALL(TARGETS ryzom_configuration_qt RUNTIME DESTINATION games COMPONENT client BUNDLE DESTINATION /Applications)
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
CClientConfigDialog::CClientConfigDialog( QWidget *parent ) :
|
CClientConfigDialog::CClientConfigDialog( QWidget *parent ) :
|
||||||
QDialog( parent )
|
QDialog( parent )
|
||||||
|
@ -156,7 +157,7 @@ void CClientConfigDialog::onClickPlay()
|
||||||
{
|
{
|
||||||
bool started = false;
|
bool started = false;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef Q_OS_WIN32
|
||||||
started = QProcess::startDetached( "ryzom_client_r.exe" );
|
started = QProcess::startDetached( "ryzom_client_r.exe" );
|
||||||
if( !started )
|
if( !started )
|
||||||
QProcess::startDetached( "ryzom_client_rd.exe" );
|
QProcess::startDetached( "ryzom_client_rd.exe" );
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include "client_config_dialog.h"
|
#include "client_config_dialog.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
#include <QSplashScreen>
|
||||||
|
|
||||||
int main( sint32 argc, char **argv )
|
int main( sint32 argc, char **argv )
|
||||||
{
|
{
|
||||||
QApplication app( argc, argv );
|
QApplication app( argc, argv );
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#include <windows.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
IDI_MAIN_ICON ICON DISCARDABLE "client_config.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", "Client Config Qt"
|
||||||
|
VALUE "FileVersion", NL_VERSION
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT
|
||||||
|
#ifdef _DEBUG
|
||||||
|
VALUE "OriginalFilename", "client_config_qt_d.exe"
|
||||||
|
#else
|
||||||
|
VALUE "OriginalFilename", "client_config_qt_r.exe"
|
||||||
|
#endif
|
||||||
|
VALUE "ProductName", "Ryzom Core"
|
||||||
|
VALUE "ProductVersion", NL_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1252
|
||||||
|
END
|
||||||
|
END
|
|
@ -17,6 +17,12 @@
|
||||||
#ifndef STDPCH_H
|
#ifndef STDPCH_H
|
||||||
#define STDPCH_H
|
#define STDPCH_H
|
||||||
|
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
|
#undef Q_COMPILER_RVALUE_REFS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <nel/misc/types_nl.h>
|
#include <nel/misc/types_nl.h>
|
||||||
|
|
Loading…
Reference in a new issue