Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yousefvand/Notepad--
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.9
Choose a base ref
...
head repository: yousefvand/Notepad--
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 324 changed files with 25,060 additions and 1,360 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
PLEASE FILL THE FOLLOWING INFORMATION
-->

**I'm submitting a ...** (check one with "x")
```
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
```

**Current behavior**
<!-- Describe how the bug manifests. -->

**Expected behavior**
<!-- Describe what the behavior would be without the bug. -->

**Minimal reproduction of the problem with instructions**
<!--
If the current behavior is a bug or you can illustrate your feature request better with an example,
please provide the *STEPS TO REPRODUCE* and, in case of graphical issues, a screenshot.
-->

**Please tell us about your environment:**
<!-- Operating system, Qt version, Notepad-- version, ... -->
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Ubuntu 24.04.1]
- Installation type [e.g. snap, git, distro packages, other]
- Qt version [find it from the menu "? -> About Qt..."]
- Notepad-- version [find it from the menu "? -> About Notepad--..."]

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
199 changes: 145 additions & 54 deletions .github/workflows/cmake-multi-platform.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,75 +1,166 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
name: Build and Release

on:
push:
branches: [ "main" ]
branches: [main, dev]
pull_request:
branches: [ "main" ]
branches: [main]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
artifact_extension: tar.gz
- os: macos-latest
artifact_extension: zip
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
artifact_extension: zip

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

# Ubuntu Section
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build \
qt6-base-dev qt6-tools-dev qt6-tools-dev-tools \
qt6-l10n-tools libgl1-mesa-dev libglu1-mesa-dev rsync
- name: Configure CMake (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
cmake -B "${{ github.workspace }}/build" \
-DCMAKE_BUILD_TYPE=Release \
-G "Ninja" \
-S "${{ github.workspace }}"
- name: Build Notepad-- (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: cmake --build "${{ github.workspace }}/build" --config Release
- name: Package Notepad-- (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
BUILD_DIR="${{ github.workspace }}/build"
OUTPUT_DIR="${{ github.workspace }}/artifacts"
mkdir -p $OUTPUT_DIR
tar -czvf $OUTPUT_DIR/Notepad--_ubuntu.tar.gz -C $BUILD_DIR .
- name: Upload Ubuntu Artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: Notepad--_ubuntu
path: "${{ github.workspace }}/artifacts/Notepad--_ubuntu.tar.gz"

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
# macOS Section
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
brew install ninja qt
- name: Configure CMake (macOS)
if: matrix.os == 'macos-latest'
run: |
cmake -B "${{ github.workspace }}/build" \
-DCMAKE_BUILD_TYPE=Release \
-G "Ninja" \
-S "${{ github.workspace }}"
- name: Build Notepad-- (macOS)
if: matrix.os == 'macos-latest'
run: cmake --build "${{ github.workspace }}/build" --config Release
- name: Package Notepad-- (macOS)
if: matrix.os == 'macos-latest'
run: |
BUILD_DIR="${{ github.workspace }}/build"
OUTPUT_DIR="${{ github.workspace }}/artifacts"
mkdir -p $OUTPUT_DIR
zip -r $OUTPUT_DIR/Notepad--_macos.zip $BUILD_DIR
- name: Upload macOS Artifact
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: Notepad--_macos
path: "${{ github.workspace }}/artifacts/Notepad--_macos.zip"

# Windows Section
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install ninja -y
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
choco install mingw -y
shell: cmd
- name: Install Qt (Windows)
if: matrix.os == 'windows-latest'
uses: jurplel/install-qt-action@v4
with:
version: '6.5.3'
host: 'windows'
target: 'desktop'
arch: 'win64_mingw'
- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
run: |
cmake -B "${{ github.workspace }}\\build" ^
-DCMAKE_BUILD_TYPE=Release ^
-G Ninja ^
-DCMAKE_PREFIX_PATH=D:\\a\\Notepad--\\Qt\\6.5.3\\mingw_64 ^
-S "${{ github.workspace }}"
shell: cmd
- name: Build Notepad-- (Windows)
if: matrix.os == 'windows-latest'
run: cmake --build "${{ github.workspace }}\\build" --config Release
shell: cmd
- name: Package Notepad-- (Windows)
if: matrix.os == 'windows-latest'
run: |
$BUILD_DIR="${{ github.workspace }}\\build"
$OUTPUT_DIR="${{ github.workspace }}\\artifacts"
mkdir $OUTPUT_DIR
Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip"
shell: pwsh
- name: Upload Windows Artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: Notepad--_windows
path: "${{ github.workspace }}\\artifacts\\Notepad--_windows.zip"

release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Generate Tag Name
id: tag_name
run: echo "RELEASE_TAG=release-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: Notepad-- Release
draft: false
prerelease: false

- name: Upload Artifacts to Release
run: |
for file in $(find artifacts -type f); do
gh release upload ${{ env.RELEASE_TAG }} "$file"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build/
examples/
CMakeLists.txt.user
Empty file modified .vscode/settings.json
100644 → 100755
Empty file.
Loading