Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<!--- What actually happened -->

### Debug Information
<!--- In your Notepad++, click on the "?" menu (found to the right of "Window" in the menu bar) -->
<!--- In PaperWasp, click on the "?" menu (found to the right of "Window" in the menu bar) -->
<!--- In the menu that drops down, choose "Debug Info..." -->
<!--- A message box will open detailing specifics about your Notepad++ version, plugins, etc. -->
<!--- A message box will open detailing specifics about your PaperWasp version, plugins, etc. -->
<!--- CLICK ON THE BUTTON with the text "Copy debug info into clipboard" -->
<!--- Do a PASTE HERE -->

Expand Down
27 changes: 13 additions & 14 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,32 @@ body:
required: true
- type: checkboxes
attributes:
label: Is the issue reproducible in Notepad++ without plugin?
label: Is the issue reproducible in PaperWasp without plugins?
description: |
If feasible, try launching Notepad++ without any plugins.
Some updates to Notepad++ modify communication rules used by plugins,
If feasible, try launching PaperWasp without any plugins.
Some updates to PaperWasp modify communication rules used by plugins,
and if plugin developers do not keep their plugins in sync with these changes, issues may arise.
Running without plugins can help diagnose specific problems.
You can use cmdline `notepad++.exe -noPlugin`
or rename your plugin folder, usually "C:\Program Files\Notepad++\plugins\" to e.g. "...\plugins.bak\").
You can temporarily move your user plugin folder, usually `~/Library/Application Support/PaperWasp/plugins`.
options:
- label: I have tried Notepad++ without plugin
- label: I have tried PaperWasp without plugins
required: false
- type: checkboxes
attributes:
label: Is the issue reproducible in portable version of Notepad++?
label: Is the issue reproducible with a clean PaperWasp configuration?
description: |
If feasible, try launching portable version of Notepad++.
It can help to diagnose if specific configuration is causing issue.
If feasible, try launching PaperWasp with a clean user configuration.
It can help diagnose whether a specific configuration is causing the issue.
options:
- label: I have tried portable version of Notepad++
- label: I have tried a clean PaperWasp configuration
required: false
- type: checkboxes
attributes:
label: Does the issue affect SciTE?
description: |
Notepad++ relies on the Lexilla and Scintilla libraries.
PaperWasp relies on the Lexilla and Scintilla libraries.
For more details, visit https://github.com/ScintillaOrg/lexilla and https://sourceforge.net/p/scintilla.
Consider using the reference program SciTE to verify whether the issue is a genuine bug in Notepad++.
Consider using the reference program SciTE to verify whether the issue is in the shared editor/lexer stack.
Download Scite from here https://www.scintilla.org/SciTEDownload.html.
options:
- label: I have tried SciTE
Expand Down Expand Up @@ -84,9 +83,9 @@ body:
attributes:
label: Debug Information
description: |
In your Notepad++, click on the "?" menu (found to the right of "Window" in the menu bar).
In PaperWasp, click on the "?" menu (found to the right of "Window" in the menu bar).
In the menu that drops down, choose "Debug Info...".
A dialog will open detailing specifics about your Notepad++ version, plugins, etc.
A dialog will open detailing specifics about your PaperWasp version, plugins, etc.
CLICK ON THE BUTTON "Copy debug info into clipboard".
Do a PASTE HERE
render: shell
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/2-feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Suggest an idea for Notepad++
description: Suggest an idea for PaperWasp
title: "[Feature request] <title>"
#labels: ["feature"]
#type: feature
Expand Down Expand Up @@ -27,9 +27,9 @@ body:
attributes:
label: Debug Information
description: |
In your Notepad++, click on the "?" menu (found to the right of "Window" in the menu bar).
In PaperWasp, click on the "?" menu (found to the right of "Window" in the menu bar).
In the menu that drops down, choose "Debug Info...".
A dialog will open detailing specifics about your Notepad++ version, plugins, etc.
A dialog will open detailing specifics about your PaperWasp version, plugins, etc.
CLICK ON THE BUTTON "Copy debug info into clipboard".
Do a PASTE HERE
render: shell
Expand All @@ -41,12 +41,12 @@ body:
description: |
Links? References? Anything that will give us more context about the feature you want!

