Archive: Simple debug output, where to put?


Simple debug output, where to put?
Hi,
I simply want to put out a hello-world debug message, but where do I put this:
DetailPrint "Hello World"

I tried using macro and function, but it ever says error, any idea?

Thanks!


What error do you get?


Hi,
I not only want to give a message, well here is my source:

!macro get3dsMaxDirectory
ReadRegStr $TempPath HKCR 3dsmax\DefaultIcon\ ""
!echo $TempPath
!macroend

But I don't know, where to put this into code. I want it to be executed before any window is shown, or before the path is selected.
Thanks!


!echo is a compile time command. It's executed when the installer is built. It echoes a message to the makensis output and not on the installer itself. MessageBox or DetailPrint can be used to display messages in the installer itself.

If you want something to be executed when the installer is started, put it in a special function called .onInit.


Thanks a lot!


This thread is suitable for my question... I think...
The DetailPrint function can be used when InstFiles page is shown. But when I want to debug something before or after this page I think that the only possibility is to use MessageBox. If I make a debug-macro (let's name it DumpText), is there a way to decide inside of it if the InstFilles page is active or not and to select automatically which function to call - DetailPrint or MessageBox? It's clear that I can use always MessageBox, but DetailPrint has some advantages - no need to push a button and possibility to write the text into a log-file (with the plug-in DumpLog.dll), so I prefer to use it when I can and I don't want always to think which function I have to call, but simply to call my macro whenever I want and automatically to get the best possible result. is there a way to do this?


!ifdef __SECTION__

Stu


Thanks. It is so simple. When I use it in the same file with the installer's script it works fine, but if I call a macro in external nsh-file, it doesn't work. Any idea?


I solved my problem. My macro calls a function inside. This makes the define __SECTION__ useless. I made like a normal macro and it works fine. Thanks a lot!