This a library to parse .ini files for other projects. I want to use this for all of my other projects instead of relying on a 3rd-party. I just thought why not and here are we.
This library is originally meant to be used for other SMaster4 projects. It is not a library meant to be used in combination with anything else since the stability and maintanance is tied to other SMaster4 Project needs. No one disallows you from using it, but there is no guarantue for stability.
- CMake(Version 3.12 and upwards)
- A C11 compatible compiler(like GCC)
- A Build System CMake can compile to(comes usally with the compiler)
- Git™(optional, but recommended)
CMake is a tool to generate build files for your choosen build system. You check if CMake is installed by running:
cmake --version
If CMake is installed, the version of CMake should be now printed out. If this version isn't 3.12 or an error stating that cmake isn't installed or similar, please install CMake with the package manager of your OS or use the download page of CMake.
Please note that they are many other compilers, but for this explanation we are just gona use GCC. The building steps can slightly differ if you choose a different compiler. Consider reading the documentation of your compiler if you have issues. You can check if GCC is allready installed by running:
gcc --version
If it now prints out the version of GCC, then you can skip the installation process. If it doesn't please install GCC or your choosen compiler with the package manager of your OS or follow the official install guide of GGC. Do note that GCC isn't officially available on Windows. There are forks(projects using other projects as a base to develope on) like MinGW64 supporting Windows.
Git™ is a version control system whit which you can download the entire project with one command. To check if it is allready installed(which it mostly is) run:
git --version
If it isn't installed, then install it with your package manager or download it from the offical website.
- Clone the project by typing:
git clone https://github.com/SMASTER4/smaster4s-inis
- Change your directory to the project(optional):
cd smaster4s-inis
- Create a new directory to build your project in(optional):
mkdir out # The name doesn't matter at all
- Now just go into the directory(optional):
cd out
- If you use a different compiler you might need to set the CC enviorement variable so anything works(this might differ from OS to OS):
export CC=/usr/bin/clang # Example for Linux and clang
- Now just compile your Makefile with cmake:
cmake .. # The directory where the so called CMakeLists.txt is inside
- Now you can just build this WILL differ from compiler to compiler. This is an example for GCC:
make
- You now might want to install the library on your device for that run(optional):
sudo make install # Be carefull with this. You will need to undo this manually