* Add CI scripts for iOS Qt 5.15.2 build process
Introduced three CI scripts: ci_post_clone.sh for setting up Qt 5.15.2 and patched libraries, ci_pre_xcodebuild.sh for running qmake and restoring WatchOS references, and ci_post_xcodebuild.sh for post-build verification and artifact logging. These scripts automate the iOS build environment setup and validation for QDomyos-Zwift.
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Enforce exact Qt 5.15.2 install and Xcode Cloud fixes
Update CI scripts to strictly require and verify Qt 5.15.2, using aqt or Homebrew with version pinning. Add robust error handling for incorrect Qt versions, ensure patched Bluetooth libraries are present, and improve messaging. In pre-xcodebuild, verify Qt version, add Xcode Cloud build location fixes via xcconfig and pbxproj edits, and enhance error handling for project configuration.
* Update ci_post_clone.sh
* Use local Homebrew formula for Qt 5.15.2 installation
Updated the CI post-clone script to install Qt 5.15.2 using a local Homebrew formula instead of downloading it from an external source. Added the qt5.rb formula to the repository under ci-scripts/homebrew-formulas for reproducible and reliable builds.
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Update ci_post_clone.sh
* Initial commit
Project files added to set up the initial codebase.
* Update project.pbxproj
* Revert "Update project.pbxproj"
This reverts commit f17455cfe7.
* Revert "Initial commit"
This reverts commit 91c30cc8b1.
* relative paths
* relative paths
* porting from aradar xcode project
* Update project.pbxproj
* Add Xcode workspace configuration files
Added initial Xcode workspace files including contents.xcworkspacedata, IDEWorkspaceChecks.plist, and SwiftPM Package.resolved for project setup and dependency management.
* Update project.pbxproj
* Update project.pbxproj
* Update project.pbxproj
* Create PrivacyInfo.xcprivacy
* Create PrivacyInfo.xcprivacy
* Revert "Create PrivacyInfo.xcprivacy"
This reverts commit 5a8fb9dee5.
* Revert "Update project.pbxproj"
This reverts commit e160c9bf6e.
* Reapply "Update project.pbxproj"
This reverts commit 1cf0092c57.
* Revert "Create PrivacyInfo.xcprivacy"
This reverts commit e0ede5d42d.
* Revert "Update project.pbxproj"
This reverts commit e160c9bf6e.
* Revert "Update project.pbxproj"
This reverts commit f8025155cc.
* Revert "Update project.pbxproj"
This reverts commit ac4d5f5fc0.
* Revert "Add Xcode workspace configuration files"
This reverts commit a3aacc002b.
* Revert "Update project.pbxproj"
This reverts commit d5e68987e6.
* Revert "porting from aradar xcode project"
This reverts commit 21f489b86d.
* Revert "relative paths"
This reverts commit 2002677955.
* Revert "relative paths"
This reverts commit 4da17e3ae9.
* trying to don't change the full directory structure
* Update _ci_pre_xcodebuild.sh
* Update project.pbxproj
* Persist and load Qt environment for CI scripts
ci_post_clone.sh now saves the Qt environment variables to a persistent file (/tmp/qt_env.sh) after installation or detection. ci_pre_xcodebuild.sh is renamed and updated to load this environment file, ensuring consistent Qt configuration across CI steps. Additional debug output is added for troubleshooting.
* Update ci_pre_xcodebuild.sh
* Update project.pbxproj
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* debug
* Update ci_post_clone.sh
* Update project.pbxproj
* Update project.pbxproj
* Update ci_pre_xcodebuild.sh
* Update project.pbxproj
* Update project.pbxproj
* Update qdomyos-zwift.pri
* Update qdomyos-zwift.pri
* Update qdomyos-zwift.pri
* Update qdomyos-zwift.pro
* Update qdomyos-zwift.pri
* Update qdomyos-zwift.pri
* fake xcode
* foxing
* Revert "foxing"
This reverts commit 5dd813b2f5.
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* signing
* Update qdomyos-zwift.pro
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* relative path
* Update project.pbxproj
* Update project.pbxproj
* moc relative
* signing
* root project
* Update qdomyos-zwift.pro
* Update ci_pre_xcodebuild.sh
* Update ci_pre_xcodebuild.sh
* Fix Xcode Cloud build: symlink to correct project with code signing
qmake regenerates src/qdomyoszwift.xcodeproj without code signing during
make, causing build failures. After make completes, we now:
- Delete the corrupted project in src/
- Create symlink to the correct project in build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/
- xcodebuild now uses the project with proper code signing configuration
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix: Create fake xcodebuild BEFORE make to prevent circular failure
The previous fix failed because:
1. make was calling xcodebuild with corrupted project
2. xcodebuild failed due to code signing
3. make exited with error
4. Script never reached symlink creation (circular problem)
This fix:
1. Creates fake xcodebuild BEFORE make starts
2. make completes successfully (fake xcodebuild returns success)
3. Script continues and creates symlink to correct project
4. Removes fake xcodebuild from PATH
5. Real xcodebuild (from Xcode Cloud) uses symlinked project with code signing
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix: Use absolute paths to avoid git repo not found error
Problems fixed:
1. Script not executable - added chmod +x
2. cd .. after make went to wrong directory → git repo not found
3. find ../src failed after make → wrong directory
Solution:
- Save PROJECT_ROOT absolute path at start
- Use "$PROJECT_ROOT" instead of cd ..
- Use "$PROJECT_ROOT/src" instead of ../src
- Made script executable (755)
Now script can find git repo and source files regardless of where make leaves us.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add missing QZWidgetExtension.entitlements from master
Xcode build was failing with:
"Build input file cannot be found: QZWidgetExtension.entitlements"
This file exists in master but was missing from xcode-cloud-scripts branch.
Copied from master to fix the build error.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Resolve merge conflict: use master version of settings.local.json
* Copy ALL Qt-generated files from src/ to build directory
Problem: qmake/make generates files (moc_*.cpp, qrc_*.cpp,
qmltyperegistrations, etc.) in src/ but Xcode expects them in
build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/
Solution: After make completes, copy all generated files to build directory:
- MOC files (moc_*.cpp, moc_*.cpp.json)
- QRC files (qrc_*.cpp)
- Object files (*.o, *.a)
- QML type registrations (*_qmltyperegistrations.*)
- Metatypes (*_metatypes.json, *.qmltypes)
- Plugin imports (*_plugin_import.cpp)
This matches the local build directory structure.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix file copy timing - move AFTER git restore
Critical bug fix: The file copy from src/ to build/ was happening BEFORE
git checkout, which was then wiping out the copied files.
Changes:
- Move file copy to AFTER git checkout to preserve generated files
- Add -print flag to show which files are being copied
- Add verification step to confirm qdomyoszwift_qmltyperegistrations.cpp exists
This ensures Qt-generated files (MOC, QML type registrations, etc.) are
properly available in the build directory for Xcode to find them.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix qmltyperegistrations filename mismatch
Critical fix: qmake generates qdomyos-zwift_qmltyperegistrations.cpp (with hyphen)
but Xcode project expects qdomyoszwift_qmltyperegistrations.cpp (no hyphen).
Added:
- Copy/rename step to create the non-hyphenated version Xcode expects
- Handle both .cpp and .o files
- Verification output to confirm file exists
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add symlink for Qt path compatibility - fix httpserver module
The Qt archive contains .pri files with hardcoded absolute paths from
local development machine (/Users/cagnulein/Qt/5.15.2/).
When extracted on Xcode Cloud to /tmp/Qt-5.15.2/, qmake can't find
httpserver and other modules because it looks in the original path.
Solution: Create symlink from original path to Xcode Cloud path so
qmake can find all modules including httpserver.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix hardcoded paths in .pri files instead of using symlinks
Replace sudo symlink approach (requires password) with direct path
replacement in .pri files using sed.
- Find all .pri files in Qt installation
- Replace /Users/cagnulein/Qt/5.15.2 with /tmp/Qt-5.15.2
- Verify httpserver module .pri file is findable after fix
This allows qmake to find httpserver and other modules without
requiring elevated privileges.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix Qt library relative paths in Xcode project
The Xcode project contains relative paths to Qt libraries like:
../../Qt/5.15.2/ios/qml/Qt/labs/calendar/libqtlabscalendarplugin.a
These relative paths don't resolve correctly on Xcode Cloud.
Solution: After git restore, use sed to replace relative Qt paths
with absolute paths pointing to /tmp/Qt-5.15.2/ios/
This fixes the "library 'qtlabscalendarplugin' not found" error.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add Qt/labs/calendar to library search paths
The qtlabscalendarplugin library exists but wasn't in the linker's
search paths, causing "library not found" error.
Changes:
- Add ls verification to confirm library file exists
- Add /tmp/Qt-5.15.2/ios/qml/Qt/labs/calendar to LIBRARY_SEARCH_PATHS
- Add debugging output to show calendar path references
This ensures the linker can find libqtlabscalendarplugin.a during linking.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add all necessary Qt library search paths
Instead of adding only calendar path, add ALL common Qt iOS library
paths that might be missing from the committed Xcode project:
- Qt/labs/* (calendar, platform)
- QtCharts, QtWebView, QtPositioning, QtLocation, QtMultimedia
- plugins/* (platforms, webview, texttospeech, geoservices,
sqldrivers, mediaservice, playlistformats, audio)
This should fix "library not found" errors for qios_debug and other
Qt libraries that qmake expects to find in these directories.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Replace debug Qt libraries with release versions
The Qt package only contains release libraries, not debug versions.
The Xcode project has some references to _debug libraries which causes
the linker to look for debug versions of ALL Qt libraries, including
qios_debug which doesn't exist.
Solution: Use sed to replace all _debug library references with release
versions:
- lib*_debug.a -> lib*.a (file references)
- -l*_debug -> -l* (linker flags)
This fixes "library 'qios_debug' not found" and similar errors.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Change all scheme configurations to Release
Xcode Cloud was building in Debug mode, looking for debug Qt libraries
(_debug suffix) which don't exist in the Qt package (only release libs).
Changed all scheme actions to use Release configuration:
- TestAction: Debug -> Release
- LaunchAction: Debug -> Release
- AnalyzeAction: Debug -> Release
- ArchiveAction: already Release
This ensures Xcode Cloud builds with release Qt libraries.
qDebug output will still work in Release builds.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Download and install missing qmldbg libraries
The Qt package is missing libqmldbg_debugger.a and
libqmldbg_nativedebugger.a which are needed for linking.
Solution: Download the missing libraries from GitHub release and
install them in /tmp/Qt-5.15.2/ios/plugins/qmltooling/
This fixes "Library 'qmldbg_debugger' not found" error.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fail build if qmldbg libraries are not found
- Add exit 1 after error messages if files are not found
- Show contents after zip extraction for debugging
- Create target directory before moving files
If the required libraries cannot be installed, the build must fail
immediately rather than continuing without them.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Download both qmldbg library files separately
- Download libqmldbg_debugger.a.zip (new file with correct version)
- Download libqmldbg_debugger.zip (has nativedebugger files)
- Use _debug version of nativedebugger as fallback if release not found
- Show all extracted files for debugging
- Fail fast if required files are missing
This ensures both libqmldbg_debugger.a and libqmldbg_nativedebugger.a
are properly installed.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Reorganize Xcode Cloud CI configuration to use dynamic project modifications
This commit reorganizes the CI setup to keep project files clean and apply all modifications via CI scripts:
Changes:
1. ci_post_clone.sh: Added secret.h generation from Xcode Cloud environment variables
- Generates secret.h with STRAVA_SECRET_KEY, PELOTON_SECRET_KEY, SMTP credentials, etc.
- Generates cesium-key.js if CESIUMKEY environment variable is provided
- Matches the pattern used in GitHub workflows
2. ci_pre_xcodebuild.sh: Enhanced with comprehensive project file modifications
- Added path fixes for local development paths -> Xcode Cloud paths
- Added scheme modification from Debug to Release configuration
- Preserved existing fixes: _debug suffix removal, library search paths, qmltyperegistrations
3. project.pbxproj and qdomyoszwift.xcscheme: Reverted to master branch versions
- Project files now stay clean in the repository
- All environment-specific modifications done dynamically in CI scripts
4. ci_post_xcodebuild.sh: Removed (no longer needed)
Benefits:
- Clean project files in repository (easier to maintain and review)
- All CI-specific modifications isolated in CI scripts
- Easier to debug and update CI configuration
- Consistent with GitHub workflow patterns
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix legacy build locations error by removing SYMROOT in CI script
After reverting project.pbxproj to master, SYMROOT settings were restored
causing: "Packages are not supported when using legacy build locations"
Solution: Remove SYMROOT and OBJROOT lines dynamically in ci_pre_xcodebuild.sh
instead of committing the change to project.pbxproj.
This keeps project files clean while fixing the Swift package compatibility issue.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Create workspace settings to disable legacy build locations
The error "Packages are not supported when using legacy build locations"
requires both:
1. Removing SYMROOT from project.pbxproj
2. Creating WorkspaceSettings.xcsettings and IDEWorkspaceChecks.plist
These workspace files force Xcode to use the modern build system and
disable legacy build locations, enabling Swift Package Manager support.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Move legacy build locations fix to ci_post_clone.sh
Xcode Cloud executes scripts in this order:
1. ci_post_clone.sh
2. xcodebuild -resolvePackageDependencies (was failing here)
3. ci_pre_xcodebuild.sh (never reached)
The workspace settings and SYMROOT removal must happen in ci_post_clone.sh
BEFORE Xcode Cloud tries to resolve package dependencies.
This fixes: "Packages are not supported when using legacy build locations"
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix absolute paths for resource files (Default-568h@2x.png)
After reverting project.pbxproj to master, resource files like
Default-568h@2x.png have absolute paths from local development machine:
/Users/cagnulein/qdomyos-zwift/build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/qdomyoszwift.xcodeproj/
These paths don't exist on Xcode Cloud. Convert them to relative paths:
qdomyoszwift.xcodeproj/Default-568h@2x.png
Added fix to both ci_post_clone.sh and ci_pre_xcodebuild.sh to ensure
paths are correct throughout the build process.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix resource file paths and sourceTree for LaunchScreen.storyboard
Resource files have both absolute paths and sourceTree = "<absolute>"
which prevents Xcode Cloud from finding them.
Changed the fix to:
1. Convert absolute paths to relative (remove local machine prefix)
2. Change sourceTree from "<absolute>" to "<group>"
This allows Xcode to find resource files relative to their group
in the project structure.
Fixes: Default-568h@2x.png, LaunchScreen.storyboard, and other resources
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix sed syntax to keep quotes in resource file paths
The sed was removing quotes from paths causing parse errors:
path = Default-568h@2x.png (WRONG - causes parse error)
Fixed to maintain quotes:
path = "Default-568h@2x.png" (CORRECT)
This prevents "project is damaged and cannot be opened" error.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Use SOURCE_ROOT for resource file paths instead of <group>
Changed sourceTree from <group> to SOURCE_ROOT with full relative path:
- path = "build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/qdomyoszwift.xcodeproj/Default-568h@2x.png"
- sourceTree = SOURCE_ROOT
On Xcode Cloud, SOURCE_ROOT = /Volumes/workspace/repository/, so files
will be found at the correct location.
Tested locally before committing to verify sed produces valid output.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix all paths to match working version exactly
Tested locally to ensure output matches the working version exactly.
All key files verified:
✓ Default-568h@2x.png: MATCH
✓ LaunchScreen.storyboard: MATCH
✓ Qt5Core: MATCH
✓ virtualbike.cpp: MATCH
Path fixes applied in correct order:
1. Qt paths: /Users/cagnulein/Qt/5.15.2/ios/ -> /tmp/Qt-5.15.2/ios/
2. Source paths: /Users/cagnulein/qdomyos-zwift/src/ -> ../src/
3. General: /Users/cagnulein/qdomyos-zwift/ -> /Volumes/workspace/repository/
4. sourceTree fix: ../src/* files use <group> not <absolute>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Revert project files to updated master
Previous revert used outdated master missing sportstechrower and filesearcher.
Now reverting to updated master that includes all recent files.
Tested locally - all files match working version:
✓ sportstechrower.cpp: MATCH
✓ filesearcher.cpp: MATCH
✓ Default-568h@2x.png: MATCH
✓ virtualbike.cpp: MATCH
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix QZWidget extension version to match app version
Changed MARKETING_VERSION from 1.0 to 2.20 for QZWidgetExtension
to fix error: CFBundleShortVersionString Mismatch
App version: 2.20
Widget version: 2.20 (was 1.0)
Build number (1285) should be configured in Xcode Cloud dashboard.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Use echo instead of heredoc for secret.h generation
Changed from heredoc (cat << EOF) to echo statements to match
GitHub workflow exactly. This should fix potential escaping issues
with environment variables like PELOTON_SECRET_KEY.
Now identical to GitHub workflow approach.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add permissions for Bash commands in settings
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* #911 new branch with a very basic google test. Needs google test downloaded into /google_test. Will probably set up another submodule at some point.
* #911 added google test as a submodule
* Attempt to get lib and test project to build in action
* #911 trying to get submodule checkout to work
* #911 trying to get Linux build to happen
* #911 added header include
* #996 put the values from settings read for device discovery into a class
* #996 moved the enormous if statement for device detection to a method.
* #996 split device detection into detection and bluetoothdevice object creation
* #996 return the created object (but don't use it)
* #996 factored out starting of template managers into a single location
* #911 beginning of 2 device detection tests using google test
* #911 removed unnecessary #pragma once
* #996 put new classes into separate files. Added exclusions to devicediscoveryinfo to replicate current production behaviour
* #996 comments on functions
* #911 latest work. Tests crash in Windows.
* #911 2 device detection tests working
* #911 added test data classes for remaining devices
* #911 missed file
* #911 tests build and run. Most fail due to incomplete config.
* #911 filled in details for some of the device tests
* #911 filled in vast majority of test data. Doesn't build, and some obscure situations yet to be done.
* #911 use template method instead
* #911 builds, some tests failing
* #911 fixed some tests.
* #911 device identification tests passing to the currently possible extent, pending feedback.
* #911 start of work testing device object creation
* #911 got bluetoothdevice object creation tests working
* #911 added manufacturer data for m3i bike test, and fixed case sensitivity of m3i bike test.
* #911 added ability to specify and test multiple settings configurations
* #911 fixed typos
* #911 parameterized version
* #911 fixed file name to match class
* #911 added version using typed tests. Refactored to share basic test code from original test suite.
* #911 added googletest submodule to the documentation
* #911 rework to match current functioning of the bluetooth class, instead of the result of current work on #996.
* #911 updated for changes in master. Still doesn't actually work.
* #911 added configuration of test QSettings.
QSettings are probablly not set up properly, but the tests actually run now, but many fail.
* #911 added test settings facility
This enables the developer to override the default QSettings for the life of a test suite.
* #911 start tests with default settings.
* #911 got exclusions working
At least, where the bluetoothdevice object can actually work.
* #911 skip abstract devices
* #911 removed some unused code
* #911 removed unused file
* #911 include app project in main project
* #911 updated for latest device detection code
* #911 added submodule checkout of googletest to Android build
* #911 run qmake from the root in android build
* #911 adjusted test names and made the test for the invalid bluetooth device info test with enabling and disabling settings.
* #911 enabled the test for non-detection with invalid names
* #911 fixed test
* #911 updated comments
* #911 moved devicediscoveryinfo to the testing project
* #911 move devicediscoveryinfo to the test project
* #911 removed a unused class
* #911 removed unused file
* #911 modify correct object
* #911 modify correct object
* #911 removed irrelevant comment
* adding ls to locate llvm-arm
* debugging github actions
* Update main.yml
* #911 try being more specific about tst project dependency
* trying linking llvm-ar
* debugging llvm
* adding alias to llvm-ar
* enabling aliases
* Update main.yml
* maybe the last one for fixing CI?
* #911 see how the CI builds go without the app project
* #911 restored app project to root project
* trying to move the alias just before the make process
* trying to use NDK_LLVM_PATH
* trying set AR variable
* seems to be the right way
* fixing test m3i
* updating version aligned with the master
* #911 moved some definitions to defaults.pri
* #911 adjusted test case for adjusted detection rule
* #911 adjusted relative path
* #911 try adding toolchain/bin to path
* #911 revert previous change and show the PATH
* #911 fixed yml file
* #911 restored previous working yml file
* #911 show the PATH
* #911 moved some android related content to the shared defaults.pri
* #911 ignore the test and lib projects in an Android build
* #911 restore yml without AR specified
* #911 updated for the "TOORX" option for Horizon Treadmill
* #911 added test for the new detection criteria for Horizon Treadmill (TOORX)
* #911 added test for Kingsmith WR1 rowing device
* #911 added test cases for Toorx experience etc
* #911 added test case for FTMS Bike named KICKR CORE
* #911 simplified setup of multiple detection configs
* #911 further simplification of test config setup
* version aligned with master
Co-authored-by: Roberto Viola <cagnulein@gmail.com>