From 02e4ea00441c7368346d9e8143857f09cac57f4f Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Sun, 1 Jun 2014 01:39:47 -0500 Subject: [PATCH 1/7] allows compilation on windows --- src/defines.hpp | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/defines.hpp diff --git a/src/defines.hpp b/src/defines.hpp new file mode 100644 index 0000000..7562a65 --- /dev/null +++ b/src/defines.hpp @@ -0,0 +1 @@ +typedef unsigned int uint From 71a7c217091211a25e3b47e30fdaa88e1ac9a78c Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Sun, 1 Jun 2014 01:42:02 -0500 Subject: [PATCH 2/7] allows compilation on windows --- CMakeLists.txt | 1 + src/filesystem.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed2c331..4dade61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,7 @@ set(MAIN_HEADERS src/al-util.h src/boost-hash.h src/debugwriter.h + src/defines.hpp ) set(MAIN_SOURCE diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 7de9138..e6706ef 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -23,6 +23,7 @@ #include "font.h" #include "util.h" +#include "defines.hpp" #include "exception.h" #include "boost-hash.h" #include "debugwriter.h" From ba403a67ad4ad72092c87d41696e76c5db13bf4d Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Sun, 1 Jun 2014 01:47:37 -0500 Subject: [PATCH 3/7] changed uint to unsigned int for cross-platform purposes --- CMakeLists.txt | 1 - src/defines.hpp | 1 - src/filesystem.cpp | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 src/defines.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dade61..ed2c331 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,7 +135,6 @@ set(MAIN_HEADERS src/al-util.h src/boost-hash.h src/debugwriter.h - src/defines.hpp ) set(MAIN_SOURCE diff --git a/src/defines.hpp b/src/defines.hpp deleted file mode 100644 index 7562a65..0000000 --- a/src/defines.hpp +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned int uint diff --git a/src/filesystem.cpp b/src/filesystem.cpp index e6706ef..f460a29 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -23,7 +23,6 @@ #include "font.h" #include "util.h" -#include "defines.hpp" #include "exception.h" #include "boost-hash.h" #include "debugwriter.h" @@ -329,7 +328,7 @@ RGSS_openArchive(PHYSFS_Io *io, const char *, int forWrite) nameLen ^= advanceMagic(magic); static char nameBuf[512]; - uint i; + unsigned int i; for (i = 0; i < nameLen; ++i) { char c; From ce74031dc63666242e2a2cd8c0a09a02b231c55c Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Fri, 6 Jun 2014 04:00:59 -0500 Subject: [PATCH 4/7] fixed ruby.h includes --- binding-mri/binding-mri.cpp | 5 +++-- binding-mri/binding-util.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp index ac54a07..7ef69ae 100644 --- a/binding-mri/binding-mri.cpp +++ b/binding-mri/binding-mri.cpp @@ -26,8 +26,9 @@ #include "filesystem.h" #include "util.h" #include "debugwriter.h" - -#include <ruby.h> +extern "C" { + #include <ruby.h> +} #include <ruby/encoding.h> #include <string> diff --git a/binding-mri/binding-util.h b/binding-mri/binding-util.h index 2d1577e..daf9d0e 100644 --- a/binding-mri/binding-util.h +++ b/binding-mri/binding-util.h @@ -21,9 +21,9 @@ #ifndef BINDING_UTIL_H #define BINDING_UTIL_H - -#include <ruby.h> - +extern "C" { + #include <ruby.h> +} #include "exception.h" enum RbException From f2f5ea67395ed45196a1720f0033c1c2f0020363 Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Fri, 6 Jun 2014 04:24:27 -0500 Subject: [PATCH 5/7] ignored codeblocks stuff. --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3ef397e..e7c5f21 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ Makefile mkxp xxd+ -/build \ No newline at end of file +/build +mkxp.layout +mkxp.cbp From 3c5ac5e53871068b60e011775aba8a34c0507cc6 Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Fri, 6 Jun 2014 04:29:07 -0500 Subject: [PATCH 6/7] hopefully fixes building on windows --- binding-mri/etc-binding.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/binding-mri/etc-binding.cpp b/binding-mri/etc-binding.cpp index 4269da8..af7a2bc 100644 --- a/binding-mri/etc-binding.cpp +++ b/binding-mri/etc-binding.cpp @@ -18,7 +18,9 @@ ** You should have received a copy of the GNU General Public License ** along with mkxp. If not, see <http://www.gnu.org/licenses/>. */ - +#ifndef _POSIX + #define _POSIX +#endif #include "etc.h" #include "binding-util.h" #include "serializable-binding.h" From e003da1d4a21b12519b5e87da66f83dbd560a780 Mon Sep 17 00:00:00 2001 From: Marty Plummer <ntzrmtthihu777@gmail.com> Date: Fri, 6 Jun 2014 04:56:39 -0500 Subject: [PATCH 7/7] Nope, that did not fix it --- binding-mri/etc-binding.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/binding-mri/etc-binding.cpp b/binding-mri/etc-binding.cpp index af7a2bc..7283e6a 100644 --- a/binding-mri/etc-binding.cpp +++ b/binding-mri/etc-binding.cpp @@ -18,9 +18,6 @@ ** You should have received a copy of the GNU General Public License ** along with mkxp. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _POSIX - #define _POSIX -#endif #include "etc.h" #include "binding-util.h" #include "serializable-binding.h"