Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[20946] Remove 32bit slice from Mac externals if we build for 64bit only #6321

Merged
merged 3 commits into from Feb 9, 2018

Conversation

livecodepanos
Copy link
Contributor

Setting this to blocker as it affects Mac App Store submission

@@ -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
Copy link
Member

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

Copy link
Member

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 ?

Copy link
Contributor Author

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)

Copy link
Contributor Author

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? 😄 )

@montegoulding
Copy link
Member

@livecode-vulcan review ok 66902a8

@livecode-vulcan
Copy link
Contributor

💙 review by @montegoulding ok 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: pending
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: success
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: pending
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: pending
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: pending
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: pending
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: pending
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: pending
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: pending
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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 livecode deleted a comment from livecode-vulcan Feb 9, 2018
@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😞 test failure 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: pending
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: success

@livecodepanos
Copy link
Contributor Author

@livecode-vulcan retry 66902a8

livecode-vulcan added a commit that referenced this pull request Feb 9, 2018
[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
Copy link
Contributor

😎 test success 66902a8

  • try-community-armv6-android-api8: success
  • try-community-armv6-android-api9: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.2: success
  • try-community-universal-ios-iphonesimulator11.2: success
  • try-community-universal-mac-macosx10.6: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian7: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian7: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: success
  • try-community-x86_64-win32: success

@livecodepanos livecodepanos merged commit c874565 into livecode:develop-8.1 Feb 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants