From 55b83af845608541e27e00c621ea2bb1dea2e56b Mon Sep 17 00:00:00 2001 From: joshslark Date: Fri, 27 Mar 2015 02:56:13 -0500 Subject: [PATCH 1/3] Add arch linux dependency instructions --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 24c073a32b..7d5516bbac 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ __Windows__ __Linux__ * Debian & Ubuntu: `sudo apt-get install libopenal-dev libwxgtk3.0-dev build-essential libglew-dev` +* Arch: `sudo pacman -S glew openal wxgtk cmake llvm` __Mac OSX__ * Install with Homebrew: `brew install glew wxwidgets` From 10983338d8a82ddecb747c6508ae9193025a91d4 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Tue, 31 Mar 2015 03:34:37 -0500 Subject: [PATCH 2/3] Small fixes to allow compililation on linux --- Utilities/rFile.cpp | 2 +- rpcs3/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Utilities/rFile.cpp b/Utilities/rFile.cpp index 88db8ad28e..657a143f28 100644 --- a/Utilities/rFile.cpp +++ b/Utilities/rFile.cpp @@ -127,7 +127,7 @@ bool rRename(const std::string &from, const std::string &to) #ifdef _WIN32 if (!MoveFile(ConvertUTF8ToWString(from).c_str(), ConvertUTF8ToWString(to).c_str())) #else - if (rename(from.c_str(), to.c_str())) + if (int err = rename(from.c_str(), to.c_str())) #endif { LOG_ERROR(GENERAL, "Error renaming '%s' to '%s': 0x%llx", from.c_str(), to.c_str(), (u64)GET_API_ERROR); diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 495d00f44e..c20b911b90 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -45,6 +45,7 @@ endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") #on some Linux distros shm_unlink and similar functions are in librt only set(ADDITIONAL_LIBS "rt") + set(ADDITIONAL_LIBS "X11") elseif(UNIX) #it seems like glibc includes the iconv functions we use but other libc #implementations like the one on OSX don't seem implement them From 3c3e3baa14d6dddd3586552850e494fe7f4cf938 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Tue, 31 Mar 2015 04:20:25 -0500 Subject: [PATCH 3/3] proper fix for issue #1041 --- Utilities/rFile.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Utilities/rFile.cpp b/Utilities/rFile.cpp index 657a143f28..b25310ab4d 100644 --- a/Utilities/rFile.cpp +++ b/Utilities/rFile.cpp @@ -5,6 +5,7 @@ #include #include #include "rFile.h" +#include "errno.h" #ifdef _WIN32 #include @@ -25,7 +26,7 @@ std::wstring ConvertUTF8ToWString(const std::string &source) { #ifdef _WIN32 #define GET_API_ERROR GetLastError() #else -#define GET_API_ERROR err +#define GET_API_ERROR errno #endif bool getFileInfo(const char *path, FileInfo *fileInfo) { @@ -112,7 +113,7 @@ bool rRmdir(const std::string &dir) #ifdef _WIN32 if (!RemoveDirectory(ConvertUTF8ToWString(dir).c_str())) #else - if (int err = rmdir(dir.c_str())) + if (rmdir(dir.c_str())) #endif { LOG_ERROR(GENERAL, "Error deleting directory %s: 0x%llx", dir.c_str(), (u64)GET_API_ERROR); @@ -127,7 +128,7 @@ bool rRename(const std::string &from, const std::string &to) #ifdef _WIN32 if (!MoveFile(ConvertUTF8ToWString(from).c_str(), ConvertUTF8ToWString(to).c_str())) #else - if (int err = rename(from.c_str(), to.c_str())) + if (rename(from.c_str(), to.c_str())) #endif { LOG_ERROR(GENERAL, "Error renaming '%s' to '%s': 0x%llx", from.c_str(), to.c_str(), (u64)GET_API_ERROR); @@ -152,7 +153,7 @@ bool rRemoveFile(const std::string &file) #ifdef _WIN32 if (!DeleteFile(ConvertUTF8ToWString(file).c_str())) #else - if (int err = unlink(file.c_str())) + if (unlink(file.c_str())) #endif { LOG_ERROR(GENERAL, "Error deleting file %s: 0x%llx", file.c_str(), (u64)GET_API_ERROR);