Code Monkey home page Code Monkey logo

far2l's Introduction

far2l

Linux port of FAR v2 (http://farmanager.com/) ALPHA VERSION. Currently interesting only for entusiasts!!!

Currently working plugins: colorer, multiarc, farftp, tmppanel, align, autowrap, drawline, editcase, SimpleIndent

Travis

License: GNU/GPLv2

Used code from projects

  • FAR for Windows
  • Wine
  • ANSICON
  • Portable UnRAR
  • 7z ANSI-C Decoder

Contributing, Hacking

Required dependencies

  • gawk
  • m4
  • libglib2.0-dev
  • libwxgtk3.0-dev
  • cmake ( >= 3.2.2 )
  • g++

Or simply on Ubuntu:

apt-get install gawk m4 libglib2.0-dev libwxgtk3.0-dev cmake g++

Clone and Build

git clone https://github.com/elfmz/far2l
mkdir build
cd build

with make:

cmake -DCMAKE_BUILD_TYPE=Release ../far2l
make -j4

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

cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../far2l
ninja -j4

macOS build

  • Supported compiler: AppleClang 8.0.0.x or newer. Check your version, and install/update XCode if necessary.
clang++ -v
  • Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install required packages:
brew install glib gawk cmake pkg-config wget
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2
bunzip2 wxWidgets-3.1.0.tar.bz2
tar xvf wxWidgets-3.1.0.tar
cd wxWidgets-3.1.0
./configure --disable-shared --disable-debug CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++ --enable-monolithic --enable-unicode
make -j4
make install
  • Download, generate makefiles and build far2l:
git clone https://github.com/elfmz/far2l
cd far2l
cmake -G "Unix Makefiles"
make -j4

IDE Setup

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

  • QtCreator: Select "Open Project" and point QtCreator to the CMakeLists.txt in far2l root directory
  • CodeLite: use this guide to setup a project: http://codelite.org/LiteEditor/WorkingWithCMake. Don't create workspace inside far2l directory, so you don't pollute your source tree.

Useful add-ons

Notes on porting

I implemented/borrowed from Wine some commonly used WinAPI functions. They are all declared in WinPort/WinPort.h and corresponding defines can be found in WinPort/WinCompat.h. Both included by WinPort/windows.h. Note that this stuff may not be 1-to-1 to corresponding Win32 functionality also doesn't provide full-UNIX functionality, but it simplifies porting and can be considered as temporary scaffold.

However only main executable linked statically to WinPort, it also exports WinPort functionality, so plugins use it without neccessity to bring own copy of its code. So plugin binary should not statically link to WinPort!

While FAR internally is UTF16, so WinPort contains UTF16- related stuff. However native Linux wchar_t size is 4 so potentially Linux FAR may be fully UTF32-capable in future, but while it uses Win32-style UTF16 functions - its not. However programmers must be aware on fact that wchar_t is not 2 bytes long anymore.

Inspect all printf format strings: unlike Windows in Linux both wide and multibyte printf-like functions has same multibyte and wide specifiers. That means %s is always multibyte, while %ls is always wide. So any %s used in wide-printf-s or %ws used in any printf should be replaces by %ls.

Update from 27aug: now its possible by defining WINPORT_DIRECT to avoid renaming used WIndows API and also to avoid changing format strings as swprintf will be intercepted by compatibility wrapper.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.