A "run-only" option for the C7 IDE

After the latest beta (5225) release several developers asked for a Run button which would simply run the current project instead of building the application first. There is a Start without Debugger option (Ctrl-F5) but in fact this invokes an MSBuild task. Even if the EXE is already built MSBuild will verify that a recompile isn’t needed, and that can take some time on a big multi-DLL solution.

I decided to play around with the Tools menu to see if there was a way to produce a “run only” behavior, and I did find a solution. But SV has now said that a run only button will be in the next build, but in the event that you can’t wait for the next build of C7, here’s what you need to do to add your own “Run only” menu option.

It was Ben Dell who got me started on the Tools menu. He pointed out that it was possible to run customized MSBuild tasks that way. And if you can run an MSBuild task on a project, why not a task to run an EXE?

First, create a new Win32 EXE solution (not an APP - this will be a hand coded program) called, say, Launcher. Launcher.clw contains just this code:

                    PROGRAM

                    MAP
                    END

    CODE
    run(COMMAND())

Compile the code.

Next, in Tools | Options | Tools create a new external tool called something like “Run the current application”.

Set the command to your Launcher.exe

Set the arguments to "${TargetPath}" (the quotes take care of long file names, although they may not be necessary) and the working directory to ${ProjectDir}.

Now when you want to launch a program you just highlight it in the solution explorer and choose the “Run the current application” option from the Tools menu.

Posted: March 30 2009

Clarion Roadmap

Try the roadmap (beta)

Search ClarionMag

 

Advanced search

From the archives

External Business Rules with the In-Memory Driver

6/21/2006 12:00:00 AM

Towards the end of 2004 Nardus Swanevelder wrote a series of articles on Clarion's Business rules, and how they could be configured at runtime. In this update, Nardus shows how to use configurable business rules with the In-Memory Driver. SOURCE LINK UPDATED!