From 0258298a17b1a1e9206bc614e9dae0fe6b956da3 Mon Sep 17 00:00:00 2001 From: Joe George Date: Thu, 29 Aug 2024 11:07:14 -0400 Subject: [PATCH 1/6] Add support for multi arch xcframeworks --- Package.swift | 13 ++++- config/Make.rules.Darwin | 16 ++++-- cpp/Makefile | 4 ++ cpp/config/Make.xcframework.rules | 49 ++++++++++++------- cpp/src/IceIAP/Makefile.mk | 2 +- swift/Makefile | 15 +++--- swift/test/Package.swift | 2 +- .../test/ios/TestDriverApp/ControllerI.swift | 3 +- 8 files changed, 70 insertions(+), 34 deletions(-) diff --git a/Package.swift b/Package.swift index 5615c20e45d..bf0da70723e 100644 --- a/Package.swift +++ b/Package.swift @@ -22,7 +22,7 @@ let package = Package( defaultLocalization: "en", platforms: [ .macOS(.v14), - .iOS(.v12), + .iOS(.v17), ], products: [ .library(name: "Ice", targets: ["Ice"]), @@ -66,7 +66,12 @@ let package = Package( ), .target( name: "IceImpl", - dependencies: ["IceCpp", "IceDiscoveryCpp", "IceLocatorDiscoveryCpp"], + dependencies: [ + "IceCpp", + "IceDiscoveryCpp", + "IceLocatorDiscoveryCpp", + .target(name:"IceIAPCpp", condition: .when(platforms: [.iOS])) + ], path: "swift/src/IceImpl", cxxSettings: [ // We rely on a few private headers from Ice @@ -91,6 +96,10 @@ let package = Package( path: "cpp/lib/IceLocatorDiscovery.xcframework" ), + .binaryTarget( + name: "IceIAPCpp", + path: "cpp/lib/IceIAP.xcframework" + ), .executableTarget( name: "slice2swift", dependencies: ["mcpp"], diff --git a/config/Make.rules.Darwin b/config/Make.rules.Darwin index 5f8003ae961..c7b27f8c3ac 100644 --- a/config/Make.rules.Darwin +++ b/config/Make.rules.Darwin @@ -4,6 +4,8 @@ supported-platforms = macosx iphoneos iphonesimulator +xcframeworks = Ice IceDiscovery IceLocatorDiscovery IceIAP + macosx_ar = libtool macosx_cppflags = -mmacosx-version-min=12.00 macosx_ldflags = $(macosx_cppflags) \ @@ -15,16 +17,22 @@ iphoneos_cc = xcrun -sdk iphoneos clang iphoneos_cxx = xcrun -sdk iphoneos clang++ iphoneos_cppflags = -miphoneos-version-min=15.0 -arch arm64 -fembed-bitcode iphoneos_ldflags = -miphoneos-version-min=15.0 -arch arm64 -iphoneos_configs = %xcodesdk -iphoneos_targetdir = $(if $(filter %/build,$5),/iphoneos) +iphoneos_configs = %static +iphoneos_targetdir = /iphoneos +# TODO: disable all install for this platform +iphoneos_installdir = /iphoneos +iphoneos_components = $(xcframeworks) iphonesimulator_ar = libtool iphonesimulator_cc = xcrun -sdk iphonesimulator clang iphonesimulator_cxx = xcrun -sdk iphonesimulator clang++ iphonesimulator_cppflags = -mios-simulator-version-min=15.0 iphonesimulator_ldflags = $(iphonesimulator_cppflags) -iphonesimulator_configs = %xcodesdk -iphonesimulator_targetdir = $(if $(filter %/build,$5),/iphonesimulator) +iphonesimulator_configs = %static +iphonesimulator_targetdir = /iphonesimulator +# TODO: disable all install for this platform +iphonesimulator_installdir = /iphonesimulator +iphonesimulator_components = $(xcframeworks) ifneq ($(shell command -v brew 2> /dev/null),) MCPP_HOME ?= $(shell brew --prefix mcpp) diff --git a/cpp/Makefile b/cpp/Makefile index 67c97843803..f5e530c5d70 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -25,6 +25,10 @@ include $(foreach p,$(load_first),src/$p/Makefile.mk) include $(filter-out $(foreach p,$(load_first),%/src/$p/Makefile.mk),$(shell find $(lang_srcdir)/src -name Makefile.mk)) $(call make-projects,$(projects),make-cpp-src-project,,$(filter all cpp,$(ICE_BIN_DIST))) +ifeq ($(os),Darwin) +$(call make-xcframeworks) +endif + # # Now, create and load test projects. # diff --git a/cpp/config/Make.xcframework.rules b/cpp/config/Make.xcframework.rules index ad66c08d423..7714d4684fb 100644 --- a/cpp/config/Make.xcframework.rules +++ b/cpp/config/Make.xcframework.rules @@ -1,21 +1,34 @@ # Copyright (c) ZeroC, Inc. All rights reserved. +# Gets the library path for a platform (macosx does not have a platform directory) +# $(call xcframework-library,Ice,macosx) => lib/Ice/libIce.a +# $(call xcframework-library,Ice,iphoneos) => lib/iphoneos/libIce.a +xcframework-library = lib/$(if $(filter macosx,$2),,$2/)lib$1.a + +# Gets a list of library paths for a component for all platforms +xcframework-libraries = $(foreach p,$($1_platforms),$(call xcframework-library,$1,$p)) + +# Gets a list of component flags used when generating an xcframework. One set of flags per platform. +xcframework-flags = $(foreach p,$($1_platforms),-library $(call xcframework-library,$1,$p) $(if $2,-headers include/$1)) + # Creates a xcframework from a static component and its headers -# $1: The name of the framework (Ice, IceDiscovery, etc.) -# $2: The platform -# $3: Output path -define create-xcframework-from-library +# Note: Th headers are coppied into the root of the Headers directory. We move the headers into Header/$1 so that we can +# include Ice as . We also copy the generated headers into the Headers/$1 directory. +# +# $(call create-xcframework,$1=framework-name) +define create-xcframework -lib/$1.xcframework: lib/lib$1.a - $(E) Creating lib/$1.xcframework +lib/$1.xcframework: $(call xcframework-libraries,$1) + $(E) Creating lib/$1.xcframework from $(call xcframework-libraries,$1) $(Q)$(RM) -r lib/$1.xcframework $(Q)if [ -d include/$1 ]; then \ - xcodebuild -create-xcframework -library lib/lib$1.a -headers include/$1 -output lib/$1.xcframework ; \ - mkdir -p lib/$1.xcframework/macos-arm64/Headers/$1 ; \ - find lib/$1.xcframework/macos-arm64/Headers/* -prune ! -name $1 -exec mv {} lib/$1.xcframework/macos-arm64/Headers/$1 \; ; \ - cp include/generated/$1/*.h lib/$1.xcframework/macos-arm64/Headers/$1 ; \ + xcodebuild -create-xcframework $(call xcframework-flags,$1,true) -output lib/$1.xcframework ; \ + find lib/$1.xcframework -name Headers -prune -exec mv {} {}_$1 \; -exec mkdir {} \; -exec mv {}_$1 {}/$1 \; ; \ + if [ -d include/generated/$1 ]; then \ + find lib/$1.xcframework -name Headers -prune -exec cp -r include/generated/$1/* {}/$1 \; ; \ + fi \ else \ - xcodebuild -create-xcframework -library lib/lib$1.a -output lib/$1.xcframework; \ + xcodebuild -create-xcframework $(call xcframework-flags,$1) -output lib/$1.xcframework; \ fi srcs all:: lib/$1.xcframework @@ -23,15 +36,13 @@ srcs all:: lib/$1.xcframework clean:: $(E) Cleaning lib/$1.xcframework $(Q)$(RM) -r lib/$1.xcframework - endef -ifeq ($(filter $(CONFIGS),static),) -Ice_always_enable_configs := static -IceDiscovery_always_enable_configs := static -IceLocatorDiscovery_always_enable_configs := static +ifeq ($(filter $(config),static),) +$(foreach f, $(xcframeworks), $(eval $f_always_enable_configs := static)) endif -$(eval $(call create-xcframework-from-library,Ice)) -$(eval $(call create-xcframework-from-library,IceDiscovery)) -$(eval $(call create-xcframework-from-library,IceLocatorDiscovery)) +define make-xcframeworks +$(foreach f, $(xcframeworks),\ + $(if $($f_platforms),$(eval $(call create-xcframework,$f)))) +endef diff --git a/cpp/src/IceIAP/Makefile.mk b/cpp/src/IceIAP/Makefile.mk index 5521e39d1e0..7cde92b9fb8 100644 --- a/cpp/src/IceIAP/Makefile.mk +++ b/cpp/src/IceIAP/Makefile.mk @@ -4,7 +4,7 @@ $(project)_libraries = IceIAP -IceIAP_configs := xcodesdk +IceIAP_configs := static IceIAP_platforms := iphoneos iphonesimulator IceIAP_targetdir := $(libdir) diff --git a/swift/Makefile b/swift/Makefile index 2db8ce0a8b2..d1b72a9c66e 100644 --- a/swift/Makefile +++ b/swift/Makefile @@ -17,12 +17,14 @@ $1:: test/ios/TestDriverApp.xcodeproj -project test/ios/TestDriverApp.xcodeproj \ -scheme TestDriverApp \ -configuration $(CONFIG) \ + -arch arm64 \ -sdk $2 $3 + endef all:: tests -srcs: +srcs:: $(Q)swift build $(SWIFT_BUILD_FLAGS) tests:: @@ -32,13 +34,14 @@ install:: @echo nothing to install clean:: - $(Q)rm -rf .build + $(Q)rm -rf ../.build $(Q)rm -rf test/.build distclean:: clean -# test-app-platforms ?= iphonesimulator iphoneos +# We just build the test app for the iphonesimulator platform by default +test-app-platforms ?= $(filter iphonesimulator, $(platforms)) -# $(foreach p,$(test-app-platforms),$(eval $(call xcode-test-app-rule,tests,$p,build))) -# $(foreach p,$(test-app-platforms),$(eval $(call xcode-test-app-rule,clean,$p,clean))) -# $(foreach p,$(test-app-platforms),$(eval $(call xcode-test-app-rule,distclean,$p,clean))) +$(foreach p,$(test-app-platforms),$(eval $(call xcode-test-app-rule,tests,$p,build))) +$(foreach p,$(test-app-platforms),$(eval $(call xcode-test-app-rule,clean,$p,clean))) +$(foreach p,$(test-app-platforms),$(eval $(call xcode-test-app-rule,distclean,$p,clean))) diff --git a/swift/test/Package.swift b/swift/test/Package.swift index 763ffbfc2a8..817c1ff10a5 100644 --- a/swift/test/Package.swift +++ b/swift/test/Package.swift @@ -131,7 +131,7 @@ let package = Package( defaultLocalization: "en", platforms: [ .macOS(.v14), - .iOS(.v12), + .iOS(.v17), ], products: [ .library(name: "TestCommon", targets: ["TestCommon"]), diff --git a/swift/test/ios/TestDriverApp/ControllerI.swift b/swift/test/ios/TestDriverApp/ControllerI.swift index 3b87e4f0d93..4b0d1c5378c 100644 --- a/swift/test/ios/TestDriverApp/ControllerI.swift +++ b/swift/test/ios/TestDriverApp/ControllerI.swift @@ -46,6 +46,7 @@ class ProcessControllerI: CommonProcessController { _ipv4 = ipv4 _ipv6 = ipv6 + //TODO: remove the queues _serverDispatchQueue = DispatchQueue(label: "Server", qos: .background) _clientDispatchQueue = DispatchQueue(label: "Client", qos: .background) } @@ -197,7 +198,7 @@ class ControllerHelperI: ControllerHelper, TextWriter { let className = "\(_testName).\(_exe)" - _queue.async { + Task { do { let testHelper = TestBundle.getTestHelper(name: className) testHelper.setControllerHelper(controllerHelper: self) From 3d3dfcef0ba615640167534c1e89cd781988eeb9 Mon Sep 17 00:00:00 2001 From: Joe George Date: Fri, 30 Aug 2024 10:44:29 -0400 Subject: [PATCH 2/6] Move iAP into Ice --- Package.swift | 5 ----- config/Make.rules.Darwin | 2 +- cpp/include/Ice/Ice.h | 6 ++++++ cpp/include/{IceIAP => Ice/iAP}/ConnectionInfo.h | 0 cpp/include/{IceIAP => Ice/iAP}/EndpointInfo.h | 0 cpp/include/IceIAP/IceIAP.h | 11 ----------- cpp/src/Ice/Makefile.mk | 3 ++- cpp/src/{IceIAP => Ice/iAP}/Connector.h | 8 ++++---- cpp/src/{IceIAP => Ice/iAP}/Connector.mm | 2 +- cpp/src/{IceIAP => Ice/iAP}/EndpointI.h | 6 +++--- cpp/src/{IceIAP => Ice/iAP}/EndpointI.mm | 16 ++++++++-------- cpp/src/{IceIAP => Ice/iAP}/Transceiver.h | 8 ++++---- cpp/src/{IceIAP => Ice/iAP}/Transceiver.mm | 4 ++-- cpp/src/IceIAP/Makefile.mk | 14 -------------- swift/src/IceImpl/include/Config.h | 6 ------ 15 files changed, 31 insertions(+), 60 deletions(-) rename cpp/include/{IceIAP => Ice/iAP}/ConnectionInfo.h (100%) rename cpp/include/{IceIAP => Ice/iAP}/EndpointInfo.h (100%) delete mode 100644 cpp/include/IceIAP/IceIAP.h rename cpp/src/{IceIAP => Ice/iAP}/Connector.h (89%) rename cpp/src/{IceIAP => Ice/iAP}/Connector.mm (98%) rename cpp/src/{IceIAP => Ice/iAP}/EndpointI.h (97%) rename cpp/src/{IceIAP => Ice/iAP}/EndpointI.mm (98%) rename cpp/src/{IceIAP => Ice/iAP}/Transceiver.h (94%) rename cpp/src/{IceIAP => Ice/iAP}/Transceiver.mm (99%) delete mode 100644 cpp/src/IceIAP/Makefile.mk diff --git a/Package.swift b/Package.swift index bf0da70723e..e14b7870f5f 100644 --- a/Package.swift +++ b/Package.swift @@ -70,7 +70,6 @@ let package = Package( "IceCpp", "IceDiscoveryCpp", "IceLocatorDiscoveryCpp", - .target(name:"IceIAPCpp", condition: .when(platforms: [.iOS])) ], path: "swift/src/IceImpl", cxxSettings: [ @@ -96,10 +95,6 @@ let package = Package( path: "cpp/lib/IceLocatorDiscovery.xcframework" ), - .binaryTarget( - name: "IceIAPCpp", - path: "cpp/lib/IceIAP.xcframework" - ), .executableTarget( name: "slice2swift", dependencies: ["mcpp"], diff --git a/config/Make.rules.Darwin b/config/Make.rules.Darwin index c7b27f8c3ac..31d1d3fb420 100644 --- a/config/Make.rules.Darwin +++ b/config/Make.rules.Darwin @@ -4,7 +4,7 @@ supported-platforms = macosx iphoneos iphonesimulator -xcframeworks = Ice IceDiscovery IceLocatorDiscovery IceIAP +xcframeworks = Ice IceDiscovery IceLocatorDiscovery macosx_ar = libtool macosx_cppflags = -mmacosx-version-min=12.00 diff --git a/cpp/include/Ice/Ice.h b/cpp/include/Ice/Ice.h index a3e7abfb3b6..678069b2d66 100644 --- a/cpp/include/Ice/Ice.h +++ b/cpp/include/Ice/Ice.h @@ -56,6 +56,12 @@ # include "Ice/PropertiesAdmin.h" # include "Ice/RemoteLogger.h" # include "Ice/Router.h" + +// Include Apple iAP headers if building for iOS +# if defined(__APPLE__) && TARGET_OS_IPHONE != 0 +# include "iAP/ConnectionInfo.h" +# include "iAP/EndpointInfo.h" +# endif #endif #endif diff --git a/cpp/include/IceIAP/ConnectionInfo.h b/cpp/include/Ice/iAP/ConnectionInfo.h similarity index 100% rename from cpp/include/IceIAP/ConnectionInfo.h rename to cpp/include/Ice/iAP/ConnectionInfo.h diff --git a/cpp/include/IceIAP/EndpointInfo.h b/cpp/include/Ice/iAP/EndpointInfo.h similarity index 100% rename from cpp/include/IceIAP/EndpointInfo.h rename to cpp/include/Ice/iAP/EndpointInfo.h diff --git a/cpp/include/IceIAP/IceIAP.h b/cpp/include/IceIAP/IceIAP.h deleted file mode 100644 index 95f28537211..00000000000 --- a/cpp/include/IceIAP/IceIAP.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#ifndef ICE_IAP_ICE_IAP_H -#define ICE_IAP_ICE_IAP_H - -#include "ConnectionInfo.h" -#include "EndpointInfo.h" - -#endif diff --git a/cpp/src/Ice/Makefile.mk b/cpp/src/Ice/Makefile.mk index 4e4c2917c25..65f7c3352ce 100644 --- a/cpp/src/Ice/Makefile.mk +++ b/cpp/src/Ice/Makefile.mk @@ -28,7 +28,8 @@ endif endif Ice[iphoneos]_excludes := $(wildcard src/Ice/CtrlCHandler.cpp $(addprefix $(currentdir)/,Tcp*.cpp Service.cpp)) -Ice[iphoneos]_extra_sources := $(wildcard $(addprefix $(currentdir)/ios/,*.cpp *.mm)) +Ice[iphoneos]_extra_sources := $(wildcard $(addprefix $(currentdir)/ios/,*.cpp *.mm))\ + $(wildcard $(addprefix $(currentdir)/iAP/,*.cpp *.mm)) Ice[iphonesimulator]_excludes = $(Ice[iphoneos]_excludes) Ice[iphonesimulator]_extra_sources = $(Ice[iphoneos]_extra_sources) diff --git a/cpp/src/IceIAP/Connector.h b/cpp/src/Ice/iAP/Connector.h similarity index 89% rename from cpp/src/IceIAP/Connector.h rename to cpp/src/Ice/iAP/Connector.h index 0dc5158a03f..022206e06d4 100644 --- a/cpp/src/IceIAP/Connector.h +++ b/cpp/src/Ice/iAP/Connector.h @@ -5,10 +5,10 @@ #ifndef ICE_IAP_CONNECTOR_H #define ICE_IAP_CONNECTOR_H -#include "../Ice/Connector.h" -#include "../Ice/ProtocolInstanceF.h" -#include "../Ice/TraceLevelsF.h" -#include "../Ice/TransceiverF.h" +#include "../Connector.h" +#include "../ProtocolInstanceF.h" +#include "../TraceLevelsF.h" +#include "../TransceiverF.h" #include "Ice/Logger.h" #import diff --git a/cpp/src/IceIAP/Connector.mm b/cpp/src/Ice/iAP/Connector.mm similarity index 98% rename from cpp/src/IceIAP/Connector.mm rename to cpp/src/Ice/iAP/Connector.mm index d30a9ccb8f2..d0596a5ab8c 100644 --- a/cpp/src/IceIAP/Connector.mm +++ b/cpp/src/Ice/iAP/Connector.mm @@ -6,7 +6,7 @@ #if TARGET_OS_IPHONE != 0 -# include "../Ice/ProtocolInstance.h" +# include "../ProtocolInstance.h" # include "Connector.h" # include "EndpointI.h" # include "Transceiver.h" diff --git a/cpp/src/IceIAP/EndpointI.h b/cpp/src/Ice/iAP/EndpointI.h similarity index 97% rename from cpp/src/IceIAP/EndpointI.h rename to cpp/src/Ice/iAP/EndpointI.h index 6af7d90f335..019632e63e5 100644 --- a/cpp/src/IceIAP/EndpointI.h +++ b/cpp/src/Ice/iAP/EndpointI.h @@ -5,9 +5,9 @@ #ifndef ICE_IAP_ENDPOINT_I_H #define ICE_IAP_ENDPOINT_I_H -#include "../Ice/EndpointFactory.h" -#include "../Ice/EndpointI.h" -#include "../Ice/ProtocolInstanceF.h" +#include "../EndpointFactory.h" +#include "../EndpointI.h" +#include "../ProtocolInstanceF.h" #include "Ice/SSL/ServerAuthenticationOptions.h" #include diff --git a/cpp/src/IceIAP/EndpointI.mm b/cpp/src/Ice/iAP/EndpointI.mm similarity index 98% rename from cpp/src/IceIAP/EndpointI.mm rename to cpp/src/Ice/iAP/EndpointI.mm index 026268259c6..f49648eb15b 100644 --- a/cpp/src/IceIAP/EndpointI.mm +++ b/cpp/src/Ice/iAP/EndpointI.mm @@ -6,12 +6,12 @@ #if TARGET_OS_IPHONE != 0 -# include "../Ice/DefaultsAndOverrides.h" -# include "../Ice/EndpointFactoryManager.h" -# include "../Ice/HashUtil.h" -# include "../Ice/Network.h" -# include "../Ice/ProtocolInstance.h" -# include "../Ice/ProtocolPluginFacade.h" +# include "../DefaultsAndOverrides.h" +# include "../EndpointFactoryManager.h" +# include "../HashUtil.h" +# include "../Network.h" +# include "../ProtocolInstance.h" +# include "../ProtocolPluginFacade.h" # include "Connector.h" # include "EndpointI.h" # include "Ice/Initialize.h" @@ -20,8 +20,8 @@ # include "Ice/OutputStream.h" # include "Ice/Properties.h" # include "Ice/RegisterPlugins.h" -# include "IceIAP/ConnectionInfo.h" -# include "IceIAP/EndpointInfo.h" +# include "Ice/iAP/ConnectionInfo.h" +# include "Ice/iAP/EndpointInfo.h" # include diff --git a/cpp/src/IceIAP/Transceiver.h b/cpp/src/Ice/iAP/Transceiver.h similarity index 94% rename from cpp/src/IceIAP/Transceiver.h rename to cpp/src/Ice/iAP/Transceiver.h index c0d2ed1c7fe..07ab87425fc 100644 --- a/cpp/src/IceIAP/Transceiver.h +++ b/cpp/src/Ice/iAP/Transceiver.h @@ -5,10 +5,10 @@ #ifndef ICE_IAP_TRANSCEIVER_H #define ICE_IAP_TRANSCEIVER_H -#include "../Ice/Network.h" -#include "../Ice/ProtocolInstanceF.h" -#include "../Ice/Selector.h" -#include "../Ice/Transceiver.h" +#include "../Network.h" +#include "../ProtocolInstanceF.h" +#include "../Selector.h" +#include "../Transceiver.h" #import #import diff --git a/cpp/src/IceIAP/Transceiver.mm b/cpp/src/Ice/iAP/Transceiver.mm similarity index 99% rename from cpp/src/IceIAP/Transceiver.mm rename to cpp/src/Ice/iAP/Transceiver.mm index b4a5038eadc..1896bda8b91 100644 --- a/cpp/src/IceIAP/Transceiver.mm +++ b/cpp/src/Ice/iAP/Transceiver.mm @@ -9,9 +9,9 @@ # include "EndpointI.h" # include "Transceiver.h" -# include "IceIAP/ConnectionInfo.h" +# include "Ice/iAP/ConnectionInfo.h" -# include "../Ice/ProtocolInstance.h" +# include "../ProtocolInstance.h" # include "Ice/Buffer.h" # include "Ice/LocalExceptions.h" diff --git a/cpp/src/IceIAP/Makefile.mk b/cpp/src/IceIAP/Makefile.mk deleted file mode 100644 index 7cde92b9fb8..00000000000 --- a/cpp/src/IceIAP/Makefile.mk +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -$(project)_libraries = IceIAP - -IceIAP_configs := static -IceIAP_platforms := iphoneos iphonesimulator - -IceIAP_targetdir := $(libdir) -IceIAP_dependencies := Ice -IceIAP_cppflags := -DICEIAP_API_EXPORTS - -projects += $(project) diff --git a/swift/src/IceImpl/include/Config.h b/swift/src/IceImpl/include/Config.h index 94d1367733c..b540d3d37dd 100644 --- a/swift/src/IceImpl/include/Config.h +++ b/swift/src/IceImpl/include/Config.h @@ -6,13 +6,7 @@ #endif #ifdef __cplusplus - # include - -# if TARGET_OS_IPHONE -# include -# endif - #endif #define ICE_SWIFT_UNAVAILABLE(msg) __attribute__((unavailable(msg))) From 1adc347704b27e627e55cda5a12e4d04f6c13948 Mon Sep 17 00:00:00 2001 From: Joe George Date: Fri, 30 Aug 2024 11:23:20 -0400 Subject: [PATCH 3/6] Fixes --- cpp/include/Ice/iAP/ConnectionInfo.h | 4 ++-- cpp/include/Ice/iAP/EndpointInfo.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/include/Ice/iAP/ConnectionInfo.h b/cpp/include/Ice/iAP/ConnectionInfo.h index da88eceea6b..aab87ee1ee6 100644 --- a/cpp/include/Ice/iAP/ConnectionInfo.h +++ b/cpp/include/Ice/iAP/ConnectionInfo.h @@ -5,7 +5,7 @@ #ifndef ICE_IAP_CONNECTION_INFO_H #define ICE_IAP_CONNECTION_INFO_H -#include "Ice/Connection.h" +#include "../Connection.h" #if defined(__clang__) # pragma clang diagnostic push @@ -19,7 +19,7 @@ namespace IceIAP { /** * Provides access to the connection details of an IAP connection - * \headerfile IceIAP/IceIAP.h + * \headerfile Ice/Ice.h */ class ConnectionInfo : public Ice::ConnectionInfo { diff --git a/cpp/include/Ice/iAP/EndpointInfo.h b/cpp/include/Ice/iAP/EndpointInfo.h index 10cbd775fcb..1de603225ff 100644 --- a/cpp/include/Ice/iAP/EndpointInfo.h +++ b/cpp/include/Ice/iAP/EndpointInfo.h @@ -5,7 +5,7 @@ #ifndef ICE_IAP_ENDPOINT_INFO_H #define ICE_IAP_ENDPOINT_INFO_H -#include "Ice/Endpoint.h" +#include "../Endpoint.h" #if defined(__clang__) # pragma clang diagnostic push @@ -19,7 +19,7 @@ namespace IceIAP { /** * Provides access to an IAP endpoint information. - * \headerfile IceIAP/IceIAP.h + * \headerfile Ice/Ice.h */ class EndpointInfo : public Ice::EndpointInfo { From 37eace1fea552352e6ddc5eba34578a045729bd6 Mon Sep 17 00:00:00 2001 From: Joe George Date: Tue, 3 Sep 2024 10:36:00 -0400 Subject: [PATCH 4/6] Disable xcodesdk ci --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7039d0c30e..6259fbbb360 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,14 +55,14 @@ jobs: test_flags: "--platform=x64 --config=Debug" msbuild_project: "msbuild/ice.proj" - # Xcode SDK builds - # TODO - Should we also test the debug config here as well? - - os: macos-14 - config: "xcodesdk" - working_directory: "cpp" - build_flags: "CONFIGS=xcodesdk PLATFORMS=iphonesimulator" - test_flags: "--config=xcodesdk --platform=iphonesimulator --controller-app" - build_cpp_and_python: true + # # Xcode SDK builds + # # TODO - Should we also test the debug config here as well? + # - os: macos-14 + # config: "xcodesdk" + # working_directory: "cpp" + # build_flags: "CONFIGS=xcodesdk PLATFORMS=iphonesimulator" + # test_flags: "--config=xcodesdk --platform=iphonesimulator --controller-app" + # build_cpp_and_python: true # MATLAB - os: ubuntu-24.04 From f4a6d85764d40c11a1f96d0b6107a55f48406897 Mon Sep 17 00:00:00 2001 From: Joe George Date: Wed, 4 Sep 2024 10:26:42 -0400 Subject: [PATCH 5/6] Rename files --- cpp/include/Ice/Ice.h | 4 ++-- .../Ice/{iAP/ConnectionInfo.h => ios/iAPConnectionInfo.h} | 0 .../Ice/{iAP/EndpointInfo.h => ios/iAPEndpointInfo.h} | 0 cpp/src/Ice/Makefile.mk | 3 +-- cpp/src/Ice/{iAP/Connector.h => ios/iAPConnector.h} | 0 cpp/src/Ice/{iAP/Connector.mm => ios/iAPConnector.mm} | 6 +++--- cpp/src/Ice/{iAP/EndpointI.h => ios/iAPEndpointI.h} | 0 cpp/src/Ice/{iAP/EndpointI.mm => ios/iAPEndpointI.mm} | 8 ++++---- cpp/src/Ice/{iAP/Transceiver.h => ios/iAPTransceiver.h} | 0 cpp/src/Ice/{iAP/Transceiver.mm => ios/iAPTransceiver.mm} | 6 +++--- 10 files changed, 13 insertions(+), 14 deletions(-) rename cpp/include/Ice/{iAP/ConnectionInfo.h => ios/iAPConnectionInfo.h} (100%) rename cpp/include/Ice/{iAP/EndpointInfo.h => ios/iAPEndpointInfo.h} (100%) rename cpp/src/Ice/{iAP/Connector.h => ios/iAPConnector.h} (100%) rename cpp/src/Ice/{iAP/Connector.mm => ios/iAPConnector.mm} (97%) rename cpp/src/Ice/{iAP/EndpointI.h => ios/iAPEndpointI.h} (100%) rename cpp/src/Ice/{iAP/EndpointI.mm => ios/iAPEndpointI.mm} (99%) rename cpp/src/Ice/{iAP/Transceiver.h => ios/iAPTransceiver.h} (100%) rename cpp/src/Ice/{iAP/Transceiver.mm => ios/iAPTransceiver.mm} (99%) diff --git a/cpp/include/Ice/Ice.h b/cpp/include/Ice/Ice.h index 678069b2d66..743dec4cb62 100644 --- a/cpp/include/Ice/Ice.h +++ b/cpp/include/Ice/Ice.h @@ -59,8 +59,8 @@ // Include Apple iAP headers if building for iOS # if defined(__APPLE__) && TARGET_OS_IPHONE != 0 -# include "iAP/ConnectionInfo.h" -# include "iAP/EndpointInfo.h" +# include "ios/iAPConnectionInfo.h" +# include "ios/iAPEndpointInfo.h" # endif #endif diff --git a/cpp/include/Ice/iAP/ConnectionInfo.h b/cpp/include/Ice/ios/iAPConnectionInfo.h similarity index 100% rename from cpp/include/Ice/iAP/ConnectionInfo.h rename to cpp/include/Ice/ios/iAPConnectionInfo.h diff --git a/cpp/include/Ice/iAP/EndpointInfo.h b/cpp/include/Ice/ios/iAPEndpointInfo.h similarity index 100% rename from cpp/include/Ice/iAP/EndpointInfo.h rename to cpp/include/Ice/ios/iAPEndpointInfo.h diff --git a/cpp/src/Ice/Makefile.mk b/cpp/src/Ice/Makefile.mk index 65f7c3352ce..4e4c2917c25 100644 --- a/cpp/src/Ice/Makefile.mk +++ b/cpp/src/Ice/Makefile.mk @@ -28,8 +28,7 @@ endif endif Ice[iphoneos]_excludes := $(wildcard src/Ice/CtrlCHandler.cpp $(addprefix $(currentdir)/,Tcp*.cpp Service.cpp)) -Ice[iphoneos]_extra_sources := $(wildcard $(addprefix $(currentdir)/ios/,*.cpp *.mm))\ - $(wildcard $(addprefix $(currentdir)/iAP/,*.cpp *.mm)) +Ice[iphoneos]_extra_sources := $(wildcard $(addprefix $(currentdir)/ios/,*.cpp *.mm)) Ice[iphonesimulator]_excludes = $(Ice[iphoneos]_excludes) Ice[iphonesimulator]_extra_sources = $(Ice[iphoneos]_extra_sources) diff --git a/cpp/src/Ice/iAP/Connector.h b/cpp/src/Ice/ios/iAPConnector.h similarity index 100% rename from cpp/src/Ice/iAP/Connector.h rename to cpp/src/Ice/ios/iAPConnector.h diff --git a/cpp/src/Ice/iAP/Connector.mm b/cpp/src/Ice/ios/iAPConnector.mm similarity index 97% rename from cpp/src/Ice/iAP/Connector.mm rename to cpp/src/Ice/ios/iAPConnector.mm index d0596a5ab8c..2bed280623c 100644 --- a/cpp/src/Ice/iAP/Connector.mm +++ b/cpp/src/Ice/ios/iAPConnector.mm @@ -7,9 +7,9 @@ #if TARGET_OS_IPHONE != 0 # include "../ProtocolInstance.h" -# include "Connector.h" -# include "EndpointI.h" -# include "Transceiver.h" +# include "iAPConnector.h" +# include "iAPEndpointI.h" +# include "iAPTransceiver.h" using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/iAP/EndpointI.h b/cpp/src/Ice/ios/iAPEndpointI.h similarity index 100% rename from cpp/src/Ice/iAP/EndpointI.h rename to cpp/src/Ice/ios/iAPEndpointI.h diff --git a/cpp/src/Ice/iAP/EndpointI.mm b/cpp/src/Ice/ios/iAPEndpointI.mm similarity index 99% rename from cpp/src/Ice/iAP/EndpointI.mm rename to cpp/src/Ice/ios/iAPEndpointI.mm index f49648eb15b..efde86766e9 100644 --- a/cpp/src/Ice/iAP/EndpointI.mm +++ b/cpp/src/Ice/ios/iAPEndpointI.mm @@ -12,16 +12,16 @@ # include "../Network.h" # include "../ProtocolInstance.h" # include "../ProtocolPluginFacade.h" -# include "Connector.h" -# include "EndpointI.h" +# include "iAPConnector.h" +# include "iAPEndpointI.h" # include "Ice/Initialize.h" # include "Ice/InputStream.h" # include "Ice/LocalExceptions.h" # include "Ice/OutputStream.h" # include "Ice/Properties.h" # include "Ice/RegisterPlugins.h" -# include "Ice/iAP/ConnectionInfo.h" -# include "Ice/iAP/EndpointInfo.h" +# include "Ice/ios/iAPConnectionInfo.h" +# include "Ice/ios/iAPEndpointInfo.h" # include diff --git a/cpp/src/Ice/iAP/Transceiver.h b/cpp/src/Ice/ios/iAPTransceiver.h similarity index 100% rename from cpp/src/Ice/iAP/Transceiver.h rename to cpp/src/Ice/ios/iAPTransceiver.h diff --git a/cpp/src/Ice/iAP/Transceiver.mm b/cpp/src/Ice/ios/iAPTransceiver.mm similarity index 99% rename from cpp/src/Ice/iAP/Transceiver.mm rename to cpp/src/Ice/ios/iAPTransceiver.mm index eb8938d7601..6e680d32193 100644 --- a/cpp/src/Ice/iAP/Transceiver.mm +++ b/cpp/src/Ice/ios/iAPTransceiver.mm @@ -6,10 +6,10 @@ #if TARGET_OS_IPHONE != 0 -# include "EndpointI.h" -# include "Transceiver.h" +# include "iAPEndpointI.h" +# include "iAPTransceiver.h" -# include "Ice/iAP/ConnectionInfo.h" +# include "Ice/ios/iAPConnectionInfo.h" # include "../ProtocolInstance.h" # include "Ice/Buffer.h" From 9e71245343559fd7af8ee7b095d8d6a48af0eab4 Mon Sep 17 00:00:00 2001 From: Joe George Date: Wed, 4 Sep 2024 10:28:40 -0400 Subject: [PATCH 6/6] Clang format --- cpp/src/Ice/ios/iAPEndpointI.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/Ice/ios/iAPEndpointI.mm b/cpp/src/Ice/ios/iAPEndpointI.mm index efde86766e9..0118b7c19b6 100644 --- a/cpp/src/Ice/ios/iAPEndpointI.mm +++ b/cpp/src/Ice/ios/iAPEndpointI.mm @@ -12,8 +12,6 @@ # include "../Network.h" # include "../ProtocolInstance.h" # include "../ProtocolPluginFacade.h" -# include "iAPConnector.h" -# include "iAPEndpointI.h" # include "Ice/Initialize.h" # include "Ice/InputStream.h" # include "Ice/LocalExceptions.h" @@ -22,6 +20,8 @@ # include "Ice/RegisterPlugins.h" # include "Ice/ios/iAPConnectionInfo.h" # include "Ice/ios/iAPEndpointInfo.h" +# include "iAPConnector.h" +# include "iAPEndpointI.h" # include