| 1 | = How to use 16M colors on 32-bits systems = |
| 2 | |
| 3 | MC 4.8.19 onward supports 16 millions colors. |
| 4 | |
| 5 | Only, however, if you're using S-Lang 2.3.1 and up on a **64-bits** system. |
| 6 | |
| 7 | That's exactly the problem: if you're on a **32-bits** system, you're toast. (This is supposed to be fixed in some futuristic "version 3" of S-Lang.) |
| 8 | |
| 9 | This page shows how to compile S-Lang with 16M colors **on a 32-bits system**, and how to compile MC against it. |
| 10 | |
| 11 | == Compiling & installing S-Lang: == |
| 12 | |
| 13 | {{{ |
| 14 | rm -rf ~/slang-dev |
| 15 | mkdir ~/slang-dev |
| 16 | cd ~/slang-dev |
| 17 | |
| 18 | wget http://www.jedsoft.org/releases/slang/old/slang-2.3.0.tar.gz |
| 19 | tar zxvf slang-2.3.0.tar.gz |
| 20 | cd slang-2.3.0 |
| 21 | |
| 22 | wget http://midnight-commander.org/raw-attachment/ticket/3145/slang-truecolor-demo.patch |
| 23 | patch -p1 < slang-truecolor-demo.patch |
| 24 | |
| 25 | # Let MC know we support 16M colors: |
| 26 | perl -i -pe 's/#define SLANG_VERSION 20300/#define SLANG_VERSION 30000/' src/slang.h |
| 27 | # Remove duplicate declarations (gives compiler warnings): |
| 28 | perl -i -pe '$skip || s/SL_EXTERN int SLrline_get_update_client_data \(SLrline_Type \*, VOID_STAR \*\);// && ($skip=1)' src/slang.h |
| 29 | |
| 30 | ./configure --prefix=$HOME/local-slang |
| 31 | |
| 32 | make |
| 33 | make install |
| 34 | |
| 35 | rm -rf ~/slang-dev |
| 36 | }}} |
| 37 | |
| 38 | == Compiling MC: == |
| 39 | |
| 40 | {{{ |
| 41 | cd /PATH/TO/YOUR/MC-BUILD-DIR |
| 42 | |
| 43 | ../configure \ |
| 44 | --prefix=$HOME/local-mc16Mcolors \ |
| 45 | --with-screen=slang \ |
| 46 | --with-slang-includes=$HOME/local-slang/include \ |
| 47 | --with-slang-libs=$HOME/local-slang/lib \ |
| 48 | CFLAGS="-g -O0" |
| 49 | |
| 50 | make |
| 51 | make install |
| 52 | |
| 53 | # download a sample 16M skin: |
| 54 | cd $HOME/local-mc16Mcolors/share/mc/skins |
| 55 | wget http://midnight-commander.org/raw-attachment/ticket/3724/seasons-spring16M.ini |
| 56 | |
| 57 | # run mc: |
| 58 | export LD_LIBRARY_PATH=$HOME/local-slang/lib |
| 59 | export TERM=xterm-256color # if it's not already so. |
| 60 | /PATH/TO/YOUR/MC-BUILD-DIR/src/mc # or run it from $HOME/local-mc16Mcolors/bin/mc |
| 61 | # ...then go to Options >> Appearance and choose the 16M skin. |
| 62 | }}} |