User forums > Using Code::Blocks

Pre-Run option?

(1/1)

doim:
I found "pre-build steps" in "Project build options" but there is no "pre-run steps" option.

Code::Blocks has no "pre-run steps" option? or I just not found that option?

Pecan:
Pre/Post build steps are there for you to place console (or other) commands to be run before your source is compiled.
Pre/Post areas are text editors for your personal use.

For example, place this command in the pre-build steps:
"cmd /c echo %path%"  (for a Windows compile)
would print out the path used before compiling.

Post build steps executes your personal commands after the compile is finished.
 
Below is an example .png showing how files can be bundled and/or moved after a compile.

doim:
Thank you for your answer ^^.
I think my first post has not enough infomation about my question.

codeblocks build and run message is below.

--- Quote ----------------- Build: Debug in DoimEngine (compiler: GNU GCC Compiler)---------------
[pre-build steps]
(Compiling) -> g++ ...
[post-build steps]

-------------- Run: Debug in DoimEngine (compiler: GNU GCC Compiler)---------------
(Executing) -> ... bin/Debug/ProjectName ...
--- End quote ---
on codeblocks run -> version 3.0

on console,
./ProjectName -> version 3.0(not wanted, same as codeblocks)

MESA_GL_VERSION_OVERRIDE=3.3 ./ProjectName -> version 3.3(wanted)

export MESA_GL_VERSION_OVERRIDE=3.3    // next line
./ProjectName -> version 3.3(wanted)


when I inserted "MESA_GL_VERSION_OVERRIDE=3.3" or " export MESA_GL_VERSION_OVERRIDE=3.3" in "pre build steps" or "post build steps",
version was 3.0.

I want "codeblocks run" make version 3.3 result.

Commaster:
Looks like you want to create a new "envvar set" under "Settings -> Environment settings -> Environment variables".

After that go to "Project -> Options -> EnvVars options" and pick that envvar set.

(Untested but sounds logical)

Navigation

[0] Message Index

Go to full version