Skip to content

Commit c3de0ac

Browse files
committed
Test changes
1 parent 423772b commit c3de0ac

3 files changed

Lines changed: 19 additions & 20 deletions

File tree

β€Žfastlane/Fastfileβ€Ž

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,20 @@ lane :release do |options|
102102
end
103103

104104
private_lane :build_xcframework do |options|
105-
sh("./scripts/sync_gclient.sh #{options[:branch]}")
105+
ENV['PATH'] = "#{ENV.fetch('PATH', nil)}:#{Dir.home}/webrtc/depot_tools"
106+
sh("./sync_gclient.sh #{options[:branch]}")
106107
inject_objc_runtime_name
107-
sh("./scripts/build_xcframework.sh")
108+
109+
Dir.chdir('src') do
110+
sh("./tools_webrtc/ios/build_ios_libs.py \
111+
--deployment-target 13.0 \
112+
--extra-gn-args \
113+
is_debug=false \
114+
use_goma=false \
115+
use_rtti=true \
116+
rtc_libvpx_build_vp9=true")
117+
end
118+
108119
current_path = File.expand_path('src/out_ios_libs/WebRTC.xcframework')
109120
new_path = "./#{File.basename(current_path)}"
110121
FileUtils.mv(current_path, new_path)
@@ -176,8 +187,7 @@ end
176187
private_lane :inject_objc_runtime_name do
177188
prefix = 'StreamRTC'
178189
Dir.glob('src/**/*.{h,m,mm}') do |file|
179-
next unless File.file?(file)
180-
next if file.include?('/build/') || file.include?('.git')
190+
next if !File.file?(file) || file.include?('/build/') || file.include?('.git')
181191

182192
content = File.read(file, mode: 'rb').encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
183193
original = content.dup
@@ -190,14 +200,13 @@ private_lane :inject_objc_runtime_name do
190200
pre_context = content[0...Regexp.last_match.begin(0)].split("\n").last(3).join("\n")
191201
next match if pre_context.include?('objc_runtime_name')
192202

193-
attr_line = "#{indent}__attribute__((objc_runtime_name(\"#{prefix}#{classname[3..]}\")))\n"
194-
"#{attr_line}#{match}"
203+
"#{indent}__attribute__((objc_runtime_name(\"#{prefix}#{classname[3..]}\")))\n#{match}"
195204
end
196205

197-
if new_content != original
198-
UI.message("πŸ‘‰ #{file}")
199-
File.write(file, new_content)
200-
end
206+
next if new_content == original
207+
208+
UI.message("πŸ”§ #{file}")
209+
File.write(file, new_content)
201210
end
202211
end
203212

β€Žfastlane/scripts/build_xcframework.shβ€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ if ! command -v gclient &> /dev/null; then
55
mkdir $HOME/webrtc
66
cd $HOME/webrtc
77
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
8-
export PATH=$PATH:$HOME/webrtc/depot_tools
98
cd $current_dir
109
fi
1110

0 commit comments

Comments
Β (0)