kanryu / quickviewer

A image/comic viewer application for Windows, Mac and Linux, it can show images very fast
https://kanryu.github.io/quickviewer/
GNU General Public License v3.0
536 stars 63 forks source link

Dunnos - Qt SDK?, I try to compile, i fail. #120

Open inukaze opened 4 years ago

inukaze commented 4 years ago

Hi there. i am trying to compile the AppImage under GNU/Linux 64 Bits. well the thing is in the point

  1. Setup Set Up Qt SDK

You should install Qt SDK on your pc.

https://www.qt.io/download-open-source/

Why you don't explain the instructions for download and compile the Qt SDK ?

Its very frustrating i just want to make single a question in the Qt site, but for anything you must specify a password with the site wants, not the password i want and i can remember ¬¬, and not by everything you must specify cell number phone when you don't have one ¬¬. I hate that developers can't understand the world is not only U.S.A and America is a Whole continent and not everyone had the same Purchasing power and not all are related to business.

because i enter in the site but i can not found nothing useful. and i try to compile with the version of the site and when i try to compile using the follow commands :

#QuickViewer

echo 'Instalar PreRequisitos : 1) Linux Deploy QT'
cd /tmp
git clone https://github.com/probonopd/linuxdeployqt
cd linuxdeployqt/
qmake PREFIX=/usr linuxdeployqt.pro
make
su -c "make install ; ldconfig" root
echo 'Instalar PreRequisitos : 2) AppImage Kit'
cd /tmp
git clone https://github.com/AppImage/AppImageKit
cd AppImageKit/
su -c "./build.sh ; cd build ; make install ; ldconfig ; cd .." root

echo 'Compilar y crear el binario ejecutable de QuickViewer'
cd /tmp
git clone https://github.com/kanryu/quickviewer
cd quickviewer
git submodule init
git submodule update
mkdir build ; cd build
qmake -o Makefile -recursive ../QVproject.pro
make

i get in this last make the follow :

make
cd Qt7z/Qt7z/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /media/Compartido/Liñux/cdf/git/quickviewer/Qt7z/Qt7z/Qt7z.pro -o Makefile ) && make -f Makefile 
make[1]: se entra en el directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/Qt7z/Qt7z'
make[1]: No se hace nada para 'first'.
make[1]: se sale del directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/Qt7z/Qt7z'
cd ResizeHalf/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /media/Compartido/Liñux/cdf/git/quickviewer/ResizeHalf/ResizeHalf.pro -o Makefile ) && make -f Makefile 
make[1]: se entra en el directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/ResizeHalf'
make[1]: No se hace nada para 'first'.
make[1]: se sale del directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/ResizeHalf'
cd easyexif/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /media/Compartido/Liñux/cdf/git/quickviewer/easyexif/easyexif.pro -o Makefile ) && make -f Makefile 
make[1]: se entra en el directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/easyexif'
make[1]: No se hace nada para 'first'.
make[1]: se sale del directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/easyexif'
cd unrar/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /media/Compartido/Liñux/cdf/git/quickviewer/unrar/unrar.pro -o Makefile ) && make -f Makefile 
make[1]: se entra en el directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/unrar'
make[1]: No se hace nada para 'first'.
make[1]: se sale del directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/unrar'
cd Qt7z/lib7z/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /media/Compartido/Liñux/cdf/git/quickviewer/Qt7z/lib7z/lib7z.pro -o Makefile ) && make -f Makefile 
make[1]: se entra en el directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/Qt7z/lib7z'
make[1]: No se hace nada para 'first'.
make[1]: se sale del directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/Qt7z/lib7z'
cd fileloader/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /media/Compartido/Liñux/cdf/git/quickviewer/fileloader/fileloader.pro -o Makefile ) && make -f Makefile 
make[1]: se entra en el directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/fileloader'
g++ -c -m64 -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -fPIC -DNTDDI_VERSION=NTDDI_VISTA -D_UNIX -DUNRAR -DRARDLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I../../fileloader -I/media/Compartido/Liñux/cdf/git/quickviewer/build/fileloader -I../../Qt7z/Qt7z/7zip -I../../Qt7z/Qt7z/7zip/CPP -I../../Qt7z/Qt7z/lib7zip/src -I../../unrar -I../../Qt7z/Qt7z -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I/media/Compartido/Liñux/cdf/git/quickviewer/build/fileloader -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o fileloader7zarchive.o ../../fileloader/fileloader7zarchive.cpp
../../fileloader/fileloader7zarchive.cpp: In constructor ‘Qt7zMultiStreamWriter::Qt7zMultiStreamWriter(QString, QList<Qt7zFileInfo>*, QObject*)’:
../../fileloader/fileloader7zarchive.cpp:280:13: warning: ‘Qt7zMultiStreamWriter::m_baseDirPath’ will be initialized after [-Wreorder]
     QString m_baseDirPath;
             ^~~~~~~~~~~~~
