Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

james124816

macrumors newbie
Original poster
Feb 4, 2012
4
0
how would you accomplish this..wanting to convert fancontrol for the macbook pro from 32 bit pref pane to 64bit pref pane.
 

hwojtek

macrumors 68020
Jan 26, 2008
2,274
1,276
Poznan, Poland
1. Get ahold of source code and adjust it for 64 bit architecture.
2. Compile for 64-bit (or even better do a 32/64 fat binary).
3. Debug all combinations of hardware vs architecture.
4. More changes to the code.
5. Compile again as in 2.
6. Go to 3.
7. If it works, sell it. If no, go to 3 again.

Thank you for using my impromptu "There is no 64-bit version of an app I really need to use because otherwise" programming workflow.
 

KnightWRX

macrumors Pentium
Jan 28, 2009
15,046
4
Quebec, Canada
Most of the time, there really is no real work to do aside from just recompiling for a 64 bit platform. APIs/Frameworks and code using them are becoming more and more size agnostic as far as variables go. There really is little code left that assumes a specific memory size for a specific variable and that doesn't use "garanteed" size types like uint32 or other such things.
 

KnightWRX

macrumors Pentium
Jan 28, 2009
15,046
4
Quebec, Canada
Yeah, but we're talking direct hardware access in this one.

You can't do direct hardware access on OS X unless you're running in kernel space. Fancontrol runs in user space as far as I can see. Also, the OP is asking from the Preference pane, which is only a front-end. the actual control of the Fan is done by a userspace daemon launched on startup.

I don't have access to the source code, lacking a working DMG extractor, so I can't look more deeply into it, but really unless there's code in there that assumes variable width (like int = 4 bytes), then it's just an issue of building a 64 bit binary.

With the source being available (at least for the version I found), it shouldn't be a tremendous task.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,743
8,417
A sea of green
You can't do direct hardware access on OS X unless you're running in kernel space. Fancontrol runs in user space as far as I can see. Also, the OP is asking from the Preference pane, which is only a front-end. the actual control of the Fan is done by a userspace daemon launched on startup.

There is no reason that a daemon would need to be 64-bits, even if the pref-pane that talks to it is 64-bits. Separate processes, separate architectures.

So it's quite possible that the daemon could remain 32-bit, while the pref-pane could be converted to 64-bit (assuming it needs any conversion at all, other than recompiling for 64-bit).
 

KnightWRX

macrumors Pentium
Jan 28, 2009
15,046
4
Quebec, Canada
There is no reason that a daemon would need to be 64-bits, even if the pref-pane that talks to it is 64-bits. Separate processes, separate architectures.

So it's quite possible that the daemon could remain 32-bit, while the pref-pane could be converted to 64-bit (assuming it needs any conversion at all, other than recompiling for 64-bit).

I don't think that was ever put into the question. I only pointed out that the OP was only wanting a 64 bit pref-pane.
 

Applemi

macrumors newbie
May 26, 2013
1
0
Is there a converter that I could download that covert programs from 32 to 64 bit.
 

ytk

macrumors 6502
Jul 8, 2010
252
5
Is there a converter that I could download that covert programs from 32 to 64 bit.

It's actually really easy. 64 bits is twice as much as 32, so all you need to do is double up the program like this:
Code:
cat 32bit_ver 32bit_ver > 64bit_ver

If you want to really future-proof things, cat together four copies of the program to go all the way to 128-bit. :D
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
how would you accomplish this..wanting to convert fancontrol for the macbook pro from 32 bit pref pane to 64bit pref pane.

Go to developer.apple.com and type "64 bit" into the search field. You'll want to study the 64 bit transition guide.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.