Hi all,
I'd like to have madExcept disabled while im working in the Delphi IDE but have it enabled in a special build for our testers. How can I achieve that?
I know that I have to call madExceptPatch when compiling MSBuild and that part works. But AFACIT en-/-disabling madEcept via the Delphi Project menu works either for IDE and command line build or for none of them.
Can I control that via a $DEFINE, a dproj configuration or similar?
Best regards,
Uli
Add madExcept only via commandline build?
-
- Posts: 14
- Joined: Wed Oct 24, 2012 9:39 am
Re: Add madExcept only via commandline build?
Using madExceptPatch is one thing of 3 you have to do. Here are the other 2:
(1) Make sure you compile with the correct compiler and linker options. Turn the compiler debug infos on. The linker debug options can stay turned off, except for the map file (Delphi) or TD32 debug info (BCB).
(2) The madExcept code needs to be linked into the exe, otherwise it can't work. You can do this by activating madExcept in the project settings, then move the madExcept uses clause units (or pragma links) into a conditional define. Afterwards add a comment "// dontTouchUses - this tells madExcept to don't modify your source code" above the uses clause or above the pragmas. The in the command line build, make sure the conditional define you used is activated.
(1) Make sure you compile with the correct compiler and linker options. Turn the compiler debug infos on. The linker debug options can stay turned off, except for the map file (Delphi) or TD32 debug info (BCB).
(2) The madExcept code needs to be linked into the exe, otherwise it can't work. You can do this by activating madExcept in the project settings, then move the madExcept uses clause units (or pragma links) into a conditional define. Afterwards add a comment "// dontTouchUses - this tells madExcept to don't modify your source code" above the uses clause or above the pragmas. The in the command line build, make sure the conditional define you used is activated.
-
- Posts: 14
- Joined: Wed Oct 24, 2012 9:39 am
Re: Add madExcept only via commandline build?
Sorry for digging up this old thread again.
I tried your suggestions but didn't get it to work. Please see the attached project. I would like to configure it so that
Best regards,
Uli
I tried your suggestions but didn't get it to work. Please see the attached project. I would like to configure it so that
- madExcept is disabled for MadExceptMSBuildTest.dproj in the IDE
- madExcept is enabled in the MadExceptMSBuildTest.exe produced by test.bat
- madExcept is disabled for MadExceptMSBuildTest.exe's produced by MSBuild with config Release
Best regards,
Uli
- Attachments
-
- MadExceptMSBuildTest.7z
- (5.05 KiB) Downloaded 277 times
Re: Add madExcept only via commandline build?
Sorry for the late reply.
You can solve the problem by telling madExceptPatch.exe to use a different MES file, one which isn't used by the IDE and which has "HandleExceptions=1" set.
You can solve the problem by telling madExceptPatch.exe to use a different MES file, one which isn't used by the IDE and which has "HandleExceptions=1" set.
-
- Posts: 14
- Joined: Wed Oct 24, 2012 9:39 am
Re: Add madExcept only via commandline build?
Thanks madshi,
that worked. Such a simple solution.
that worked. Such a simple solution.