Skip to content

Commit

Permalink
Merge branch 'edbee:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
vadi2 authored Feb 8, 2025
2 parents 19b8fb7 + 09bfbc0 commit ff89f5a
Show file tree
Hide file tree
Showing 295 changed files with 111,680 additions and 132,028 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ edbee-test/edbee-lib/qslog/
build/

.idea/
*.old/
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Changelog

edbee.lib:

- (2025-01-24) [v0.9.0] #150, Add version number (EDBEE_VERSION / Edbee::instance()->version())
- (2025-01-24) #145, Replace onigmo with onigruma
- (2025-01-04) Remove qslog references from `edbee-test`
- (2024-12-28) Default cmake build is QT6 (use the BUILD_WITH_QT5 option)
- (2024-12-22) Replaced qslog dependency with qlog_* macros to qDebug, qWarning etc.

Older Items

- Replaced qslog dependency with qlog_* macros to qDebug, qWarning etc.
- Autocomplete changes, setFocusPolicy on QMenu an adding `setAttribute(Qt::WA_ShowWithoutActivating)`
- PR #147, Add ctrl-a / ctrl-e support for macOS
- fix, Autocomplete Improvements
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1...3.20)

PROJECT(edbee)

OPTION(BUILD_WITH_QT5 "Whether to build with Qt5 or Qt6." ON)
OPTION(BUILD_WITH_QT5 "Whether to build with Qt5 or Qt6." OFF)

ADD_SUBDIRECTORY(edbee-lib)
ADD_SUBDIRECTORY(edbee-test)
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,33 @@ Known Issues and Missing Features
* Optimalisations for better render support and background calculate/paint-ahead functionality
* I really want to build in scripting support, for extending the editor with plugins.
Dependencies
------------
The following dependencies have been added.
(via git subtree, to embed the code and not add the complexity of a submodule to the end user)
Oniguruma has been added
```sh
git subtree add --prefix vendor/oniguruma/oniguruma https://github.com/kkos/oniguruma master --squash
```

To update oniguruma

```sh
git subtree pull --prefix vendor/oniguruma/oniguruma https://github.com/kkos/oniguruma master --squash
```

Build with minGW
----------------

```powershell
# Sample to build with MinGW on Qt (-DCMAKE_PREFIX_PATH=you cmake path)
cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH="C:\Qt\6.8.0\mingw_64\lib\cmake\" .
cmake --build .
```


Contributing
------------
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ SET(HEADERS
edbee/views/texttheme.h
)

add_subdirectory(../vendor/onig/ onig)
add_subdirectory(../vendor/oniguruma/ oniguruma)

if(BUILD_WITH_QT5)
find_package(Qt5 REQUIRED COMPONENTS Core UiTools Widgets)
Expand Down
4 changes: 3 additions & 1 deletion edbee-lib/edbee-lib.pri
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ HEADERS += \
$$PWD/edbee/data/factorykeymap.h \
$$PWD/edbee/debug.h \
$$PWD/edbee/edbee.h \
$$PWD/edbee/edbeeversion.h \
$$PWD/edbee/exports.h \
$$PWD/edbee/io/baseplistparser.h \
$$PWD/edbee/io/jsonparser.h \
Expand Down Expand Up @@ -168,7 +169,8 @@ HEADERS += \

## Extra dependencies
##====================
include($$PWD/../vendor/onig/onig.pri)

include($$PWD/../vendor/oniguruma/oniguruma.pri)

## Files that can usefully listed inside Qt IDE (Qt Creator, as "Other files")
##============================================================================
Expand Down
6 changes: 6 additions & 0 deletions edbee-lib/edbee/edbee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ void Edbee::autoInit()
}
}

/// Returns the edbee version number
const char* Edbee::version() const
{
return EDBEE_VERSION;
}



/// TODO: We need a way to load the (scoped) environment variables
Expand Down
2 changes: 2 additions & 0 deletions edbee-lib/edbee/edbee.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once

#include "edbee/exports.h"
#include "edbee/edbeeversion.h"

#include <QObject>

Expand Down Expand Up @@ -39,6 +40,7 @@ class EDBEE_EXPORT Edbee : public QObject
void setThemePath( const QString& themePath );

void autoInit();
const char* version() const;

public slots:
void init();
Expand Down
8 changes: 8 additions & 0 deletions edbee-lib/edbee/edbeeversion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once

#define EDBEE_VERSION "0.9.0"

#define EDBEE_VERSION_MAJOR 0
#define EDBEE_VERSION_MINOR 9
#define EDBEE_VERSION_PATCH 0
#define EDBEE_VERSION_POSTFIX ""
13 changes: 10 additions & 3 deletions edbee-lib/edbee/util/regexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#endif

#define ONIG_EXTERN extern
#include "onigmo.h"
#include "oniguruma.h"

#ifdef _MSC_VER
#pragma warning( pop )
Expand Down Expand Up @@ -89,14 +89,21 @@ class OnigRegExpEngine : public RegExpEngine
{
const QChar* patternChars = pattern.constData();

const OnigSyntaxType* onigSyntax = &OnigSyntaxRuby; // ONIG_SYNTAX_DEFAULT
OnigSyntaxType* onigSyntax = &OnigSyntaxRuby; // ONIG_SYNTAX_DEFAULT
if( syntax == RegExp::SyntaxFixedString ) { onigSyntax = &OnigSyntaxASIS; }


OnigOptionType onigOptions = ONIG_OPTION_NONE|ONIG_OPTION_CAPTURE_GROUP;
if( !caseSensitive ) { onigOptions = onigOptions | ONIG_OPTION_IGNORECASE;}

int result = onig_new(&reg_, (OnigUChar*)patternChars, (OnigUChar*)(patternChars + pattern.length()), onigOptions, ONIG_ENCODING_UTF16_LE, onigSyntax, &einfo_);
int result = onig_new(
&reg_,
(OnigUChar*)patternChars,
(OnigUChar*)(patternChars + pattern.length()),
onigOptions,
ONIG_ENCODING_UTF16_LE,
onigSyntax,
&einfo_);
valid_ = result == ONIG_NORMAL;
fillError( result );
}
Expand Down
3 changes: 3 additions & 0 deletions tools/patch-oniguruma.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

cp -Rp ../vendor/oniguruma/patch/* ../vendor/oniguruma/oniguruma/
30 changes: 30 additions & 0 deletions tools/set-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

if [ "$#" -lt 3 ]; then
echo "Generates the edbee version header"
echo ""
echo "Usage: $0 <major> <minor> <patch> [<postfix>]"
exit;
fi

major="$1"
minor="$2"
patch="$3"
postfix="$4"
if [ -n "$4" ]; then
postfix_dash="-$4"
fi
target="../edbee-lib/edbee/edbeeversion.h"

cat <<C > $target
#pragma once
#define EDBEE_VERSION "$major.$minor.$patch$postfix_dash"
#define EDBEE_VERSION_MAJOR $major
#define EDBEE_VERSION_MINOR $minor
#define EDBEE_VERSION_PATCH $patch
#define EDBEE_VERSION_POSTFIX "$postfix"
C

cat $target
42 changes: 0 additions & 42 deletions vendor/onig/.editorconfig

This file was deleted.

75 changes: 0 additions & 75 deletions vendor/onig/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions vendor/onig/.travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/onig/AUTHORS

This file was deleted.

Loading

0 comments on commit ff89f5a

Please sign in to comment.