add creation of zip to distribute
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
<project name="artloglaby" default="dist" basedir="/home/plhardy/artisanlogiciel/code/laby_github">
|
<!-- for document on apache ant see https://ant.apache.org/manual-1.9.x/index.html -->
|
||||||
|
|
||||||
|
<!-- don't set basedir since it default to parent directory of this file, it is what we want -->
|
||||||
|
<project name="artloglaby" default="dist">
|
||||||
<description>
|
<description>
|
||||||
simple example build file
|
2D Maze generator ( generate .stl for one 3D layer )
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<!-- set global properties for this build -->
|
<!-- set global properties for this build -->
|
||||||
<property name="src" location="java"/>
|
<property name="src" location="java"/>
|
||||||
<property name="build" location="build"/>
|
<property name="build" location="build"/>
|
||||||
@@ -43,4 +47,5 @@
|
|||||||
<delete dir="${build}"/>
|
<delete dir="${build}"/>
|
||||||
<delete dir="${dist}"/>
|
<delete dir="${dist}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -9,12 +9,45 @@ specific_run()
|
|||||||
elif [[ $action == emacsdevenv ]]
|
elif [[ $action == emacsdevenv ]]
|
||||||
then
|
then
|
||||||
make -f ${JAVA_MAKEFILE} $action
|
make -f ${JAVA_MAKEFILE} $action
|
||||||
|
elif [[ $action == create_zip_package ]]
|
||||||
|
then
|
||||||
|
create_zip_package
|
||||||
else
|
else
|
||||||
echo "[ERROR] unrecognized specific action $action" >&2
|
echo "[ERROR] unrecognized specific action $action" >&2
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_zip_package()
|
||||||
|
{
|
||||||
|
dest=artloglaby/
|
||||||
|
if [[ -e $dest ]]
|
||||||
|
then
|
||||||
|
echo "[ERROR] $dest already exists ! move it away ">&2
|
||||||
|
else
|
||||||
|
zip_package=laby.zip
|
||||||
|
if [[ -e $zip_package ]]
|
||||||
|
then
|
||||||
|
echo "[WARNING] zip package $zip_package already exists" >&2
|
||||||
|
fi
|
||||||
|
mkdir $dest
|
||||||
|
# will be used at run time to save mazes
|
||||||
|
mkdir $dest/lab
|
||||||
|
cp scripts/laby.sh $dest
|
||||||
|
cp LISEZMOI $dest
|
||||||
|
cp libs/* $dest
|
||||||
|
cp dist/lib/* $dest
|
||||||
|
zip -r $zip_package $dest
|
||||||
|
|
||||||
|
if [[ $? == 0 ]]
|
||||||
|
then
|
||||||
|
rm -r $dest
|
||||||
|
echo "[INFO] zip package created : $zip_package"
|
||||||
|
else
|
||||||
|
echo "[ERROR] zip package $zip_package creation failed" >&2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# first argument mandatory : directory containing generated .lab and .stl files ( usualy ./lab )
|
# first argument mandatory : directory containing generated .lab and .stl files ( usualy ./lab )
|
||||||
list_labs()
|
list_labs()
|
||||||
@@ -86,4 +119,5 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
specific_menus+=(list_labs "Show_Labyrinth_with_blender")
|
specific_menus+=(list_labs "Show_Labyrinth_with_blender")
|
||||||
|
specific_menus+=(create_zip_package "Create_Zip_Package")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user