Notepad++ relies on the Lexilla and Scintilla libraries.
PaperWasp relies on the Lexilla and Scintilla libraries.
For more details, visit https://github.com/ScintillaOrg/lexilla and https://sourceforge.net/p/scintilla.
If you have specific language feature requests, consider using the reference program SciTE to verify whether the desired feature is supported.
You can download SciTE from here https://www.scintilla.org/SciTEDownload.html.

If you have any questions about Notepad++ usage, explore the community forum https://community.notepad-plus-plus.org/category/7/faq.
For upstream Notepad++ usage questions, use the Notepad++ community forum: https://community.notepad-plus-plus.org/category/7/faq.

Tip: You can attach images by clicking this area to highlight it and then dragging files in.
validations:
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/macos_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,41 +68,41 @@ jobs:
working-directory: macos/build
run: cmake -G Xcode ..

- name: Build MacNotePlusPlus (Release)
- name: Build PaperWasp (Release)
working-directory: macos/build
run: cmake --build . --target MacNotePlusPlus --config Release -- -quiet
run: cmake --build . --target PaperWasp --config Release -- -quiet

- name: Build MacNotePlusPlus (Debug)
- name: Build PaperWasp (Debug)
working-directory: macos/build
run: cmake --build . --target MacNotePlusPlus --config Debug -- -quiet
run: cmake --build . --target PaperWasp --config Debug -- -quiet

- name: Build app bundle (package)
working-directory: macos/build
run: cmake --build . --target MacNotePlusPlus_package --config Release
run: cmake --build . --target PaperWasp_package --config Release

- name: Verify app bundle
run: |
echo "=== App bundle structure ==="
ls -lR macos/dist/MacNote++.app/Contents/ | head -30
ls -lR macos/dist/PaperWasp.app/Contents/ | head -30
echo ""
echo "=== Binary info ==="
file macos/dist/MacNote++.app/Contents/MacOS/MacNotePlusPlus
file macos/dist/PaperWasp.app/Contents/MacOS/PaperWasp
echo ""
echo "=== Linked frameworks ==="
otool -L macos/dist/MacNote++.app/Contents/MacOS/MacNotePlusPlus | head -20
otool -L macos/dist/PaperWasp.app/Contents/MacOS/PaperWasp | head -20

- name: Upload app bundle artifact
uses: actions/upload-artifact@v4
with:
name: MacNote++.app-${{ matrix.runner }}-${{ matrix.arch }}
path: macos/dist/MacNote++.app
name: PaperWasp.app-${{ matrix.runner }}-${{ matrix.arch }}
path: macos/dist/PaperWasp.app
retention-days: 14

- name: Upload Release binary artifact
uses: actions/upload-artifact@v4
with:
name: MacNotePlusPlus-Release-${{ matrix.runner }}-${{ matrix.arch }}
path: macos/build/Release/MacNotePlusPlus
name: PaperWasp-Release-${{ matrix.runner }}-${{ matrix.arch }}
path: macos/build/Release/PaperWasp
retention-days: 14

sign_and_notarize:
Expand Down Expand Up @@ -145,12 +145,12 @@ jobs:
if: steps.check_secrets.outputs.skip != 'true'
uses: actions/download-artifact@v4
with:
name: MacNote++.app-macos-15-arm64
name: PaperWasp.app-macos-15-arm64
path: macos/dist

- name: Restore executable permission
if: steps.check_secrets.outputs.skip != 'true'
run: chmod +x macos/dist/MacNote++.app/Contents/MacOS/MacNotePlusPlus
run: chmod +x macos/dist/PaperWasp.app/Contents/MacOS/PaperWasp

- name: Import code signing certificate
if: steps.check_secrets.outputs.skip != 'true'
Expand Down Expand Up @@ -185,17 +185,17 @@ jobs:
if: steps.check_secrets.outputs.skip != 'true'
run: |
mkdir -p macos/dist/dmg-root
rm -rf macos/dist/dmg-root/MacNote++.app
cp -R macos/dist/MacNote++.app macos/dist/dmg-root/MacNote++.app
rm -rf macos/dist/dmg-root/PaperWasp.app
cp -R macos/dist/PaperWasp.app macos/dist/dmg-root/PaperWasp.app
rm -f macos/dist/dmg-root/Applications
ln -s /Applications macos/dist/dmg-root/Applications
rm -f macos/dist/MacNote++-unsigned.dmg
rm -f macos/dist/PaperWasp-unsigned.dmg
hdiutil create \
-volname "MacNote++" \
-volname "PaperWasp" \
-srcfolder macos/dist/dmg-root \
-format UDZO \
-ov \
macos/dist/MacNote++-unsigned.dmg
macos/dist/PaperWasp-unsigned.dmg

- name: Sign and notarize
if: steps.check_secrets.outputs.skip != 'true'
Expand All @@ -212,16 +212,16 @@ jobs:
if: steps.check_secrets.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: MacNote++.dmg-signed-arm64
path: macos/dist/MacNote++.dmg
name: PaperWasp.dmg-signed-arm64
path: macos/dist/PaperWasp.dmg
retention-days: 30

- name: Upload signed app bundle
if: steps.check_secrets.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: MacNote++.app-signed-arm64
path: macos/dist/MacNote++.app
name: PaperWasp.app-signed-arm64
path: macos/dist/PaperWasp.app
retention-days: 30

- name: Cleanup keychain
Expand Down
55 changes: 33 additions & 22 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
# Building Notepad++
# Building PaperWasp

PaperWasp is the macOS application in this repository. The `PowerEditor/`
directory keeps the upstream Notepad++ Windows codebase for compatibility and
attribution.

## macOS

Use the Xcode generator. The default Makefiles generator is not reliable with
this source tree's deeply nested object paths.

```bash
cd macos/build
cmake -G Xcode ..
cmake --build . --target PaperWasp
cmake --build . --target PaperWasp_package
cmake --build . --target PaperWasp_dmg
```

Artifacts are generated in `macos/dist/`:

- `PaperWasp.app`
- `PaperWasp-unsigned.dmg`
- `PaperWasp.dmg` when signing is enabled

## Upstream Windows Build

## Microsoft Visual Studio

Expand All @@ -12,17 +37,17 @@ There are three components which are built from one visual studio solution:
- `libScintilla.lib` : static library based on [Scintilla](https://www.scintilla.org/)
- `libLexilla.lib` : static library based on [Lexilla](https://www.scintilla.org/Lexilla.html)

Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla.
The upstream Windows application is built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla.

### Build `notepad++.exe`

1. Open [`PowerEditor\visual.net\notepadPlus.sln`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/visual.net/notepadPlus.sln)
2. Select a solution configuration (Debug or Release) and a solution platform (x64 or Win32 or ARM64)
3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects.
3. Build the upstream solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects.

### Build `libScintilla.lib` and `libLexilla.lib`

As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this.
As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the upstream Windows build. This is done automatically on building the whole solution. So normally you don't need to care about this.

#### Build `libScintilla.lib` with boost and `libLexilla.lib` via nmake

Expand Down Expand Up @@ -50,13 +75,13 @@ uses features from Boost's `Boost.Regex` library.

## GCC

If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/).
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile the upstream Windows application with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/).

