ECHO off

REM org.eclipse.birt.report.engine.impl.ReportRunner Usage:
REM --mode/-m [ run | render | runrender] the default is runrender
REM for runrender mode:
REM      we should add it in the end <design file>
REM      --format/-f [ HTML \| PDF ]
REM      --output/-o <target file>
REM      --htmlType/-t < HTML \| ReportletNoCSS >
REM      --locale /-l <locale>
REM      --parameter/-p <"parameterName=parameterValue">
REM      --file/-F <parameter file>
REM      --encoding/-e <target encoding>
REM
REM Locale: default is english
REM parameters in command line will overide parameters in parameter file
REM parameter name cant include characters such as \ ', '=', ':'
REM
REM For RUN mode:
REM      we should add it in the end<design file>
REM      --output/-o <target file>
REM      --locale /-l <locale>
REM      --parameter/-p <parameterName=parameterValue>
REM      --file/-F <parameter file>
REM
REM Locale: default is english
REM parameters in command line will overide parameters in parameter file 
REM parameter name cant include characters such as \ ', '=', ':' 
REM
REM For RENDER mode:
REM     we should add it in the end<design file>
REM     --output/-o <target file>
REM     --page/-p <pageNumber>
REM     --locale /-l <locale>
REM
REM Locale: default is english
IF not "%BIRT_HOME%" == "" GOTO runBirt
ECHO "Please set BIRT_HOME first."
GOTO end
:runBirt


SET java.io.tmpdir=%BIRT_HOME%\ReportEngine\tmpdir
SET org.eclipse.datatools_workspacepath=%java.io.tmpdir%\workspace_dtp


mkdir %java.io.tmpdir%
mkdir %org.eclipse.datatools_workspacepath%


REM set the birt class path.
SET BIRTCLASSPATH=%BIRT_HOME%\ReportEngine\lib\com.ibm.icu_4.4.2.v20110208.jar;%BIRT_HOME%\ReportEngine\lib\com.lowagie.text_2.1.7.v201004222200.jar;%BIRT_HOME%\ReportEngine\lib\commons-cli-1.0.jar;%BIRT_HOME%\ReportEngine\lib\derby.jar;%BIRT_HOME%\ReportEngine\lib\flute.jar;%BIRT_HOME%\ReportEngine\lib\javax.wsdl_1.5.1.v201012040544.jar;%BIRT_HOME%\ReportEngine\lib\js.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.bridge_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.css_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.dom_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.dom.svg_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.ext.awt_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.parser_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.pdf_1.6.0.v201105071520.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.svggen_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.transcoder_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.util_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.util.gui_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.batik.xml_1.6.0.v201011041432.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.commons.codec_1.3.0.v201101211617.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.xerces_2.9.0.v201101211617.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.xml.resolver_1.2.0.v201005080400.jar;%BIRT_HOME%\ReportEngine\lib\org.apache.xml.serializer_2.7.1.v201005080400.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.birt.runtime_3.7.0.v20110615-1818.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.core.expressions_3.4.300.v20110228.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.core.filesystem_1.3.100.v20110423-0524.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.core.jobs_3.5.100.v20110404.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.core.resources_3.7.100.v20110510-0712.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.core.runtime_3.7.0.v20110110.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity_1.2.2.v201105270956.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.apache.derby_1.0.101.v201104090305.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.apache.derby.dbdefinition_1.0.2.v200906161815.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.console.profile_1.0.0.v200906020553.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.dbdefinition.genericJDBC_1.0.1.v200906161815.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.db.generic_1.0.1.v200908130547.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.oda_3.3.2.v201105200920.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.oda.consumer_3.2.4.v201105200848.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.oda.design_3.3.3.v201105191315.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.oda.flatfile_3.1.1.v201104191557.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.oda.profile_3.2.5.v201104090305.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.connectivity.sqm.core_1.2.2.v201104090305.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.hsqldb_1.0.0.v200906020900.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.hsqldb.dbdefinition_1.0.0.v200906161800.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.ibm.db2.luw_1.0.2.v201005211230.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition_1.0.4.v201005211215.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.ibm.informix_1.0.1.v201005211230.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.ibm.informix.dbdefinition_1.0.4.v201005211230.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.msft.sqlserver_1.0.1.v201001180222.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition_1.0.0.v201004211630.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.mysql_1.0.2.v201002041100.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.mysql.dbdefinition_1.0.4.v200906161800.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.oda.ws_1.2.2.v201011041216.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.oda.xml_1.2.1.v201104121500.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.oracle_1.0.0.v200908130544.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.oracle.dbdefinition_1.0.102.v201101120745.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.postgresql_1.0.1.v200906020900.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.enablement.postgresql.dbdefinition_1.0.1.v200906161800.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.modelbase.dbdefinition_1.0.2.v201002130228.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.modelbase.derby_1.0.0.v201002161452.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.modelbase.sql_1.0.4.v201002250945.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.datatools.modelbase.sql.query_1.1.1.v201008100700.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.emf_2.6.0.v20110530-1010.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.emf.common_2.7.0.v20110527-1609.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.emf.ecore_2.7.0.v20110527-1609.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.emf.ecore.change_2.7.0.v20110408-2116.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.emf.ecore.xmi_2.7.0.v20110520-1406.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.equinox.app_1.3.100.v20110321.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.equinox.common_3.6.0.v20110523.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.equinox.preferences_3.4.0.v20110502.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.equinox.registry_3.5.100.v20110502.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.osgi_3.7.0.v20110613.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.osgi.services_3.3.0.v20110513.jar;%BIRT_HOME%\ReportEngine\lib\org.eclipse.update.configurator_3.3.100.v20100512.jar;%BIRT_HOME%\ReportEngine\lib\org.w3c.css.sac_1.3.0.v200805290154.jar;%BIRT_HOME%\ReportEngine\lib\org.w3c.dom.smil_1.0.0.v200806040011.jar;%BIRT_HOME%\ReportEngine\lib\org.w3c.dom.svg_1.1.0.v201011041433.jar;%BIRT_HOME%\ReportEngine\lib\Tidy.jar;


REM set command
SET JAVACMD=java
set p1=%1
set p2=%2
set p3=%3
set p4=%4
set p5=%5
set p6=%6
set p7=%7
set p8=%8
set p9=%9
shift
set p10=%9
shift
set p11=%9
shift
set p12=%9
shift
set p13=%9
shift
set p14=%9
shift
set p15=%9
shift
set p16=%9
shift
set p17=%9
shift
set p18=%9
shift
set p19=%9

%JAVACMD% -cp "%BIRTCLASSPATH%" -DBIRT_HOME="%BIRT_HOME%\ReportEngine" org.eclipse.birt.report.engine.api.ReportRunner %p1% %p2% %p3% %p4% %p5% %p6% %p7% %p8% %p9% %p10% %p11% %p12% %p13% %p14% %p15% %p16% %p17% %p18% %p19%

:end
