Commit 1e1c5007 authored by Bruno Coudoin's avatar Bruno Coudoin

Modified the createit script so that the xml template menu is created avoiding...

Modified the createit script so that the xml template menu is created avoiding the need to run make.

Now the user can just run creatit.sh then runit.sh
parent 9f3769ef
......@@ -19,24 +19,31 @@ cp newactivity.svg $activitydir/$activity.svg
cd $activitydir
# Cleanup, remove generated files
rm -f Makefile pythontemplate.pyc pythontemplate.xml \
rm -f Makefile pythontemplate.pyc \
Makefile Makefile.in python.svg
mv $template.py $activity.py
mv $template.xml.in $activity.xml.in
sed -i s/$template/$activity/g init_path.sh Makefile.am \
$activity.xml.in $activity.py
sed -i s/$template/$activity/g init_path.sh Makefile.am $activity.py
sed -i s/python.svg/$activity.svg/ Makefile.am
sed -i s/python.svg/$activity.svg/ $activity.xml.in Makefile.am
sed -i "s:Bruno Coudoin:your name here:" $activity.xml.in
sed -i "s:\\(<_title>.*</_title>\\):<_title>set a title for $activity</_title>:" $activity.xml.in
sed -i "s:\\(<_description>.*</_description>\\):<_description>set a description for $activity</_description>:" $activity.xml.in
sed -i "s:\\(<_prerequisite>.*</_prerequisite>\\):<_prerequisite>set a prerequisite for $activity</_prerequisite>:" $activity.xml.in
sed -i "s:\\(<_goal>.*</_goal>\\):<_goal>set a goal for $activity</_goal>:" $activity.xml.in
sed -i "s:\\(<_manual>.*</_manual>\\):<_manual>set a manual for $activity</_manual>:" $activity.xml.in
sed -i "s:\\(<_credit>.*</_credit>\\):<_credit>set a credit for $activity</_credit>:" $activity.xml.in
mv $template.xml.in $activity.xml.in
mv $template.xml $activity.xml
# Let's process also $activity.xml so that running 'make'
# is not mandatory to run the activity.
for menu in $activity.xml.in $activity.xml
do
sed -i s/$template/$activity/g init_path.sh $menu
sed -i s/python.svg/$activity.svg/ $menu
sed -i "s:Bruno Coudoin:your name here:" $menu
sed -i "s:\\(<_title>.*</_title>\\):<_title>set a title for $activity</_title>:" $menu
sed -i "s:\\(<_description>.*</_description>\\):<_description>set a description for $activity</_description>:" $menu
sed -i "s:\\(<_prerequisite>.*</_prerequisite>\\):<_prerequisite>set a prerequisite for $activity</_prerequisite>:" $menu
sed -i "s:\\(<_goal>.*</_goal>\\):<_goal>set a goal for $activity</_goal>:" $menu
sed -i "s:\\(<_manual>.*</_manual>\\):<_manual>set a manual for $activity</_manual>:" $menu
sed -i "s:\\(<_credit>.*</_credit>\\):<_credit>set a credit for $activity</_credit>:" $menu
done
cd -
......@@ -47,9 +54,9 @@ echo src/$activitydir/$activity.xml.in >> ../po/POTFILES.in
echo src/$activitydir/$activity.py >> ../po/POTFILES.in
echo "Now you can test your activity with:"
echo "make && ./runit $activitydir"
echo "./runit $activitydir"
echo "To run it in a complete GCompris, run:"
echo "sudo make install"
echo "make && sudo make install"
echo "gcompris --experimental"
echo "(by default the activity is in the experimental section."
echo " To change is, edit the file $activitydir/$activity.xml.in"
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