Skip to content

Commit

Permalink
Remove no grpc builds (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
fundies committed Mar 27, 2021
1 parent 394448f commit 977fcbe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 74 deletions.
32 changes: 13 additions & 19 deletions CMakeLists.txt
Expand Up @@ -3,7 +3,6 @@ project(RadialGM)

include(CMakeDependentOption)

option(RGM_ENABLE_GRPC_SERVER "Enable the GRPC client plugin for compilation and code analysis." ON)
option(RGM_BUILD_EMAKE "Build Emake and the compiler." ON)

# FIXME: MSVC dynamic linking requires US TO DLLEXPORT our funcs
Expand Down Expand Up @@ -186,11 +185,8 @@ else()
set(EDITOR_SOURCES Widgets/CodeWidgetScintilla.cpp)
endif()

if (RGM_ENABLE_GRPC_SERVER)
add_definitions(-DRGM_SERVER_ENABLED)
set(RGM_SOURCES ${RGM_SOURCES} Plugins/ServerPlugin.cpp)
set(RGM_HEADERS ${RGM_HEADERS} Plugins/ServerPlugin.h)
endif()
set(RGM_SOURCES ${RGM_SOURCES} Plugins/ServerPlugin.cpp)
set(RGM_HEADERS ${RGM_HEADERS} Plugins/ServerPlugin.h)

# Tell CMake to create the RadialGM executable
add_executable(${EXE} WIN32 ${RGM_UI} ${RGM_HEADERS} ${RGM_SOURCES} ${EDITOR_SOURCES} ${RGM_RC})
Expand Down Expand Up @@ -237,19 +233,17 @@ include_directories(${EXE} PRIVATE ${RAPIDJSON_INCLUDE_DIRS})
find_package(yaml-cpp CONFIG REQUIRED)
target_link_libraries(${EXE} PRIVATE yaml-cpp)

if (RGM_ENABLE_GRPC_SERVER)
#Find gRPC
if (MSVC) # Windows actually does something right for once
find_package(gRPC CONFIG REQUIRED)
target_link_libraries(${EXE} PRIVATE gRPC::gpr gRPC::grpc gRPC::grpc++)
else() # https://tinyurl.com/arch-grpc-bug
find_library(LIB_GRPC_UNSECURE NAMES grpc++_unsecure)
find_library(LIB_GPR NAMES gpr)
find_library(LIB_CARES NAMES cares)
find_library(LIB_ADDRESS_SORTING NAMES address_sorting)
target_link_libraries(${EXE} PRIVATE ${LIB_CARES} ${LIB_ADDRESS_SORTING} ${LIB_GPR} ${LIB_GRPC_UNSECURE})
endif()
endif()
#Find gRPC
if (MSVC) # Windows actually does something right for once
find_package(gRPC CONFIG REQUIRED)
target_link_libraries(${EXE} PRIVATE gRPC::gpr gRPC::grpc gRPC::grpc++)
else() # https://tinyurl.com/arch-grpc-bug
find_library(LIB_GRPC_UNSECURE NAMES grpc++_unsecure)
find_library(LIB_GPR NAMES gpr)
find_library(LIB_CARES NAMES cares)
find_library(LIB_ADDRESS_SORTING NAMES address_sorting)
target_link_libraries(${EXE} PRIVATE ${LIB_CARES} ${LIB_ADDRESS_SORTING} ${LIB_GPR} ${LIB_GRPC_UNSECURE})
endif()

# Find Protobuf
include(FindProtobuf)
Expand Down
5 changes: 0 additions & 5 deletions MainWindow.cpp
Expand Up @@ -20,10 +20,7 @@
#include "Components/Logger.h"

#include "Plugins/RGMPlugin.h"

#ifdef RGM_SERVER_ENABLED
#include "Plugins/ServerPlugin.h"
#endif

#include "gmk.h"
#include "gmx.h"
Expand Down Expand Up @@ -169,7 +166,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), _ui(new Ui::MainW
settingsButton->setToolButtonStyle(Qt::ToolButtonStyle::ToolButtonTextBesideIcon);
_ui->actionSettings->setMenu(_ui->menuChangeGameSettings);

#ifdef RGM_SERVER_ENABLED
RGMPlugin *pluginServer = new ServerPlugin(*this);
auto outputTextBrowser = this->_ui->outputTextBrowser;
connect(pluginServer, &RGMPlugin::LogOutput, outputTextBrowser, &QTextBrowser::append);
Expand All @@ -183,7 +179,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), _ui(new Ui::MainW
connect(_ui->actionRun, &QAction::triggered, pluginServer, &RGMPlugin::Run);
connect(_ui->actionDebug, &QAction::triggered, pluginServer, &RGMPlugin::Debug);
connect(_ui->actionCreateExecutable, &QAction::triggered, pluginServer, &RGMPlugin::CreateExecutable);
#endif

openNewProject();
}
Expand Down
11 changes: 2 additions & 9 deletions RadialGM.pro
Expand Up @@ -30,15 +30,6 @@ rgm_enable_syntaxhighlight {
SOURCES += Widgets/CodeWidgetPlain.cpp
}

# Uncomment if you want compilation & code analysis
#CONFIG += rgm_enable_grpc_server

rgm_enable_grpc_server {
DEFINES += RGM_SERVER_ENABLED
SOURCES += Plugins/ServerPlugin.cpp
HEADERS += Plugins/ServerPlugin.h
}

# we do this even in release mode for "Editor Diagnostics"
DEFINES += QT_MESSAGELOGCONTEXT

Expand Down Expand Up @@ -108,6 +99,7 @@ SOURCES += \
Models/ImmediateMapper.cpp \
Components/Utility.cpp \
Plugins/RGMPlugin.cpp \
Plugins/ServerPlugin.cpp \
Components/RecentFiles.cpp \
Editors/CodeEditor.cpp \
Editors/ScriptEditor.cpp \
Expand Down Expand Up @@ -157,6 +149,7 @@ HEADERS += \
Models/ImmediateMapper.h \
Components/Utility.h \
Plugins/RGMPlugin.h \
Plugins/ServerPlugin.h \
Components/RecentFiles.h \
Widgets/SpriteSubimageListView.h \
Widgets/SpriteView.h \
Expand Down
2 changes: 1 addition & 1 deletion Submodules/enigma-dev
Submodule enigma-dev updated 95 files
+10 −0 .github/ISSUE_TEMPLATE/gsoc_proposal.md
+2 −21 .travis.yml
+3 −3 CI/build_and_run_game.sh
+0 −11 CI/build_sdl.sh
+5 −59 CI/install_emake_deps.sh
+4 −4 CI/solve_engine_deps.sh
+10 −18 CommandLine/emake/CMakeLists.txt
+0 −147 CommandLine/emake/Game.cpp
+0 −42 CommandLine/emake/Game.hpp
+8 −28 CommandLine/emake/Main.cpp
+6 −21 CommandLine/emake/Makefile
+69 −49 CommandLine/emake/OptionsParser.cpp
+1 −0 CommandLine/emake/OptionsParser.hpp
+0 −64 CommandLine/emake/SOG.cpp
+0 −10 CommandLine/emake/SOG.hpp
+2 −1 CommandLine/emake/Server.cpp
+52 −0 CommandLine/libEGM/egm-events.cpp
+27 −0 CommandLine/libEGM/egm-events.h
+2 −23 CommandLine/libEGM/egm-read.cpp
+2 −6 CommandLine/libEGM/egm-write.cpp
+0 −2 CommandLine/libEGM/egm.h
+2 −0 CommandLine/libEGM/file-format.cpp
+5 −0 CommandLine/libEGM/filesystem.h
+117 −0 CommandLine/libEGM/sog.cpp
+35 −0 CommandLine/libEGM/sog.h
+7 −4 CommandLine/testing/Makefile
+16 −2 CommandLine/testing/SimpleTests/file_input_output.sog/create.edl
+7 −3 CompilerSource/Makefile
+4 −0 CompilerSource/OS_Switchboard.h
+5 −1 CompilerSource/frontend.h
+74 −5 CompilerSource/general/bettersystem.cpp
+31 −0 Compilers/FreeBSD/clang.ey
+31 −0 Compilers/FreeBSD/clang32.ey
+31 −0 Compilers/FreeBSD/gcc.ey
+31 −0 Compilers/FreeBSD/gcc32.ey
+1 −1 Compilers/Linux/TestHarness.ey
+33 −7 Config.mk
+2 −2 ENIGMAsystem/SHELL/Audio_Systems/OpenAL/Info/About.ey
+5 −5 ENIGMAsystem/SHELL/Audio_Systems/OpenAL/Makefile
+0 −3 ENIGMAsystem/SHELL/Bridges/SDL-OpenGL/graphics_bridge.cpp
+12 −8 ENIGMAsystem/SHELL/ENIGMAengine.cbp
+38 −0 ENIGMAsystem/SHELL/Graphics_Systems/Direct3D11/DX11d3d.cpp
+0 −35 ENIGMAsystem/SHELL/Graphics_Systems/Direct3D11/DX11vertex.cpp
+4 −4 ENIGMAsystem/SHELL/Graphics_Systems/General/GSmatrix_impl.h
+2 −0 ENIGMAsystem/SHELL/Graphics_Systems/OpenGL-Desktop/Makefile
+2 −1 ENIGMAsystem/SHELL/Graphics_Systems/OpenGL1/Info/About.ey
+1 −0 ENIGMAsystem/SHELL/Graphics_Systems/OpenGL1/include.h
+1 −1 ENIGMAsystem/SHELL/Graphics_Systems/OpenGL3/Info/About.ey
+1 −0 ENIGMAsystem/SHELL/Graphics_Systems/OpenGL3/include.h
+1 −0 ENIGMAsystem/SHELL/Graphics_Systems/OpenGLES2/include.h
+1 −0 ENIGMAsystem/SHELL/Graphics_Systems/OpenGLES3/include.h
+2 −16 ENIGMAsystem/SHELL/Makefile
+1 −0 ENIGMAsystem/SHELL/Platforms/General/PFfilemanip.h
+7 −0 ENIGMAsystem/SHELL/Platforms/General/PFjoystick.h
+1 −0 ENIGMAsystem/SHELL/Platforms/General/PFmain.h
+1 −0 ENIGMAsystem/SHELL/Platforms/General/PFsystem.h
+27 −0 ENIGMAsystem/SHELL/Platforms/General/POSIX/BSD/BSDprogdir.cpp
+12 −0 ENIGMAsystem/SHELL/Platforms/General/POSIX/Linux/LINUXprogdir.cpp
+2 −0 ENIGMAsystem/SHELL/Platforms/General/POSIX/POSIXprogdir.h
+1 −0 ENIGMAsystem/SHELL/Platforms/General/POSIX/include.h
+4 −8 ENIGMAsystem/SHELL/Platforms/General/POSIX/main.cpp
+7 −2 ENIGMAsystem/SHELL/Platforms/None/Makefile
+16 −4 ENIGMAsystem/SHELL/Platforms/SDL/Event.cpp
+19 −2 ENIGMAsystem/SHELL/Platforms/SDL/Gamepad.cpp
+1 −1 ENIGMAsystem/SHELL/Platforms/SDL/Gamepad.h
+2 −3 ENIGMAsystem/SHELL/Platforms/SDL/fileio/cstdio
+24 −0 ENIGMAsystem/SHELL/Platforms/xlib/BSD/BSDjoystick.cpp
+5 −0 ENIGMAsystem/SHELL/Platforms/xlib/BSD/XLIBsystem.h
+4 −4 ENIGMAsystem/SHELL/Platforms/xlib/Info/About.ey
+0 −44 ENIGMAsystem/SHELL/Platforms/xlib/LINUXjoystick.h
+1 −1 ENIGMAsystem/SHELL/Platforms/xlib/Linux/LINUXjoystick.cpp
+5 −0 ENIGMAsystem/SHELL/Platforms/xlib/Linux/XLIBsystem.h
+13 −0 ENIGMAsystem/SHELL/Platforms/xlib/Makefile
+1 −5 ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp
+1 −1 ENIGMAsystem/SHELL/Platforms/xlib/include.h
+9 −8 ENIGMAsystem/SHELL/Universal_System/Extensions/DataStructures/data_structures.cpp
+1 −5 ENIGMAsystem/SHELL/Universal_System/Extensions/IniFilesystem/Makefile
+1 −1 ENIGMAsystem/SHELL/Universal_System/Extensions/libpng/libpng-util.cpp
+1 −1 ENIGMAsystem/SHELL/Universal_System/fileio.cpp
+1 −19 ENIGMAsystem/SHELL/Universal_System/image_formats.cpp
+2 −2 ENIGMAsystem/SHELL/Widget_Systems/GTK+/Info/About.ey
+2 −2 ENIGMAsystem/SHELL/Widget_Systems/None/Info/About.ey
+0 −2 ENIGMAsystem/SHELL/Widget_Systems/xlib/SDL/include.h
+154 −3 ENIGMAsystem/SHELL/Widget_Systems/xlib/dialogs.cpp
+2 −0 ENIGMAsystem/SHELL/Widget_Systems/xlib/dialogs.h
+23 −48 ENIGMAsystem/SHELL/Widget_Systems/xlib/kdialog.cpp
+18 −43 ENIGMAsystem/SHELL/Widget_Systems/xlib/zenity.cpp
+1 −7 Makefile
+1 −1 Readme.md
+4 −15 appveyor.yml
+48 −4 azure-pipelines.yml
+5 −1 ci-regression.sh
+44 −0 emake-defaults.yaml
+27 −30 shared/protos/CMakeLists.txt
+4 −12 shared/protos/Makefile
41 changes: 1 addition & 40 deletions azure-jobs.yml
Expand Up @@ -240,48 +240,9 @@ jobs:
echo 'Server = https://mirrors.kernel.org/archlinux/\$repo/os/\$arch' >> /etc/pacman.d/mirrorlist
pacman-key --init
pacman-key --populate archlinux
pacman -Syu --noconfirm base base-devel git gcc cmake protobuf yaml-cpp pugixml rapidjson boost qt5 qscintilla-qt5
pacman -Syu --noconfirm base base-devel git gcc cmake protobuf grpc yaml-cpp pugixml rapidjson boost qt5 qscintilla-qt5
EOF
displayName: 'Bootstrap Archlinux'
- bash: |
set -e
cd $(Build.BinariesDirectory)
cat << EOF | sudo ./root.x86_64/bin/arch-chroot ./root.x86_64/
set -e
cd RadialGM
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel -DRGM_ENABLE_GRPC_SERVER=OFF ..
make
make install
cd ..
rm -rf build/
EOF
displayName: 'Release Build (No gRPC)'
- bash: |
set -e
cd $(Build.BinariesDirectory)
cat << EOF | sudo ./root.x86_64/bin/arch-chroot ./root.x86_64/
set -e
cd RadialGM
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DRGM_ENABLE_GRPC_SERVER=OFF ..
make
make install
cd ..
rm -rf build/
EOF
displayName: 'Debug Build (No gRPC)'
- bash: |
set -e
cd $(Build.BinariesDirectory)
cat << EOF | sudo ./root.x86_64/bin/arch-chroot ./root.x86_64/
set -e
pacman -S --noconfirm grpc
EOF
displayName: 'Install gRPC'
- bash: |
set -e
Expand Down

0 comments on commit 977fcbe

Please sign in to comment.