Search code examples
cgtkmsys

Is there such a thing as a MSYS script file?


I'm running MSYS under Windows and although it works I want to know if there is such a thing as a MSYS script file.

For example to compile a GTK program in C I need to type: gcc source.c -o executable.exe 'pkg-config --cflags --libs gtk+-3.0' to compile. Is there a way to store this in a file and run the file from MSYS without having to type in the command each time (IE like .bat, .sh files)?


Solution

  • If you want to automate building an application, just use a build system. The Meson build system is what the GTK+ developers recommend now (and GStreamer, and many other projects). It's multiplatform, and available as a package in MSYS2 (I used it there, works like a charm). They have a simple Meson tutorial where they build a GTK application. That's 3 lines of code.