Applied slightly modified patch in [r13278], thanks.
Changes:
- New method now begins with uppercase, following code style
- Change Exe to Executable, EXE is meaningful only on MSW
- Test target type first, avoid second (and slower) test if not relevant.
- Use wxFileName::FileExists() instead of wxFileExists()
Thanks.
But then there's some code that will never be executed: the code corresponding to the 'Run' action!
Shall I provide you with a new patch ?
Or delete it directly ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the 'int CompilerGcc::Run(ProjectBuildTarget * target)' method from line 2133 -> line 2155 : this code is no longer needed, as the executable will exist.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That code may look superfluous, but better safe than sorry:
- Some antivirus may delete the executable as soon as it is created, leaving the button enabled
- Some execution path may call Run() directly (a script?).
I can add some comment, though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I have one issue about this ticket. I see the code is already applied in the trunk. When I used the svn trunk HEAD C::B, I see that the "virtual" target is not allowed to "run". I mean for virtual target, the run bottom is disabled. Is that by design? For me, I have a virtual target, the virtual target has one host exe target and many dll targets. When I rebuild the virtual target, I have to switch to the host exe to run the application. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[r13278] and [r13312] determine if the Run button must be enabled or disabled, they are not related to execution itself.
At compilergcc.cpp:2109 we have
// commands-only target?if(target->GetHostApplication().IsEmpty()){cbMessageBox(_("You must select a host application to \"run\" a commands-only target..."));m_pProject->SetCurrentlyCompilingTarget(0);return-1;}
I have never used this "command only" targets, so I do not know if setting an executable should be enabled or the if() must be relaxed/removed.
Applied slightly modified patch in [r13278], thanks.
Changes:
- New method now begins with uppercase, following code style
- Change Exe to Executable, EXE is meaningful only on MSW
- Test target type first, avoid second (and slower) test if not relevant.
- Use wxFileName::FileExists() instead of wxFileExists()
Related
Commit: [r13278]
Thanks.
But then there's some code that will never be executed: the code corresponding to the 'Run' action!
Shall I provide you with a new patch ?
Or delete it directly ?
Sorry, I do not understand. Which code will not be executed?
In the
'int CompilerGcc::Run(ProjectBuildTarget * target)'
method from line 2133 -> line 2155 : this code is no longer needed, as the executable will exist.That code may look superfluous, but better safe than sorry:
- Some antivirus may delete the executable as soon as it is created, leaving the button enabled
- Some execution path may call Run() directly (a script?).
I can add some comment, though.
Yes, that's not a problem.
Hi, I have one issue about this ticket. I see the code is already applied in the trunk. When I used the svn trunk HEAD C::B, I see that the "virtual" target is not allowed to "run". I mean for virtual target, the run bottom is disabled. Is that by design? For me, I have a virtual target, the virtual target has one host exe target and many dll targets. When I rebuild the virtual target, I have to switch to the host exe to run the application. Thanks.
This is a collateral damage. Feel free to modify or revert the commit, I have no time to do it right now and the release is around the corner.
Basically ExecutableExists() should return true if the target is virtual, but I do not know ATM how a virtual target can be identified.
@ollydbg, can you check if replacing ExecutableExists() with this code works for you?
Fixed in [r13312].
Related
Commit: [r13312]
Hi, Miguel, thanks for the help.
I was quite busy on my work in those days. I will build the svn head as soon as possible to test.
Thanks.
I just tested it, and it works fine(The run button behaves the old way for the virtual target)
Hi, for some reasons, I can't run the command line only target, see this forum post here: I can't run a command only build target
I think this ticket is related. Thanks.
[r13278] and [r13312] determine if the Run button must be enabled or disabled, they are not related to execution itself.
At compilergcc.cpp:2109 we have
I have never used this "command only" targets, so I do not know if setting an executable should be enabled or the if() must be relaxed/removed.
Related
Commit: [r13278]
Commit: [r13312]
I think I have made a mistake, sorry. I explain it here: Re: I can't run a command only build target