This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding zlib and wxWidgets
#1
Hello. This is my first post on the forum, so if this is in the wrong place, please let me know.

I've forked the build for RPCS3 and started working on removing wx dependencies in emucore. So far I've only changed rpcs3/Crypto/unself.cpp to use zlib instead of wxStreams to handle decompression of 64-bit SELF files.

As far as I can tell, this hasn't affected my build, but I haven't found a good SELF file to test on. So that's problem number 1.

Problem number 2 is that zlib.h is packaged inside wxWidgets, so I have to #include "../../wxWidgets/src/zlib/zlib.h". Obviously, this doesn't really eliminate the dependency on wxWidgets.

So, how should I handle these two problems? Thanks!
Reply
#2
(03-17-2016, 01:51 AM)markus Wrote: Hello. This is my first post on the forum, so if this is in the wrong place, please let me know.

I've forked the build for RPCS3 and started working on removing wx dependencies in emucore. So far I've only changed rpcs3/Crypto/unself.cpp to use zlib instead of wxStreams to handle decompression of 64-bit SELF files.

As far as I can tell, this hasn't affected my build, but I haven't found a good SELF file to test on. So that's problem number 1.

Problem number 2 is that zlib.h is packaged inside wxWidgets, so I have to #include "../../wxWidgets/src/zlib/zlib.h". Obviously, this doesn't really eliminate the dependency on wxWidgets.

So, how should I handle these two problems? Thanks!

You'll have more success asking on the IRC or Github issues about development related things.
We also use wxWidget's zlib for libpng, to save on compilation time. It's probably worth leaving it taking it from wxWidgets until other wxWidget's core dependencies have been eliminated. Other than that, good job!
Reply
#3
Thanks tambre.

Would it be wise to submit a pull request at this point with my code? I've only tested it with uncompressing the EBOOT.BIN of one game, and it has no memleaks or extra compiler warnings.
Reply
#4
Thanks for tackling this.

PR even at early stage always help getting comments or advice on code style or performance.
Reply
#5
So I utterly destroyed my repo with EOL bugs, but I fixed it. And now I'm back to this one issue (still):

I can't pass the buildbots on my PR. They all break on the include statement for zlib.h. Here's what I've tried:

Code:
#include "../../wxWidgets/src/zlib/zlib.h"
Code:
#include "wxWidgets/src/zlib/zlib.h"
Code:
#include <wxWidgets/src/zlib/zlib.h>

And I would try
Code:
#include <zlib.h>
, but that won't build in Visual Studio. I've been trying to solve this all day, to no avail.
Reply
#6
(03-18-2016, 11:20 PM)markus Wrote: So I utterly destroyed my repo with EOL bugs, but I fixed it. And now I'm back to this one issue (still):

I can't pass the buildbots on my PR. They all break on the include statement for zlib.h. Here's what I've tried:

Code:
#include "../../wxWidgets/src/zlib/zlib.h"
Code:
#include "wxWidgets/src/zlib/zlib.h"
Code:
#include <wxWidgets/src/zlib/zlib.h>

And I would try
Code:
#include <zlib.h>
, but that won't build in Visual Studio. I've been trying to solve this all day, to no avail.

You should probably add wxWidget's zlib directory as an additional include directory in one of our properties sheets. I think it should be added to rpcs3_default properties sheet.
Reply
#7
Yep, that's exactly what I did.

Code:
<IncludePath>..\wxWidgets\src\zlib;
Code:
#include <zlib.h>

This satisfies Visual Studio and Travis, but Appveyor still fails on that include line.

EDIT: For the sake of completeness, I can quickly say what solved this issue.

I needed to include ZLIB_INCLUDE_DIR in the CMakeLists.txt file in rpcs3/rpcs3, and then I added the wxWidgets/src/zlib directory to the default props file for rpcs3. This satisfied both Appveyor and Visual Studio.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)