pindo 5.11.1 → 5.11.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c01ace2237a0df141f7e2194f2826d967a770b00ceff2baf2fae6b1d0af8d7e1
|
|
4
|
+
data.tar.gz: 778177150ddcdb9aea701bb48c095d63d19ef6d2affb9478ea39f845e1c060d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 918922d789aeba7a7def7ccf5f43eb387044ceb1cf4b477ac845e3406ea5303e8764053cb39d6c0c7b5523e4bac49f3e27125accb7963b611c50965df4204157
|
|
7
|
+
data.tar.gz: 5d31433f1670b8ccee41d4c6d8cc62c9d57d4f86031b72b5d6974a725970e5629357e3d7f74554caf30e8d3dea3bbfbe72da7ec227b17948a3426f2fe33908ce
|
|
@@ -143,13 +143,19 @@ module Pindo
|
|
|
143
143
|
|
|
144
144
|
puts "开始构建Unity项目..."
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
begin
|
|
147
|
+
unity_helper.build_project(
|
|
148
|
+
unity_exe_full_path: unity_exe_path,
|
|
149
|
+
project_path: pindo_project_dir,
|
|
150
|
+
platform: 'Android',
|
|
151
|
+
isLibrary: isLibrary,
|
|
152
|
+
indexNo: apk_count
|
|
153
|
+
)
|
|
154
|
+
rescue => e
|
|
155
|
+
Funlog.instance.fancyinfo_error("调用GoodUnityBuild导出工程失败!")
|
|
156
|
+
Funlog.instance.fancyinfo_error("错误信息: #{e.message}")
|
|
157
|
+
raise e
|
|
158
|
+
end
|
|
153
159
|
|
|
154
160
|
puts "Unity项目构建完成,准备处理Android项目..."
|
|
155
161
|
|
|
@@ -163,7 +163,13 @@ DESC
|
|
|
163
163
|
# 获取 ipaCount 用于传递给 Unity 构建
|
|
164
164
|
ipa_count = app_info_obj&.dig("ipaCount") || -1
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
begin
|
|
167
|
+
unity_helper.build_project(unity_exe_full_path:unity_exe_path, project_path:pindo_project_dir, platform:'iOS', isLibrary:isLibrary, indexNo:ipa_count)
|
|
168
|
+
rescue => e
|
|
169
|
+
Funlog.instance.fancyinfo_error("调用GoodUnityBuild导出工程失败!")
|
|
170
|
+
Funlog.instance.fancyinfo_error("错误信息: #{e.message}")
|
|
171
|
+
raise e
|
|
172
|
+
end
|
|
167
173
|
|
|
168
174
|
|
|
169
175
|
args_temp = []
|
|
@@ -143,7 +143,13 @@ module Pindo
|
|
|
143
143
|
# 获取 ipaCount 用于传递给 Unity 构建
|
|
144
144
|
ipa_count = app_info_obj&.dig("ipaCount") || -1
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
begin
|
|
147
|
+
unity_helper.build_project(unity_exe_full_path:unity_exe_path, project_path:pindo_project_dir, platform:'iOS', isLibrary:isLibrary, indexNo:ipa_count)
|
|
148
|
+
rescue => e
|
|
149
|
+
Funlog.instance.fancyinfo_error("调用GoodUnityBuild导出工程失败!")
|
|
150
|
+
Funlog.instance.fancyinfo_error("错误信息: #{e.message}")
|
|
151
|
+
raise e
|
|
152
|
+
end
|
|
147
153
|
|
|
148
154
|
|
|
149
155
|
|
|
@@ -182,7 +182,13 @@ module Pindo
|
|
|
182
182
|
end
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
begin
|
|
186
|
+
unity_helper.build_project(unity_exe_full_path:unity_exe_path, project_path:pindo_project_dir, platform:'WebGL', indexNo:zip_count)
|
|
187
|
+
rescue => e
|
|
188
|
+
Funlog.instance.fancyinfo_error("调用GoodUnityBuild导出工程失败!")
|
|
189
|
+
Funlog.instance.fancyinfo_error("错误信息: #{e.message}")
|
|
190
|
+
raise e
|
|
191
|
+
end
|
|
186
192
|
|
|
187
193
|
build_path = File.join(web_export_dir, "build", "index.{html}")
|
|
188
194
|
html_file_upload = Dir.glob(build_path).max_by {|f| File.mtime(f)}
|
|
@@ -240,6 +240,9 @@ module Pindo
|
|
|
240
240
|
update_manifest_to_standard(manifest_path: manifest_path)
|
|
241
241
|
end
|
|
242
242
|
|
|
243
|
+
# 3.5 更新所有 XML 文件中的图标引用
|
|
244
|
+
update_all_xml_icon_references(proj_dir: proj_dir)
|
|
245
|
+
|
|
243
246
|
# 4. 安装标准 icon 文件
|
|
244
247
|
success_count = 0
|
|
245
248
|
densities_installed = []
|
|
@@ -289,6 +292,53 @@ module Pindo
|
|
|
289
292
|
end
|
|
290
293
|
end
|
|
291
294
|
|
|
295
|
+
# 更新所有 XML 文件中的图标引用(从旧名称更新为标准名称)
|
|
296
|
+
# @param proj_dir [String] Android项目目录
|
|
297
|
+
# @return [Boolean] 是否成功更新
|
|
298
|
+
def self.update_all_xml_icon_references(proj_dir: nil)
|
|
299
|
+
return false unless proj_dir && File.directory?(proj_dir)
|
|
300
|
+
|
|
301
|
+
begin
|
|
302
|
+
updated_files = []
|
|
303
|
+
|
|
304
|
+
# 查找所有 XML 文件
|
|
305
|
+
xml_files = Dir.glob(File.join(proj_dir, "**/*.xml"))
|
|
306
|
+
.reject { |f| f.include?("/build/") || f.include?("/.gradle/") }
|
|
307
|
+
|
|
308
|
+
xml_files.each do |xml_file|
|
|
309
|
+
content = File.read(xml_file)
|
|
310
|
+
original_content = content.dup
|
|
311
|
+
|
|
312
|
+
# 替换所有旧的图标引用为标准名称
|
|
313
|
+
# app_icon -> ic_launcher
|
|
314
|
+
# app_icon_round -> ic_launcher_round
|
|
315
|
+
content.gsub!('@mipmap/app_icon_round', '@mipmap/ic_launcher_round')
|
|
316
|
+
content.gsub!('@mipmap/app_icon', '@mipmap/ic_launcher')
|
|
317
|
+
content.gsub!('@drawable/app_icon_round', '@drawable/ic_launcher_round')
|
|
318
|
+
content.gsub!('@drawable/app_icon', '@drawable/ic_launcher')
|
|
319
|
+
|
|
320
|
+
# 如果内容有变化,保存文件
|
|
321
|
+
if content != original_content
|
|
322
|
+
File.write(xml_file, content)
|
|
323
|
+
relative_path = xml_file.sub(proj_dir + '/', '')
|
|
324
|
+
updated_files << relative_path
|
|
325
|
+
puts " ✓ 更新图标引用: #{relative_path}"
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
if updated_files.empty?
|
|
330
|
+
puts " ✓ 所有 XML 文件的图标引用已是标准配置"
|
|
331
|
+
else
|
|
332
|
+
puts " ✓ 已更新 #{updated_files.length} 个文件的图标引用"
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
return true
|
|
336
|
+
rescue => e
|
|
337
|
+
Funlog.instance.fancyinfo_error("更新 XML 图标引用失败: #{e.message}")
|
|
338
|
+
return false
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
292
342
|
end
|
|
293
343
|
|
|
294
344
|
end
|
data/lib/pindo/version.rb
CHANGED