QuaZip Import
-
@FluentCoding said in QuaZip Import:
So I have to use MSVC2019 to compile my project when using KArchive
If you use my pre-compiled version, yes
-
@VRonin Aight, thanks! Are there any instructions on how to compile it? I still want to stay at MinGW :/
-
Instructions do not include the optional liblzma as it would need some testing on my part and I don't have MinGW on my pc atm.
- install CMake if you don't have it already (https://cmake.org/)
- install git if you don't have it already (https://git-scm.com/)
- start a command prompt (cmd.exe), all the instructions beyond this point need to be run inside this cmd terminal
- type
cmake --version
. if an error appears, callset PATH=path\to\cmake\bin;%PATH%
wherepath/to/cmake/bin
is the path to the bin folder of CMake (for me it's C:\Program Files\CMake\bin). Runcmake --version
again to confirm no more errors - type
git --version
. if an error appears, callset PATH=path\to\git\bin;%PATH%
wherepath/to/git/bin
is the path to the bin folder of git(for me it's C:\Program Files\Git\bin). Rungit --version
again to confirm no more errors cd
into the bin folder of Qt (for me it's C:\Qt\5.15.0\msvc2019_64\bin)- call
qtenv2.bat
- cd into an empty folder and run these commands:
set CMAKEGENERATOR="MinGW Makefiles" git clone --depth=1 https://gitlab.com/federicomenaquintero/bzip2.git bzip2src cd .\bzip2src mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DENABLE_LIB_ONLY=ON -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX=../../bzip2 ../ cmake --build . --config Release cmake --build . --target install --config Release cd ..\..\ rmdir /Q /S bzip2src set PATH=%CD%\bzip2;%PATH% git clone --depth=1 https://github.com/madler/zlib.git zlibBuild cd zlibBuild mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DCMAKE_INSTALL_PREFIX=../../zlib -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install cd ..\..\ rmdir /Q /S zlibBuild set PATH=%CD%\zlib;%PATH% git clone --depth=1 git://anongit.kde.org/extra-cmake-modules ECM cd ECM mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=../../ECMbuild -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install cd ..\..\ set PATH=%CD%\ECMbuild;%PATH% git clone --depth=1 git://anongit.kde.org/karchive.git KArchive cd KArchive mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=../../KDEAPI -DCMAKE_BUILD_TYPE=DEBUG ../ cmake --build . cmake --build . --target install cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=../../KDEAPI -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install cd ..\..\ rmdir /Q /S ECMbuild rmdir /Q /S ECM rmdir /Q /S KArchive
Now you should have 3 folders. KDEAPI will contain the KArchive to link to it in Qt Creator the other 2 will contain the dlls required by KArchive to function
-
@VRonin Big thanks to you! I'm currently stuck at this:
... but I'll write to you when I have progress. Thanks bud! -
@VRonin I got an error.
... in this step:
cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=../../KDEAPI -DCMAKE_BUILD_TYPE=DEBUG ../
(one of the last ones).Should I update the config file?
-
KArchive requires Qt 5.12 or newer, you have Qt 5.6 installed so it's not enough
-
@VRonin I have the (almost) newest version installed :/ weird...
-
After the "call qtenv2.bat" step, try calling
qmake --version
to check what Qt version you are using -
-
and it still fails? very strange.
After calling qtenv2.bat could you typeecho %PATH%
and tell us what it prints? -
-
wow, that's a messy PATH, you have more than 3 versions of mingw and apparently 2 of Qt in there.
beforeset CMAKEGENERATOR="MinGW Makefiles"
runset PATH=C:\Program Files\CMake\bin;C:\Program Files\Git\cmd
.This hould get rid of the junk in there but you should really think about cleaning up that variable permanently from the variable editor removing stuff you don't need.
-
Didn't work, even when setting QtCore_DIR ...
-
did you run qtenv2.bat? can you tell us what
echo %PATH%
prints just before calling KArchive's CMake? -
-
ok, let's start from scratch:
Now I know where you installed stuff so I can do it all in one script.
Open a new cmd window and run the following comands:set PATH=C:\Program Files\CMake\bin;C:\Program Files\Git\cmd set CMAKEGENERATOR="MinGW Makefiles" cd /D D:\dev\Qt\5.14.2\mingw73_64\bin qtenv2.bat cd /D C:\Users\einst\Desktop rmdir /Q /S KArchive mkdir KArchive cd KArchive git clone --depth=1 https://gitlab.com/federicomenaquintero/bzip2.git bzip2src cd .\bzip2src mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DENABLE_LIB_ONLY=ON -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX=../../bzip2 ../ cmake --build . --config Release cmake --build . --target install --config Release cd ..\..\ rmdir /Q /S bzip2src set PATH=%CD%\bzip2;%PATH% git clone --depth=1 https://github.com/madler/zlib.git zlibBuild cd zlibBuild mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DCMAKE_INSTALL_PREFIX=../../zlib -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install cd ..\..\ rmdir /Q /S zlibBuild set PATH=%CD%\zlib;%PATH% git clone --depth=1 git://anongit.kde.org/extra-cmake-modules ECM cd ECM mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=../../ECMbuild -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install cd ..\..\ set PATH=%CD%\ECMbuild;%PATH% git clone --depth=1 git://anongit.kde.org/karchive.git KArchive cd KArchive mkdir .\build cd .\build cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=../../KDEAPI -DCMAKE_BUILD_TYPE=DEBUG ../ cmake --build . cmake --build . --target install cmake -G %CMAKEGENERATOR% -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=../../KDEAPI -DCMAKE_BUILD_TYPE=RELEASE ../ cmake --build . cmake --build . --target install cd ..\..\ rmdir /Q /S ECMbuild rmdir /Q /S ECM rmdir /Q /S KArchive
-
@VRonin Nah, I'm giving up tbh. I get errors and erros and even then, is it worth it? I mean I just want to download a zip from my application and extract it from memory, but it wouldnt be so hard for the computer that it saves the zip into local storage and then extracts it from there. Also, I have an ETA for my application that I set myself. :/ But thank you so much for your help! I owe you..
13/20