User forums > General (but related to Code::Blocks)
Feature Request: launch console window button for console projects
Seronis:
It would be useful if you could have a uniform command that would launch a console window with a primary working directory set to where the current targets executable gets saved. Mostly when im working on quick test projects that require/allow command line arguments i dont want to have to edit the project to alter the default arguments for testing. If a button would just pop open a window where i need to be (some paths are annoying to navigate to) and that path would be accurate regardless of build target (thus diff build directory) it would be most useful.
MortenMacFly:
--- Quote from: Seronis on March 05, 2008, 05:25:04 pm ---It would be useful if you could have a uniform command that would launch a console window with a primary working directory set to where the current targets executable gets saved.
--- End quote ---
You can simply setup a tool that does so. Open a cmd.exe (the "tool") ansd specify the patch where this shall be opened.
See: Menu "Tools" -> "Configure tools..."
I have setup cmd.exe there (for example) with "${PROJECT_DIR}" as working directory.
BCCISProf:
For Windows XP there is also a (free) Microsoft PowerToy Called "Open Command Window Here" which allows you to right click on any directory in Explorer and open a console window in that directory.
Seronis:
--- Quote from: MortenMacFly on March 05, 2008, 06:03:33 pm ---I have setup cmd.exe there (for example) with "${PROJECT_DIR}" as working directory.
--- End quote ---
But doesnt that just go to the project directory? Is there some macro that goes to the binary directory? I have projects that place the binary in one of several different tools directories, sometimes on removable media, that are not always gaurenteed to even be on the same drive as the project. I would still like the cmd window to open to the appropriate place based on where the binary is created.
I'll do a test when I have access to my C::B installation to double check but im thinking setting up the tool like that would work if a ${BINARY_DIR} gets added to the environment that always resolves to the correct location.
Seronis:
--- Quote from: BCCISProf on March 05, 2008, 11:04:32 pm ---For Windows XP there is also a (free) Microsoft PowerToy Called "Open Command Window Here" which allows you to right click on any directory in Explorer and open a console window in that directory.
--- End quote ---
That still requires me to leave the build environment and already have the target directory open. Instead of being a quick-clickable button accessible from within the IDE, that automatically can determine the binary location based on project settings. Really looking for a one-step solution =-)
As a side note, the functionality you mention is built into Vista by default with no special tools required. I think this is the first nice thing i have EVER noticed about vista. Actually make that 2nd, with the mingw installation of C::B being vista friendly it has 2 nice things about it.
Navigation
[0] Message Index
[#] Next page
Go to full version