Commit bdce574e authored by Hachem Rihab's avatar Hachem Rihab

[opale_to_optim] added opale to optim conversion

parent 52e601cd
Pour réaliser votre conversion vous devez ajouter votre fichier .scar dans le dossier input.
Veillez à n'en placer qu'un seul dedans.
Ensuite il suffit d'appeler le script (.bat ou .sh).
!!Attention!! Ce script efface tous les input et output préalablement contenus dans les deux conversions.
\ No newline at end of file
<project name="ProjetOpale" default="convert">
<!-- Beginning -->
<target name="convert">
<antcall target="clean_everything" />
<antcall target="opale_to_hdoc" />
<antcall target="hdoc_to_optim" />
<antcall target="copy_optim_output" />
</target>
<target name="clean_everything">
<delete dir="../opale_to_hdoc/input"/>
<delete dir="../opale_to_hdoc/output/result.hdoc"/>
<delete dir="../hdoc_to_optim/input"/>
<delete dir="../hdoc_to_optim/output/result.scar"/>
</target>
<target name="opale_to_hdoc">
<copy tofile="../opale_to_hdoc/input/sample.scar" file="input/sample.scar"/>
<ant antfile="../opale_to_hdoc/opale_to_hdoc.ant" inheritAll="false"/>
</target>
<target name="hdoc_to_optim">
<copy tofile="../hdoc_to_optim/input/sample.hdoc" file="../opale_to_hdoc/output/result.hdoc"/>
<ant antfile="../hdoc_to_optim/hdoc_to_optim.ant" inheritAll="false"/>
</target>
<target name="copy_optim_output">
<copy tofile="output/result.scar" file="../hdoc_to_optim/output/result.scar"/>
</target>
</project>
\ No newline at end of file
@echo off
set lib=lib
set ant=opale_to_optim.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
#!/bin/sh
lib="lib"
ant="opale_to_optim.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
xCheckJava () {
vInputVarName=\$"$1"
vInputVarVal=`eval "expr \"$vInputVarName\" "`
if [ -z "$vInputVarVal" ];then
eval "$1=false"
return
fi
vSunJavaFound=`$vInputVarVal -version 2>&1 | grep -Eo -m 1 "(HotSpot)|(OpenJDK)"`
if [ "$vSunJavaFound" != "HotSpot" ] && [ "$vSunJavaFound" != "OpenJDK" ] ; then
eval "$1=false"
return
fi
}
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
vJavaCmd="$JAVA_HOME/bin/java"
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
echo "ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit 1
fi
fi
#Lancer la commande
scJarList="$lib/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment