2010-11-04 02:46:38 +07:00
|
|
|
<!-- ====================================================== -->
|
2017-10-11 20:46:16 +07:00
|
|
|
<!-- iDempiere Distribution Setup -->
|
2010-11-04 02:46:38 +07:00
|
|
|
<!-- ====================================================== -->
|
2017-10-11 20:46:16 +07:00
|
|
|
<!-- $Header: org.adempiere.server-feature/build.xml $-->
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
<project name="setup" default="setup" basedir=".">
|
|
|
|
|
|
|
|
<description>
|
2012-06-06 21:13:34 +07:00
|
|
|
This buildfile is used to setup the idempiere Environment.
|
2010-11-04 02:46:38 +07:00
|
|
|
</description>
|
|
|
|
|
|
|
|
<property environment="env" />
|
2012-06-06 21:13:34 +07:00
|
|
|
<property name="envFile" value="idempiereEnv.properties" />
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- Init -->
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<target name="setupInit"
|
|
|
|
description="initialization target">
|
|
|
|
|
2012-06-06 21:13:34 +07:00
|
|
|
<echo message="iDempiere Server Setup ===================" />
|
|
|
|
<echo message="IDEMPIERE_HOME = ${env.IDEMPIERE_HOME}" />
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
<!-- create the time stamp and environment -->
|
|
|
|
<tstamp />
|
|
|
|
<available file="${envFile}" property="envFileExists" />
|
|
|
|
<fail message="**** RUN_setup was not successful - please re-run ****" unless="envFileExists" />
|
|
|
|
<property file="${envFile}"/>
|
|
|
|
<filter filtersfile="${envFile}" />
|
|
|
|
|
|
|
|
<echo message="Environment = ${envFile}" />
|
|
|
|
<echo message="Java VM = ${ADEMPIERE_JAVA_TYPE}" />
|
|
|
|
<echo message="Database = ${ADEMPIERE_DB_TYPE}" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Environment variables -->
|
|
|
|
<condition property="isWindows">
|
|
|
|
<os family="windows" />
|
|
|
|
</condition>
|
|
|
|
<echo message="Windows=${isWindows}" />
|
|
|
|
|
2014-10-13 10:05:19 +07:00
|
|
|
<copy file="jettyhome/etc/jetty-template.xml"
|
|
|
|
tofile="jettyhome/etc/jetty.xml" filtering="yes" overwrite="yes"/>
|
|
|
|
<copy file="jettyhome/etc/jetty-ssl-template.xml"
|
2020-10-31 05:53:36 +07:00
|
|
|
tofile="jettyhome/etc/jetty-ssl.xml" filtering="yes" overwrite="yes"/>
|
2016-07-08 15:40:24 +07:00
|
|
|
<copy file="jettyhome/etc/jetty-ssl-context-template.xml"
|
2020-10-31 05:53:36 +07:00
|
|
|
tofile="jettyhome/etc/jetty-ssl-context.xml" filtering="yes" overwrite="yes"/>
|
2016-07-08 15:40:24 +07:00
|
|
|
<copy file="jettyhome/etc/jetty-http-template.xml"
|
2020-10-31 05:53:36 +07:00
|
|
|
tofile="jettyhome/etc/jetty-http.xml" filtering="yes" overwrite="yes"/>
|
2014-10-13 10:05:19 +07:00
|
|
|
<copy file="hazelcast-template.xml"
|
2020-10-31 05:53:36 +07:00
|
|
|
tofile="hazelcast.xml" filtering="yes" overwrite="yes"/>
|
2020-12-20 13:30:15 +07:00
|
|
|
<chmod file="jettyhome/etc/jetty-ssl-context.xml" perm="0600"/>
|
2010-11-04 02:46:38 +07:00
|
|
|
|
2017-10-11 20:46:16 +07:00
|
|
|
<mkdir dir="jettyhome/work"/>
|
|
|
|
<mkdir dir="log"/>
|
2010-11-04 02:46:38 +07:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- Windows Setup -->
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<target name="setupWin" depends="setupInit" if="isWindows"
|
|
|
|
description="Windows Setup">
|
|
|
|
|
|
|
|
<!-- Filter files No Overwrite -->
|
|
|
|
<copy file="utils/myDBcopyTemplate.bat"
|
|
|
|
tofile="utils/myDBcopy.bat" filtering="yes" overwrite="no" />
|
|
|
|
|
|
|
|
<!-- Filter files Overwrite -->
|
|
|
|
<copy file="utils/myEnvironmentTemplate.bat"
|
|
|
|
tofile="utils/myEnvironment.bat" filtering="yes" overwrite="yes" />
|
|
|
|
|
|
|
|
<copy file="utils/RUN_WinEnvTemplate.bat"
|
|
|
|
tofile="utils/RUN_WinEnv.bat" filtering="yes" overwrite="yes" />
|
|
|
|
|
|
|
|
<delete>
|
|
|
|
<fileset dir="." includes="**/*.sh" />
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- Non Windows Setup -->
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<target name="setupNonWin" depends="setupInit" unless="isWindows"
|
|
|
|
description="Non Windows Setup">
|
|
|
|
|
|
|
|
<!-- Filter files No Overwrite -->
|
|
|
|
<copy file="utils/myDBcopyTemplate.sh"
|
|
|
|
tofile="utils/myDBcopy.sh" filtering="yes" overwrite="no" />
|
|
|
|
|
|
|
|
<!-- Filter files Overwrite -->
|
|
|
|
<copy file="utils/myEnvironmentTemplate.sh"
|
|
|
|
tofile="utils/myEnvironment.sh" filtering="yes" overwrite="yes" />
|
|
|
|
|
|
|
|
<copy file="utils/RUN_UnixEnvTemplate.sh"
|
|
|
|
tofile="utils/RUN_UnixEnv.sh" filtering="yes" overwrite="yes" />
|
|
|
|
|
|
|
|
<!-- Fix OS stuff -->
|
|
|
|
<fixcrlf srcdir="." eol="lf" eof="remove" includes="**/*.sh" />
|
|
|
|
<chmod dir="." perm="ugo+x" includes="**/*.sh" />
|
2020-12-20 13:30:15 +07:00
|
|
|
<chmod file="idempiereEnv.properties" perm="0600"/>
|
|
|
|
<chmod file="idempiere.properties" perm="0600"/>
|
2021-01-03 21:19:49 +07:00
|
|
|
<chmod file=".idpass" perm="0600"/>
|
2020-12-20 13:30:15 +07:00
|
|
|
<chmod file="utils/myEnvironment.sh" perm="0700"/>
|
2021-01-03 21:19:49 +07:00
|
|
|
<chmod file="utils/getVar.sh" perm="0700"/>
|
|
|
|
<chmod file="utils/setVar.sh" perm="0700"/>
|
|
|
|
<chmod file="utils/customGetVar.sh" perm="0700"/>
|
|
|
|
<chmod file="utils/customSetVar.sh" perm="0700"/>
|
2010-11-04 02:46:38 +07:00
|
|
|
|
|
|
|
<delete>
|
|
|
|
<fileset dir="." includes="*.bat" />
|
|
|
|
<fileset dir="utils" includes="**/*.bat" />
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- Setup (Main) -->
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<target name="setup" depends="setupInit, setupWin, setupNonWin"
|
2017-10-11 20:46:16 +07:00
|
|
|
description="Setup iDempiere">
|
2010-11-04 02:46:38 +07:00
|
|
|
</target>
|
2020-12-20 13:30:15 +07:00
|
|
|
</project>
|