Commit 7440827a authored by Rafaël Carré's avatar Rafaël Carré

qt4: Fix help dialog (again)

Uses builtin AUTHORS THANKS and COPYING files on every platform
Don't ship AUTHORS.txt and THANKS.txt on windows packages
COPYING.txt is kept since it's used in the nsis installer
Only show authors' name instead of the full AUTHORS file
Removes an empty line in THANKS to make it easier to parse without using endless pipes
parent 17acf797
......@@ -619,7 +619,7 @@ package-win-common:
cp "$(top_builddir)/src/.libs/libvlc$(LIBEXT)" "vlc-${VERSION}/"
cp "$(top_builddir)/src/.libs/libvlc-control$(LIBEXT)" "vlc-${VERSION}/"
for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
for file in MAINTAINERS NEWS COPYING README ; \
do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
......
$Id$
VLC makes extensive use of the following persons' code:
Aaron Holtzman <aholtzma at ess.engr.uvic.ca> - AC3 decoder, MPEG video decoder
......
......@@ -82,14 +82,14 @@ dialogs/help.cpp: dialogs/about.hpp
dialogs/about.hpp: Modules.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
mkdir -p -- dialogs
echo "/* Automatically generated file - DO NOT EDIT */" > dialogs/about.hpp.tmp
echo "static const char psz_licence[] =" >> dialogs/about.hpp.tmp
echo "static const char psz_license[] =" >> dialogs/about.hpp.tmp
cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp
echo ";" >> dialogs/about.hpp.tmp
echo "static const char psz_thanks[] =" >> dialogs/about.hpp.tmp
cat $(top_srcdir)/THANKS | grep -v '$$Id:' | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp
grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp
echo ";" >> dialogs/about.hpp.tmp
echo "static const char psz_authors[] =" >> dialogs/about.hpp.tmp
cat $(top_srcdir)/AUTHORS | grep -v '$$Id:' | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp
grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp
echo ";" >> dialogs/about.hpp.tmp
mv -f -- dialogs/about.hpp.tmp dialogs/about.hpp
......
......@@ -114,15 +114,7 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
/* GPL License */
QTextEdit *licenseEdit = new QTextEdit( this );
#ifdef WIN32
QFile *licenseFile = new QFile( "COPYING.txt" );
licenseFile->open( QIODevice::ReadOnly | QIODevice::Text );
licenseEdit->setText( licenseFile->readAll().data() );
licenseFile->close();
#else
char *psz_license = LICENCE;
licenseEdit->setText( qfu( psz_license ) );
#endif
licenseEdit->setReadOnly( true );
/* People who helped */
......@@ -136,29 +128,13 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
thanksLabel->setWordWrap( true );
thanksLayout->addWidget( thanksLabel );
QTextEdit *thanksEdit = new QTextEdit( this );
#ifdef WIN32
QFile *thanksFile = new QFile( "THANKS.txt" );
thanksFile->open( QIODevice::ReadOnly | QIODevice::Text );
thanksEdit->setText( thanksFile->readAll().data() );
thanksFile->close();
#else
char *psz_thanks = THANKS;
thanksEdit->setText( qfu( psz_thanks ) );
#endif
thanksEdit->setReadOnly( true );
thanksLayout->addWidget( thanksEdit );
/* People who wrote the software */
QTextEdit *authorsEdit = new QTextEdit( this );
#ifdef WIN32
QFile *authorsFile = new QFile( "COPYING.txt" );
authorsFile->open( QIODevice::ReadOnly | QIODevice::Text );
authorsEdit->setText( authorsFile->readAll().data() );
authorsFile->close();
#else
char *psz_authors = AUTHORS;
authorsEdit->setText( qfu( psz_authors ) );
#endif
authorsEdit->setReadOnly( true );
/* add the tabs to the Tabwidget */
......
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