Skip to content

Use macdeployqt #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 6, 2020
Merged

Use macdeployqt #648

merged 6 commits into from
May 6, 2020

Conversation

simons-public
Copy link

Making a release was failing with both Homebrew and MacPorts on Mojave. The compiled binary would run successfully, but the resulting .app bundle from running build_installer.sh (which runs reref_dylibs.sh and builds the .app bundle) was giving SEGFAULT 11 when executed.

This pull request replaces build_installer.sh with build_dist.sh that runs the Qt toolkit's macdeployqt which is included with the Qt on both MacPorts and Homebrew. It builds the distributable bundle and creates the dmg if it is a Release build.

The previous scripts have been left in place with deprecation warnings in case they are still needed by older versions of MacOS.

It also removes the if condition in CMake that prevents building a bundle on Debug releases.

Have CMake always build a bundle, the `build_dist.sh` script will only build a dmg if the build type is "Release"
@simons-public simons-public mentioned this pull request May 2, 2020
@simons-public
Copy link
Author

Despite the Azure Pipeline for Mac Build Release failing, this builds successfully on 10.14 Mojave with either Homebrew or MacPorts.

The build failing seems to have something to do with OpenSSL and linking barrierc on the 10.14 MacOS image that I cannot replicate on a system with Homebrew or MacPorts. The output of clean_build.sh using VERBOSE=1 on my systems and the Azure image are identical except for some path differences in where Xcode is located.

@p12tic
Copy link
Member

p12tic commented May 3, 2020

The previous scripts have been left in place with deprecation warnings in case they are still needed by older versions of MacOS.

Which macOS releases are we leaving behind due to this change?

@plessbd
Copy link

plessbd commented May 4, 2020

Just want to confirm that I was getting this same error, and with this new update I was able to successfully build a snapshot using B_BUILD_TYPE=Release bash -x ./clean_build.sh thank you very much @simons-public

@simons-public
Copy link
Author

Which macOS releases are we leaving behind due to this change?

None that haven't already been left behind by 2.3.2-Release. It should compile/run on anything still supported by Qt/Xcode. I just didn't want to remove the old scripts in case it was part of someone's workflow.

macdeployqt needs "-executable=filename" to propery
change linking on other variables

also renamed the cmake target from "Barrier_dmg" to
"Barrier_MacOS" to properly reflect earlier changes
@simons-public
Copy link
Author

I had forgotten to manually specify barrierc and barriers in the macdeployqt arguments with -executable=. Since they're not listed in CFBundleExecutable in the plist they weren't getting picked up. Commit 0deaaad fixes this issue and changes the name of the CMake target to reflect earlier changes.

The Azure Pipelines MacOS vmImage has an old version of OpenSSL (1.0.2t)
installed at /usr/local/opt/openssl. Normally with Homebrew this directory
would be linked to the currenly installed version of OpenSSL (1.1.x) in
/usr/local/Cellar, but since it has been installed manually here it interferes
with linking libssl.a and libcrypto.a static libraries which causes the build
to fail.
@simons-public
Copy link
Author

simons-public commented May 6, 2020

Added changes that fixed Azure Pipeline Builds on MacOS since this is already a build-related pull request. The issue was with OpenSSL 1.0 being where OpenSSL 1.1.x should be symlinked (actions/runner-images#837)

@p12tic
Copy link
Member

p12tic commented May 6, 2020

Thanks a lot!

cc @AdrianKoshka

@shymega
Copy link

shymega commented May 6, 2020

@p12tic @AdrianKoshka is no longer involved in this project from what I've been told. I still am though, so I'll approve these changes (they look good to me), then I'll merge them :)

Copy link

@shymega shymega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@shymega shymega merged commit 675a17d into debauchee:master May 6, 2020
@digantabanikya
Copy link

I am desperately waiting for a new build for Mac OS. The current release 2.3.2 isnt working actually on Catalina 10.15.5. I am not a developer and I do not know how to create builds. Your help is much appreciated here. :)

@plessbd
Copy link

plessbd commented Jun 2, 2020

@digantabanikya @simons-public has a compiled build on his fork
https://github.com/simons-public/barrier/releases

It is pretty easy to build if you want to follow the directions
https://github.com/debauchee/barrier-wiki/blob/master/Building-on-macOS.md

Just found where the azure builds are
https://dev.azure.com/debauchee/Barrier/_build/results?buildId=232&view=artifacts&type=publishedArtifacts

So that would be your best place

@digantabanikya
Copy link

Thank you. I will try. I have never seen what xcode looks like. lol

@plessbd
Copy link

plessbd commented Jun 2, 2020

You actually wont be looking at xcode at all. ANd if you just download the artifacts from https://dev.azure.com/debauchee/Barrier/_build/results?buildId=232&view=artifacts&type=publishedArtifacts you wont need xcode at all

@digantabanikya
Copy link

digantabanikya commented Jun 2, 2020

@plessbd Appreciate your patience in pointing things out to a rookie like me. I am no coder. I just see the published artifacts page but cant seem to download the packages on Mac/Windows.

@plessbd
Copy link

plessbd commented Jun 2, 2020

Piss Poor Design on Azures part

Hover shows a ... that allows you to download

Screen Shot 2020-06-02 at 3 03 06 PM

@digantabanikya
Copy link

@plessbd You're an angel. It worked! tested for 5 hours straight. Between Mac and Windows, Mac being the client.

@ghost ghost mentioned this pull request Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants