Skip to content

Commit

Permalink
Merge pull request #10 from Borwe/dev
Browse files Browse the repository at this point in the history
Update to use unzip to extract while on *nix systems
  • Loading branch information
Borwe authored Jan 29, 2022
2 parents 88a7c83 + db255ec commit 48771de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Build instructions for Ubuntu(should be same for other distributions):
### Requirements:

- A C++ compiler, eg: GCC, Clang, MSVC. Make sure it supports C++17
- tar executable, should come by default in Windows 10 and linux,
- tar executable, should come by default in Windows 10, and linux we use unzip
NOTE: install it if you find problems during extraction stage, enable debug to see when it fails to extract.
- CMake
- Qt 5.15 (the one currently used) or above
Expand Down
6 changes: 3 additions & 3 deletions cligetter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ void CliGetter::startUnzipping(QString location){
cmd.append(location).append(" -C ").append(waka_extracted_dir.absolutePath());
result = system(cmd.toStdString().c_str());
#else
QString cmd("tar -xf ");
cmd.append(location).append(" -C ").append(waka_extracted_dir.absolutePath());
QString cmd("unzip ");
cmd.append(location).append(" -d ").append(waka_extracted_dir.absolutePath());
result = system(cmd.toStdString().c_str());
#endif
if(result!=0){
msg="Couldn't extract the files properly, check if you have enough storage";

//delete the zipped file
QFile zip(location);
zip.remove();
//zip.remove();
emit promptMessage(msg);
}else{
msg="Done Extracting files";
Expand Down

0 comments on commit 48771de

Please sign in to comment.