How to get OSX App to work previous OSX Versions
lazarus / 33-macOS - Mac OS X
----------------------------------------------------------------------
Josh · 2018-11-12 17:49
Hi
Hopefully i am just missing something..
Using Laz 2.1.0 59397, fpc 3.3.1 (carbon ide)
I created a simple test app, that has just a few buttons on, Set for
Carbon i386, and have "-macosx_version_min 10.6" set in project
options/compilation and linking.
I created the application bundle, i then transferred the executable to
MacOS folder in the bundle removing the symlink.
I would have thought this would allow it to run on 10.6 and above.
If I run this on my High Sierra ( the one its compiled on) it works,
if I run it on Mojave it works, If I run in Sierra I get error "this
app requires Mac OS 10.13.6 or later".
Any ideas as to what I am missing.
----------------------------------------------------------------------
Jonas Maebe · 2018-11-12 19:38
Use the compiler option -WM10.6, and remove the linker option.
----------------------------------------------------------------------
Josh · 2018-11-12 21:35
Hi Jonas,
I have updated laz and fpc to latest trunk 59528.
When I go Project/Options/Custom Options then Click All Options, I can
scroll down the list and put the value 10.6 in the box. Click OK; but
nothing is added to the list of options.
I tried doing the same on Latest Trunk on windows with OSX Cross
Compiler, and the same project; when I change the value the compiler
otion -WM10.6 is added to the list.
Is there a bug in the latest Trunk Custom Compiler Options?
----------------------------------------------------------------------
MISV · 2018-11-24 15:45
Did you successfully solve this? I always assumed my app would work on
all recent versions - I guess not
----------------------------------------------------------------------
Josh · 2018-11-24 20:49
Hi
I added the below code into custom compiler options (
Project->Options->Compiler Options->Custom Options )
Code: [Select]if TargetOS = 'darwin' then
begin
UsageCustomOptions += ' -WM10.6';
end;
----------------------------------------------------------------------
MISV · 2018-11-26 23:36
Thank you - I better do this as well then. I am really surprised it is
necessary. I always tagged my downloads as being Yosemite+ (10.10)
compatible
----------------------------------------------------------------------
VTwin · 2018-11-27 00:09
Thanks. Apparently this changed as of FPC 2.6.2. I just updated my
projects:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i if TargetOS
= 'darwin' then begin //UsageCustomOptions += ' -k-macosx_version_min
-k10.5'; //UsageCustomOptions += '
-XR/Developer/SDKs/MacOSX10.5.sdk/'; UsageCustomOptions += '
-WM10.6';end;
Cheers,
VTwin
----------------------------------------------------------------------
CCRDude · 2018-12-20 11:23
I'm fighting a similar thing currently. Got the latest
FreePascal/Lazarus trunk/trunk checked out this morning using
fpcupdeluxe, but this has happened for weeks now. I've got those
UsageCustomOptions in place.
When I let the Lazarus UI create the .app bundle folder for my binary,
macOS tells me the app would be designed for 10.14, while I only run
10.13.6. If I run the executable directly, it works fine.
This is even valid for the Lazarus.app created by fpcupdeluxe.
It's getting spooky... I copied an older app bundle and modified it
completely for the app I was testing. Adjusted icon, Info.plist
entries, etc.. Runs fine - until I rename it, or compress/decompress
it, then macOS again tells me it's incompatible. Same message appears
on other Macs, so it's not strictly a local curiosity. A simple
"touch" to the .app and the Info.plist renders the bundle
incompatible.
Has anyone experienced similar (including Lazarus.app and stock
created new app bundles not working)? Any workaround?
----------------------------------------------------------------------
VTwin · 2018-12-28 04:52
Quote from: CCRDude on December 20, 2018, 12:23:04 pmWhen I let the
Lazarus UI create the .app bundle folder for my binary, macOS tells me
the app would be designed for 10.14, while I only run 10.13.6. If I
run the executable directly, it works fine.
Strange. I don't know the answer, but have you looked at the
info.plist LSMinimumSystemVersion entry in your application bundle?
Mine shows:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
LSMinimumSystemVersion 10.5.0
What value do you see?
----------------------------------------------------------------------
CCRDude · 2019-01-07 19:01
My apologies for the late reply, I didn't work between the years.
My actual setting was:
Code: XML [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
LSMinimumSystemVersion 10.12.6
I have tried with 10.5.0 as well, and without a minimum system
version. Since I run 10.13.6, both should work.
I've been browsing /var/log/ to see if I can find anything logged
about this, but did not find anything.
If no one else is experiencing this issue (should be quite visible,
since here it even affects Lazarus.app), it's most likely some local
problem on my Mac. But it only happens with Lazarus apps.