::@ECHO OFF
:: %1 - Amount of memory in MB
:: %2 - Selected language code ("en")
:: %3 - Path to the image list .txt-file.
:: %4 & %5 - for the future.

if [%1] == [] (
   set Xmx=2048
) else (
   set Xmx=%1
)
:: check processor architecture and select appropriate jre

set Arch=x64
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
   if not defined PROCESSOR_ARCHITEW6432 set Arch=x86
)


if "%Arch%" == "x64" (
.\jre_x64\bin\java.exe -Xmx%Xmx%m -Dsun.java2d.d3d=true -Djava.library.path=.\lib64\;.; -classpath RomexisViewer.jar;j3dcore.jar;j3dutils.jar;vecmath.jar;jai_codec.jar;jai_core.jar;jai_imageio.jar; romexis_client_viewer.ui.RxViewer -new3d %2 %3 %4 %5
) else (
.\jre_x86\bin\java.exe -Xmx%Xmx%m -Dsun.java2d.d3d=true -Djava.library.path=.\lib32\;.; -classpath RomexisViewer.jar;j3dcore.jar;j3dutils.jar;vecmath.jar;jai_codec.jar;jai_core.jar;jai_imageio.jar; romexis_client_viewer.ui.RxViewer -new3d %2 %3 %4 %5
)

exit
