[20946] Remove 32bit slice from Mac externals if we build for 64bit only #6321
[20946] Remove 32bit slice from Mac externals if we build for 64bit only #6321
Conversation
@@ -398,6 +398,17 @@ private command __revSBCopyFile pSourceFile, pTargetFile, pCallback, pCallbackTa | |||
end if | |||
end if | |||
|
|||
-- if we build only for 64 bit, remove the 32 bit slice from the externals | |||
if pSettings is not empty and pSettings["MacOSX x86-64"] is true and pSettings["MacOSX x86-32"] is false then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@livecodepanos what about something like:
if pSettings is not empty then
local tRemove
if pSettings["MacOSX x86-64"] is true and pSettings["MacOSX x86-32"] is false then
put "i386" into tRemove
else if pSettings["MacOSX x86-32"] is true and pSettings["MacOSX x86-64"] is false then
put "x86_64" into tRemove
end if
if tRemove is not empty then
set the itemDel to slash
if pSettings["externals"] contains item -1 of pTargetFile then
replace " " with "\ " in pTargetFile
local tShell
put "lipo " & pTargetFile & " -remove " & tRemove & " -output " & pTargetFile into tShell
get shell(tShell)
end if
end if
end if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... also you need to check the platform is "macos"
because you can build a mac standalone on other platforms. Actually we should document that somewhere that if you are building for the mac app store then it must be on a mac... unless we have something _internal
that can strip a slice... paging @runrevmark ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RE the first comment, yes your approach is better. Apps that are 32-bit-only cannot be submitted to the Mac AppStore anyway (thus they are not required to have only the 32-bit slice), but removing the 64-bit slice of the externals in a 32-bit-only app will result in smaller size of the standalone :)
BTW the check should probably be:
if pSettings["MacOSX x86-64"] is true and pSettings["MacOSX x86-32"] is not true then
(similarly for the other case) so as to include the case where pSettings["MacOSX x86-32"]
(or pSettings["MacOSX x86-64"]
is empty (one of them is empty by default in a fresh stack)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RE the second comment, yes I missed to check if the platform is "macos"
.
If people are building a Mac standalone for the Mac AppStore in another platform, they would need to sign the standalone in a Mac anyway, so they can remove the 32-bit slice using the terminal. So we could document that somewhere (where? 😄 )
@livecode-vulcan review ok 66902a8 |
💙 review by @montegoulding ok 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😞 test failure 66902a8
|
@livecode-vulcan retry 66902a8 |
[20946] Remove 32bit slice from Mac externals if we build for 64bit only Setting this to blocker as it affects Mac App Store submission
😎 test success 66902a8
|
Setting this to blocker as it affects Mac App Store submission