Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QuaZip Import
Forum Updated to NodeBB v4.3 + New Features

QuaZip Import

Scheduled Pinned Locked Moved Unsolved General and Desktop
20 Posts 2 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • VRoninV VRonin

    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, call set PATH=path\to\cmake\bin;%PATH% where path/to/cmake/bin is the path to the bin folder of CMake (for me it's C:\Program Files\CMake\bin). Run cmake --version again to confirm no more errors
    • type git --version. if an error appears, call set PATH=path\to\git\bin;%PATH% where path/to/git/bin is the path to the bin folder of git(for me it's C:\Program Files\Git\bin). Run git --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

    FluentCodingF Offline
    FluentCodingF Offline
    FluentCoding
    wrote on last edited by
    #8

    @VRonin I got an error.

    5a99c22a-490b-4ce0-b4bb-6ddacace2f26-image.png

    ... 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?

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #9

      KArchive requires Qt 5.12 or newer, you have Qt 5.6 installed so it's not enough

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      FluentCodingF 1 Reply Last reply
      0
      • VRoninV VRonin

        KArchive requires Qt 5.12 or newer, you have Qt 5.6 installed so it's not enough

        FluentCodingF Offline
        FluentCodingF Offline
        FluentCoding
        wrote on last edited by
        #10

        @VRonin I have the (almost) newest version installed :/ weird...

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #11

          After the "call qtenv2.bat" step, try calling qmake --version to check what Qt version you are using

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          FluentCodingF 1 Reply Last reply
          0
          • VRoninV VRonin

            After the "call qtenv2.bat" step, try calling qmake --version to check what Qt version you are using

            FluentCodingF Offline
            FluentCodingF Offline
            FluentCoding
            wrote on last edited by
            #12

            @VRonin e0d4181d-e368-4ea8-933b-de1a031dc1a3-image.png

            1 Reply Last reply
            0
            • VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #13

              and it still fails? very strange.
              After calling qtenv2.bat could you type echo %PATH% and tell us what it prints?

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              FluentCodingF 1 Reply Last reply
              0
              • VRoninV VRonin

                and it still fails? very strange.
                After calling qtenv2.bat could you type echo %PATH% and tell us what it prints?

                FluentCodingF Offline
                FluentCodingF Offline
                FluentCoding
                wrote on last edited by
                #14

                @VRonin 677b0bea-99c4-4e11-b692-2e0eefdee078-image.png

                1 Reply Last reply
                0
                • VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #15

                  wow, that's a messy PATH, you have more than 3 versions of mingw and apparently 2 of Qt in there.
                  before set CMAKEGENERATOR="MinGW Makefiles" run set 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.

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  FluentCodingF 1 Reply Last reply
                  3
                  • VRoninV VRonin

                    wow, that's a messy PATH, you have more than 3 versions of mingw and apparently 2 of Qt in there.
                    before set CMAKEGENERATOR="MinGW Makefiles" run set 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.

                    FluentCodingF Offline
                    FluentCodingF Offline
                    FluentCoding
                    wrote on last edited by
                    #16

                    @VRonin a8ebe3c7-d4a1-4cf2-ba5c-ee21d2cf4e6f-image.png

                    Didn't work, even when setting QtCore_DIR ...

                    1 Reply Last reply
                    0
                    • VRoninV Offline
                      VRoninV Offline
                      VRonin
                      wrote on last edited by
                      #17

                      did you run qtenv2.bat? can you tell us what echo %PATH% prints just before calling KArchive's CMake?

                      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                      ~Napoleon Bonaparte

                      On a crusade to banish setIndexWidget() from the holy land of Qt

                      FluentCodingF 1 Reply Last reply
                      0
                      • VRoninV VRonin

                        did you run qtenv2.bat? can you tell us what echo %PATH% prints just before calling KArchive's CMake?

                        FluentCodingF Offline
                        FluentCodingF Offline
                        FluentCoding
                        wrote on last edited by
                        #18

                        @VRonin 8a8abb32-e15b-43ca-95d4-fdf7856e2a95-image.png

                        1 Reply Last reply
                        0
                        • VRoninV Offline
                          VRoninV Offline
                          VRonin
                          wrote on last edited by VRonin
                          #19

                          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
                          

                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                          ~Napoleon Bonaparte

                          On a crusade to banish setIndexWidget() from the holy land of Qt

                          FluentCodingF 1 Reply Last reply
                          1
                          • VRoninV VRonin

                            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
                            
                            FluentCodingF Offline
                            FluentCodingF Offline
                            FluentCoding
                            wrote on last edited by FluentCoding
                            #20

                            @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..

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved