Skip to content

Commit 1604b4e

Browse files
committed
Cleanup
- Removed the 3rdparty dir; the only shared library is the googletest library, which is now under the test folder. - Fixed Qt build for Qt 6. - Repl is now a standard mode. - Removed the extensions folder Some simple things to make less pieces and a more transparent bulid process.
1 parent 07afbca commit 1604b4e

File tree

415 files changed

+21
-11996
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+21
-11996
lines changed

CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ option(BUILD_QT "Make Qt Library" OFF)
77
option(BUILD_IMGUI "Make Imgui Library" OFF)
88
option(BUILD_DEMOS "Make the demo app" ON)
99
option(BUILD_TESTS "Make the tests" ON)
10-
option(BUILD_EXTENSIONS "Make the extension library (required for demo)" OFF)
1110
option(ZEP_FEATURE_CPP_FILE_SYSTEM "Default File system enabled" ON)
1211

1312
# Global Settings
@@ -23,7 +22,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "Always use msvcrt.dll" FORCE)
2322
set(CMAKE_DEBUG_POSTFIX "-debug")
2423
set(CMAKE_RELWITHDEBINFO_POSTFIX "-reldbg")
2524

26-
if (BUILD_DEMOS OR BUILD_EXTENSIONS)
25+
if (BUILD_DEMOS)
2726
if (WIN32)
2827
set(VCPKG_TARGET_TRIPLET x64-windows-static-md)
2928
endif()
@@ -42,15 +41,10 @@ if (ZEP_FEATURE_CPP_FILE_SYSTEM)
4241
add_definitions(-DZEP_FEATURE_CPP_FILE_SYSTEM)
4342
endif()
4443

45-
if (BUILD_DEMOS)
46-
SET(BUILD_EXTENSIONS ON)
47-
endif()
48-
4944
# config_app.h checks
5045
# This makes a config_shared.h file which can be included for system settings
5146
# Must be after setting up the platforms
5247
set (ZEP_ROOT ${CMAKE_CURRENT_LIST_DIR})
53-
set (M3RDPARTY_DIR ${CMAKE_CURRENT_LIST_DIR}/m3rdparty)
5448

5549
configure_file(${ZEP_ROOT}/cmake/config_app.h.cmake ${CMAKE_BINARY_DIR}/config_app.h)
5650

@@ -60,13 +54,12 @@ include(GNUInstallDirs)
6054
include(cmake/all.cmake)
6155

6256
# Functions for file copying
63-
include(m3rdparty/cmake/copy_files.cmake)
57+
include(cmake/copy_files.cmake)
6458

6559
enable_testing()
6660

6761
# The main library
6862
add_subdirectory(src)
69-
add_subdirectory(extensions)
7063
add_subdirectory(tests)
7164
add_subdirectory(demos)
7265

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Tab windows are like workspaces, each containing a set of windows arranged in sp
9494
display layer to draw the text. This makes it simple to draw the editor using different rendering code. Adding Qt took just an hour to do.
9595

9696
### Vim & Standard Modes
97-
Mode plugins provide the editing facility - currently that is Vim & Standard and extension modes for the Repl and the Search panels.
97+
Mode plugins provide the editing facility - currently that is Vim & Standard and modes for the Repl and the Search panels.
9898
The Vim mode has most of the usual word motions, visual mode, etc. The standard mode has the usual shift, select, cut/copy/paste, etc.
9999
See [Vim Mode](https://github.com/Rezonality/zep/wiki/Vim-Mode), or the top of the mode_vim.cpp file for a list of supported operations in Vim
100100

File renamed without changes.

demos/CMakeLists.txt

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ set(IDENTIFIER "com.zep")
77

88
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR}/cmake)
99

10-
include(${M3RDPARTY_DIR}/list.cmake)
1110
include(${CMAKE_CURRENT_LIST_DIR}/cmake/demo_common.cmake)
1211

13-
#if (WIN32)
14-
#set(VCPKG_TARGET_TRIPLET x64-windows-static-md)
15-
#endif()
16-
#set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file")
17-
1812
add_subdirectory(demo_imgui)
1913
add_subdirectory(demo_qt)
2014

demos/demo_imgui/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ target_include_directories(${DEMO_NAME}
6565
${ZEP_ROOT}/demos/demo_imgui/janet
6666
${FREETYPE_INCLUDE_DIRS}
6767
${SDL2_ROOT_DIR}
68-
${CMAKE_BINARY_DIR}
69-
${M3RDPARTY_DIR})
68+
${CMAKE_BINARY_DIR})
7069