../../fileloader/fileloader7zarchive.cpp:279:26: warning:   ‘QList<Qt7zFileInfo>* Qt7zMultiStreamWriter::m_fileInfoList’ [-Wreorder]
     QList<Qt7zFileInfo>* m_fileInfoList;
                          ^~~~~~~~~~~~~~
../../fileloader/fileloader7zarchive.cpp:292:5: warning:   when initialized here [-Wreorder]
     Qt7zMultiStreamWriter(QString basePath, QList<Qt7zFileInfo>* pFileInfoList, QObject* parent)
     ^~~~~~~~~~~~~~~~~~~~~
../../fileloader/fileloader7zarchive.cpp: In function ‘Qt7zFileInfo fromC7ZipArchiveItem(C7ZipArchiveItem&, QString, size_t)’:
../../fileloader/fileloader7zarchive.cpp:340:64: error: invalid initialization of non-const reference of type ‘long long unsigned int&’ from an rvalue of type ‘long long unsigned int’
     item.GetUInt64Property(PropertyIndexEnum::kpidSize, uintval);
                                                                ^
In file included from ../../fileloader/fileloader7zarchive.cpp:8:0:
../../Qt7z/Qt7z/lib7zip/src/lib7zip.h:116:15: note:   initializing argument 2 of ‘virtual bool C7ZipArchiveItem::GetUInt64Property(lib7zip::PropertyIndexEnum, long long unsigned int&) const’
  virtual bool GetUInt64Property(lib7zip::PropertyIndexEnum propertyIndex,
               ^~~~~~~~~~~~~~~~~
../../fileloader/fileloader7zarchive.cpp:347:68: error: invalid initialization of non-const reference of type ‘long long unsigned int&’ from an rvalue of type ‘long long unsigned int’
     item.GetUInt64Property(PropertyIndexEnum::kpidChecksum, uintval);
                                                                    ^
In file included from ../../fileloader/fileloader7zarchive.cpp:8:0:
../../Qt7z/Qt7z/lib7zip/src/lib7zip.h:116:15: note:   initializing argument 2 of ‘virtual bool C7ZipArchiveItem::GetUInt64Property(lib7zip::PropertyIndexEnum, long long unsigned int&) const’
  virtual bool GetUInt64Property(lib7zip::PropertyIndexEnum propertyIndex,
               ^~~~~~~~~~~~~~~~~
../../fileloader/fileloader7zarchive.cpp: In member function ‘bool FileLoader7zArchivePrivate::extractToDir(const QString&)’:
../../fileloader/fileloader7zarchive.cpp:561:16: warning: unused variable ‘pre_total’ [-Wunused-variable]
         size_t pre_total = 0;
                ^~~~~~~~~
Makefile:558: fallo en las instrucciones para el objetivo 'fileloader7zarchive.o'
make[1]: *** [fileloader7zarchive.o] Error 1
make[1]: se sale del directorio '/media/Compartido/Liñux/cdf/git/quickviewer/build/fileloader'
Makefile:153: fallo en las instrucciones para el objetivo 'sub-fileloader-make_first'
make: *** [sub-fileloader-make_first] Error 2

And well i don't know which tools from Qt / Qt SDK this software need for successful creation of the binary executable of QuickViewer i test under Windows 7, and i love almost all, except the "Folder View" and i don't know why in the options don't exist the option for start with the folder view hide permanently. The rest is very fast and lightweight

Well if i can not compile i just change this tool for XnView XP 1.8.6 because the simple reason, just work.

kanryu commented 4 years ago

Sorry for the late reply.

I haven't recently rechecked your tests because I haven't recently cloned and built a new repository. I'm planning to imitate you later and check it out.

inukaze commented 4 years ago

Sorry for the late reply.

I haven't recently rechecked your tests because I haven't recently cloned and built a new repository. I'm planning to imitate you later and check it out.

Thanks i wait you test too. and if possibly indicate me if i can compile successfully the QuickViewer just using the "-dev" package from repository.

kanryu commented 4 years ago

I've confirmed that the 7z build doesn't seem to succeed. In the Linux environment, p7zip is used instead of 7zip, but previously customized ones were bundled. Currently there is lib7zip, so you should be able to build with general p7zip, but one of quickviewer may still be old. I haven't released a Linux version of QuickViewer for a long time.

inukaze commented 4 years ago

Can you give me the commands i should use for make successfully the QuickView compilation ?

Or you recommend me i wait for an upgrade in the source code to able more compatibility for successful compilation ?

kanryu commented 4 years ago

First of all, please build my lib7zip fork with the official p7zip successfully. https://github.com/kanryu/lib7zip

This is the process of building it with qmake on the QuickViewer source tree.

inukaze commented 4 years ago
#Go the the Temp Folder
cd /tmp

#Download the Source Code of p7zip used on Slackware(64) 14.2
wget -c http://www.slackware.com/~alien/slackbuilds/p7zip/build/p7zip_16.02_src_all.tar.bz2

#Get the OS Architecture & Set Optimizations : 
Arquitectura=$(uname -m)
case "$Arquitectura" in
    x86)    Arquitectura="x32"                      ;;
    i?86)   Arquitectura="x32"                      ;;
    amd64)  Arquitectura="x64"                      ;;
    x86_64) Arquitectura="x64"                      ;;
    * ) echo    "Tu Arquitectura '$Arquitectura' -> NO ESTA SOPORTADA." ;;
