From 9c21a144a668b73f7740d3be9ca0158518d27e70 Mon Sep 17 00:00:00 2001 From: Vascom Date: Jun 05 2014 11:08:12 +0000 Subject: Initial add Qt GUI subpackage --- diff --git a/mediainfo-fix-command-line-argument-parsing.patch b/mediainfo-fix-command-line-argument-parsing.patch new file mode 100644 index 0000000..6399355 --- /dev/null +++ b/mediainfo-fix-command-line-argument-parsing.patch @@ -0,0 +1,25 @@ +diff --git a/Source/GUI/Qt/main.cpp b/Source/GUI/Qt/main.cpp +index 922eb7e..6b5ef35 100755 +--- a/Source/GUI/Qt/main.cpp ++++ b/Source/GUI/Qt/main.cpp +@@ -28,6 +28,8 @@ int main(int argc, char *argv[]) + { + QApplication a(argc, argv); + QStringList args = QCoreApplication::arguments(); ++ // # First argument is always app name, not an really argument ++ args.removeFirst(); + bool no_gui=false; + QStringList filesnames; + int output=-1; +diff --git a/Source/GUI/Qt/mainwindow.cpp b/Source/GUI/Qt/mainwindow.cpp +index 7afbee8..fb2641f 100755 +--- a/Source/GUI/Qt/mainwindow.cpp ++++ b/Source/GUI/Qt/mainwindow.cpp +@@ -103,7 +103,7 @@ MainWindow::MainWindow(QStringList filesnames, int viewasked, QWidget *parent) : + + refreshDisplay(); + +- if(filesnames.count()>1) { ++ if(filesnames.count()>0) { + openFiles(filesnames); + } diff --git a/mediainfo-qt.desktop b/mediainfo-qt.desktop new file mode 100644 index 0000000..6952dd9 --- /dev/null +++ b/mediainfo-qt.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=MediaInfo Qt +Comment=Supplies technical and tag information about a video or audio file +Comment[fr]=fournit des informations techniques et les tags à propos de vos fichiers video et audio +Icon=mediainfo +Exec=mediainfo-qt %f +Terminal=false +MimeType= +Categories=AudioVideo;AudioVideoEditing; +X-Desktop-File-Install-Version=0.22 diff --git a/mediainfo-qt.kde4.desktop b/mediainfo-qt.kde4.desktop new file mode 100644 index 0000000..f1fe3d6 --- /dev/null +++ b/mediainfo-qt.kde4.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +Name=mediainfo-qt.desktop +ServiceTypes=KonqPopupMenu/Plugin,audio/*,video/*,image/*,application/x-flash-video +Actions=mediainfo-qt +X-KDE-Priority=TopLevel + +[Desktop Action mediainfo-qt] +Name=MediaInfoQt +GenericName=Media Analyzer +Exec=mediainfo-qt %u +Icon=mediainfo diff --git a/mediainfo-qt.patch b/mediainfo-qt.patch new file mode 100644 index 0000000..acee12b --- /dev/null +++ b/mediainfo-qt.patch @@ -0,0 +1,37 @@ +diff --git a/Project/QMake/GUI/MediaInfoQt.pro b/Project/QMake/GUI/MediaInfoQt.pro +index 34a35ac..627283a 100755 +--- a/Project/QMake/GUI/MediaInfoQt.pro ++++ b/Project/QMake/GUI/MediaInfoQt.pro +@@ -1,17 +1,14 @@ + # ------------------------------------------------- + # Project created by QtCreator 2010-07-23T13:03:11 + # ------------------------------------------------- +-TARGET = mediainfo-gui ++TARGET = mediainfo-qt + TEMPLATE = app + + # QT += webkit + QT += xml + DEFINES += \ + _UNICODE +-LIBS += -ldl \ +- ../../../../MediaInfoLib/Project/GNU/Library/.libs/libmediainfo.a \ +- ../../../../ZenLib/Project/GNU/Library/.libs/libzen.a \ +- -lz ++LIBS += -ldl -lmediainfo -lzen -lz + SOURCES += ../../../Source/GUI/Qt/main.cpp \ + ../../../Source/GUI/Qt/mainwindow.cpp \ + ../../../Source/Common/Core.cpp \ +diff --git a/Source/GUI/Qt/columneditsheet.cpp b/Source/GUI/Qt/columneditsheet.cpp +index 69858e6..9ebe986 100755 +--- a/Source/GUI/Qt/columneditsheet.cpp ++++ b/Source/GUI/Qt/columneditsheet.cpp +@@ -23,7 +23,7 @@ ColumnEditSheet::ColumnEditSheet(column c, int pos, int nb, Core* C, QWidget *pa + QHBoxLayout(parent), + pos(pos), + C(C), +- col(c), ++ col(c) + { + QLineEdit* lineedit = new QLineEdit(c.name); + this->addWidget(lineedit); diff --git a/mediainfo.spec b/mediainfo.spec index e666a11..f990d56 100644 --- a/mediainfo.spec +++ b/mediainfo.spec @@ -1,6 +1,6 @@ Name: mediainfo Version: 0.7.69 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Supplies technical and tag information about a video or audio file (CLI) Summary(ru): Предоставляет полную информацию о медиа файле (CLI) @@ -8,6 +8,10 @@ License: BSD Group: Applications/Multimedia URL: http://mediaarea.net/MediaInfo Source0: http://mediaarea.net/download/source/%{name}/%{version}/%{name}_%{version}.tar.bz2 +Source1: mediainfo-qt.desktop +Source2: mediainfo-qt.kde4.desktop +Patch0: mediainfo-qt.patch +Patch1: mediainfo-fix-command-line-argument-parsing.patch BuildRequires: libmediainfo-devel >= %{version} BuildRequires: libzen-devel >= 0.4.29 @@ -20,6 +24,7 @@ BuildRequires: autoconf BuildRequires: desktop-file-utils BuildRequires: ImageMagick BuildRequires: hicolor-icon-theme +BuildRequires: qt4-devel %description MediaInfo CLI (Command Line Interface). @@ -116,8 +121,40 @@ VOB, DVD, WMA, VMW, ASF, 3GP, 3GPP, 3GP2 * Аудио: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF * Субтитры: SRT, SSA, ASS, SAMI +%package qt +Summary: Supplies technical and tag information about a video or audio file (Qt GUI) +Summary(ru):Предоставляет полную информацию о медиа файле (Qt GUI) +Group: Applications/Multimedia +Requires: libzen%{?_isa} >= 0.4.29 +Requires: libmediainfo%{?_isa} >= %{version} + +%description qt +MediaInfo (Graphical User Interface). + +What information can I get from MediaInfo? +* General: title, author, director, album, track number, date, duration... +* Video: codec, aspect, fps, bitrate... +* Audio: codec, sample rate, channels, language, bitrate... +* Text: language of subtitle +* Chapters: number of chapters, list of chapters + +DivX, XviD, H263, H.263, H264, x264, ASP, AVC, iTunes, MPEG-1, +MPEG1, MPEG-2, MPEG2, MPEG-4, MPEG4, MP4, M4A, M4V, QuickTime, +RealVideo, RealAudio, RA, RM, MSMPEG4v1, MSMPEG4v2, MSMPEG4v3, +VOB, DVD, WMA, VMW, ASF, 3GP, 3GPP, 3GP2 + +What format (container) does MediaInfo support? +* Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, + MPEG-2, MPEG-4, DVD (VOB) (Codecs: DivX, XviD, MSMPEG4, ASP, + H.264, AVC...) +* Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF +* Subtitles: SRT, SSA, ASS, SAMI + %prep %setup -q -n MediaInfo +%patch0 -p1 +%patch1 -p1 + sed -i 's/.$//' *.txt *.html Release/*.txt find Source -type f -exec chmod 644 {} ';' @@ -147,6 +184,11 @@ pushd Project/GNU/GUI make %{?_smp_mflags} popd +# now build Qt GUI +pushd Project/QMake/GUI + qmake-qt4 + make %{?_smp_mflags} +popd %install pushd Project/GNU/CLI @@ -157,6 +199,10 @@ pushd Project/GNU/GUI %make_install popd +pushd Project/QMake/GUI + make install INSTALL_ROOT=%{buildroot} +popd + # icon install -dm 755 %{buildroot}%{_datadir}/icons/hicolor/128x128/apps install -m 644 -p Source/Resource/Image/MediaInfo.png \ @@ -177,9 +223,11 @@ install -m 644 -p Source/Resource/Image/MediaInfo.png \ install -dm 755 %{buildroot}%{_datadir}/applications desktop-file-install --dir="%{buildroot}%{_datadir}/applications" \ Project/GNU/GUI/mediainfo-gui.desktop +desktop-file-install --dir="%{buildroot}%{_datadir}/applications" %{SOURCE1} install -dm 755 %{buildroot}%{_datadir}/kde4/services/ServiceMenus/ install -m 644 -p Project/GNU/GUI/mediainfo-gui.kde4.desktop \ %{buildroot}%{_datadir}/kde4/services/ServiceMenus/mediainfo-gui.desktop +install -m 644 -p %{SOURCE2} %{buildroot}%{_datadir}/kde4/services/ServiceMenus/mediainfo-qt.desktop %post gui /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -202,13 +250,20 @@ fi %files gui %doc Release/ReadMe_GUI_Linux.txt License.html History_GUI.txt %{_bindir}/mediainfo-gui -%{_datadir}/applications/*.desktop +%{_datadir}/applications/%{name}-gui.desktop %{_datadir}/pixmaps/*.png %{_datadir}/icons/hicolor/*/apps/*.png -%{_datadir}/kde4/services/ServiceMenus/*.desktop +%{_datadir}/kde4/services/ServiceMenus/%{name}-gui.desktop +%files qt +%{_bindir}/mediainfo-qt +%{_datadir}/applications/%{name}-qt.desktop +%{_datadir}/kde4/services/ServiceMenus/%{name}-qt.desktop %changelog +* Thu Jun 05 2014 Vasiliy N. Glazov 0.7.69-2 +- Add qt GUI subpackage + * Tue Jun 03 2014 Vasiliy N. Glazov 0.7.69-1 - Update to 0.7.69