Score:0

Midnight Commander - create (standalone/static) package

nl flag

I would like to create a Midnight Commander package containing the binaries and all related files/folders as the following (this is just an example):

$HOME/{FOLDER}/../mc (this will be a folder or subfolder in my home directory) and below will be the structure:

mc                   ---> the folder containing all Midnight Commander required files & folders
├── bin              ---> this is a folder
│   ├── mc
│   ├── mcdiff -> mc
│   ├── mcedit -> mc
│   └── mcview -> mc
├── etc              ---> this is a folder
│   └── mc           ---> this is a folder
│       ├── edit.indent.rc
│       ├── filehighlight.ini
│       ├── mc.default.keymap
│       ├── mcedit.menu
│       ├── mc.emacs.keymap
│       ├── mc.ext.ini
│       ├── mc.keymap -> mc.default.keymap
│       ├── mc.menu
│       └── sfs.ini
├── lib              ---> folder containing al required libraries
├── libexec          ---> this is a folder
│   └── mc           ---> this is a folder
│       ├── ext.d    ---> this is a folder
│       ├── extfs.d  ---> this is a folder
│       ├── fish     ---> this is a folder
│       ├── cons.saver
│       ├── mc.csh
│       ├── mc.sh
│       ├── mc-wrapper.csh
│       └── mc-wrapper.sh
└── share            ---> this is a folder
    ├── locale       ---> this is a folder
    ├── man          ---> this is a folder  containing man files)
    └── mc
        ├── examples ---> this is a folder
        ├── help     ---> this is a folder  containing *.hlp files)
        ├── hints    ---> this is a folder  containing *.hint files)
        ├── skins    ---> this is a folder  containing *.ini skin files)
        ├── syntax   ---> this is a folder  containing *.syntax files)
        ├── mc.charsets
        └── mc.lib

So does anyone can help me which parameters I need to use with "configure" to create such a standalone/static package

FYI - I have been playing with the following parameters:

./configure --prefix=$HOME/mc --disable-shared --enable-static

after creating the package (using make && make install) it does give the results I am looking for, cause when I move the folder to a different place, like

$HOME/mytools/mc

I get all sorts of errors like not being able to find the Syntax file, or the help file, etc...

Thanks in advance for your replies

waltinator avatar
it flag
By using `--prefix=$HOME/mc` on your `./configure`, you have told `mc` to find all the files it needs in the directory tree based at `$HOME/mc/`. When you moved the files elsewhere, `mc` couldn't find them, so, of course you would "get all sorts of errors like not being able to find the Syntax file, or the help file, etc...". Use the desired destination directory in your `--prefix=`.
wolfferine avatar
nl flag
Thanks for your explanation - and yes I am aware of the --prefix parameter, but wat I am looking for - is if there's a way to create an install of Midnight Commander, independent of the location where the "mc folder" is placed (like I show in the tree view I have added) In other words all the required files (except the libraries) are stored in one folder and it doesn't matter were this folder is placed or how it's named (generally, in my case, it would be "mc" in the home folder)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.