Building Notepad++ is regularly tested on a Windows system by using [MSYS2](https://www.msys2.org/) project. Current versions of tools used to building (such as GCC, Clang, Make or Bash) can be checked by looking at some logs from the finished building (for example in the [current-build page](https://github.com/notepad-plus-plus/notepad-plus-plus/actions/workflows/CI_build.yml)). Other versions may also work but are untested.
Building the upstream Windows application is regularly tested on a Windows system by using [MSYS2](https://www.msys2.org/) project. Current versions of tools used to building (such as GCC, Clang, Make or Bash) can be checked by looking at some logs from the finished building (for example in the upstream current-build page). Other versions may also work but are untested.

**Note:** Before building make sure that the system `PATH` environment variable contains `$MinGW-root$\bin` directory. Otherwise you have to set this directory yourself in Windows settings. You can also use a command like `set PATH=$MinGW-root$\bin;%PATH%` each time `cmd` is launched. But beware that if `PATH` contains several versions of MinGW-w64 GCC, only the first one will be usable.

### Compiling Notepad++ binary
### Compiling the upstream Windows binary

1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary.
2. `cd` into `notepad-plus-plus\PowerEditor\gcc`.
Expand All @@ -65,24 +90,10 @@ Building Notepad++ is regularly tested on a Windows system by using [MSYS2](http

#### Some additional information

- The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start.
- The directory containing `notepad++.exe` will also contain everything needed for the upstream Windows application to start.
- To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
- To see commands being executed add `VERBOSE=1` to the same command.
- When a project is built outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first.
- When a project is built through MinGW-w64 with multilib support, a specific target can be forced by passing `TARGET_CPU` variable with `x86_64` or `i686` as value.
- To use Clang instead of GCC for compilation provide `CXX` variable with `clang++` as value.
- To use [Clang analyzer](https://clang-analyzer.llvm.org/) together with Clang provide `CLANGANALYZE=1` to the `mingw32-make` invocation.

## macOS (experimental port)

The macOS port uses CMake from the `macos/` directory.

1. Configure: `cmake -S macos -B macos/build`
2. Build app binary: `cmake --build macos/build --target MacOSNotePP`
3. Package app bundle: `cmake --build macos/build --target MacOSNotePP_package`
4. Build unsigned DMG: `cmake --build macos/build --target MacOSNotePP_dmg`

Artifacts are generated in `macos/dist/`:

- `MacNote++.app`
- `MacNote++-unsigned.dmg`
16 changes: 8 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

**MacNotePlusPlus 1.0** is a macOS port of Notepad++, the Windows-native source code editor written in C++20. The upstream Notepad++ wraps the Scintilla editor component and Lexilla lexer library, adding tabbed editing, plugin support, docking panels, and extensive configuration. The original is a Win32 application using the Windows API directly (no cross-platform framework). This project brings that functionality to macOS.
**PaperWasp 1.0** is an independent macOS port based on Notepad++, the Windows-native source code editor written in C++20. The upstream Notepad++ project wraps the Scintilla editor component and Lexilla lexer library, adding tabbed editing, plugin support, docking panels, and extensive configuration. PaperWasp is not endorsed by the creators of Notepad++.

## Build Commands

Expand All @@ -19,18 +19,18 @@ rm -rf *
cmake -G Xcode ..

# Build the app (development binary)
cmake --build . --target MacNotePlusPlus
cmake --build . --target PaperWasp

# Build the .app bundle (for testing Finder integration, icon, etc.)
cmake --build . --target MacNotePlusPlus_package
cmake --build . --target PaperWasp_package

# Build unsigned DMG for distribution
cmake --build . --target MacNotePlusPlus_dmg
cmake --build . --target PaperWasp_dmg

# Build with code signing (opt-in, requires Developer ID certificate)
cmake -G Xcode .. -DCODESIGN_ENABLED=ON -DCODESIGN_IDENTITY="Developer ID Application"
cmake --build . --target MacNotePlusPlus_sign # Sign .app bundle
cmake --build . --target MacNotePlusPlus_dmg # Build + sign DMG
cmake --build . --target PaperWasp_sign # Sign .app bundle
cmake --build . --target PaperWasp_dmg # Build + sign DMG

# Full sign + notarize workflow (after building unsigned DMG)
export CODESIGN_IDENTITY="Developer ID Application"
Expand All @@ -40,10 +40,10 @@ export APPLE_APP_PASSWORD="xxxx-xxxx-xxxx-xxxx"
macos/scripts/sign-and-notarize.sh

# Run the app (development build)
./Debug/MacNotePlusPlus
./Debug/PaperWasp

# Run the packaged app
open ../dist/MacNote++.app
open ../dist/PaperWasp.app
```

**Important:** Use the Xcode generator (`-G Xcode`). The default Makefiles generator fails on deeply nested object paths in this repo. The Xcode generator is required for reliable builds.
Expand Down
Loading
Loading