esac

if [ "$Arquitectura" = "x32" ]; then
    export {C,CXX}FLAGS='-O2 -march=native -mtune=i686'
    export OPTFLAGS='-O2 -march=native -mtune=i686'
    CFLAGS='-O2 -march=native -mtune=i686'
    CXXFLAGS='-O2 -march=native -mtune=i686'
    OPTFLAGS='-O2 -march=native -mtune=i686'
    OPCIONALES=""; SUFIJOLIB=""
    SUFIJO="x86_asm_gcc_4.X"
fi

if [ "$Arquitectura" = "x64" ]; then
    export {C,CXX}FLAGS='-O2 -fPIC -march=native -mtune=native -pipe'
    export OPTFLAGS='-O2 -fPIC -march=native -mtune=native -pipe'
    CFLAGS='-O2 -fPIC -march=native -mtune=native -pipe'
    CXXFLAGS='-O2 -fPIC -march=native -mtune=native -pipe'
    OPCIONALES="-L/usr/lib64"; SUFIJOLIB="64"
        SUFIJO="amd64"
fi

#Set Umask
_UMASK_=$(umask)
umask 0022

# Enter in the extracted p7zip directory
cd p7zip_16.02
DIRCDF=$(cd $(dirname $0); pwd)     #Directorio Actual del Codigo Fuente

#Download Patches
wget -c http://www.slackware.com/~alien/slackbuilds/p7zip/build/patches/p7zip_osversion.patch
wget -c http://www.slackware.com/~alien/slackbuilds/p7zip/build/patches/p7zip_CVE-2015-1038.patch

#Apply Patches
cat "$DIRCDF/p7zip_osversion.patch" | patch -p1 --verbose "$DIRCDF/CPP/7zip/UI/FileManager/FM.cpp" 2>&1
sed -i -e "s#/lib/#/lib${SUFIJOLIB}/#g" $(grep -rl /lib/ .)
sed -i -e 's/chmod 555/chmod 755/' -e 's/chmod 444/chmod 644/' install.sh
sed -i -e "s#7zFM_do_not_use#7zFM#g" $(grep -rl 7zFM_do_not_use .)

