-
Notifications
You must be signed in to change notification settings - Fork 241
Automatically build IPA for iOS #2355
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| # autobuild_1_prepare: set up environment, install Qt & dependencies | ||
|
|
||
| if [ "$#" -ne "1" ]; then | ||
| echo "need to specify Qt version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| QT_DIR=/usr/local/opt/qt | ||
| QT_VER=$1 | ||
| AQTINSTALL_VERSION=2.0.5 | ||
|
|
||
| ################### | ||
| ### PROCEDURE ### | ||
| ################### | ||
|
|
||
| echo "Install dependencies..." | ||
| python3 -m pip install "aqtinstall==${AQTINSTALL_VERSION}" | ||
| python3 -m aqt install-qt --outputdir "${QT_DIR}" mac ios ${QT_VER} | ||
|
|
||
| # Add the qt binaries to the PATH. | ||
| # The clang_64 entry can be dropped when Qt <6.2 compatibility is no longer needed. | ||
| for qt_path in "${QT_DIR}"/${QT_VER}/ios/bin "${QT_DIR}"/${QT_VER}/clang_64/bin; do | ||
| if [[ -d $qt_path ]]; then | ||
| export -p PATH="${qt_path}:${PATH}" | ||
| break | ||
| fi | ||
| done | ||
| echo "::set-env name=PATH::${PATH}" | ||
| echo "the path is ${PATH}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/bin/sh -e | ||
|
|
||
| # autobuild_2_build: actual build process | ||
|
|
||
|
|
||
| #################### | ||
| ### PARAMETERS ### | ||
| #################### | ||
|
|
||
|
|
||
| source "$(dirname "${BASH_SOURCE[0]}")/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh" | ||
|
|
||
| ################### | ||
| ### PROCEDURE ### | ||
| ################### | ||
|
|
||
| cd "${THIS_JAMULUS_PROJECT_PATH}" | ||
|
|
||
| qmake -spec macx-xcode Jamulus.pro | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would have expected the spec to be the iOS build rather than the macx target here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. But that's what builds for iOS
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so how does: play into the build?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably it generates the .xcodeproject for iOS
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the build includes the iOS version of Qt, probably |
||
| /usr/bin/xcodebuild -project Jamulus.xcodeproj -scheme Jamulus -configuration Release clean archive -archivePath "build/Jamulus.xcarchive" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
| # Make a deploy folder | ||
| mkdir deploy | ||
| # Generate ipa by copying the .app file from the xcarchive file | ||
| mkdir deploy/Payload | ||
| cp -r build/Jamulus.xcarchive/Products/Applications/Jamulus.app deploy/Payload/ | ||
| cd deploy | ||
| zip -0 -y -r Jamulus.ipa Payload/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #!/bin/sh -e | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mostly copied from macOS. |
||
|
|
||
| # autobuild_3_copy_files: copy the built files to deploy folder | ||
|
|
||
| if [ "$#" -gt 1 ]; then | ||
| BUILD_SUFFIX=_$1 | ||
| shift | ||
| fi | ||
|
|
||
| #################### | ||
| ### PARAMETERS ### | ||
| #################### | ||
|
|
||
| source "$(dirname "${BASH_SOURCE[0]}")/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh" | ||
|
|
||
| ################### | ||
| ### PROCEDURE ### | ||
| ################### | ||
|
|
||
| cd "${THIS_JAMULUS_PROJECT_PATH}" | ||
|
|
||
| echo "" | ||
| echo "" | ||
| echo "ls GITROOT/deploy/" | ||
| ls "${THIS_JAMULUS_PROJECT_PATH}"/deploy/ | ||
| echo "" | ||
|
|
||
| echo "" | ||
| echo "" | ||
| artifact_deploy_filename=jamulus_${jamulus_buildversionstring}_iOSUnsigned${BUILD_SUFFIX}.ipa | ||
| echo "Move/Rename the built file to deploy/${artifact_deploy_filename}" | ||
| mv "${THIS_JAMULUS_PROJECT_PATH}"/deploy/Jamulus.ipa "${THIS_JAMULUS_PROJECT_PATH}"/deploy/"${artifact_deploy_filename}" | ||
|
|
||
|
|
||
| echo "" | ||
| echo "" | ||
| echo "ls GITROOT/deploy/" | ||
| ls "${THIS_JAMULUS_PROJECT_PATH}"/deploy/ | ||
| echo "" | ||
|
|
||
|
|
||
| github_output_value() | ||
| { | ||
| echo "github_output_value() ${1} = ${2}" | ||
| echo "::set-output name=${1}::${2}" | ||
| } | ||
|
|
||
| github_output_value artifact_1 ${artifact_deploy_filename} | ||
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.
I think this needs caching.