Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 0 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,9 @@ target_wrapper.*

# QtCtreator CMake
CMakeLists.txt.user*
CMakeCache.
cmake_install.cmake
Makefile
__cmake_systeminformation

*.pyc

/build
/build*
/icon/*.png
/icon/ImageMagick

# JetBrains IDE prefs
.idea/

# macOS annoyances
.DS_Store
*DS_Store
._*

.cpm-cache/

# ninja
.ninja_deps
.ninja_lock
.ninja_log
build.ninja
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "src/singleapplication"]
path = src/singleapplication
url = https://github.com/itay-grudev/SingleApplication.git
[submodule "src/uchardet"]
path = src/uchardet
url = https://gitlab.freedesktop.org/uchardet/uchardet.git
[submodule "src/editorconfig-core-qt"]
path = src/editorconfig-core-qt
url = https://github.com/editorconfig/editorconfig-core-qt.git
[submodule "src/ads"]
path = src/ads
url = https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
[submodule "src/QSimpleUpdater"]
path = src/QSimpleUpdater
url = https://github.com/alex-spataru/QSimpleUpdater
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ There are numerous bugs and half working implementations. Pull requests are grea

Packages are available for Windows, Linux, and MacOS.

Below are the supported distribution mechanisms. There may be other ways to download/install the application, but this project will likely not be able to offer any support for those since they are made available by other individuals.
Below are the supported distribution mechanisms. There may be other ways to download/install the application, but this project will likely not be able to offer any support for those since they are made availble by other individuals.

## Windows
Windows packages are available as an installer or a stand-alone zip file on the [release](https://github.com/dail8859/NotepadNext/releases) page. The installer provides additional components such as an auto-updater and Windows context menu integration. You can easily install it with Winget:
Expand All @@ -30,22 +30,13 @@ Linux packages can be obtained by downloading the stand-alone AppImage on the [r
flatpak install flathub com.github.dail8859.NotepadNext
```

If you are using Ubuntu and prefer an up-to-date deb version, you can use the [PPA supporting Ubuntu 22.04 and newer](https://launchpad.net/~quentiumyt/+archive/ubuntu/notepadnext) provided by
[Quentin Lienhardt](https://github.com/QuentiumYT). You can add it by executing:

```bash
sudo add-apt-repository ppa:quentiumyt/notepadnext
sudo apt update
sudo apt install notepadnext
```

## MacOS
MacOS disk images can be downloaded from the [release](https://github.com/dail8859/NotepadNext/releases) page.

It can also be installed using brew:
```bash
brew tap dail8859/notepadnext
brew install notepadnext
brew install --no-quarantine notepadnext
```

#### MacOS Tweaks
Expand All @@ -59,9 +50,9 @@ defaults -currentHost write -g AppleFontSmoothing -int 0
A restart is required for this to take effect.

# Development
Current development is done using QtCreator with the Microsoft Visual C++ (msvc) compiler. Qt 6.5 is the currently supported Qt version. Older versions of Qt are likely to work but are not tested. Any fixes for older versions will be accepted as long as they do not introduce complex fixes. This application is also known to build successfully on various Linux distributions and macOS. Other platforms/compilers should be usable with minor modifications.
Current development is done using QtCreator with the Microsft Visual C++ (msvc) compiler. Qt 6.5 is the prefered Qt version but this can also be built with Qt 5.15. This is also known to build successfully on various Linux distributions and macOS. Other platforms/compilers should be usable with minor modifications.

If you are familiar with building C++ Qt desktop applications with Qt Creator, then this should be as simple as opening `CMakeLists` 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).

Expand Down
20 changes: 5 additions & 15 deletions deploy/linux/NotepadNext.desktop
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
[Desktop Entry]
Categories=Qt;TextEditor;Utility;
Exec=NotepadNext %f
Comment=A cross-platform, reimplementation of Notepad++
Type=Application
Icon=NotepadNext
MimeType=text/plain;
Name=Notepad Next
StartupNotify=true
Type=Application
Terminal=false

Name=Notepad Next
Name[pt_BR]=Editor de Texto Notepad Next

GenericName=Text Editor
GenericName[pt_BR]=Editor de Texto

Comment=A cross-platform, reimplementation of Notepad++
Comment[pt_BR]=O ‘Notepad Next’ é um editor de texto e editor de código-fonte, trata-se de uma reimplementação do Notepad++ para várias plataformas, possui compatibilidade para várias linguagens de programação e oferece traduções para vários idiomas

Keywords=notepad;next;text;editor;manager;IDE;programming tool;source code;tabs;
Keywords[pt_BR]=notepad;next;bloco de notas;próximo;editor;texto;Ambiente de Desenvolvimento Integrado;IDE;ferramenta de programação;exibição de texto colorido;código-fonte;abas;guias;
Categories=Qt;TextEditor;Utility;
MimeType=text/plain;
6 changes: 0 additions & 6 deletions deploy/linux/com.github.dail8859.NotepadNext.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@

<launchable type="desktop-id">com.github.dail8859.NotepadNext.desktop</launchable>
<releases>
<release version="v0.14" date="2026-04-27" />
<release version="v0.13" date="2026-01-25" />
<release version="v0.12" date="2025-06-16" />
<release version="v0.11" date="2025-04-02" />
<release version="v0.10" date="2025-01-15" />
<release version="v0.9" date="2024-11-20" />
<release version="v0.8" date="2024-06-25" />
<release version="v0.7" date="2024-02-22" />
<release version="v0.6.4" date="2023-10-18" />
Expand Down
60 changes: 15 additions & 45 deletions doc/Building.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Building Notepad Next

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

# Windows

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

## Installing Visual Studio 2022

Expand All @@ -18,7 +18,7 @@ This section specifically describes how to build Notepad Next using Microsoft's
1. Download the [Qt installer](https://www.qt.io/download-qt-installer)
1. Run the installer.
1. Select 'custom installation'
1. Install any version of Qt >= 6.5 (6.5 is recommended if possible)
1. Install any version of Qt >= 6.2 (5.15 may also work):
* `MSVC 2019 64-bit` located under the desired version of Qt
* `Qt 5 Compatibility Module` (not needed for Qt 5.x)
* `Developer and Design Tools` > `Qt Creator CDB Debugger Support`
Expand All @@ -27,55 +27,25 @@ This section specifically describes how to build Notepad Next using Microsoft's
## Cloning the Notepad Next Repository

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

## Building/Running Notepad Next

1. Open Qt Creator and open the root `CMakeLists.txt` file.
1. Configure the project for 'Desktop Qt 6.5 MSVC2019 64bit' (or whatever version of Qt you have installed)
1. Open `src/NotepadNext.pro` with Qt Creator
1. Configure the project for 'Desktop Qt 6.2.4 MSVC2019 64bit'
1. Press `Ctrl+R`
1. Qt Creator will build and run the project.

# Linux
Here's instructions for ubuntu/debian. Should be same across all distros as long as you get the packages.

```sh
export DISTRIBUTION=AppImage
export EXTRA_PLATFORM_PLUGINS="libqwayland-generic.so"
Using a fresh Ubuntu 21.10 setup, the following script will install the needed dependencies and build the executable:

sudo apt update
sudo apt install -y \
cmake \
ninja-build \
file \
libxkbcommon-dev \
libxkbcommon-x11-0 \
fuse \
libxcb-cursor-dev \
libcups2-dev \
libglib2.0-0 \
libglib2.0-dev \
libproxy1v5 \
libproxy-dev \
qt6-base-dev \
qt6-base-dev-tools \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-wayland \
qt6-wayland-dev \
libqt6waylandclient6 \
qml6-module-qtwayland-compositor \
libqt6core5compat6 \
libqt6core5compat6-dev \
qt6-base-private-dev

cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DAPP_DISTRIBUTION=$DISTRIBUTION
cmake --build build --target appimage --parallel
```

# MacOS

TODO
sudo apt install qtbase5-dev qt5-qmake qtbase5-dev-tools qttools5-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)
```
29 changes: 29 additions & 0 deletions doc/Create Release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Prepare Release

- Update version in `src/Version.pri`
- Add new `<release>` tag to metainfo file in `deploy/linux`
- Commit
- Tag commit with new version number
- Push commit and tag to GitHub
- Once GitHub action finishes, edit draft notes of new release that was automatically created
- Publish

## Manually Build Release
Example bat script to build release

```
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
set PATH=C:\Qt\6.4.1\msvc2019_64\bin\;C:\Qt\Tools\QtCreator\bin\jom\;%PATH%
set PATH=C:\Program Files\7-Zip;%PATH%
set PATH=C:\Program Files (x86)\NSIS\Bin;%PATH%
mkdir build
cd build
qmake ..\src\NotepadNext.pro
jom
jom package
jom zip
jom installer
cd ..
copy build\NotepadNext*.zip .
copy installer\NotepadNext*.exe .
```
43 changes: 43 additions & 0 deletions doc/Translation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation

## Overview of the Process

1. Strings meant for translation are marked using `tr()` in the source code.
1. Qt's translation tool `lupdate` scans the source files for `tr()` and places the strings in a .ts XML file. At this point, the .ts file contains only strings that are meant to be translated.
1. A translator provides translations by opening the .ts file using Qt Linguist. At this point, the .ts file contains both the string to be translated and the translation.
1. When the application is built, the .ts files are converted into a binary .qm format.
1. The application loads the .qm files at runtime (depending on the locale/settings) and all `tr()` invocations are translated.

## Required Tools

For translators:
- Qt Linguist

For developers:
- lupdate

## Translation Process for Developers

Follow the [Writing Source Code for Translation](https://doc.qt.io/qt-6/i18n-source-translation.html) guide to properly expose string to be translated. Once strings are ready to be released to translators, use the `lupdate` tool. If you use Qt creator, you can execute the lupdate command from the menu `Tools > External > Qt linguist > lupdate` or from the console/terminal:

```
$ lupdate NotepadNext.pro
```

When the application is built, it automatically uses `lrelease` to convert the list of .ts files into binary .qm files for the application to load.

### Project Setup

The included .ts files are listed `i18n.pri`. New locales names can be added to the `LOCALES` variable.

## Translation Process for Translators

If you want to help with translations but the target language is not supported yet, please open an issue and a new .ts file will be added you can use. If one already exists, open the appropriate .ts file with Qt Linguist and follow the [Qt Linguist Manual](https://doc.qt.io/qt-6/linguist-translators.html). Once changes have been made to the .ts file you can create a pull request so new translated strings can be included in the application.

Qt Linguist is contained in the Qt SDK that you can download [here](https://www.qt.io/download-qt-installer). If you don't want to download the whole SDK, there is a community made a standalone version for Qt Linguist [here](https://github.com/lelegard/qtlinguist-installers/releases).

## Reference and Detailed Info

- [Internationalization with Qt](https://doc.qt.io/qt-6/internationalization.html)
- [Writing Source Code for Translation](https://doc.qt.io/qt-6/i18n-source-translation.html)
- [Qt Linguist Manual](https://doc.qt.io/qt-6/linguist-translators.html)
8 changes: 4 additions & 4 deletions doc/Update Scintilla.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1. Delete all files in `thirdparty\scintilla` except `CMakeLists.txt`
1. Copy new release of Scintilla into `thirdparty\scintilla`
1. Change directory into `thirdparty\scintilla\qt\ScintillaEdit\` and run `python WidgetGen.py`
1. Update `thirdparty\scintilla\CMakeLists.txt` as needed
1. Delete all files in `src\scintilla`
1. Copy new release of Scintilla into `src\scintilla`
1. Run `python src\scintilla\qt\ScintillaEdit\WidgetGen.py`
1. Update `src\scintilla.pri` as needed
Loading