Skip to content
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

Build: iOS: Use Qt6 and bump build environment #3065

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/autobuild/ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ setup() {
build_app_as_ipa() {
# Add the Qt binaries to the PATH:
export PATH="${QT_DIR}/${QT_VERSION}/ios/bin:${PATH}"
./ios/deploy_ios.sh
./ios/deploy_ios.sh -m "${QT_DIR}/${QT_VERSION}/ios/bin/qmake"
}

pass_artifact_to_job() {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,13 @@ jobs:

- config_name: iOS (artifacts)
target_os: ios
building_on_os: macos-11
base_command: QT_VERSION=5.15.2 ./.github/autobuild/ios.sh
building_on_os: macos-13
base_command: QT_VERSION=6.4.3 ./.github/autobuild/ios.sh
# Build failed with CodeQL enabled when last tested 03/2022 (#2490).
# There are no hints that iOS is supposed to be supported by CodeQL.
# Therefore, disable it:
run_codeql: false
xcode_version: 12.5.1
xcode_version: 14.2.0

- config_name: Windows (artifact+codeQL)
target_os: windows
Expand Down
1 change: 1 addition & 0 deletions Jamulus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ win32 {
HEADERS += src/sound/coreaudio-ios/sound.h
OBJECTIVE_SOURCES += src/sound/coreaudio-ios/sound.mm
QMAKE_TARGET_BUNDLE_PREFIX = io.jamulus
QMAKE_LFLAGS += -Wl,-e,_qt_main_wrapper
LIBS += -framework AVFoundation \
-framework AudioToolbox
} else:android {
Expand Down
23 changes: 22 additions & 1 deletion ios/deploy_ios.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
#!/bin/bash
set -eu -o pipefail


qmake_path=""

while getopts 'hm:' flag; do
case "${flag}" in
m)
qmake_path=$OPTARG
if [[ -z "$qmake_path" ]]; then
echo "Please add the path to the qmake binary: -m \"</path/to/ios/qmake/binary>\""
fi
;;
h)
echo "Usage: -m </path/to/ios/qmake/binary>"
exit 0
;;
*)
exit 1
;;
esac
done

## Builds an ipa file for iOS. Should be run from the repo-root

# Create Xcode file and build
qmake -spec macx-xcode Jamulus.pro
eval "${qmake_path} Jamulus.pro"
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like eval here

/usr/bin/xcodebuild -project Jamulus.xcodeproj -scheme Jamulus -configuration Release clean archive -archivePath "build/Jamulus.xcarchive" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO CODE_SIGN_ENTITLEMENTS=""

# Generate ipa by copying the .app file from the xcarchive directory
Expand Down
5 changes: 5 additions & 0 deletions src/chatdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ CChatDlg::CChatDlg ( QWidget* parent ) : CBaseDlg ( parent, Qt::Window ) // use
// Now tell the layout about the menu
layout()->setMenuBar ( pMenu );

#if defined( Q_OS_ANDROID ) || defined( ANDROID ) || defined( Q_OS_IOS )
// for the Android/iOS version maximize the window
setWindowState ( Qt::WindowMaximized );
#endif

// Connections -------------------------------------------------------------
QObject::connect ( edtLocalInputText, &QLineEdit::textChanged, this, &CChatDlg::OnLocalInputTextTextChanged );

Expand Down
5 changes: 5 additions & 0 deletions src/clientsettingsdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet
layout()->setMenuBar ( pMenu );
#endif
Copy link
Member Author

Choose a reason for hiding this comment

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

Smells like avoidable duplication.

Copy link
Collaborator

@pljones pljones May 21, 2023

Choose a reason for hiding this comment

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

Do we live with this for now as it's not directly related?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated, but worth an issue


#if defined( Q_OS_ANDROID ) || defined( ANDROID ) || defined( Q_OS_IOS )
// for the Android/iOS version maximize the window
setWindowState ( Qt::WindowMaximized );
#endif

// Add help text to controls -----------------------------------------------
// local audio input fader
QString strAudFader = "<b>" + tr ( "Local Audio Input Fader" ) + ":</b> " +
Expand Down
4 changes: 2 additions & 2 deletions src/connectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
// setup timers
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if the order we set the maximized state matters. At least in the version which kind of worked - I first needed to rotate the screen to allow it getting the correct sizing - but that's way better than it was.

TimerInitialSort.setSingleShot ( true ); // only once after list request

#ifdef ANDROID
// for the android version maximize the window
#if defined( Q_OS_ANDROID ) || defined( ANDROID ) || defined( Q_OS_IOS )
// for the Android/iOS version maximize the window
setWindowState ( Qt::WindowMaximized );
#endif

Expand Down