Author Topic: Pre-Run option?  (Read 2516 times)

Offline doim

  • Single posting newcomer
  • *
  • Posts: 2
Pre-Run option?
« on: August 07, 2019, 05:41:01 am »
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?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Pre-Run option?
« Reply #1 on: August 07, 2019, 06:06:32 am »
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.
« Last Edit: August 07, 2019, 06:14:23 am by Pecan »

Offline doim

  • Single posting newcomer
  • *
  • Posts: 2
Re: Pre-Run option?
« Reply #2 on: August 07, 2019, 06:49:06 am »
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 ...
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.

Offline Commaster

  • Almost regular
  • **
  • Posts: 171
Re: Pre-Run option?
« Reply #3 on: August 07, 2019, 07:35:39 am »
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)