Skip to content

Commit

Permalink
v0.4.9 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dail8859 committed Mar 17, 2022
2 parents 3268c8e + 3b25666 commit 91c0f0a
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 23 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ on: [push, pull_request]

jobs:
build-linux:
strategy:
matrix:
config:
-
qt_version: "5.15.2"
modules: ""
-
qt_version: "6.2.3"
modules: "qt5compat"

runs-on: ubuntu-latest

steps:
Expand All @@ -14,21 +24,36 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: "5.15.2"
version: ${{ matrix.config.qt_version }}
modules: ${{ matrix.config.modules }}

- name: Setup
run: sudo apt-get install libxkbcommon-dev

- name: Compile
run: |
rm -rf build-linux
mkdir build-linux
cd build-linux
qmake ../src/NotepadNext.pro
make
make -j$(nproc)
- name: Build AppImage
run: |
cd build-linux
make install INSTALL_ROOT=AppDir
cd NotepadNext
wget --no-verbose "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget --no-verbose "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
chmod +x linuxdeploy*.AppImage
export OUTPUT=NotepadNext-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: NotepadNext-Linux
path: ${{ github.workspace }}/build-linux/NotepadNext/NotepadNext
name: NotepadNext-Linux-Qt${{ matrix.config.qt_version }}-AppImage
path: ${{ github.workspace }}/build-linux/NotepadNext/NotepadNext-x86_64.AppImage

build-windows:
strategy:
Expand All @@ -38,7 +63,7 @@ jobs:
qt_version: "5.15.2"
modules: ""
-
qt_version: "6.2.2"
qt_version: "6.2.3"
modules: "qt5compat"

runs-on: windows-latest
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



A cross-platform, reimplementation of Notepad++.
A cross-platform, reimplementation of Notepad++. Releases are available for Windows and Linux.

Though the application overall is stable and usable, it should not be considered safe for critically important work.

Expand All @@ -16,11 +16,11 @@ There are numerous bugs and half working implementations. Pull requests are grea
![screenshot](/doc/screenshot.png)

# Development
Current development is done using Visual Studio 2019 and Qt v5.15. Other platforms/compilers have not been tested but should be usable with minor modifications.
Current development is done using Visual Studio 2019 and Qt v5.15 on Windows. This is known to build successfully on Ubuntu 21.10. Other Linux distributions are likely to work as well. Other platforms/compilers have not been tested but should be usable with minor modifications.

If you are familiar with building C++ Qt desktop applications, then this should be as simple as opening `src/NotepadNext.pro` and build/run the project.
If you are familiar with building C++ Qt desktop applications with Qt Creator, then this should be as simple as opening `src/NotepadNext.pro` and build/run the project.

If you are new to building C++ Qt desktop applications, there is a more detailed guide [here](/doc/Building.md)
If you are new to building C++ Qt desktop applications, there is a more detailed guide [here](/doc/Building.md).


# License
Expand Down
9 changes: 9 additions & 0 deletions deploy/linux/NotepadNext.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Exec=NotepadNext
Comment=A cross-platform, reimplementation of Notepad++
Type=Application
Icon=NotepadNext
Name=Notepad Next
StartupNotify=true
Terminal=false
Categories=Qt;TextEditor;Utility;
24 changes: 20 additions & 4 deletions doc/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

To build Notepad Next you will need a compatible C++ compiler, the Qt libraries, and the Notepad Next source code.

This document specifically describes how to build Notepad Next using Microsoft's Visual Studio 2019 compiler. Other compilers and operating systems have not been tested, but should be possible with minor changes to the project files and source code.
# Windows

This section specifically describes how to build Notepad Next using Microsoft's Visual Studio 2019 compiler.

## Installing Visual Studio 2019

Expand All @@ -22,17 +24,31 @@ This document specifically describes how to build Notepad Next using Microsoft's
* `Developer and Design Tools` > `Qt Creator CDB Debugger Support`
* `Developer and Design Tools` > `Debugging Tools for Windows`

# Cloning the Notepad Next Repository
## Cloning the Notepad Next Repository

1. In a command prompt (or git shell, powershell, etc) run:
1. `git clone --recurse-submodules https://github.com/dail8859/NotepadNext.git`
1. `cd NotepadNext`
1. `git checkout dev`


# Building/Running Notepad Next
## Building/Running Notepad Next

1. Open `src/NotepadNext.pro` with Qt Creator
1. Configure the project for 'Desktop Qt 5.15.2 MSVC2019 64bit'
1. Press `Ctrl+R`
1. Qt Creator will build and run the project.
1. Qt Creator will build and run the project.

# Linux

Using a fresh Ubuntu 21.10 setup, the following script will install the needed dependencies and build the executable:

```
sudo apt install qtbase5-dev qt5-qmake qtbase5-dev-tools qtbase5-private-dev libqt5x11extras5-dev build-essential git
git clone --recurse-submodules https://github.com/dail8859/NotepadNext.git
cd NotepadNext
mkdir build
cd build
qmake ../src/NotepadNext.pro
make -j$(nproc)
```
File renamed without changes
4 changes: 4 additions & 0 deletions installer/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ Function .onInit
${endif}

!insertmacro MULTIUSER_INIT

${MementoSectionRestore}

# Trigger the selection change manually so that the hidden sections get set appropriately
Call .onSelChange
FunctionEnd

Function .onInstSuccess
Expand Down
10 changes: 5 additions & 5 deletions src/NotepadNext.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@

include(Version.pri)

lessThan(QT_MAJOR_VERSION, 5) {
lessThan(QT_MINOR_VERSION, 13) {
error(Qt v5.13.x is required)
}
}
!versionAtLeast(QT_VERSION, 5.15):error("Qt v5.15 or greater is required")

TEMPLATE = subdirs

SUBDIRS = NotepadNext

# Extra Windows targets
win32 {
# Package up the EXE with all the other needed files
package.target = package
package.commands = \
xcopy $$shell_path($${OUT_PWD}/NotepadNext/NotepadNext.exe) $$shell_path($${OUT_PWD}/package/) /Y && \
Expand All @@ -40,10 +38,12 @@ win32 {
package.commands += windeployqt --release --no-translations --no-system-d3d-compiler --no-compiler-runtime --no-angle --no-opengl-sw $$shell_path($${OUT_PWD}/package/NotepadNext.exe)
}

# Zip it up
zip.target = zip
zip.depends = package
zip.commands = 7z a -tzip $$quote(NotepadNext-v$${APP_VERSION}.zip) $$shell_path(./package/*) -x!libssl-1_1-x64.dll -x!libcrypto-1_1-x64.dll

# Build the Installer
installer.target = installer
installer.depends = package
installer.commands = makensis /V4 $$shell_path($${OUT_PWD}/../installer/installer.nsi)
Expand Down
14 changes: 14 additions & 0 deletions src/NotepadNext/NotepadNext.pro
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,17 @@ OBJECTS_DIR = build/obj
MOC_DIR = build/moc
RCC_DIR = build/qrc
UI_DIR = build/ui

unix {
target.path = /usr/bin
INSTALLS += target

desktopfile.path = /usr/share/applications/
desktopfile.files += ../../deploy/linux/NotepadNext.desktop
INSTALLS += desktopfile

iconscalable.path = /usr/share/icons/hicolor/scalable/mimetypes/
iconscalable.files = ../../icon/NotepadNext.svg
INSTALLS += iconscalable
}

1 change: 1 addition & 0 deletions src/NotepadNext/NotepadNextApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ void NotepadNextApplication::setEditorLanguage(ScintillaNext *editor, const QStr
editor.UseTabs = (L.tabSettings or "tabs") == "tabs"
editor.TabWidth = L.tabSize or 4
editor.MarginWidthN[2] = L.disableFoldMargin and 0 or 16
if L.styles then
for name, style in pairs(L.styles) do
editor.StyleFore[style.id] = style.fgColor
Expand Down
2 changes: 1 addition & 1 deletion src/NotepadNext/languages/c.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local L = {}

L.lexer = "c"
L.lexer = "cpp"

L.extensions = {
"c",
Expand Down
2 changes: 2 additions & 0 deletions src/NotepadNext/languages/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ local L = {}

L.lexer = "markdown"

L.disableFoldMargin = true

L.extensions = {
"md",
"markdown",
Expand Down
2 changes: 2 additions & 0 deletions src/NotepadNext/languages/text.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ local L = {}
L.name = "Text"
L.lexer = "null"

L.disableFoldMargin = true

L.extensions = {
"",
"txt",
Expand Down
2 changes: 1 addition & 1 deletion src/Version.pri
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
# along with Notepad Next. If not, see <https://www.gnu.org/licenses/>.


!defined(APP_VERSION, var):APP_VERSION = "0.4.8"
!defined(APP_VERSION, var):APP_VERSION = "0.4.9"
APP_COPYRIGHT = "Copyright 2019-2022 Justin Dailey"
6 changes: 3 additions & 3 deletions src/ads.pri
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with Notepad Next. If not, see <https://www.gnu.org/licenses/>.

QT += core gui widgets gui-private
QT += core gui widgets

windows {
# MinGW
Expand Down Expand Up @@ -73,9 +73,9 @@ SOURCES += \
unix:!macx {
HEADERS += $$PWD/ads/src/linux/FloatingWidgetTitleBar.h
SOURCES += $$PWD/ads/src/linux/FloatingWidgetTitleBar.cpp
INCLUDEPATH += $$PWD/ads/src/linux
QT += x11extras
LIBS += -lxcb
QT += gui-private
}


INCLUDEPATH += $$PWD/ads/src/

0 comments on commit 91c0f0a

Please sign in to comment.