cocoapods-bb-PodAssistant 0.1.9.1 → 0.1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment.rb +9 -1
- data/lib/cocoapods-bb-PodAssistant/babybus/helpers/babybus_info_plist_helper.rb +12 -4
- data/lib/cocoapods-bb-PodAssistant/babybus/installer/post_install_hooks.rb +27 -17
- data/lib/cocoapods-bb-PodAssistant/gem_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32ae7a754051168b335839ef24e3241e10ae8c1ce9772b65ae1add131a591744
|
4
|
+
data.tar.gz: fabd94ec00e74cd9b40dcbbf176baca21d88e54d640ddaf82b3c085520649807
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3945a8e16d272daa2b8a13e6fa412127bd055b1f85f97b6dbee51c56df0465dce8a8403d913139bb669239e1c7926341e6f8e5a7a60f619b49f614983cb1f387
|
7
|
+
data.tar.gz: 1d27d7075c0fae3e206182a07b2c061f2d1f67907083ff938084ed34d4bc4d872d19d6a55a1e09abfaaf3879b99ec47ec3fd2c101ff10e1eb617c9598ff23509
|
@@ -13,12 +13,16 @@ class BabybusInstallEnv
|
|
13
13
|
rootPath = getProjectRootPath
|
14
14
|
bundleIdentifier = getProjectBundleIdentifier
|
15
15
|
path = File.join(rootPath, "Configs", "#{bundleIdentifier}/BBPlistMacro.h")
|
16
|
+
puts "查找PlistMacro文件1:#{path}"
|
16
17
|
if !File.file?(path)
|
17
18
|
path = File.join(rootPath, "Configs/PlistMacro", "#{bundleIdentifier}/BBPlistMacro.h")
|
19
|
+
puts "查找PlistMacro文件2:#{path}"
|
18
20
|
if !File.file?(path)
|
19
21
|
path = File.join(rootPath, "Configs/PlistMacro", "#{bundleIdentifier}_BBPlistMacro.h")
|
22
|
+
puts "查找PlistMacro文件3:#{path}"
|
20
23
|
if !File.file?(path)
|
21
24
|
path = File.join(rootPath, "Configs/PlistMacro", "BBPlistMacro.h")
|
25
|
+
puts "查找PlistMacro文件4:#{path}"
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
@@ -51,12 +55,16 @@ class BabybusInstallEnv
|
|
51
55
|
rootPath = getProjectRootPath
|
52
56
|
bundleIdentifier = getProjectBundleIdentifier
|
53
57
|
path = File.join(rootPath, "Configs", "#{bundleIdentifier}/UnityFramework.framework")
|
58
|
+
puts "查找UnityFramework产物1:#{path}"
|
54
59
|
if !File.file?(path)
|
55
60
|
path = File.join(rootPath, "Configs/UnityFramework", "#{bundleIdentifier}/UnityFramework.framework")
|
61
|
+
puts "查找UnityFramework产物2:#{path}"
|
56
62
|
if !File.directory?(path)
|
57
63
|
path = File.join(rootPath, "Configs/UnityFramework", "#{bundleIdentifier}_UnityFramework.framework")
|
64
|
+
puts "查找UnityFramework产物3:#{path}"
|
58
65
|
if !File.directory?(path)
|
59
66
|
path = File.join(rootPath, "Configs/UnityFramework", "UnityFramework.framework")
|
67
|
+
puts "查找UnityFramework产物4:#{path}"
|
60
68
|
end
|
61
69
|
end
|
62
70
|
end
|
@@ -78,7 +86,7 @@ class BabybusInstallEnv
|
|
78
86
|
system "rm -rf #{replaceFilePath}; cp -af #{path} #{replaceFilePath}"
|
79
87
|
puts "替换UnityFramework文件成功".yellow
|
80
88
|
else
|
81
|
-
puts "找不到UnityFramework
|
89
|
+
puts "找不到UnityFramework产物文件,替换失败".red
|
82
90
|
end
|
83
91
|
end
|
84
92
|
# 2D母包替换
|
@@ -24,12 +24,20 @@ def forceAddDebugTool
|
|
24
24
|
forceAddDebugTool = BB::PodUtils.getValueFromInfoPlist("ForceAddDebugTool")
|
25
25
|
return forceAddDebugTool === "true"
|
26
26
|
end
|
27
|
-
# 是否3d产品
|
27
|
+
# 是否3d产品(968开始切新版unity2022引擎)
|
28
28
|
def isUnity3DApp
|
29
|
-
|
30
|
-
|
29
|
+
if isUnityApp
|
30
|
+
# 1=>Cocos2D; 2=>Unity2D; 3=>普通 Unity3D; 4=>新版 Unity 3D; 5=>2D融合 打包机负责写入
|
31
|
+
value = BB::PodUtils.getValueFromInfoPlist("packer_engines_id")
|
32
|
+
return value === "4"
|
33
|
+
end
|
34
|
+
return false
|
35
|
+
end
|
36
|
+
# 是否unity产品,包含2d/3d
|
37
|
+
def isUnityApp
|
38
|
+
value = BB::PodUtils.getValueFromInfoPlist("Unity3D")
|
39
|
+
return value === "true"
|
31
40
|
end
|
32
|
-
|
33
41
|
# 是否需要第三方支付sdk
|
34
42
|
def isThirdPaySdk
|
35
43
|
value = BB::PodUtils.getValueFromInfoPlist("Third_Purcharse")
|
@@ -7,36 +7,46 @@ require 'cocoapods-bb-PodAssistant/babybus/business/babybus_install_environment'
|
|
7
7
|
require 'cocoapods-bb-PodAssistant/helpers/pod_utils'
|
8
8
|
|
9
9
|
class PodPostInstaller
|
10
|
-
def initialize(lib, deployment_target=
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
def initialize(lib, deployment_target=nil)
|
11
|
+
@lib = lib
|
12
|
+
puts "====isUnity3DApp:#{isUnity3DApp}".red
|
13
|
+
if deployment_target.nil?
|
14
|
+
@deployment_target = isUnity3DApp ? "12.0" : "11.0" # Unity2022引擎最低支持iOS12.0
|
15
|
+
else
|
16
|
+
@deployment_target = deployment_target
|
17
|
+
end
|
14
18
|
end
|
15
19
|
def run
|
16
20
|
env = BabybusInstallEnv.new()
|
17
21
|
is_xcode15 = BB::PodUtils.compare_xcode_15_version
|
18
22
|
# 是否Untify项目
|
19
|
-
isUnityProject =
|
20
|
-
|
23
|
+
isUnityProject = isUnityApp
|
21
24
|
# Untify项目需要移除cocos项目res/src目录
|
22
25
|
if (isUnityProject) then
|
23
26
|
env.createCocosResource
|
24
27
|
end
|
25
|
-
ios_deployment_target =
|
26
|
-
puts "当前工程最低支持iOS
|
28
|
+
ios_deployment_target = @deployment_target
|
29
|
+
puts "当前工程最低支持iOS系统 ===> #{ios_deployment_target.to_s.send(:red)}".green
|
27
30
|
@lib.aggregate_targets.first.user_project.save # 解决Xcode13 pod update操作出现failed to save pods.xcodeproj问题 by hm 21/11/8
|
28
31
|
project = Xcodeproj::Project.open(BB::PodUtils.getXcodeprojPath)
|
29
32
|
project.targets.each do |target|
|
30
33
|
target.build_configurations.each do |config|
|
31
|
-
if
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
if !target.name.include? '_test' # 过滤target test 工程
|
35
|
+
if config.name.include? 'Debug' # 只有debug环境才进行替换操作,其它环境交由打包机处理
|
36
|
+
puts "[#{target.name}/#{config.name}] 开发者debug环境环境替换[PlistMacro/cocos/unity]文件操作,其它环境交由打包机处理".red
|
37
|
+
env.copyPlistMacro # 开发自行打开不能提交到版本控制,避免test包出现配置不正确情况 by hm 22/5/17
|
38
|
+
if (isUnityProject) then
|
39
|
+
env.copyUnityFramework
|
40
|
+
else
|
41
|
+
env.copyCocosPackage
|
42
|
+
end
|
43
|
+
end
|
44
|
+
# iOS17适配添加ld64
|
45
|
+
if (is_xcode15 == true) then
|
46
|
+
config.build_settings['OTHER_LDFLAGS'] = "$(inherited) -lxml2 -lz -ObjC -lstdc++ -ld64"
|
47
|
+
else
|
48
|
+
config.build_settings['OTHER_LDFLAGS'] = "$(inherited) -lxml2 -lz -ObjC -lstdc++"
|
49
|
+
end
|
40
50
|
end
|
41
51
|
end
|
42
52
|
end
|