Saturday, December 21, 2024

Getting You the Best Text Editor

Given how gung-ho I am about UX, you just can't lose. Where have you been my whole life?


-------------------------------------------------
how familiar are you with NEdit?

(Why? Because I want to ask it to hack the source code and upgrade the prehistoric file open dialog with something that has a field for mod date, and lets you sort by that so you see oldest/newest easily :)

blah blah and..

Status

  • Development of NEdit has largely ceased, but a fork called NEdit-NG (NEdit Next Generation) is actively maintained. NEdit-NG modernizes the original while maintaining the core user experience.

Is NEdit-NG something that can be installed on ubuntu?

YES! - install dependencies - and you get something MUCH nicer than the old beast. Thank you FOSS comm!

Yes, NEdit-NG can be installed on Ubuntu. While it's not available directly through Ubuntu's default package repositories, you can compile it from source by following these steps:

  1. Install Required Dependencies: Open a terminal and execute the following commands to ensure all necessary packages are installed:


    sudo apt update sudo apt install -y git cmake qt5-default qttools5-dev libboost-all-dev bison
  2. Clone the NEdit-NG Repository: Navigate to your preferred directory and clone the repository:


    git clone https://github.com/eteran/nedit-ng.git
  3. Build NEdit-NG: Navigate into the cloned directory, create a build directory, and compile the source code:


    cd nedit-ng mkdir build cd build cmake .. make
  4. Install NEdit-NG: After a successful build, install the application:


    sudo make install

This process will install NEdit-NG on your system, making it accessible via the command line. For more detailed information and documentation, you can visit the official NEdit-NG documentation page.

Please note that while NEdit-NG aims to be a drop-in replacement for the original NEdit, there may be differences in functionality and appearance due to modernization efforts. If you encounter any issues or have specific requirements, consulting the official documentation or seeking assistance from the developer community is recommended.

You said:

I get Package 'qt5-default' has no installation candidate

chatGPT said:
ChatGPT

The qt5-default package is no longer available in recent versions of Ubuntu (such as 22.04 and later). However, you can install the necessary Qt development tools through alternative packages. Here's how to proceed:

Updated Installation Steps for Qt Dependencies

  1. Install Qt Tools and Development Packages Run the following command to install the necessary Qt libraries and tools:


    sudo apt update sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
  2. Verify qmake is Installed Ensure that qmake, which is part of Qt, is available:


    qmake --version

    This command should output the version of qmake. If it's missing, check the installation of the qt5-qmake package.

  3. Continue with Building NEdit-NG Now you can follow the remaining steps to build NEdit-NG from source:

    • Clone the repository:
      git clone https://github.com/eteran/nedit-ng.git
    • Navigate to the directory and build:

      cd nedit-ng mkdir build cd build cmake .. make
    • Install:

      sudo make install

This should resolve the issue with qt5-default and allow you to successfully build and install NEdit-NG. Let me know if you encounter any other issues!

You said:

If uname-a returns 

 Linux ubuntu-desktop 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 

which version of cmake do you suggest? There is 

sudo snap install cmake # version 3.31.3, or
sudo apt install cmake # version 3.22.1-1ubuntu1.22.04.2

ChatGPT said:
ChatGPT

Given your system details (Linux ubuntu-desktop 5.15.0-119-generic running Ubuntu 22.04 LTS or a derivative), the choice of cmake version depends on the requirements of the software you're building and your preferences for stability versus newer features:

  1. Recommended Version:

    • Use the Snap version (3.31.3) if you need the latest features or are building software that explicitly requires a newer version of CMake.
    • Use the APT version (3.22.1) if you prefer a stable version that is well-tested with your Ubuntu distribution and most projects.
  2. Why Choose Each:

    • Snap Version (3.31.3):
      • Pros: Newer features, better compatibility with the latest C++ standards and modern projects.
      • Cons: Snap-based applications can have a slightly slower startup and might introduce sandboxing behavior that could cause issues in rare cases.
    • APT Version (3.22.1):
      • Pros: Fully integrated with the Ubuntu package ecosystem, stable, and minimal risk of compatibility issues.
      • Cons: Lacks the latest features and improvements in more recent CMake versions.
  3. Compatibility with NEdit-NG:

    • NEdit-NG typically doesn't demand the very latest CMake features, so the APT version (3.22.1) is likely sufficient.
    • However, if the project's documentation or error messages suggest a requirement for a specific newer version, use the Snap version.

Suggested Approach

  • Start with the APT version (3.22.1) to keep things simple and aligned with your system's dependencies.

    sudo apt install cmake
  • If you encounter issues or if the project explicitly recommends a newer version, switch to the Snap version (3.31.3):
    sudo snap install cmake --classic

Let me know if you need further clarification or assistance!

You said:

