#! /bin/sh
-## toolbox for vlc, the VideoLAN Client
-## $Id: toolbox,v 1.7 2003/01/28 20:02:03 sam Exp $
+## toolbox for the VLC media player
+## $Id: toolbox,v 1.12 2003/03/10 19:30:35 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
{
cat << EOF
recognized flags are:
- --update-vc update Microsoft Visual Studio files
- --update-po update translation files
- --fix-glade fix Glade-generated files
+ --update-changelog update the CVS changelog
+ --update-vc update Microsoft Visual Studio files
+ --update-po update translation files
+ --update-glade generate and fix Glade code
EOF
exit 1
}
###
### argument check
###
-do_help=yes
+do_help=no
+do_changelog=no
do_po=no
do_vc=no
do_glade=no
+
+if test "$1" = ""
+then
+ do_help=yes
+fi
+
while test $# -gt 0; do
case "$1" in
+ --update-changelog)
+ do_changelog=yes
+ ;;
--update-vc)
- do_help=no
do_vc=yes
;;
--update-po)
- do_help=no
do_po=yes
;;
- --fix-glade)
- do_help=no
+ --update-glade|--fix-glade)
do_glade=yes
;;
+ --help)
+ do_help=yes
+ ;;
*)
echo "$0: unknown option $1"
do_help=yes
- help
;;
esac
shift
help
fi
+##
+## Update the CVS changelog
+##
+if test "$do_changelog" = "yes"
+then
+ cvs2cl --help >/dev/null 2>&1 || exit 1
+ cvs2cl --hide-filenames --no-wrap -w --stdout | \
+ sed -e 's/^[^0-9]/ /' -e 's/^ *$//' | \
+ uniq >| ChangeLog
+fi
+
##
## Update the MSVC project files
##
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
-# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
+# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
-# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
+# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
# PROP Output_Dir "MIPSRel\\${subdir}"${M}
# PROP Intermediate_Dir "MIPSRel\\${subdir}"${M}
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
-# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
+# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 Release"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\${cfile}"${M}
+# ADD CPP /D "__VLC__" /D "__PLUGIN__" /D "MODULE_NAME=${plugin}" /D "MODULE_NAME_IS_${plugin}" ${M}
# End Source File${M}
EOF
done
find modules/gui/win32 -name '*.dfm' | while read file
do
printf "\n/*\n * from $file:\n */\n\n" >> modules/gui/win32/strings.cpp
- perl -ne 'chop; chop; if( / (Caption|Text|Hint) / || $buffer =~ /[+=] *$/ ) { $buffer =~ s/\+ *$//; $buffer .= $_; } if( $buffer =~ /'"'"' *$/) { $buffer =~ s/'"'"'/"/g; $buffer =~ s/\\/\\\\/g; $buffer =~ s/=/= _(/; print $buffer." );\n"; $buffer = "";}' < $file | grep -v '"-*"' >> modules/gui/win32/strings.cpp || exit 1
+ perl -ne 'chop; chop; if( / (Caption|Text|Hint) / || $buffer =~ /[+=] *$/ ) { $buffer =~ s/\+ *$//; $buffer .= $_; } if( $buffer =~ /'"'"' *$/) { $buffer =~ s/'"'"'/"/g; $buffer =~ s/\\/\\\\/g; $buffer =~ s/=/= _(/; print $buffer." );\n"; $buffer = "";}' < $file | grep -v '"-*"' | grep -v '"http://' | grep -v '"vlcs"' >> modules/gui/win32/strings.cpp || exit 1
done
# clean old potfiles
cd po