Hello!
Another useful idea for me.
Currently in geany Compile, Build and Execute commands are associated with file types and have two nice, additional variables (%f and %e). It would be very useful to add one more variable that would stand as project base directory (i.e. %p).
This could bring problems in case when project is not open. To resolve that it could be interesting to add certain project properties: compile, build and run that would overwrite default ones. Currently there is a similar "override" run option, but it does not provide %f, %e and possibly %p variables.
I would be very happy if you could add compile and build project options, providing also project base directory variable (i.e. %p).
Thanks in advance for answers.
On 05/20/2007 03:40:05 AM, Michal Kurgan wrote:
Hello!
Another useful idea for me.
Currently in geany Compile, Build and Execute commands are associated with file types and have two nice, additional variables (%f and %e). It would be very useful to add one more variable that would stand as project base directory (i.e. %p).
Could you give an example usage of %p?
This could bring problems in case when project is not open. To resolve that it could be interesting to add certain project properties: compile, build and run that would overwrite default ones. Currently there is a similar "override" run option, but it does not provide %f, %e and possibly %p variables.
You're right, %f and %e could be useful for the project run command. I'll add this soon. I see that project compile and build commands could be useful, I'll think about this.
Regards, Nick
On Mon, 21 May 2007 17:01:51 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 05/20/2007 03:40:05 AM, Michal Kurgan wrote:
Hello!
Another useful idea for me.
Currently in geany Compile, Build and Execute commands are associated with file types and have two nice, additional variables (%f and %e). It would be very useful to add one more variable that would stand as project base directory (i.e. %p).
Could you give an example usage of %p?
In all my projects i use cmake, it uses out of the source builds. Here is example layout:
project/ .cmake/ src/ CMakeLists.txt
.cmake directory will hold all Makefiles, there is none in src directory. To populate .cmake directory you can use following command (in geany it can be run command):
cd %p/.cmake && cmake .. (currently this will work: cd .cmake && cmake ..)
It's not hard to imagine that to compile sources it would be very useful to have %p variable:
make -C %p/.cmake <target>
This could bring problems in case when project is not open. To resolve that it could be interesting to add certain project properties: compile, build and run that would overwrite default ones. Currently there is a similar "override" run option, but it does not provide %f, %e and possibly %p variables.
You're right, %f and %e could be useful for the project run command. I'll add this soon. I see that project compile and build commands could be useful, I'll think about this.
Thanks, it would be very nice.
Regards, Nick
On 05/21/2007 06:03:26 PM, Michal Kurgan wrote:
On Mon, 21 May 2007 17:01:51 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 05/20/2007 03:40:05 AM, Michal Kurgan wrote:
Hello!
Another useful idea for me.
Currently in geany Compile, Build and Execute commands are
associated
with file types and have two nice, additional variables (%f and
%e). It
would be very useful to add one more variable that would stand as
project
base directory (i.e. %p).
Could you give an example usage of %p?
In all my projects i use cmake, it uses out of the source builds. Here is example layout:
project/ .cmake/ src/ CMakeLists.txt
.cmake directory will hold all Makefiles, there is none in src directory. To populate .cmake directory you can use following command (in geany it can be run command):
cd %p/.cmake && cmake .. (currently this will work: cd .cmake && cmake ..)
It's not hard to imagine that to compile sources it would be very useful to have %p variable:
make -C %p/.cmake <target>
Thanks, I'll add %p also.
Regards, Nick
On Mon, 21 May 2007 18:18:56 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 05/21/2007 06:03:26 PM, Michal Kurgan wrote:
On Mon, 21 May 2007 17:01:51 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 05/20/2007 03:40:05 AM, Michal Kurgan wrote:
Hello!
Another useful idea for me.
Currently in geany Compile, Build and Execute commands are associated with file types and have two nice, additional variables (%f and %e). It would be very useful to add one more variable that would stand as project base directory (i.e. %p).
Could you give an example usage of %p?
[ ... ]
make -C %p/.cmake <target>
Thanks, I'll add %p also.
Great information for me. I would be very happy if you could send some information about progress on this feature here. Everyday CHANGELOG reading is not that exiting. ;-)
Regards, Nick
On 05/24/2007 01:01:18 AM, Michal Kurgan wrote:
On Mon, 21 May 2007 18:18:56 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 05/21/2007 06:03:26 PM, Michal Kurgan wrote:
On Mon, 21 May 2007 17:01:51 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 05/20/2007 03:40:05 AM, Michal Kurgan wrote:
Hello!
Another useful idea for me.
Currently in geany Compile, Build and Execute commands are
associated
with file types and have two nice, additional variables (%f
and %e).
It would be very useful to add one more variable that would
stand as
project base directory (i.e. %p).
Could you give an example usage of %p?
[ ... ]
make -C %p/.cmake <target>
Thanks, I'll add %p also.
Great information for me. I would be very happy if you could send some information about progress on this feature here. Everyday CHANGELOG reading is not that exiting. ;-)
Well, I'm not sure yet what is necessary. I was too quick to reply in my last email.
I am unsure about your example for the run command. If you're running make, you should use the normal Make command, with the project base path set to "/path/to/project/.cmake". The only reason why you might not want that is because then the project run command will be run with that path as the current working directory, but probably this doesn't matter too much. (You can use full paths or ../ in the run command as a workaround). The run command is intended for running the script or executable you just built.
Anyway, even if you do want to use the run command for now, I don't think there is any need for %p. The base path is used for the current working directory, so you can just use: make -C .cmake <target>
Sorry I didn't reply with this earlier.
I will add run command %e and %f support, but really it needs some code refactoring, so maybe it will get done in the next week. So just use full paths for now.
Regards, Nick
On Thu, 24 May 2007 12:57:06 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
Well, I'm not sure yet what is necessary. I was too quick to reply in my last email.
I am unsure about your example for the run command. If you're running make, you should use the normal Make command, with the project base path set to "/path/to/project/.cmake".
Better do not change base paths in geany (this is done now, but it would be better to not change current behaviour and complicate things more). For make it's best to use "-C" switch with path supplied. Example run command was about _cmake_ command not _make_. ;-)
The only reason why you might not want that is because then the project run command will be run with that path as the current working directory, but probably this doesn't matter too much. (You can use full paths or ../ in the run command as a workaround). The run command is intended for running the script or executable you just built.
Yes, in example it initializes build system (cd .cmake && cmake ..).
Anyway, even if you do want to use the run command for now, I don't think there is any need for %p. The base path is used for the current working directory, so you can just use: make -C .cmake <target>
True, project run command works now. I have only problem with make build and compile commands. Problem with run command is that output is not parsed for errors in compilation as process is spawned in external terminal.
Sorry I didn't reply with this earlier.
I will add run command %e and %f support, but really it needs some code refactoring, so maybe it will get done in the next week. So just use full paths for now.
No problem. For now i run geany with special environmental variables and use them in run and compile dialogs like "make -C $VAR/.cmake".
Regards, Nick
Maybe whole thing is a bit unclear now so i will summarize this request. * add support for %p variable in project run dialog * add project Run and Compile commands that would override these global commands and support %p variable.
I also looked at build.c sources and see there many "magic", like adding additional flags or working directory changes. This probably complicate implementation so no need to hurry. Geany "even" in current state is great. :-)
On 05/24/2007 05:57:51 PM, Michal Kurgan wrote:
On Thu, 24 May 2007 12:57:06 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
Well, I'm not sure yet what is necessary. I was too quick to reply in my last email.
I am unsure about your example for the run command. If you're
running
make, you should use the normal Make command, with the project base
path set to "/path/to/project/.cmake".
Better do not change base paths in geany (this is done now, but it would be better to not change current behaviour and complicate things more).
Perhaps I will add a separate path for makefiles from the base path. Also I'll look at getting Make Object to work for non-recursive makefiles.
For make it's best to use "-C" switch with path supplied. Example run command was about _cmake_ command not _make_. ;-)
OK, I was referring to: make -C %p/.cmake <target>
In your examples, I'm not sure what's wrong with using relative paths, e.g. just leave off the '%p/'.
The only reason why you might not want that is because then the
project run
command will be run with that path as the current working directory,
but
probably this doesn't matter too much. (You can use full paths or
../ in
the run command as a workaround). The run command is intended for
running
the script or executable you just built.
Yes, in example it initializes build system (cd .cmake && cmake ..).
Anyway, even if you do want to use the run command for now, I don't
think there is any need for %p. The base path is used for the
current
working directory, so you can just use: make -C .cmake <target>
True, project run command works now. I have only problem with make build and compile commands. Problem with run command is that output is not parsed for errors in compilation as process is spawned in external terminal.
OK, so the solution is to make the project make command work with cmake. I'm not familiar with cmake. Do you normally use make or cmake to build sources?
Sorry I didn't reply with this earlier.
I will add run command %e and %f support, but really it needs some
code
refactoring, so maybe it will get done in the next week. So just use
full paths for now.
Just added this to SVN.
No problem. For now i run geany with special environmental variables and use them in run and compile dialogs like "make -C $VAR/.cmake".
[...]
Maybe whole thing is a bit unclear now so i will summarize this request.
- add support for %p variable in project run dialog
But the run command always has %p as it's working directory. Surely all tools (and make -C) support relative paths?
- add project Run and Compile commands that would override these
global commands and support %p variable.
You mean project Compile and Build commands? Perhaps, but first I want to get the project Make commands working for non-recursive makefile layouts.
Regards, Nick
On Fri, 25 May 2007 13:32:23 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
For make it's best to use "-C" switch with path supplied. Example run command was about _cmake_ command not _make_. ;-)
OK, I was referring to: make -C %p/.cmake <target>
In your examples, I'm not sure what's wrong with using relative paths, e.g. just leave off the '%p/'.
Nothing. I can use relative paths. Problem is when i have additional directories in src/. In that case ../.cmake would not work for them.
project/ .cmake/ src/ base/ *.c files lib/ *.c files *.c files
OK, so the solution is to make the project make command work with cmake. I'm not familiar with cmake. Do you normally use make or cmake to build sources?
Yes.
Sorry I didn't reply with this earlier.
I will add run command %e and %f support, but really it needs some code refactoring, so maybe it will get done in the next week. So just use full paths for now.
Just added this to SVN.
Thanks.
Maybe whole thing is a bit unclear now so i will summarize this request.
- add support for %p variable in project run dialog
But the run command always has %p as it's working directory. Surely all tools (and make -C) support relative paths?
Yes. My problem is that i usually use more subdirectories for sources. In that case relative paths have problems.
As for now project run command works good for me. I have only problems with other ones and cmake out of the source build system.
- add project Run and Compile commands that would override these global commands and support %p variable.
You mean project Compile and Build commands? Perhaps, but first I want to get the project Make commands working for non-recursive makefile layouts.
Good thing for me too as cmake uses that. :-)
Regards, Nick