# Now Download the lib7zip & compile it
cd /tmp
git clone https://github.com/kanryu/lib7zip ; cd lib7zip ; mkdir build ; cd build
cmake -DP7ZIP_SOURCE_DIR="$DIRCDF" -DCMAKE_INSTALL_PREFIX:STRING=/usr ..
$ make
Scanning dependencies of target lib7zip
[  2%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipArchive.cpp.o
[  5%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipCompressCodecsInfo.cpp.o
[  7%] Building CXX object src/CMakeFiles/lib7zip.dir/OSFunctions_UnixLike.cpp.o
[ 10%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipArchiveItem.cpp.o
[ 12%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipInStreamWrapper.cpp.o
[ 15%] Building CXX object src/CMakeFiles/lib7zip.dir/HelperFuncs.cpp.o
[ 17%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipArchiveOpenCallback.cpp.o
[ 20%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipDllHandler.cpp.o
[ 23%] Building CXX object src/CMakeFiles/lib7zip.dir/OSFunctions_Win32.cpp.o
[ 25%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipObjectPtrArray.cpp.o
[ 28%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipCodecInfo.cpp.o
[ 30%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipFormatInfo.cpp.o
[ 33%] Building CXX object src/CMakeFiles/lib7zip.dir/7ZipOpenArchive.cpp.o
[ 35%] Building CXX object src/CMakeFiles/lib7zip.dir/OSFunctions_OS2.cpp.o
[ 38%] Building CXX object src/CMakeFiles/lib7zip.dir/7zipLibrary.cpp.o
[ 41%] Building CXX object src/CMakeFiles/lib7zip.dir/tmp/p7zip_16.02/CPP/Common/MyWindows.cpp.o
[ 43%] Building CXX object src/CMakeFiles/lib7zip.dir/tmp/p7zip_16.02/CPP/Windows/PropVariant.cpp.o
[ 46%] Linking CXX static library lib7zip.a
[ 46%] Built target lib7zip
Scanning dependencies of target Test7ZipRar5
[ 48%] Building CXX object test/CMakeFiles/Test7ZipRar5.dir/stdafx.cpp.o
[ 51%] Building CXX object test/CMakeFiles/Test7ZipRar5.dir/Test7ZipRar5.cpp.o
/tmp/lib7zip/test/Test7ZipRar5.cpp: In function ‘int main(int, char**)’:
/tmp/lib7zip/test/Test7ZipRar5.cpp:250:16: error: cannot declare variable ‘oStream’ to be of abstract type ‘TestOutStream’
  TestOutStream oStream("TestResult.txt");
                ^~~~~~~
/tmp/lib7zip/test/Test7ZipRar5.cpp:106:7: note:   because the following virtual functions are pure within ‘TestOutStream’:
 class TestOutStream : public C7ZipOutStream
       ^~~~~~~~~~~~~
In file included from /tmp/lib7zip/test/Test7ZipRar5.cpp:5:0:
/tmp/lib7zip/test/../src/lib7zip.h:153:14: note:    virtual int C7ZipOutStream::ReopenForIndex(unsigned int)
  virtual int ReopenForIndex(unsigned int index) = 0;
              ^~~~~~~~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-class-memaccess’ [-Werror]
cc1plus: all warnings being treated as errors
test/CMakeFiles/Test7ZipRar5.dir/build.make:75: fallo en las instrucciones para el objetivo 'test/CMakeFiles/Test7ZipRar5.dir/Test7ZipRar5.cpp.o'
make[2]: *** [test/CMakeFiles/Test7ZipRar5.dir/Test7ZipRar5.cpp.o] Error 1
CMakeFiles/Makefile2:153: fallo en las instrucciones para el objetivo 'test/CMakeFiles/Test7ZipRar5.dir/all'
make[1]: *** [test/CMakeFiles/Test7ZipRar5.dir/all] Error 2
Makefile:83: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 2

I can't compile it :'(

kanryu commented 4 years ago

The result is a bit disappointing, but don't worry too much. In short, the public interface is not compatible and the sample program cannot be built. If lib7zip builds with p7zip and a shared library is created, it is successful. I will take the opportunity to modify the sample program.