7170
if (NOT WIN32)
7271
target_include_directories(${DEMO_NAME}
@@ -77,7 +76,6 @@ endif()
7776
target_link_libraries (${DEMO_NAME}
7877
PRIVATE
7978
Zep
80-
ZepExtensions
8179
$<TARGET_NAME_IF_EXISTS:SDL2::SDL2main>
8280
$<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>
8381
imgui::imgui

demos/demo_imgui/main.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@
3535
#include "zep/imgui/editor_imgui.h"
3636
#include "zep/mode_standard.h"
3737
#include "zep/mode_vim.h"
38+
#include "zep/mode_repl.h"
3839
#include "zep/tab_window.h"
3940
#include "zep/theme.h"
4041
#include "zep/window.h"
41-
42-
#include "repl/mode_repl.h"
43-
4442
#include "zep/regress.h"
4543

4644
#include <tinyfiledialogs/tinyfiledialogs.h>

demos/demo_qt/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,17 @@ target_include_directories(${DEMO_NAME}
5757
${Qt6Gui_INCLUDE_DIRS}
5858
${Qt6Core_INCLUDE_DIRS}
5959
${CMAKE_BINARY_DIR}
60-
${M3RDPARTY_DIR}
6160
${ZEP_ROOT}/include)
6261

6362
target_link_libraries(${DEMO_NAME} PRIVATE
6463
Qt6::Core
6564
Qt6::Gui
6665
Qt6::Widgets
6766
Zep
68-
ZepExtensions
6967
${PLATFORM_LINKLIBS})
7068

7169
target_compile_options(${DEMO_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/W3>) # Workaround Qt + MSVC 19 compile issue in release build.
72-
add_dependencies(${DEMO_NAME} Zep ZepExtensions)
70+
add_dependencies(${DEMO_NAME} Zep)
7371

7472
if(WIN32)
7573
message(STATUS "Copying required Qt libraries and binaries to output directory....")

demos/demo_qt/mainwindow.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include <orca/time_provider.h>
21
#define _MATH_DEFINES_DEFINED
32

43
#include <QCommandLineParser>
@@ -16,18 +15,15 @@
1615
#include "zep/theme.h"
1716
#include "zep/window.h"
1817

19-
#include "orca/mode_orca.h"
20-
2118
// Repl example
2219
#include "config_app.h"
2320
#include "mainwindow.h"
24-
#include "repl/mode_repl.h"
21+
#include "zep/mode_repl.h"
2522
#include "zep/qt/zepwidget_qt.h"
2623

2724
#include "demo_common.h"
2825

2926
using namespace Zep;
30-
using namespace MUtils;
3127

3228
const std::string shader = R"R(
3329
#version 330 core
@@ -66,7 +62,6 @@ MainWindow::MainWindow()
6662
auto* pWidget = new ZepWidget_Qt(this, qApp->applicationDirPath().toStdString(), DemoFontPtSize);
6763

6864
// Register our extensions
69-
ZepMode_Orca::Register(pWidget->GetEditor());
7065
ZepRegressExCommand::Register(pWidget->GetEditor());
7166
ZepReplExCommand::Register(pWidget->GetEditor(), this);
7267

@@ -138,13 +133,10 @@ MainWindow::MainWindow()
138133

139134
setMenuBar(menu);
140135
setCentralWidget(pWidget);
141-
142-
TimeProvider::Instance().StartThread();
143136
}
144137

145138
MainWindow::~MainWindow()
146139
{
147-
TimeProvider::Instance().EndThread();
148140
}
149141

150142
std::string MainWindow::ReplParse(const std::string& str)

demos/demo_qt/mainwindow.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
#include <QMainWindow>
44
#include <memory>
55

6-
#include <orca/mode_orca.h>
7-
#include <repl/mode_repl.h>
6+
#include <zep/mode_repl.h>
87

98
QT_FORWARD_DECLARE_CLASS(QDockWidget)
109
QT_FORWARD_DECLARE_CLASS(QMenu)

extensions/CMakeLists.txt

-63
This file was deleted.
File renamed without changes.

include/zep/qt/zepwidget_qt.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,15 @@ class ZepWidget_Qt : public QWidget, public IZepComponent
241241
{
242242
if (m_spEditor)
243243
{
244-
m_spEditor->OnMouseDown(toNVec2f(ev->localPos()), GetMouseButton(ev));
244+
m_spEditor->OnMouseDown(toNVec2f(ev->position()), GetMouseButton(ev));
245245
}
246246
}
247247
virtual void mouseReleaseEvent(QMouseEvent* ev) override
248248
{
249249
(void)ev;
250250
if (m_spEditor)
251251
{
252-
m_spEditor->OnMouseUp(toNVec2f(ev->localPos()), GetMouseButton(ev));
252+
m_spEditor->OnMouseUp(toNVec2f(ev->position()), GetMouseButton(ev));
253253
}
254254
}
255255

@@ -262,7 +262,7 @@ class ZepWidget_Qt : public QWidget, public IZepComponent
262262
{
263263
if (m_spEditor)
264264
{
265-
m_spEditor->OnMouseMove(toNVec2f(ev->localPos()));
265+
m_spEditor->OnMouseMove(toNVec2f(ev->position()));
266266
}
267267
}
268268

m3rdparty/cmake/config_shared.h.cmake

-10
This file was deleted.

m3rdparty/list.cmake

-1
This file was deleted.

m3rdparty/m3rdparty.h

-36
This file was deleted.

m3rdparty/nod/.gitignore

-46
This file was deleted.

0 commit comments

Comments
 (0)