Skip to content
⌘ NSIS Forum Archive

Variable Max Length?

4 posts

bljohnson#

Variable Max Length?

I'm writing an EXE that makes a call out to java.exe (based on the samples in the NSIS archive) to run some java code using NSIS.

Is there a limit to the size of variables? I have a quite LARGE classpath (since all jars have to be included) and no matter what maxlen I specify with StrCpy it always truncates the string at a certain position (didnt bother to count every character so not sure exactly where it truncates.. but it does).

Any suggestions? The truncating is my last little hurdle.

Thanks!
bljohnson#
By the way.. heres the StrCpy command I'm using:

StrCpy $COMMAND '"$R0" -classpath "$CLASSPATH" -Xmx256M -Dproject.home="$R3" ${CLASS}'

I then run an Exec on that variable. The CLASSPATH is quite large.. about 1032 characters.
pengyou#
The default NSIS compiler has a maximum string length of 1024 bytes. There is a special build available which has a much higher limit - see http://nsis.sourceforge.net/download/specialbuilds/