Archive: Help, Nsis_max_strlen Too Small!!


Help, Nsis_max_strlen Too Small!!
Can someone please tell me how I can increase the size of NSIS_MAX_STRLEN. the string I am loading into it is approx. twice the size of NSIS_MAX_STRLEN and I need it to be larger.


You will need to change that in the source code and recompile NSIS. I think its the makensis that need recompiling.

Vytautas


I have made the changes to this line in config.h:

FROM: #define NSIS_MAX_STRLEN 1024
TO: #define NSIS_MAX_STRLEN 4096

and recompiled in VC++ 6 with no change.


Whouldn't be easier to change it during runtime or make one?
For example:


#define NSIS_MAX_PATH 4093
;...
MessageBox MB_OK "This is my string lenght ${NSIS_MAX_PATH}"
;..

:)

I thought that that was a predefined constant that could not be changed from the script.

Sorry but I think I got the wrong file you needed to recompile it should be MakeNSISw for more info you could read this topic

Vytautas


You can always undefine NSIS_MAX_STRLEN and define it again in the script, but it will not change the size of the strings. You must recompile makensis in order to make the strings bigger.

MakeNSISw is just a Windows wrapper. You don't have to recompile it.


Sorry for not understanding but given the posts that are here so far there still is not a straight answer as to how to do this. As posted previously, I have already made changes to the source file and rebuilt the "makenssi" workspace ( all projects ) with Visual C++ 6.0 with no changes to the string size.


You must have do something wrong. Did you rebuild the exehead too?


Here is the screenshot of the process I use to compile. I also show the change made to the NSIS_MAX_STRLEN define. I choose to rebuild all projects within the workspace.


That is the correct process.

How did you check that the size hasn't changed?


Soryy for all the WHoooo Haaaa!!!!!!! he he, I was doing "copy details to clipboard" option in the installer and noticed that there was no change but tried a sec. ago to just display to messagebox and everything seems to be there. I am not sure why there is a diffrence in the amount of data displayed but it seems to be working for me.