Skip to content

Commit

Permalink
chore: fixing Test Library (for non natives)
Browse files Browse the repository at this point in the history
  • Loading branch information
genadyb authored and uerceg committed Oct 24, 2024
1 parent c419718 commit e162ca0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 51,7 @@
524BACB8221D5A3600624F6C /* ATLControlSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 524BACB6221D5A3600624F6C /* ATLControlSignal.m */; };
6F08425C2007782600568A31 /* ATLTestLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F08424F2007782500568A31 /* ATLTestLibrary.m */; };
6F08425E2007782600568A31 /* ATLUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0842562007782500568A31 /* ATLUtil.m */; };
6F666C922C00B058005A6D90 /* ATLNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F666C902C00B058005A6D90 /* ATLNetworking.h */; };
6F666C922C00B058005A6D90 /* ATLNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F666C902C00B058005A6D90 /* ATLNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
6F666C932C00B058005A6D90 /* ATLNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F666C912C00B058005A6D90 /* ATLNetworking.m */; };
6FFCFE752007AE0000467F01 /* ATLBlockingQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FFCFE742007AE0000467F01 /* ATLBlockingQueue.m */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -200,14 200,14 @@
524BAC8A221C4E0B00624F6C /* PSWebSocketNetworkThread.h in Headers */,
524BAC8E221C4E0B00624F6C /* PSWebSocketTypes.h in Headers */,
20AC303F203C205B00CD9DA8 /* ATLTestLibrary.h in Headers */,
6F666C922C00B058005A6D90 /* ATLNetworking.h in Headers */,
524BAC7E221C4E0B00624F6C /* PocketSocket-Prefix.pch in Headers */,
524BAC81221C4E0B00624F6C /* PSWebSocketBuffer.h in Headers */,
524BACAE221D529900624F6C /* ATLControlWebSocketClient.h in Headers */,
524BAC8F221C4E0B00624F6C /* PSWebSocketUTF8Decoder.h in Headers */,
20AC3042203C206300CD9DA8 /* ATLConstants.h in Headers */,
524BAC7F221C4E0B00624F6C /* PSWebSocket.h in Headers */,
524BAC85221C4E0B00624F6C /* PSWebSocketDriver.h in Headers */,
6F666C922C00B058005A6D90 /* ATLNetworking.h in Headers */,
524BAC8C221C4E0B00624F6C /* PSWebSocketServer.h in Headers */,
20AC3044203C206800CD9DA8 /* ATLBlockingQueue.h in Headers */,
524BAC89221C4E0B00624F6C /* PSWebSocketInternal.h in Headers */,
Expand Down Expand Up @@ -290,7 290,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\n# If we're already inside this script then die\nif [ -n \"$RW_MULTIPLATFORM_BUILD_IN_PROGRESS\" ]; then\nexit 0\nfi\nexport RW_MULTIPLATFORM_BUILD_IN_PROGRESS=1\n\nRW_FRAMEWORK_NAME=${PROJECT_NAME}\nRW_INPUT_STATIC_LIB=\"lib${PROJECT_NAME}.a\"\nRW_FRAMEWORK_LOCATION=\"${BUILT_PRODUCTS_DIR}/static/${RW_FRAMEWORK_NAME}.framework\"\n\nfunction build_static_library {\n echo \"1\"\n echo \"${BUILD_DIR}\"\n # Will rebuild the static library as specified\n # build_static_library sdk\n xcrun xcodebuild -project \"${PROJECT_FILE_PATH}\" \\\n -target \"${TARGET_NAME}\" \\\n -configuration \"${CONFIGURATION}\" \\\n -sdk \"${1}\" \\\n ONLY_ACTIVE_ARCH=NO \\\n BUILD_DIR=\"${BUILD_DIR}\" \\\n OBJROOT=\"${OBJROOT}/DependantBuilds\" \\\n BUILD_ROOT=\"${BUILD_ROOT}\" \\\n SYMROOT=\"${SYMROOT}\" $ACTION\n}\n\nfunction make_fat_library {\n # Will smash 2 static libs together\n # make_fat_library in1 in2 out\n xcrun lipo -create \"${1}\" \"${2}\" -output \"${3}\"\n}\n\n# 1 - Extract the platform (iphoneos/iphonesimulator) from the SDK name\nif [[ \"$SDK_NAME\" =~ ([A-Za-z] ) ]]; then\nRW_SDK_PLATFORM=${BASH_REMATCH[1]}\nelse\necho \"Could not find platform name from SDK_NAME: $SDK_NAME\"\nexit 1\nfi\n\n# 2 - Extract the version from the SDK\nif [[ \"$SDK_NAME\" =~ ([0-9] .*$) ]]; then\nRW_SDK_VERSION=${BASH_REMATCH[1]}\nelse\necho \"Could not find sdk version from SDK_NAME: $SDK_NAME\"\nexit 1\nfi\n\n# 3 - Determine the other platform\nif [ \"$RW_SDK_PLATFORM\" == \"iphoneos\" ]; then\nRW_OTHER_PLATFORM=iphonesimulator\nelse\nRW_OTHER_PLATFORM=iphoneos\nfi\n\n# 4 - Find the build directory\nif [[ \"$BUILT_PRODUCTS_DIR\" =~ (.*)$RW_SDK_PLATFORM$ ]]; then\nRW_OTHER_BUILT_PRODUCTS_DIR=\"${BASH_REMATCH[1]}${RW_OTHER_PLATFORM}\"\nelse\necho \"Could not find other platform build directory.\"\nexit 1\nfi\n\n# Build the other platform.\nbuild_static_library \"${RW_OTHER_PLATFORM}${RW_SDK_VERSION}\"\n\n# If we're currently building for iphonesimulator, then need to rebuild\n# to ensure that we get both i386 and x86_64\nif [ \"$RW_SDK_PLATFORM\" == \"iphonesimulator\" ]; then\nbuild_static_library \"${SDK_NAME}\"\nfi\n\n# Join the 2 static libs into 1 and push into the .framework\nmake_fat_library \"${BUILT_PRODUCTS_DIR}/${RW_INPUT_STATIC_LIB}\" \\\n\"${RW_OTHER_BUILT_PRODUCTS_DIR}/${RW_INPUT_STATIC_LIB}\" \\\n\"${RW_FRAMEWORK_LOCATION}/Versions/A/${RW_FRAMEWORK_NAME}\"\n\n# Ensure that the framework is present in both platform's build directories\ncp -a \"${RW_FRAMEWORK_LOCATION}/Versions/A/${RW_FRAMEWORK_NAME}\" \\\n\"${RW_OTHER_BUILT_PRODUCTS_DIR}/static/${RW_FRAMEWORK_NAME}.framework/Versions/A/${RW_FRAMEWORK_NAME}\"\n\n# Copy the framework to the project directory\nditto \"${RW_FRAMEWORK_LOCATION}\" \"${SRCROOT}/../../sdk_distribution/test-static-framework/${RW_FRAMEWORK_NAME}.framework\"\n";
shellScript = "set -e\n\n# If we're already inside this script then die\nif [ -n \"$RW_MULTIPLATFORM_BUILD_IN_PROGRESS\" ]; then\nexit 0\nfi\nexport RW_MULTIPLATFORM_BUILD_IN_PROGRESS=1\n\nRW_FRAMEWORK_NAME=${PROJECT_NAME}\nRW_INPUT_STATIC_LIB=\"lib${PROJECT_NAME}.a\"\nRW_FRAMEWORK_LOCATION=\"${BUILT_PRODUCTS_DIR}/static/${RW_FRAMEWORK_NAME}.framework\"\n\nfunction build_static_library {\n echo \"1\"\n echo \"${BUILD_DIR}\"\n # Will rebuild the static library as specified\n # build_static_library sdk\n xcrun xcodebuild -project \"${PROJECT_FILE_PATH}\" \\\n -target \"${TARGET_NAME}\" \\\n -configuration \"${CONFIGURATION}\" \\\n -sdk \"${1}\" \\\n ONLY_ACTIVE_ARCH=NO \\\n BUILD_DIR=\"${BUILD_DIR}\" \\\n OBJROOT=\"${OBJROOT}/DependantBuilds\" \\\n BUILD_ROOT=\"${BUILD_ROOT}\" \\\n SYMROOT=\"${SYMROOT}\" $ACTION\n}\n\nfunction make_fat_library {\n # Will smash 2 static libs together\n # make_fat_library in1 in2 out\n xcrun lipo -create \"${1}\" \"${2}\" -output \"${3}\"\n}\n\n# 1 - Extract the platform (iphoneos/iphonesimulator) from the SDK name\nif [[ \"$SDK_NAME\" =~ ([A-Za-z] ) ]]; then\nRW_SDK_PLATFORM=${BASH_REMATCH[1]}\nelse\necho \"Could not find platform name from SDK_NAME: $SDK_NAME\"\nexit 1\nfi\n\n# 2 - Extract the version from the SDK\nif [[ \"$SDK_NAME\" =~ ([0-9] .*$) ]]; then\nRW_SDK_VERSION=${BASH_REMATCH[1]}\nelse\necho \"Could not find sdk version from SDK_NAME: $SDK_NAME\"\nexit 1\nfi\n\n# 3 - Determine the other platform\nif [ \"$RW_SDK_PLATFORM\" == \"iphoneos\" ]; then\nRW_OTHER_PLATFORM=iphonesimulator\nelse\nRW_OTHER_PLATFORM=iphoneos\nfi\n\n# 4 - Find the build directory\nif [[ \"$BUILT_PRODUCTS_DIR\" =~ (.*)$RW_SDK_PLATFORM$ ]]; then\nRW_OTHER_BUILT_PRODUCTS_DIR=\"${BASH_REMATCH[1]}${RW_OTHER_PLATFORM}\"\nelse\necho \"Could not find other platform build directory.\"\nexit 1\nfi\n\n# Build the other platform.\nbuild_static_library \"${RW_OTHER_PLATFORM}${RW_SDK_VERSION}\"\n\n# If we're currently building for iphonesimulator, then need to rebuild\n# to ensure that we get both i386 and x86_64\nif [ \"$RW_SDK_PLATFORM\" == \"iphonesimulator\" ]; then\nbuild_static_library \"${SDK_NAME}\"\nfi\n\n# Join the 2 static libs into 1 and push into the .framework\nmake_fat_library \"${BUILT_PRODUCTS_DIR}/${RW_INPUT_STATIC_LIB}\" \\\n\"${RW_OTHER_BUILT_PRODUCTS_DIR}/${RW_INPUT_STATIC_LIB}\" \\\n\"${RW_FRAMEWORK_LOCATION}/Versions/A/${RW_FRAMEWORK_NAME}\"\n\n# Ensure that the framework is present in both platform's build directories\ncp -a \"${RW_FRAMEWORK_LOCATION}/Versions/A/${RW_FRAMEWORK_NAME}\" \\\n\"${RW_OTHER_BUILT_PRODUCTS_DIR}/static/${RW_FRAMEWORK_NAME}.framework/Versions/A/${RW_FRAMEWORK_NAME}\"\n\n# Copy the framework to the project directory (for nonnative script)\nditto \"${RW_FRAMEWORK_LOCATION}\" \"${SRCROOT}/../../Frameworks/static/${RW_FRAMEWORK_NAME}.framework\"\n\n\n# Copy the framework to the project directory (for SDK distribution)\nditto \"${RW_FRAMEWORK_LOCATION}\" \"${SRCROOT}/../../sdk_distribution/test-static-framework/${RW_FRAMEWORK_NAME}.framework\"\n";
};
9D8AB2B6203F202B0015DA32 /* Build Framework */ = {
isa = PBXShellScriptBuildPhase;
Expand Down

0 comments on commit e162ca0

Please sign in to comment.