64-bit MacOSLib?

I would like to migrate to 64-bit, but have a lot of code that relies on MacOSLib. There has been no apparent movement in making MacOSLib 64-bit compliant, and I image by now that it’s not going to happen. I’d be happy to make a 64-bit MacOSLib myself, but frankly I don’t understand enough about what needs to be done. For example, when I build MacOSLib as 64-bit I get 57 errors. Would correcting those errors be enough (I’m guessing no)? I see many methods that have this warning: “MACOSLIB: This method is not 64 bit-savvy”. Is it possible make them work as 64 bit, or are the classes simply incompatible?

I guess what I’m asking is if it’s feasible to think about making a 64-bit MacOSLib? Or is it time to give up, remove MacOSLib, and move to a solution such as MBS?

Hi Jonathan,
Charles has announced that he is working on a newer version but as far as I know no sign of it yet.
If you want to have a reliable solution with high-class support, the MBS plugins are surely worth their price and you can be mighty sure they won’t stop working suddenly as long as Christian supports them.

If you want to have a modern, 64 bit capable OS X library right now, I started OSXLib recently, which is a sister of iOSLib, which means as soon as I ported the stuff you can develop xplatform on both Mac platforms somehow – with modifications, but a SceneKit game or so should be not much of a problem.
There’s not so much in yet, but if you need something urgently (and I find the time), just let me know. Or add your own implementations by hopping on the existing classes, any maybe offering your branch for others too.

Oh, and the frameworks are separated: You need to install a core folder, but beyond that (almost) everything is optional.

Thank you Ulrich. I use quite a varied range of MacOSLib functions (from receipt validation for the Mac App Store to unicode normalization to PDFKit ,and much more), so OSXLib may not be up to being a full replacement, at least not yet. But I’ll certainly take a good luck.

Clear recommendation for MBS then, until Charles proves me wrong. Or wait a year or two … ;)*

  • Maybe manucodum would be a nice company name. Every line in my libraries is hand-coded :smiley:

I have been working on getting MacOSLib to compile as 64-bit. Please check out this fork of MacOSLib, which should function in apps compiled as 64 bit:
https://github.com/sergesd/macoslib

  • Important! The main purpose of this update is simply to have the project compiled in a 64-bit environment. Now it does, but there is still a lot of work to be done to test it and get it working for all supported functionality. So, please use this fork only at your own risk and only if you are ready to debug it, fix it, and commit your changes.

  • App version was increased to 2.0a because of moving to 64 bit.

  • Starting from 2.0, MacOSLib is 64 bit-only, please use v1.89 for 32 bit.

  • To get project compiled in 64 bit these parts of code (propbably depricated declares in 64 bit) were removed:
    HISearchField, HISearchFieldExample, MacDatePicker, MacDatePickerExampleWindow, CarbonDragManager, DragManagerExample, CarbonPasteboard

  • All Single types were changed to Double.

  • There are still a lot of places that should be checked, for example, UInt32 should be changed to UInteger in most places, but for some Carbon functions and structures it’s still should be UInt32, so every place must be checked manually. So, please check the code you are curently working with and change types when necessary.

  • Special thanks to Jonathan Ashwell for helping in this initial conversion and testing.

If somebody among the original MacOSLib creators or contributors can upload these changes as an experimental branch to the main GitHub repository - please do, so we will have one place for everybody to support and improve the project.

Hey Serge, You may know me as one of the MacOSLib contributors from the about section, though I can’t pull your commits into the main repository, I have been trying to keep mine up to date by making and pulling in several updates, which now includes yours on a separate ‘master-64bit’ branch.
You can find it here: https://github.com/vidalvanbergen/macoslib/tree/master-64bit

I’d like to thank you for bringing MacOSLib into the 64 bit era! I hope more people will come in to test 64 bit support and make their own commits to the project to keep it moving ever forward into the future.

Thank you both for making MacOSLib 64-bit!

Maybe you could just leave the old MacOSLib as is for older Xojo/RB and create a new repo for v2. Also change to Xojo Project format?

It should be possible to make macoslib work in either 32 or 64 bit apps

That said Apple is moving to only 64 bit apps for macOS (10.13 is the last one to run 32 bit apps “without compromise” - whatever that means since there are lots of 32 bit bugs in macOS already - wheres @Sam Rowlands ? :stuck_out_tongue:

I would expect 64 bit apps for macOS to be the norm in the not too distant future

I expect them to be the norm right now, since all Macs that can run MacOS 10.8 and up are 64-bit already.

“whatever that means since there are lots of 32 bit & 64 bit bugs in iOS macEdition already” Fixed it for ya :wink:

In general apps for macOS could have been 64 bit for a long time
But for a lot it wasn’t “change the switch to 64 bit and recompile”
Plus I wasn’t speaking in general terms about every macOS app
So let me rephrase what I wrote
I should have written I expect that Xojo projects for macOS will default to being 64 bit in the not to distant future
Not sure if retaining a “build for 32 bit” will make any sense for macOS once that happens since 32 bit macOS is, as said at WWDC, dead by the end of 10.13 anyway

sadness ensues :frowning:

I’m sorry man.

Hello,
I have been testing macoslib 64-bit: thank you to those who worked on it.
I do not have the expertise to make a valid contribution in updating it, so I’d like to ask those who are giving their time to it if they could try fixing the MacSpeechSynthesizer that at present does not work in 64-bit.
I can, somehow, have it work, but speech.volume and speech.rate need fixing (as I said, I’m not equipped to fix it myself).
Thank you for your attention.

Hello,

I have been using macoslib, I do not have the expertise to contribute. Thanks to those who worked and are still working on it.

I have just updated to Xojo 2018 Release 1 and am trying to update my projects to 64bit since my apps may not work when Apple enforces that apps must be 64 bit.

I have some areas where I am getting some compile errors, the more important ones are
MacIcon
DocumentFile
LaunchServices.FindApp

I have deleted macoslib, for now, since I would like to compile under 64bit but still I am having this error
Linking Executable ld: framework not found AdvApi32

So, even without macoslib I cannot compile under 64bit.

Any advice/recommendations/work-arounds?

Thanks.

Lennox

This looks like a declare into a Windows DLL that probably should be wrapped in a #If TargetWindows / #EndIf but isn’t when you compile for macOS. A search for AdvApi32 should find which.

Is anyone still working on it? Last commit was 13. July 2017 …

Thanks Jason,

Thought as much but did not check, that is OK now.
Thanks again.

lennox

OK, I downloaded Xojo-AppleLib-master from https://github.com/UBogun/Xojo-AppleLib but I am not sure how to load it, i don’t use iOS.

Do I drag macLib to my project? Once I drag macLib I am being asked to locate item after item, is there a shortcut for that? or do I just keep navigating? Am I on the right track? Now asking for Shared Files for both libraries/Optionals/Apple Introspection and it is not there… what next?

Thanks.

Lennox

Have you tried the 64bit version?
https://github.com/vidalvanbergen/macoslib/tree/master-64bit

Except for carbon-only functions (and these functions may have Cocoa replacements), over all I find it usable.
Like you, I too am not expert enough to contribute; so I still hope somebody will address unresolved issues like MacSpeechSynthesizer.
And like you, I thank those who contributed and are still contributing to it.