Skip to content

lidacity/far2l

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cirrus Build Status Coverage Status Coverity Scan Language Grade: C/C++ Packages

far2l tag

Linux fork of FAR Manager v2 (http://farmanager.com/)
Works also on OSX/MacOS and BSD (but later not tested on regular manner)
BETA VERSION.
Use on your own risk!

Plug-ins that are currently working: NetRocks (SFTP/SCP/FTP/FTPS/SMB/NFS/WebDAV), colorer, multiarc, tmppanel, align, autowrap, drawline, editcase, SimpleIndent, Calculator, Python (optional scripting support)

FreeBSD/MacOS (Cirrus CI): Cirrus

License: GNU/GPLv2

Used code from projects

  • FAR for Windows and some of its plugins
  • WINE
  • ANSICON
  • Portable UnRAR
  • 7z ANSI-C Decoder
  • utf-cpp by ww898

Contributing, Hacking

Required dependencies

  • gawk
  • m4
  • libwxgtk3.0-gtk3-dev (or in older distributives - libwxgtk3.0-dev) (needed for GUI backend, not needed with -DUSEWX=no)
  • libx11-dev (optional - needed for X11 extension that provides better UX for TTY backend wherever X11 is available)
  • libxi-dev (optional - needed for X11/Xi extension that provides best UX for TTY backend wherever X11 Xi extension is available)
  • libxerces-c-dev
  • libspdlog-dev
  • libuchardet-dev
  • libssh-dev (needed for NetRocks/SFTP)
  • libssl-dev (needed for NetRocks/FTPS)
  • libsmbclient-dev (needed for NetRocks/SMB)
  • libnfs-dev (needed for NetRocks/NFS)
  • libneon27-dev (or later, needed for NetRocks/WebDAV)
  • libarchive-dev (needed for better archives support in multiarc)
  • libpcre3-dev (or in older distributives - libpcre2-dev) (needed for custom archives support in multiarc)
  • cmake ( >= 3.2.2 )
  • g++
  • git (needed for downloading source code)

Or simply on Debian/Ubuntu:

apt-get install gawk m4 libwxgtk3.0-gtk3-dev libx11-dev libxi-dev libpcre3-dev libxerces-c-dev libspdlog-dev libuchardet-dev libssh-dev libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libarchive-dev cmake g++ git

In older distributives: use libpcre2-dev and libwxgtk3.0-dev instead of libpcre3-dev and libwxgtk3.0-gtk3-dev

Clone and Build

  • Clone current master git clone https://github.com/elfmz/far2l
  • Checkout some stable release tag (master considered unstable): git checkout v_2.#.#
  • Prepare build directory:
mkdir -p far2l/_build
cd far2l/_build
  • Build: with make:
cmake -DUSEWX=yes -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j$(nproc --all)

or with ninja (you need ninja-build package installed)

cmake -DUSEWX=yes -DCMAKE_BUILD_TYPE=Release -G Ninja ..
cmake --build .
  • If above commands finished without errors - you may also install far2l, sudo cmake --install .

  • Also its possible to create far2l_2.X.X_ARCH.deb or ...tar.gz packages in _build directory by running cmake --build . --target package command.

Additional build configuration options:

To build without WX backend (console version only): change -DUSEWX=yes to -DUSEWX=no also in this case dont need to install libwxgtk*-dev package

To force-disable TTY|X and TTY|Xi backends: add argument -DTTYX=no; to disable only TTY|Xi - add argument -DTTYXI=no

To eliminate libuchardet requirement to reduce far2l dependencies by cost of losing automatic charset detection functionality: add -DUSEUCD=no

To build with Python plugin: add argument -DPYTHON=yes

There're also options to toggle other plugins build in same way: ALIGN AUTOWRAP CALC COLORER COMPARE DRAWLINE EDITCASE EDITORCOMP FARFTP FILECASE INCSRCH INSIDE MULTIARC NETROCKS SIMPLEINDENT TMPPANEL

OSX/MacOS install

  • You can install prebuilt package for x86_64 platform via Homebrew Cask, by command:
brew install --cask far2l
  • You can also manually download and install prebuilt package for x86_64 platform from Releases page: https://github.com/elfmz/far2l/releases
  • But if you need custom/recent build, you can proceed to build steps below: using brew or MacPorts.
  • Supported compiler: AppleClang 8.0.0.x or newer. Check your version, and install/update Xcode if necessary.
clang++ -v
  • If you want to build using Homebrew - first visit https://brew.sh/ for installation instructions. Note that there're reported problems with Homebrew-based build under MacOS Big Sur.
  • If you want to build using MacPorts - first visit https://www.macports.org/install.php for installation instructions.
One line OSX/MacOS install latest far2l git master via unofficial brew tap
  • With GUI/TTY backends:
brew install --HEAD yurikoles/yurikoles/far2l
  • With TTY backend only:
brew install --HEAD yurikoles/yurikoles/far2l --without-wxwidgets
  • Additionally you can enable python support by adding --with-python@3.10 to the one of two above commands.
Full OSX/MacOS build from sources (harder):

Some issues can be caused by conflicting dependencies, like having two versions of wxWidgets, so avoid such situation when installing dependecies.

  • Clone:
git clone https://github.com/elfmz/far2l
cd far2l
  • Install needed dependencies with MacPorts:
sudo port install cmake gawk pkgconfig wxWidgets-3.2 libssh openssl xercesc3 libfmt spdlog uchardet neon
  • OR if you prefer to use brew packages, then:
brew bundle -v
  • After dependencies installed - you can build far2l: with make:
mkdir _build
cd _build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUSEWX=yes -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j$(sysctl -n hw.logicalcpu)

or with ninja:

mkdir _build
cd _build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DUSEWX=yes -DCMAKE_BUILD_TYPE=Release -G Ninja ..
cmake --build .
  • Then you may create .dmg package by running: cpack command. Note that this step sometimes fails and may succeed from not very first attempt. Its recommended not to do anything on machine while cpack is in progress. After .dmg successfully created, you may install it by running open ...path/to/created/far2l-*.dmg

Building on Gentoo (and derivatives)

For absolute minimum you need:

emerge -avn dev-libs/xerces-c app-i18n/uchardet dev-util/cmake dev-libs/spdlog

If you want to build far2l with wxGTK support also install it:

emerge -avn x11-libs/wxGTK

Additionally, for NetRocks you will need:

emerge -avn net-libs/neon net-libs/libssh net-fs/libnfs net-fs/samba

After installing, follow Clone and Build section above.

Installing and Building on NixOS

To install system-wide, add the far2l package to your configuration.nix environment.systemPackages list. To run the application on-demand without affecting the system state, execute nix-shell -p far2l --command far2l. These use a package version from your current channel.

The Far2l adaptation for nix is a small file on GitHub, it tells which Git revision from Far2l repo to fetch, with what dependencies to build it, and how to patch its references to other software to make it run in isolated fashion independently from other versions available in the system.

You can build and run far2l package for any revision:

  • Directly from GitHub (NixOS/nixpkgs repo, or your own fork and branch):
nix-shell -I nixpkgs=https://github.com/<fork>/nixpkgs/archive/<revision-or-branch>.tar.gz -p far2l --command far2l
  • From a locally cloned working directory of the repo:
nix-shell -I nixpkgs=/path/to/nixpkgs -p far2l --command far2l

To advance the package to a new Far2l revision, edit the fetchFromGitHub set attributes rev (revision hash) and sha256 (revision content hash). Important! If you leave the old content hash, the old cached content for that hash might be used without attempting to download the new revision. If you're not expecting the build to break, the easiest would be to make a fork, push the change, and build straight from github.

IDE Setup

You can import the project into your favourite IDE like QtCreator, CodeLite, or any other, which supports cmake or which cmake is able to generate projects for.

  • QtCreator: select "Open Project" and point QtCreator to the CMakeLists.txt in far2l root directory
  • CLion: the same as QtCreator.
  • CodeLite: use this guide to setup a project: https://wiki.codelite.org/pmwiki.php/Main/TheCMakePlugin (to avoid polluting your source tree, don't create your workspace inside of the far2l directory)

Useful 3rd-party extras

Notes on porting and FAR Plugin API changes

  • See HACKING.md

Known issues:

  • Only valid translations are English, Russian and Ukrainian, all other languages require deep correction.

About

Linux port of FAR v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 47.4%
  • C++ 43.6%
  • M4 7.5%
  • CMake 0.7%
  • Python 0.3%
  • Shell 0.2%
  • Other 0.3%