3-Round-Stones / callimachus

Callimachus is a highly scalable platform for creating and running data-driven websites
Other
95 stars 24 forks source link

Windows installation fails (dev branch) #232

Closed edwardsph closed 8 years ago

edwardsph commented 8 years ago

There are 2 problems with callimachus.bat lines 136-137:

if not "%SERVER_VERSION%" == " goto gotServerVersion
for /f "delims=" %%a in ('"%JAVA_HOME%\bin\java.exe" -cp "%BASEDIR%\lib\*" %VERSIONCLASS%') do @set SERVER_VERSION=%%a

The simple error is a quote missing on the first line if not "%SERVER_VERSION%" == ""

The second issue is that the command to process within the "in" clause isn't handled properly. Windows appears to ignore the initial quote so it sees the command as having " -cp " in the middle of it. The easy fix was to remove the first quotes:

for /f "delims=" %%a in ('%JAVA_HOME%\bin\java.exe -cp "%BASEDIR%\lib\*" %VERSIONCLASS%') do @set SERVER_VERSION=%%a

But this will only work if JAVA_HOME doesn't include spaces.

I also think the @ before set is redundant.

I didn't want to make a change to this since I don't have a good solution at the moment.