-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I had issues compiling on Ubuntu 18.04. This is my patch it compiled and seemed to decompress a install file I wanted to try it on:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1731151..29e38dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,4 +22,5 @@ add_executable (unshieldv3
blast.c
)
target_link_libraries(unshieldv3 stdc++fs)
-install(TARGETS unshieldv3)
+install(TARGETS unshieldv3
+ RUNTIME DESTINATION bin)
diff --git a/ISArchiveV3.cpp b/ISArchiveV3.cpp
index eb22871..7bd9d8d 100644
--- a/ISArchiveV3.cpp
+++ b/ISArchiveV3.cpp
@@ -23,7 +23,7 @@ extern "C" {
#include "blast.h"
};
-namespace fs = std::filesystem;
+namespace fs = std::experimental::filesystem;
class Directory {
@@ -33,7 +33,7 @@ public:
};
-ISArchiveV3::ISArchiveV3(const std::filesystem::path& apath)
+ISArchiveV3::ISArchiveV3(const fs::path& apath)
: m_path(apath)
{
std::vector<Directory> directories;
@@ -109,11 +109,11 @@ std::tm ISArchiveV3::File::tm() const {
return tm;
}
-std::filesystem::path ISArchiveV3::File::path() const {
+fs::path ISArchiveV3::File::path() const {
std::string fp = full_path;
std::replace(fp.begin(), fp.end(),
'\\', fs::path::preferred_separator);
- return std::filesystem::path(fp);
+ return fs::path(fp);
}
std::string ISArchiveV3::File::attribString() const {
diff --git a/ISArchiveV3.h b/ISArchiveV3.h
index f6115de..47561b3 100644
--- a/ISArchiveV3.h
+++ b/ISArchiveV3.h
@@ -15,7 +15,9 @@ limitations under the License.
*/
#pragma once
-#include <filesystem>
+#include <experimental/filesystem>
+namespace fs = std::experimental::filesystem;
+
#include <fstream>
#include <vector>
#include <map>
@@ -23,7 +25,7 @@ limitations under the License.
class ISArchiveV3 {
public:
- ISArchiveV3(const std::filesystem::path& apath);
+ ISArchiveV3(const fs::path& apath);
class __attribute__ ((packed)) Header {
public:
@@ -70,14 +72,14 @@ public:
};
std::tm tm() const;
- std::filesystem::path path() const;
+ fs::path path() const;
std::string attribString() const;
};
const std::vector<File>& files() const;
bool exists(const std::string& full_path) const;
std::vector<uint8_t> decompress(const std::string& full_path);
- std::filesystem::path path() const {
+ fs::path path() const {
return m_path;
}
Header header() const {
@@ -91,7 +93,7 @@ protected:
bool isValidName(const std::string& name) const;
const File* fileByPath(const std::string& full_path) const;
- const std::filesystem::path m_path;
+ const fs::path m_path;
std::ifstream fin;
std::vector<File> m_files;
Header hdr;
diff --git a/main.cpp b/main.cpp
index fcfd859..4615bc5 100644
--- a/main.cpp
+++ b/main.cpp
@@ -25,7 +25,7 @@ limitations under the License.
#include <chrono>
using namespace std;
-namespace fs = std::filesystem;
+namespace fs = std::experimental::filesystem;
void info(const ISArchiveV3& archive) {
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working