News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Running the executable with a custom tool (Windows)

Started by Andrej08, June 12, 2010, 10:30:53 PM

Previous topic - Next topic

Andrej08

Hi,

A quote from an older thread:
Quote from: MortenMacFly on December 30, 2008, 03:02:09 PM
Quote from: xuanzon on December 30, 2008, 05:16:59 AM
I want to use cygwin(can display UTF-8 encoding correctly) as my default console program output.
This is not supported directly. Windows does have exactly one console.

But: You can use the tools menu just fine. Add the Cygwin console as new "tool" and link it with the project's application (there is a macro provided for this purpose). This way you can run *any* project's executable using the Cygwin console just fine.

I'm trying to set up Console2 on Windows to run the built executable (on codeblocks v10.05). I've added the tool to the tools menu, but I'm not sure how to link the project to use it. What is this macro that MortenMacFly speaks of?

Btw., you guys have done a fantastic work on this new release!

Cheers.

stahta01

Example of some on Wiki
http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

Looking for a list; found a list in user manual
http://www.codeblocks.org/docs/main_codeblocks_en.html

Look under "Variable Expansion" and Listing 3.2 and Listing 3.4

I think 3.4  Command Macros is the one you want.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Andrej08

Quote from: stahta01 on June 13, 2010, 01:22:59 AM
Example of some on Wiki
http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

Looking for a list; found a list in user manual
http://www.codeblocks.org/docs/main_codeblocks_en.html

Look under "Variable Expansion" and Listing 3.2 and Listing 3.4

I think 3.4  Command Macros is the one you want.

Tim S.
Quote from: stahta01 on June 13, 2010, 01:22:59 AM
Example of some on Wiki
http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

Looking for a list; found a list in user manual
http://www.codeblocks.org/docs/main_codeblocks_en.html

Look under "Variable Expansion" and Listing 3.2 and Listing 3.4

I think 3.4  Command Macros is the one you want.

Tim S.

Woops! Somehow I ended up in the advanced compiler settings for a minute there. *facepalm*

I've got it set up now, I've set up the paramaters for the Console tool like so:

-d ${PROJECT_DIR} -r "/k $(PROJECT_DIR}$(TARGET_OUTPUT_FILE}"

It doesn't work when the project dir has empty spaces, but that's a Windows/Console issue. Anyway, thanks for your help!

stahta01

Quote from: Andrej08 on June 13, 2010, 07:46:34 PM

-d ${PROJECT_DIR} -r "/k $(PROJECT_DIR}$(TARGET_OUTPUT_FILE}"

It doesn't work when the project dir has empty spaces, but that's a Windows/Console issue. Anyway, thanks for your help!

The below might work with spaces; untested.

-d "${PROJECT_DIR}" -r /k "$(PROJECT_DIR}$(TARGET_OUTPUT_FILE}"

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Andrej08

Quote from: stahta01 on June 13, 2010, 08:31:21 PM
Quote from: Andrej08 on June 13, 2010, 07:46:34 PM

-d ${PROJECT_DIR} -r "/k $(PROJECT_DIR}$(TARGET_OUTPUT_FILE}"

It doesn't work when the project dir has empty spaces, but that's a Windows/Console issue. Anyway, thanks for your help!

The below might work with spaces; untested.

-d "${PROJECT_DIR}" -r /k "$(PROJECT_DIR}$(TARGET_OUTPUT_FILE}"

Tim S.
Yeah, I've already tried that. But I think there's a bug in the Console tool itself. If I get it working I'll post it here.