|
C-Menu 0.2.9
A User Interface Toolkit
|
The instructions below will guide you through building and installing C-Menu from source.
If you plan to develop C-Menu, use the build tool you are most comfortable with, as both are fully supported and will produce similar results.
If you are building C-Menu for development or debugging purposes, use the default Debug build type. This creates unstripped executables with debugging symbols. As of C-Menu 0.2.9, the Debug binaries are about 6.5 Mb.
If you are building C-Menu for deployment or want to optimize for size and performance, use the Release build type. As of C-Menu 0.2.9, the Release binaries are about 1.4 Mb.
It is strongly recommended that you build C-Menu as a regular user and only use root privileges for the installation step.
Clone the C-Menu repository and change to the C-Menu/src directory.
Change to the C-Menu/src directory.
CAUTION: In the CMenu build system, C-Menu/src/Makefile is a temporary file which will be overwritten by CMake. It will be used for the GNU Makefile build and the CMake build, and CMake will overwrite it. This shouldn't be a problem because the original GNU Makefile is in C-Menu/src/GNUMakefile.
What you don't want to do is spend time editing C-Menu/src/Makefile and then have CMake overwrite your changes. To avoid this, if you make changes to C-Menu/src/Makefile, copy it to C-Menu/src/GNUMakefile.XXX, where XXX is a descriptive suffix or version number.
So you don't have to type "-f GNUMakefile" with every make command, copy C-Menu/src/GNUMakefile to Makefile
To build the Debug version:
To build the Release version:
If you want to run the build in a separate build directory (recommended), you can use the following commands:
Choosing the above method obviates the need for the install step below, as the last command completes the install.
CAUTION: In the CMenu build system, C-Menu/src/Makefile is a temporary file which will be overwritten by CMake. It will be used for the GNU Makefile build and the CMake build, and CMake will overwrite it. This shouldn't be a problem because the original GNU Makefile is in C-Menu/src/GNUMakefile.
What you don't want to do is spend time editing C-Menu/src/Makefile and then have CMake overwrite your changes. To avoid this, if you make changes to C-Menu/src/Makefile while you are building with GNU Makefile make, copy the Makefile to C-Menu/src/GNUMakefile.XXX, where XXX is a descriptive suffix or version number.
You don't need to protect the CMake Makefile because it is generated by CMake from another file, C-Menu/src/CMakeLists.txt.
To build with C-Make:
This will generate the necessary build files for your system. By default, CMake will configure the project to build the Debug variants of the C-Menu binaries. If you want to build the Release variants, specify the build type when configuring CMake:
You will now have a CMake makefile in C-Menu/src/Makefile. Build the project using the following command:
If you want to run the build in a separate build directory (recommended), you can use the following commands:
Choosing the above method obviates the need for the install step below, as the last command completes the install.
To install C-Menu binaries, run the following command with root privileges:
This will install the C-Menu binaries and libraries to the specified PREFIX directory (e.g., /home/your_user_name/menuapp) and set the appropriate permissions.
After installation, you can verify that the C-Menu binaries and libraries have been installed to the correct directories (e.g., /home/your_user_name/menuapp/lib64 and /home/your_user_name/menuapp/bin) and that the permissions are set correctly. You can do this by running the following command:
This will display a list of all the files that were installed, along with their permissions and sizes. You should see entries for the C-Menu binaries in /home/your_user_name/menuapp/bin and the C-Menu libraries in /home/your_user_name/menuapp/lib64, as well as the configuration file for the dynamic linker in /etc/ld.so.conf.d/CMenu.conf.
The C-Menu build system installs C-Menu libraries in:
To run the C-Menu binaries, you need to ensure that the dynamic linker can find the C-Menu libraries. The build system installs a configuration file for the dynamic linker in:
The contents of CMenu.conf should include the path to the C-Menu libraries, which is:
The C-Menu binaries are installed in:
Put the following lines in your shell profile (e.g., ~/.bashrc, ~/.zshrc) to set up your environment for running C-Menu binaries:
After setting up your environment, you can run the C-Menu binaries from any terminal. For example, to run the menu binary, simply type:
You have successfully built and installed C-Menu from source. You can now use the C-Menu binaries and libraries in your projects or run the C-Menu applications as needed. If you encounter any issues during the build or installation process, please refer to the documentation or seek help from the C-Menu community.