From 008197a569d1f837ddc98a62e843e4dece9e2e35 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Tue, 29 Jan 2019 18:01:30 -0500 Subject: [PATCH] Remove scripting switch in cmake --- .travis/linux-mingw/docker.sh | 2 +- .travis/linux/docker.sh | 2 +- .travis/macos/build.sh | 2 +- .travis/transifex/docker.sh | 2 +- CMakeLists.txt | 6 ------ src/core/CMakeLists.txt | 20 ++++++++------------ src/core/core.cpp | 6 ------ src/core/core.h | 4 ---- 8 files changed, 12 insertions(+), 32 deletions(-) diff --git a/.travis/linux-mingw/docker.sh b/.travis/linux-mingw/docker.sh index a4e75d4ab..2514a5058 100755 --- a/.travis/linux-mingw/docker.sh +++ b/.travis/linux-mingw/docker.sh @@ -5,7 +5,7 @@ cd /citra echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf" mkdir build && cd build -cmake .. -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DUSE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_SCRIPTING=ON +cmake .. -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DUSE_CCACHE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON make -j4 echo "Tests skipped" diff --git a/.travis/linux/docker.sh b/.travis/linux/docker.sh index 10ce0900c..2a583d6a5 100755 --- a/.travis/linux/docker.sh +++ b/.travis/linux/docker.sh @@ -3,7 +3,7 @@ cd /citra mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_SCRIPTING=ON +cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON make -j4 ctest -VV -C Release diff --git a/.travis/macos/build.sh b/.travis/macos/build.sh index 5b95924ca..bb3c687e6 100755 --- a/.travis/macos/build.sh +++ b/.travis/macos/build.sh @@ -7,7 +7,7 @@ export Qt5_DIR=$(brew --prefix)/opt/qt5 export PATH="/usr/local/opt/ccache/libexec:$PATH" mkdir build && cd build -cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_SCRIPTING=ON +cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON make -j4 ctest -VV -C Release diff --git a/.travis/transifex/docker.sh b/.travis/transifex/docker.sh index 99b415459..003b298b6 100644 --- a/.travis/transifex/docker.sh +++ b/.travis/transifex/docker.sh @@ -26,7 +26,7 @@ tx --version cd /citra mkdir build && cd build -cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DENABLE_SCRIPTING=OFF +cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF make translation cd .. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ba175a1d..491a6d6e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,6 @@ option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) -option(ENABLE_SCRIPTING "Enables scripting support" OFF) - if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) message(STATUS "Copying pre-commit hook") file(COPY hooks/pre-commit @@ -253,10 +251,6 @@ if (ENABLE_QT) endif() endif() -if (ENABLE_SCRIPTING) - add_definitions(-DENABLE_SCRIPTING) -endif() - # Platform-specific library requirements # ====================================== diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 7b1973624..6904aaaf6 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -423,6 +423,14 @@ add_library(core STATIC movie.h perf_stats.cpp perf_stats.h + rpc/packet.cpp + rpc/packet.h + rpc/rpc_server.cpp + rpc/rpc_server.h + rpc/server.cpp + rpc/server.h + rpc/udp_server.cpp + rpc/udp_server.h settings.cpp settings.h telemetry_session.cpp @@ -431,18 +439,6 @@ add_library(core STATIC tracer/recorder.cpp tracer/recorder.h ) -if (ENABLE_SCRIPTING) - target_sources(core PRIVATE - rpc/packet.cpp - rpc/packet.h - rpc/rpc_server.cpp - rpc/rpc_server.h - rpc/server.cpp - rpc/server.h - rpc/udp_server.cpp - rpc/udp_server.h - ) -endif() create_target_directory_groups(core) diff --git a/src/core/core.cpp b/src/core/core.cpp index a6af49b41..671363169 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -27,9 +27,7 @@ #include "core/hw/hw.h" #include "core/loader/loader.h" #include "core/movie.h" -#ifdef ENABLE_SCRIPTING #include "core/rpc/rpc_server.h" -#endif #include "core/settings.h" #include "network/network.h" #include "video_core/video_core.h" @@ -201,9 +199,7 @@ System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) { telemetry_session = std::make_unique(); -#ifdef ENABLE_SCRIPTING rpc_server = std::make_unique(); -#endif service_manager = std::make_shared(*this); archive_manager = std::make_unique(*this); @@ -294,9 +290,7 @@ void System::Shutdown() { kernel.reset(); HW::Shutdown(); telemetry_session.reset(); -#ifdef ENABLE_SCRIPTING rpc_server.reset(); -#endif cheat_engine.reset(); service_manager.reset(); dsp_core.reset(); diff --git a/src/core/core.h b/src/core/core.h index 365b8063c..b8552fe3b 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -24,11 +24,9 @@ namespace AudioCore { class DspInterface; } -#ifdef ENABLE_SCRIPTING namespace RPC { class RPCServer; } -#endif namespace Service { namespace SM { @@ -267,10 +265,8 @@ private: /// Cheats manager std::unique_ptr cheat_engine; -#ifdef ENABLE_SCRIPTING /// RPC Server for scripting support std::unique_ptr rpc_server; -#endif std::unique_ptr archive_manager;