@@ -8,6 +8,11 @@ export basedir=$(pwd)
8
8
# For signing keystore and password.
9
9
source ./config.sh
10
10
11
+ godot-zip () {
12
+ godot-zip " $@ "
13
+ }
14
+ export -f godot-zip
15
+
11
16
can_sign_windows=0
12
17
if [ ! -z " ${SIGN_KEYSTORE} " ] && [ ! -z " ${SIGN_PASSWORD} " ] && [[ $( type -P " osslsigncode" ) ]]; then
13
18
can_sign_windows=1
@@ -47,7 +52,7 @@ sign_macos() {
47
52
codesign --force --timestamp \
48
53
--options=runtime --entitlements editor.entitlements \
49
54
-s ${OSX_KEY_ID} -v ${_appname} && \
50
- zip -r ${_binname} _signed.zip ${_appname} "
55
+ godot-zip ${_binname} _signed.zip ${_appname} "
51
56
52
57
_request_uuid=$( ssh " ${OSX_HOST} " " xcrun altool --notarize-app --primary-bundle-id \" ${OSX_BUNDLE_ID} \" --username \" ${APPLE_ID} \" --password \" ${APPLE_ID_PASSWORD} \" --file ${_macos_tmpdir} /${_binname} _signed.zip" )
53
58
_request_uuid=$( echo ${_request_uuid} | sed -e ' s/.*RequestUUID = //' )
@@ -62,7 +67,7 @@ sign_macos() {
62
67
ssh " ${OSX_HOST} " "
63
68
cd ${_macos_tmpdir} && \
64
69
xcrun stapler staple ${_appname} && \
65
- zip -r ${_binname} _stapled.zip ${_appname} "
70
+ godot-zip ${_binname} _stapled.zip ${_appname} "
66
71
scp " ${OSX_HOST} :${_macos_tmpdir} /${_binname} _stapled.zip" " ${_reldir} /${_binname} .zip"
67
72
ssh " ${OSX_HOST} " " rm -rf ${_macos_tmpdir} "
68
73
fi
@@ -83,7 +88,7 @@ sign_macos_template() {
83
88
codesign --force -s - \
84
89
--options=linker-signed \
85
90
-v macos_template.app/Contents/MacOS/* && \
86
- zip -r macos_signed.zip macos_template.app"
91
+ godot-zip macos_signed.zip macos_template.app"
87
92
88
93
scp " ${OSX_HOST} :${_macos_tmpdir} /macos_signed.zip" " ${_reldir} /macos.zip"
89
94
ssh " ${OSX_HOST} " " rm -rf ${_macos_tmpdir} "
@@ -242,13 +247,13 @@ if [ "${build_classical}" == "1" ]; then
242
247
binname=" ${godot_basename} _linux.x86_64"
243
248
cp out/linux/x86_64/tools/godot.linuxbsd.editor.x86_64 ${binname}
244
249
strip ${binname}
245
- zip -q -9 " ${reldir} /${binname} .zip" ${binname}
250
+ godot-zip " ${reldir} /${binname} .zip" ${binname}
246
251
rm ${binname}
247
252
248
253
binname=" ${godot_basename} _linux.x86_32"
249
254
cp out/linux/x86_32/tools/godot.linuxbsd.editor.x86_32 ${binname}
250
255
strip ${binname}
251
- zip -q -9 " ${reldir} /${binname} .zip" ${binname}
256
+ godot-zip " ${reldir} /${binname} .zip" ${binname}
252
257
rm ${binname}
253
258
254
259
# Templates
@@ -269,7 +274,7 @@ if [ "${build_classical}" == "1" ]; then
269
274
cp out/windows/x86_64/tools/godot.windows.editor.x86_64.console.exe ${wrpname}
270
275
strip ${wrpname}
271
276
sign_windows ${wrpname}
272
- zip -q -9 " ${reldir} /${binname} .zip" ${binname} ${wrpname}
277
+ godot-zip " ${reldir} /${binname} .zip" ${binname} ${wrpname}
273
278
rm ${binname} ${wrpname}
274
279
275
280
binname=" ${godot_basename} _win32.exe"
@@ -280,7 +285,7 @@ if [ "${build_classical}" == "1" ]; then
280
285
cp out/windows/x86_32/tools/godot.windows.editor.x86_32.console.exe ${wrpname}
281
286
strip ${wrpname}
282
287
sign_windows ${wrpname}
283
- zip -q -9 " ${reldir} /${binname} .zip" ${binname} ${wrpname}
288
+ godot-zip " ${reldir} /${binname} .zip" ${binname} ${wrpname}
284
289
rm ${binname} ${wrpname}
285
290
286
291
# Templates
@@ -303,7 +308,7 @@ if [ "${build_classical}" == "1" ]; then
303
308
mkdir -p Godot.app/Contents/MacOS
304
309
cp out/macos/tools/godot.macos.editor.universal Godot.app/Contents/MacOS/Godot
305
310
chmod +x Godot.app/Contents/MacOS/Godot
306
- zip -q -9 -r " ${reldir} /${binname} .zip" Godot.app
311
+ godot-zip -r " ${reldir} /${binname} .zip" Godot.app
307
312
rm -rf Godot.app
308
313
sign_macos ${reldir} ${binname} 0
309
314
@@ -315,7 +320,7 @@ if [ "${build_classical}" == "1" ]; then
315
320
cp out/macos/templates/godot.macos.template_release.universal macos_template.app/Contents/MacOS/godot_macos_release.universal
316
321
cp out/macos/templates/godot.macos.template_debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal
317
322
chmod +x macos_template.app/Contents/MacOS/godot_macos*
318
- zip -q -9 -r " ${templatesdir} /macos.zip" macos_template.app
323
+ godot-zip -r " ${templatesdir} /macos.zip" macos_template.app
319
324
rm -rf macos_template.app
320
325
sign_macos_template ${templatesdir} 0
321
326
@@ -360,15 +365,15 @@ if [ "${build_classical}" == "1" ]; then
360
365
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
361
366
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
362
367
cd ios_xcode
363
- zip -q -9 -r " ${templatesdir} /ios.zip" *
368
+ godot-zip -r " ${templatesdir} /ios.zip" *
364
369
cd ..
365
370
rm -rf ios_xcode
366
371
367
372
# # Templates TPZ (Classical) ##
368
373
369
374
echo " ${templates_version} " > ${templatesdir} /version.txt
370
375
pushd ${templatesdir} /..
371
- zip -q -9 -r -D " ${reldir} /${godot_basename} _export_templates.tpz" templates/*
376
+ godot- zip -r " ${reldir} /${godot_basename} _export_templates.tpz" templates/*
372
377
popd
373
378
374
379
# # SHA-512 sums (Classical) ##
@@ -393,15 +398,15 @@ if [ "${build_mono}" == "1" ]; then
393
398
cp out/linux/x86_64/tools-mono/godot.linuxbsd.editor.x86_64.mono ${binbasename} _x86_64/${binbasename} .x86_64
394
399
strip ${binbasename} _x86_64/${binbasename} .x86_64
395
400
cp -rp out/linux/x86_64/tools-mono/GodotSharp ${binbasename} _x86_64/
396
- zip -r -q -9 " ${reldir_mono} /${binbasename} _x86_64.zip" ${binbasename} _x86_64
401
+ godot-zip " ${reldir_mono} /${binbasename} _x86_64.zip" ${binbasename} _x86_64
397
402
rm -rf ${binbasename} _x86_64
398
403
399
404
binbasename=" ${godot_basename} _mono_linux"
400
405
mkdir -p ${binbasename} _x86_32
401
406
cp out/linux/x86_32/tools-mono/godot.linuxbsd.editor.x86_32.mono ${binbasename} _x86_32/${binbasename} .x86_32
402
407
strip ${binbasename} _x86_32/${binbasename} .x86_32
403
408
cp -rp out/linux/x86_32/tools-mono/GodotSharp/ ${binbasename} _x86_32/
404
- zip -r -q -9 " ${reldir_mono} /${binbasename} _x86_32.zip" ${binbasename} _x86_32
409
+ godot-zip " ${reldir_mono} /${binbasename} _x86_32.zip" ${binbasename} _x86_32
405
410
rm -rf ${binbasename} _x86_32
406
411
407
412
# Templates
@@ -424,7 +429,7 @@ if [ "${build_mono}" == "1" ]; then
424
429
cp out/windows/x86_64/tools-mono/godot.windows.editor.x86_64.mono.console.exe ${binname} /${wrpname} .exe
425
430
strip ${binname} /${wrpname} .exe
426
431
sign_windows ${binname} /${wrpname} .exe
427
- zip -r -q -9 " ${reldir_mono} /${binname} .zip" ${binname}
432
+ godot-zip " ${reldir_mono} /${binname} .zip" ${binname}
428
433
rm -rf ${binname}
429
434
430
435
binname=" ${godot_basename} _mono_win32"
@@ -437,7 +442,7 @@ if [ "${build_mono}" == "1" ]; then
437
442
cp out/windows/x86_32/tools-mono/godot.windows.editor.x86_32.mono.console.exe ${binname} /${wrpname} .exe
438
443
strip ${binname} /${wrpname} .exe
439
444
sign_windows ${binname} /${wrpname} .exe
440
- zip -r -q -9 " ${reldir_mono} /${binname} .zip" ${binname}
445
+ godot-zip " ${reldir_mono} /${binname} .zip" ${binname}
441
446
rm -rf ${binname}
442
447
443
448
# Templates
@@ -461,7 +466,7 @@ if [ "${build_mono}" == "1" ]; then
461
466
cp out/macos/tools-mono/godot.macos.editor.universal.mono Godot_mono.app/Contents/MacOS/Godot
462
467
cp -rp out/macos/tools-mono/GodotSharp Godot_mono.app/Contents/Resources/GodotSharp
463
468
chmod +x Godot_mono.app/Contents/MacOS/Godot
464
- zip -q -9 -r " ${reldir_mono} /${binname} .zip" Godot_mono.app
469
+ godot-zip -r " ${reldir_mono} /${binname} .zip" Godot_mono.app
465
470
rm -rf Godot_mono.app
466
471
sign_macos ${reldir_mono} ${binname} 1
467
472
@@ -472,7 +477,7 @@ if [ "${build_mono}" == "1" ]; then
472
477
cp out/macos/templates-mono/godot.macos.template_debug.universal.mono macos_template.app/Contents/MacOS/godot_macos_debug.universal
473
478
cp out/macos/templates-mono/godot.macos.template_release.universal.mono macos_template.app/Contents/MacOS/godot_macos_release.universal
474
479
chmod +x macos_template.app/Contents/MacOS/godot_macos*
475
- zip -q -9 -r " ${templatesdir_mono} /macos.zip" macos_template.app
480
+ godot-zip -r " ${templatesdir_mono} /macos.zip" macos_template.app
476
481
rm -rf macos_template.app
477
482
sign_macos_template ${templatesdir_mono} 1
478
483
@@ -496,7 +501,7 @@ if [ "${build_mono}" == "1" ]; then
496
501
cp -r deps/vulkansdk-macos/MoltenVK/MoltenVK.xcframework ios_xcode/
497
502
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
498
503
cd ios_xcode
499
- zip -q -9 -r " ${templatesdir_mono} /ios.zip" *
504
+ godot-zip -r " ${templatesdir_mono} /ios.zip" *
500
505
cd ..
501
506
rm -rf ios_xcode
502
507
@@ -516,7 +521,7 @@ if [ "${build_mono}" == "1" ]; then
516
521
517
522
echo " ${templates_version} .mono" > ${templatesdir_mono} /version.txt
518
523
pushd ${templatesdir_mono} /..
519
- zip -q -9 -r -D " ${reldir_mono} /${godot_basename} _mono_export_templates.tpz" templates/*
524
+ godot- zip -r " ${reldir_mono} /${godot_basename} _mono_export_templates.tpz" templates/*
520
525
popd
521
526
522
527
# # SHA-512 sums (Mono) ##
0 commit comments