On Fri, 7 Dec 2007 18:09:55 -0300, "Diego Jacobi" jacobidiego@gmail.com wrote:
"Project name and executable filename are two
different things." I was talking about a default appname. If the programmer choose to set one diferent, then he should be able to do it, but if i compile a main.c i get a main.exe, and not a projectname.exe. Then, setting a file to run can be done almost automatically checking if projectname.exe exists, if not, shows an open dialog.
If you compile or build a file, you compile or build a file. There is no support to build a project or something line this.Maybe one want
to write a plugin or patch for this. Otherwise, using Makefiles would
lead to the same result with much less work.
Seems like you dont understand me.
Ok, after re-reading I think I got it: you want be able to change the -o option which is appended by Geany to the compiler?
About the GEANY_USE_WIN32_DIALOG. its nice to have the option. Seems
like the project is very well driven. There says: "The default Windows file dialogs are missing some nice features like choosing a filetype or an encoding." Choosing filetype?, i always have a combobox to choose, but i think that is called filter. Which in this case is almost the same.
No, it is no the same. The filter only filters files according to the chosen filetype. The filetype selection in the GTK dialog is meant to set the filetype with which Geany should open the selected file(s) instead of autodetecting the filetype.
I see what you say. Any way, i have never get on the need to have a so uncommon coded file that i should exactly tell what is the encodding.
Just be happy about that ;-). The best way is to always use UTF-8 or UTF-16 for file encodings and everything will work fine.
Cant the autodetection ask for the encodding if doesn't detect it?
No, Yura mentioned one reason and the other reason is that the auto detection doesn't know if it fails otherwise it wouldn't fail ;-). To be more clear: when I was speaking about failed auto detection, I meant Geany detects a file encoding and use it but it isn't the right one. If the file couldn't be converted into any known encoding, i.e. encoding conversion failed completely, Geany will print an error message and will refuse to open the file.
I don't know whether gcc should check these, should Geany? Then you need the same thing for linker includes. And it seems not be some standard way. Build support in Geany is not meant to be a complex support-everything system but just a basic way to easily compile and build small files. For bigger, more complex projects or source code files there is the possibility to execute the make command.
I tried to compile a single file gtked hello world to test geany as a build environment for gtk, and it fails. Why? becouse i have to put manually each include path on the gcc line, which are all already on the INCLUDES path on windows.
Sure. But I still think this is not a problem of Geany. GTK has a bunch of files which need to be included and the same for libraries to link against. pkg-config exists and it also works for Windows. gcc -o testapp testapp.c `pkg-config --cflags --libs gtk+-2.0` (ok, I'm not sure whether the backticks work on Windows)
Dont know how much dificult could be appending a %I to be replaced for as many include paths as are on the INCLUDE environ or a %L to libs. It will make things easier for simple projects, and leave makefiles only for multifiled projects. The process should be: Read the INCLUDES environ. Split with ";" (windows separator). Append -I to each path. Join the list of paths. Replace %I for the join list of paths. The same for libs.
This could be done but is INCLUDES a common used environment variable or is it just set by the GTK installer? How is the one for the libs called? And there might be another problem: splitting the list and building a command line for gcc with each entry might fail because there a limits for the length of a command line. Maybe this doesn't matter because the limits are high enough.
Patches are welcome. Anyway, IMO a better way could be to write a Makefile generator plugin or something like this.
Regards, Enrico