Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake support for Qt5 and Qt6 #100

Draft
wants to merge 94 commits into
base: master
Choose a base branch
from
Draft

Commits on Sep 24, 2022

  1. CMake support for Qt5

    This commit brings CMake support for the Qt5 build of NotepadNext.
    
    To build use:
    ```
    cmake -S . -B cbuild -G Ninja
    cmake --buid cbuild
    ```
    
    Building using `qmake` on my machine takes 1:37, and using `cmake/ninja` it takes about 0:53.
    
    As part of the changes - I am using external dependencies - using CPM (https://github.com/cpm-cmake/CPM.cmake).
    Some sub projects had no CMake support - and thus I forked them, and added cmake support
    so I add them. This is a big issue I need to fix over time.
    
    Note I have made 2 modifications to the code:
    1. In NotepadNextApplication.cpp - when using CPM, the lua bridge
       include is under a subdirectory. I could have fixed the internal
       fork to behave like this, but I opted to make as minimal changes
       to the app's code. Instead, I use a hack.
    2. When using upstreams Lua (the forked version I have made...),
       the include `lua.hpp` is not availble. The original code had
       that file inside the library - which is a big no-no. We do not
       modify upstream's code. Instead - I copied this into the apps
       main code.
    
    Note that this branch can still be compiled using QMake. When the
    build stabilizes - it should be easy to remove all submodules and
    internal forks, and keep the CMake build only. (the only code this
    repo will have is the main app).
    
    This was tested under Debian, using Qt5. I will have to test this
    under Windows (can test the mingw and CL builds). I cannot test this
    under OSX, as I don't own a Mac (I am open to donations!).
    
    Adding Qt6 will be also "trivial" - just fixing all the forks I have
    done, and then the main app. It will take some time.
    
    Note:
    The initial cmake takes time, as part of the configuration the
    code will git/clone the code from scintilla. This is a one time
    task - not to affect you until you clan up the build/_deps directory.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    83ed448 View commit details
    Browse the repository at this point in the history
  2. Fix clang build

     * NotepadNext - moved compile defines to the main target, no longer visible
       to the whole project
     * Main - Fixed clang building - using C++ 17 globally fixed building using clang
       (it seems GCC defaults to 17, while clang not).
     * Updates to 3rd parties.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    a167543 View commit details
    Browse the repository at this point in the history
  3. Uprade lua to v5.4.4

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    d6f1a0f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bed2be6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5bf8e88 View commit details
    Browse the repository at this point in the history
  6. Move to newer scintilla

    Updated upstreams scintilla. Both scintilla and Lexzilla.
    I also added demos of how to use the moving branches, instead of tags.
    
    From the other side, all I do is `git checkout cmake-support && git pull origin master`
    so things are easy. When I get a new tag upstream, I merge and re-tag with `-cmake` suffix.
    
    Seems easy and maintainable.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    f9891b7 View commit details
    Browse the repository at this point in the history
  7. Build cmake-qt5

    We will check Qt6, soon. Meanwhile, as Qt5 on debian is known to work - lets use it.
    
    I am not building the app image yet.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    83929a2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e8d13be View commit details
    Browse the repository at this point in the history
  9. fix setup step

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    ee266af View commit details
    Browse the repository at this point in the history
  10. Lets build on Windows, I hope

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    849d9b2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    194b106 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4f64763 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    0eea772 View commit details
    Browse the repository at this point in the history
  14. OOPS, macos, not osx....

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    2c68a89 View commit details
    Browse the repository at this point in the history
  15. Fix linking on MSVC

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    bab61e9 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    17b76fb View commit details
    Browse the repository at this point in the history
  17. Fix the name of github task

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    48e8582 View commit details
    Browse the repository at this point in the history
  18. Use static builds for all libraries

    Also - prepare for creating appimage - added an install target.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    7726b03 View commit details
    Browse the repository at this point in the history
  19. Create an AppImage

    - Switch to gnu-makefiles - as I learn how to handle ninja install
    - Added a new artifact for Linux/Qt5/AppImage/CMake. Matrix is now larger :)
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    d1ac7a6 View commit details
    Browse the repository at this point in the history
  20. Attempt to fix cmake install

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    1757daf View commit details
    Browse the repository at this point in the history
  21. Attempt to fix make install

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    d9368bc View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    c0bb613 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    3b09454 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    c9315bf View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    dbe2a27 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    2b1d97d View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    86822ce View commit details
    Browse the repository at this point in the history
  28. re-enable windows build

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    6c33eab View commit details
    Browse the repository at this point in the history
  29. Fix Qt6 support

    Fixed cmake to compile using Qt6.
    I think I did not break Qt5.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    47e1558 View commit details
    Browse the repository at this point in the history
  30. Use Qt6 on CI

    Due to a stupidity found in SimpleApplication - this is not trivial to automatically Qt version.
    This is because we need to tell that project, the Qt version we want... I can workaround it,
    but not now.
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    49c5869 View commit details
    Browse the repository at this point in the history
  31. missing compat module...

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    212d5c8 View commit details
    Browse the repository at this point in the history
  32. Update ubuntu builder to 20.04

    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    e9cfdac View commit details
    Browse the repository at this point in the history
  33. Fix compilation for version 0.5.5

    Added missing source files - and re-ordered the list of files inside the
    CMakeLists.txt.
    
    ALSO: fixed include inside MacroStepTableModel.h - we needed to guard it
    (How did it work on QMake?)
    elcuco committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    b4368bd View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2022

  1. Build using ninja

    I am now installing using `cmake` which means I can build using
    ninja again.
    elcuco committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    69f4f68 View commit details
    Browse the repository at this point in the history
  2. Updates to various libraries

    - build lua without a fork, create a local cmake file for it
    - ADS - 3.8.2 -> 3.8.3
    - ucharder - update upsream sha1
    elcuco committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    1e22932 View commit details
    Browse the repository at this point in the history
  3. Fix build

    - dont link same library twise
    - when building on the CI - pass the correct defines,
      this should work (works on my local setup!)
    elcuco committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    6c17f3a View commit details
    Browse the repository at this point in the history
  4. Fix building on windows

    Also.. use the default configure path for  cmake
    elcuco committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    e14db3a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4f258ac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    82ad512 View commit details
    Browse the repository at this point in the history
  7. fix mac + ubuntu build images?

    elcuco committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    98814e3 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. Configuration menu
    Copy the full SHA
    6b43166 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea0924b View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2022

  1. Move to a local build system for QSimpleUpdater

    As we did with LUA, QSimpleUpdater has a local CMake build system, which
    we just include. No port is needed.
    
    I am abandoning the idea of upstreaming the CMake support - as I see for
    example that LUA is not intersted at this at all. I think SCintilla are
    in a similar position.
    
    If anyone wants to port these libraries to use CMake, they can adpot
    this code from ours.
    elcuco committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    3368536 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. Simplify build system

    Now that editor-config-qt cmake support is upstream we can use the
    upstream repo, instead of the previous port.
    
    I also removed all other forks and instead made a local cmake build
    system (local to the project, a simple include file). Now we are left
    with a single fork - which is necesary (upstream uses mervurial, and
    demands python for generting some files on build time - my fork has that
    as part of the tree).
    
    All projects point to the newewst code available on their git - code
    seems to compile and run, so... yap, ship it.
    
    Fixed the app name and also remove lots of craft from the main
    CMakeFile.
    
    Fixed the workflow to use the *.so files generated at build, and
    disabled the OSX build for now.
    elcuco committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    b418cba View commit details
    Browse the repository at this point in the history
  2. Fix compilation

    Upstream removed this signal - I commend this just to the the code to
    compile and later on I will fix it.
    elcuco committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    4ece07f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a88b2d View commit details
    Browse the repository at this point in the history
  4. Fix compilation and appimage ?

    uchardet is not compiling for windows, revert the sha1
    appimage is broken, lets try and fix?
    elcuco committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    ff27b7e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    03fbc1f View commit details
    Browse the repository at this point in the history
  6. Partly revert b418cba

    Lets hope this fixes uchardet on windows
    elcuco committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    f3b0954 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b2bdb2b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c75f333 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Configuration menu
    Copy the full SHA
    45d8c29 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2022

  1. Configuration menu
    Copy the full SHA
    4fa992a View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Remove initialization of ADS

    The main window will manually initialize ADS. I am unsure what this was
    needed, but as of now, ADS knows how to initialize this for us.
    
    This code is does not compile on my CMake build - not in static, and not
    in shared - so we need to remove it.
    elcuco committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    9170d8f View commit details
    Browse the repository at this point in the history
  2. Fix build on Windows

    Main fix is - a new version of ScintillaCode which now properly build
    statically on Windows (by using `BUILD_SHARED_LIBS` properly).
    
    The main build file no longer build tests and examples (except
    `uchardet` which does not support this upstream).
    
    New version of `CPM.cmake` v0.3.5 -> v0.3.6, because WTF not.
    elcuco committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    2bd9274 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c1a91a5 View commit details
    Browse the repository at this point in the history
  4. Fix build - new file added

    Master got a new file, `ZoomEventWatcher` - lets add it.
    Also - as a bonus, use a newer version of Qt 6.3.
    elcuco committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    2f7ef95 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2022

  1. Configuration menu
    Copy the full SHA
    dbdbc1f View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Configuration menu
    Copy the full SHA
    3707317 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. Reduce some warnings (dail8859#257)

    1) Moved a global inline function to be a member (static) - this fixes warnings (as some compilation unit included that file, but did not use that function).
    2) Inside a lambda - we are not using a flag - so, lets mark it unused.
    elcuco committed Nov 16, 2022
    Configuration menu
    Copy the full SHA
    91f4094 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1aa4045 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    082c7d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6933aa2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    749a406 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2022

  1. Configuration menu
    Copy the full SHA
    e9b58cb View commit details
    Browse the repository at this point in the history
  2. Compile decorators/URLFinder.cpp

    I was missing URLFinder.cpp in the list of files to be compiled. I took
    the time also to sort this list inside the CMakeLists.txt
    elcuco committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    5f225b0 View commit details
    Browse the repository at this point in the history
  3. Update versions.. .for almost everything

    No breaks, simply compiles. NICE!
    elcuco committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    9bcd559 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6d4ca35 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    311bbc0 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2022

  1. Configuration menu
    Copy the full SHA
    dc3b61c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1624591 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2022

  1. Configuration menu
    Copy the full SHA
    45bee8f View commit details
    Browse the repository at this point in the history
  2. Fix buildings

    - point to a newer Scintilla-Code
    - add to the CMakeLists.txt newer files from main.
    elcuco committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    0c40bd3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac632bb View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. Configuration menu
    Copy the full SHA
    6f3b8c8 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2022

  1. Configuration menu
    Copy the full SHA
    333d3f4 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Configuration menu
    Copy the full SHA
    e687865 View commit details
    Browse the repository at this point in the history
  2. Added new files to the CMake build

    New files added upstream (the master branch...) and I need to update the
    CMakeLists.txt file - everything works.
    elcuco committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    c1c4dfd View commit details
    Browse the repository at this point in the history
  3. Version updates

    scintilla-code - rel-5-3-2-cmake -> rel-5-3-3-cmake
    loexilla - rel-5-2-1 -> rel-5-2-2
    uchardet - 143b3fe513bad2cc85903ee564fe55ccbe96d86b -> 2f5c24006ebc7f005040358f58f22a61a3c92522 - effectively v0.0.8
    LuaBridge - 9092ace9615d14e3f5926f2e8a3b612ddc6c8efa -> 6580b18755a0fdbf87820aa16a3bc63d24b5bf31
    Qt-Advanced-Docking-System - 8d30fc9c3c36ac66bf3d027aaad7adff973f628f -> 54c2bd0c304505f9c5abffdd9eaa29ecfd691054
    elcuco committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    0254f14 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e7dd220 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2023

  1. Configuration menu
    Copy the full SHA
    6195ddb View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. Configuration menu
    Copy the full SHA
    d4615e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c59c7eb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e76321 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2023

  1. Configuration menu
    Copy the full SHA
    27cdd3e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    78ff74a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ca88456 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2d5825e View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Configuration menu
    Copy the full SHA
    24f4413 View commit details
    Browse the repository at this point in the history
  2. Fix compilation against main

    1) updated CPM to v0.36.0
    2) uchardet: the github mirror is no longer active. Instead use the
    official freedesktop gitlab mirror.
    3) Updated sha1/versions of libraries
    4) ADS is now at v4.1.1
    5) LanguagePropertiesModel and frieds are removed from code
    elcuco committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    d34fe4d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80e5151 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    66b5a35 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bc794b0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b640125 View commit details
    Browse the repository at this point in the history