-
Notifications
You must be signed in to change notification settings - Fork 7
##General questions
Q: Why do your scripts need elevated privileges? Are you f**king scamming me?
A: The scripts do nothing evil. Elevated privileges are needed in:
- GTK+ needs Adwaita icon theme (since 3.15 IIRC), and Adwaita icon theme needs the font Droid Sans. So, I'm going to install that font on your system, which needs writing access to
%SYSTEMROOT%\Fontsand the registry. If you don't like the files I provide, you can download them by yourself. -
gtk-update-icon-cache.exeitself has to be run as administrator (go try it). When building GTK+, the makefile will run it for some reason (I didn't dig deep into that).
Q: What compiler are you using?
A: Personally, MinGW-w64 GCC 6.2.0, posix, sjlj, 32-bit. I should also remind you that according to the download statistic, MinGW-w64 GCC 6.2.0, posix, dwarf, 32-bit is more popular.
Q: Can I use another compiler?
A: Yes. You can choose from 8 versions of MinGW-w64 when prompted in setup.bat. Caution: 64-bit compilers are not tested and have a great possibility of failing.
The latest version of original MinGW might work too.
MSVC is officially supported by GTK+ but you have to build its dependencies with MSVC too (otherwise they don't link). I don't know too much about this and it's out of scope of this project.
Q: Does your project build a 32-bit version of GTK+, or a 64-bit version?
A: It depends on the compiler you choose. Mind that most libraries are not officially supported to be built under 64-bit Windows.
Q: Do you have a precompiled bundle for me to download?
A: Yes. See the discussion here and here.
Q: How do I remove the building environment?
A: Remove C:\msys and C:\MinGW.
##About building and installing GTK+/gtkmm libraries
Q: How can I build GTK+/gtkmm libraries with your project?
A: Please read the Instructions.
Q: How can I tell if the building is successful?
A: The building scripts will stop when an error occurred. You can also check the log files in lib/logs after building the libraries, and see if any error occurred.
Q: If the building process was interrupted, should I do it all over again or I can somehow continue?
A: It is always recommended that you remove the whole folder C:\msys\opt and build everything again. But if you've made sure what was going on and it's OK to just continue by checking the logs, you can continue from where it failed.
Q: Can I run the building scripts (zlib.sh, xz.sh ...) one by one, not using the script BUILD_ALL.sh? I hate the way you capitalize the name of the script.
A: Make sure you run this command in your msys prompt first, and run those building scripts in the right order.
. ./LIB_INFO.sh
And you still have to run a script whose name is capitalized. Bite me.
Q: Can I build an older version of library X?
A: Yes. Open libs/LIB_INFO.sh. You'll see a list of all the packages with version number. Change that number, and run libs/DOWNLOAD_ALL.sh before you build it.
Q: Where's the building result?
A: C:\msys\opt.
Q: How can I install these libraries?
A: They don't need to be installed. Just put them anywhere you like in your hard drive.
Q: How can I remove these libraries?
A: Delete the folder C:\msys\opt.
##About using the libraries
Q: How can I link the libraries into my GTK+/gtkmm program?
A: Please read the insctructions.
Q: I don't like makefiles. Can I build my application without using one?
A: Yes. In Linux bash shell, you can just call
gcc example.c `pkg-config gtk+-3.0 --cflags --libs`
to build your program. This is going to execute whatever between the two backticks (`), and replace it literally with the return value (string). So the line above is equivalent to this (the location of the libraries depends on where you put them):
gcc example.c -mms-bitfields -pthread -mms-bitfields -IC:/msys/opt/include/gtk-3.0 -I/opt/include-IC:/msys/opt/include/cairo -IC:/msys/opt/include -IC:/msys/opt/include/pango-1.0 -IC:/msys/opt/include/atk-1.0 -IC:/msys/opt/include/cairo -IC:/msys/opt/include/pixman-1 -IC:/msys/opt/include -IC:/msys/opt/include -IC:/msys/opt/include/freetype2 -IC:/msys/opt/include -IC:/msys/opt/include/libpng16 -IC:/msys/opt/include -IC:/msys/opt/include/freetype2 -IC:/msys/opt/include -IC:/msys/opt/include/libpng16 -IC:/msys/opt/include/gdk-pixbuf-2.0 -IC:/msys/opt/include/libpng16 -IC:/msys/opt/include/glib-2.0 -IC:/msys/opt/lib/glib-2.0/include -LC:/msys/opt/lib -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -lz -lpangocairo-1.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
But Windows command prompt doesn't have the ability to use the output of an application as an argument in command line. If you're feeling comfortable copying & pasting this all the time, you can just go with this bare command line solution.
Q: I can't use my libraries. It says, process_begin: CreateProcess(NULL, pkg-config --cflags gtk+-3.0, ...) failed.
A: Did you set up %PATH%, the environment variable correctly? C:\msys\opt\bin has to be a part of the value of this variable.
Q: How to correctly set up %PATH%?
A: Open up a command prompt window, input
set PATH=C:\msys\opt\bin;C:\MinGW\bin;%PATH%
and press Enter. Then you can build your GTK+ application within the lifespan of this command prompt.
Make a batch file if you find typing this all the time a chore.
If you have moved C:\msys\opt and/or C:\MinGW\bin somewhere else, modify that line correspondingly.
Q: My application is dynamically linked to the libraries. Can I link them statically?
A: Sure, you can link it statically, only if you have the static libraries.
Q: So, can I build a static version?
A: Unfortunately, GLib doesn't officially support being built statically in Windows. And that's probably not the only reason which blocks the way, but you're always appreciated to contribute.