Now, when I try cmake to build NEdit-NG, I get : CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.35") Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22/Modules/FindBoost.cmake:2360 (find_package_handle_standard_args) CMakeLists.txt:46 (find_package)
ChatGPT said:
ChatGPT

The error indicates that CMake is unable to find the Boost libraries on your system. Boost is a popular set of C++ libraries, and NEdit-NG requires it to build. Here's how you can resolve this issue:

Steps to Install and Configure Boost

  1. Install Boost Development Libraries Install the Boost libraries and development headers via APT:


    sudo apt install -y libboost-all-dev
  2. Verify Boost Installation Ensure the Boost headers and libraries are installed correctly. For example:


    ls /usr/include/boost

    If the directory exists and contains files, Boost is installed.

  3. Clean and Retry CMake After installing Boost, clean your build directory and run CMake again:


    cd path_to_nedit_ng/build rm -rf * cmake ..
  4. Specify Boost Paths Manually (Optional) If CMake still cannot find Boost, explicitly provide the path to the Boost include directory and libraries using CMake variables:

    cmake .. -DBOOST_ROOT=/usr/include/boost -DBoost_INCLUDE_DIR=/usr/include

Additional Notes

  • Ensure that the version of Boost installed (via APT) meets the minimum version required by NEdit-NG, which is 1.35 or later. The libboost-all-dev package in Ubuntu 22.04 provides a much newer version, so this should not be an issue.
  • If you are using a custom Boost installation or the Boost libraries are installed in a non-standard location, you need to specify the paths manually using BOOST_ROOT, Boost_INCLUDE_DIR, and Boost_LIBRARY_DIRS.

Let me know if the issue persists after trying these steps!

You said:

I now get this error with cmake on nedit-ng: CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5LinguistTools" with any of the following names: Qt5LinguistToolsConfig.cmake qt5linguisttools-config.cmake Add the installation prefix of "Qt5LinguistTools" to CMAKE_PREFIX_PATH or set "Qt5LinguistTools_DIR" to a directory containing one of the above files. If "Qt5LinguistTools" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/CMakeLists.txt:9 (find_package)

ChatGPT said:
ChatGPT

The error indicates that the Qt5LinguistTools package is not installed or CMake cannot locate it. This package is part of the Qt tools suite and is required to build NEdit-NG. Here's how to resolve it:

Steps to Fix the Error

  1. Install the qttools5-dev Package The qttools5-dev package includes Qt5LinguistTools and other necessary development tools. Install it using APT:


    sudo apt update sudo apt install -y qttools5-dev
  2. Verify Installation After installation, ensure that the Qt5LinguistToolsConfig.cmake file exists. You can check its presence with:


    locate Qt5LinguistToolsConfig.cmake

    It is usually located in /usr/lib/x86_64-linux-gnu/cmake/Qt5LinguistTools/.

  3. Clean and Retry CMake After ensuring Qt5LinguistTools is installed, clean your build directory and rerun CMake:


    cd path_to_nedit_ng/build rm -rf * cmake ..
  4. Manually Set the CMAKE_PREFIX_PATH (If Needed) If CMake still cannot locate Qt5LinguistTools, specify its location explicitly:


    cmake .. -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/cmake/Qt5LinguistTools/"

Explanation

  • The qttools5-dev package provides the necessary development files, including the configuration files that CMake uses to locate Qt5LinguistTools.
  • If you use a custom Qt installation, you may need to set the CMAKE_PREFIX_PATH to the directory containing the relevant Qt5 CMake configuration file
You said:

If build succeeds, how do you run NEdit-NG?

ChatGPT said:
ChatGPT

If the build process for NEdit-NG succeeds, you can run the application by following these steps:

Steps to Run NEdit-NG

  1. Locate the Executable After a successful build, the nedit-ng executable is typically located in the build directory where you compiled the project. You can find it with:

    find . -name nedit-ng

    This should return the path to the executable, such as build/src/nedit-ng.

  2. Run Directly from the Build Directory You can run NEdit-NG directly from the build directory:


    ./src/nedit-ng
  3. Install NEdit-NG System-Wide (Optional) If you want to run nedit-ng from anywhere on your system without specifying the full path, install it system-wide:


    sudo make install

    This will typically place the nedit-ng binary in /usr/local/bin, making it accessible via:


    nedit-ng
  4. Verify Installation Check if the nedit-ng binary is in your system's PATH by running:


    which nedit-ng

    This should return the installation path (e.g., /usr/local/bin/nedit-ng).

  5. Run NEdit-NG If installed system-wide, simply type the following in a terminal:


    nedit-ng

No comments:

Post a Comment

Who Needs Cadence Anymore (for Schematic Tree Reporting that is :)? Make Your Own Reporter with chatGPT!

You know what I mean, if you've used Cadence - the SHIFT-T thing that gives you the schematic tree can be VERY useful, at times. No Cade...