Compiling for OS X megathread


#21

Posted on /r/cpp
https://www.reddit.com/r/cpp/comments/4fhlb8/peercoin_osx_packager_needed_qmakeqt4/

and on /r/Qt5
https://www.reddit.com/r/Qt5/comments/4fhnrx/peercoin_osx_packager_needed_qmakeqt4_cpp/

and on /r/macprogramming
https://www.reddit.com/r/macprogramming/comments/4fhptj/peercoin_osx_packager_needed_qmakeqt4_cpp/


#22

i have compiled and packaged a dmg, but I don’t have a certificate to sign packages unfortunately (


#23

Great! do we need them to be signed?
Can’t we just PGP sign them, it would be sufficient for the users to trust that it’s an official build.

Which code did you build? Sunny’s official Qt4 code, or my experimental but seemingly functional Qt5 code?


#24

just the official, and still have to figure out how to package qt things inside the bundle, for some reason frameworks don’t get stuffed inside and require them to be installed on the system.

it works on my system, but not sure if that’s good enough for the rest of users (


#25

That’s perfect!

Please take a look at the packaging scripts located here: https://github.com/hrobeers/finFoil/tree/master/scripts
These were created by a guy making OSX packages for me in the past, but isn’t able to do it for me anymore.


#26

Also checkout the if(APPLE) blocks in this CMake script:

Apparently there is some application called “macdeployqt”


#27

ok guys, here’s my first try: https://rbfi.io/dl.php?key=/eVZ1/Peerunity.dmg

shasum:

2946d542ed193bbd3f9695f1c3345101f152a060


#28

installed Peerunity.dmg and it runs. :stuck_out_tongue:

I used this version to getdata via rpc calls. That works too.

The one minor thing that looks a bit odd is the dark tab-header: it isnt full width, doesnot resize with the window and there is also a gap between Address book and Export tab.

also debug window shows
client version:
v0.2.0-dirty
I assume that will be changed in the final version…


#29

-dirty just means that something has been tampered with. That can be fixed with this patch: https://github.com/peerchemist/Peerbox/blob/master/deb-peercoin/SOURCES/genbuild.patch


#30

i had to update net.cpp to fix for new libminiupnpc.15.dylib

[code]diff --git a/src/net.cpp b/src/net.cpp
index c0d2015…c4875c0 100644
— a/src/net.cpp
+++ b/src/net.cpp
@@ -53,7 +53,7 @@ static bool vfReachable[NET_MAX] = {};
static bool vfLimited[NET_MAX] = {};
static CNode* pnodeLocalHost = NULL;
uint64 nLocalHostNonce = 0;
-array<int, THREAD_MAX> vnThreadsRunning;
+boost::array<int, THREAD_MAX> vnThreadsRunning;
static std::vector vhListenSocket;
CAddrMan addrman;

@@ -1019,7 +1019,7 @@ void ThreadMapPort2(void* parg)
#else
/* miniupnpc 1.6 */
int error = 0;

  • devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
  • devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 0, &error);
    #endif

    struct UPNPUrls urls;[/code]

here’s updated version without the dirt

https://rbfi.io/dl.php?key=/eVZ1/Peerunity.dmg

shasum 2946d542ed193bbd3f9695f1c3345101f152a060


#31

This is a patch for miniupnpc: https://github.com/ppcoin/ppcoin/pull/112/commits/0996e11bd22a44e85314ef21e3b9f310b5538a54
no need to do it manually :slight_smile:


#32

hopefully changes get merged at some point in future so no hand wavery would be required (


#33

Yeah, it is waiting to be included in ppcoin tree now. For Peerunity I guess we will wait a bit longer.


#34

the boost::array fix however is only needed when the c++11 flag is turned on.
And compiling using gcc and qmake4, this flag is off by default.
So that one won’t be fixed soon.
However it is fixed in my Qt5 port (which won’t be merged), as for gcc and qmake5 the flag is on by default.
https://github.com/hrobeers/Peershares/tree/ppcoin-master-qt5


#35

I’ve tested Peerunity OS X build by @backpacker69. I can confirm that it installs and works well, and there are no obvious backdoors :slight_smile:

I guess he will release this officially soon.


#36

Was this an issue for you? It would be nice to see a screenshot if it is.


#37

here you go: https://imgur.com/PUeW2o1


#38

That’s weird. Even the Background Peerunity symbol is huge.


#39

that’s exactly how it looks like on mine and it looks great imho )
not sure what can be done and should it? considering there’s only 1 day until hard fork.


#40

[quote=“backpacker69, post:39, topic:3826”]that’s exactly how it looks like on mine and it looks great imho )
not sure what can be done and should it? considering there’s only 1 day until hard fork.[/quote]

That problem is not up to you, it is something with Peerunity source code. I say release.