FileManager (fm) is a simple command-line tool written in C++ with GTK3 for listing files in a directory. This is a hobby project aimed at learning new things. Currently, fm can list files within a specified directory. If no directory is specified, it defaults to the current directory. Note that passing files as parameters is not supported and will result in an error.
- List files in a specified directory
- Default to current directory if no parameter is provided
To compile the project, some preparations are required on Windows:
- Install MSYS2 x64.
- Start the MSYS2 UCRT64 console.
- Run the following command:
pacman -S mingw-w64-ucrt-x86_64-meson \
mingw-w64-ucrt-x86_64-python \
mingw-w64-ucrt-x86_64-gtk3 \
mingw-w64-ucrt-x86_64-glade \
mingw-w64-ucrt-x86_64-toolchain \
base-devel- Open the MSYS2 UCRT64 terminal.
- Change into the
fmfolder. - Run the following commands:
meson setup build
meson compile -vC build- Open the MSYS2 UCRT64 terminal.
- Change into the
fmfolder. - Run the following commands:
meson setup build --buildtype=release
meson compile -C buildThe exe file needs some dlls that can be found in C:\msys64\ucrt64\bin:
libatk-1.0-0.dlllibbrotlicommon.dlllibbrotlidec.dlllibcairo-2.dlllibcairo-gobject-2.dlllibdatrie-1.dlllibdeflate.dlllibepoxy-0.dlllibfontconfig-1.dlllibfreetype-6.dlllibfribidi-0.dlllibgdk_pixbuf-2.0-0.dlllibgdk-3-0.dlllibgio-2.0-0.dlllibglib-2.0-0.dlllibgmodule-2.0-0.dlllibgobject-2.0-0.dlllibgraphite2.dlllibgtk-3-0.dlllibharfbuzz-0.dlllibjbig-0.dlllibjpeg-8.dlllibLerc.dlllibpango-1.0-0.dlllibpangocairo-1.0-0.dlllibpangoft2-1.0-0.dlllibpangowin32-1.0-0.dlllibpcre2-8-0.dlllibpixman-1-0.dlllibpng16-16.dlllibsharpyuv-0.dlllibstdc++-6.dlllibthai-0.dlllibtiff-6.dlllibwebp-7.dll
Copy them along with the exe file.
Resources used for installation and development:
- https://www.gtk.org/docs/installations/windows/
- https://docs.gtk.org/gtk3/getting_started.html#building-user-interfaces
- https://docs.gtk.org/gtk3/treeview-tutorial.html
- https://mesonbuild.com/Tutorial.html
- https://mesonbuild.com/Builtin-options.html
- https://github.com/GNOME/gimp/blob/master/meson.build
- https://github.com/msys2/setup-msys2