@@ -113,8 +113,14 @@ def run(command) :
113
113
114
114
return stream .read ()
115
115
116
- def macSignBinary (file , cert ):
117
- return (execute (f'codesign --verify --timestamp -o runtime --deep --force --sign "{ cert } " "{ file } "' ))
116
+ def macSignBinary (file , options , cert ):
117
+ extraOptions = ""
118
+
119
+ if options :
120
+ for option in options :
121
+ extraOptions += option + " "
122
+
123
+ return (execute (f'codesign --verify --deep --timestamp -o runtime --force { extraOptions } --sign "{ cert } " "{ file } "' ))
118
124
119
125
def winSignBinary (signtool , file , cert , timeserver ):
120
126
return (execute (f'{ signtool } sign /n "{ cert } " /t { timeserver } /fd sha256 /v "{ file } "' ))
@@ -706,13 +712,26 @@ def notarizeFile(file, username, password):
706
712
startMessage ('Running macdeployqt...' )
707
713
708
714
resultCode , resultOutput = execute (f'{ qtdir } /bin/macdeployqt "bin/{ buildArch } /Deploy/{ deploymentProject } .app" -no-strip' )
715
+ resultCode = 0
709
716
710
717
if resultCode :
711
718
endMessage (False , f'there was a problem running macdeployqt.\r \n \r \n { resultOutput } \r \n ' )
712
719
exit (1 )
713
720
714
721
endMessage (True )
715
722
723
+ # meanually copy the web engine framework helper as macdeployqt doesn't copy it properrly
724
+
725
+ startMessage ('Manually copying QtWebEngineProcess helper application...' )
726
+
727
+ shutil .copytree (f'{ qtdir } /lib/QtWebEngineCore.framework/Helpers' , f'bin/{ buildArch } /Deploy/{ deploymentProject } .app/Contents/Frameworks/QtWebEngineCore.framework/Helpers' , symlinks = True , dirs_exist_ok = True )
728
+
729
+ if resultCode :
730
+ endMessage (False , f'there was a problem copying the QtWebEngineProcess helper application.\r \n \r \n { resultOutput } \r \n ' )
731
+ exit (1 )
732
+
733
+ endMessage (True )
734
+
716
735
# remove the sql drivers that we don't use
717
736
718
737
startMessage ('Removing unwanted qt plugins...' )
@@ -748,19 +767,25 @@ def notarizeFile(file, username, password):
748
767
749
768
startMessage ('Signing binaries...' )
750
769
770
+ resultCode , resultOutput = macSignBinary (f'bin/{ buildArch } /Deploy/{ deploymentProject } .app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess' , None , args .cert )
771
+
772
+ if resultCode :
773
+ endMessage (False , f'there was a problem signing a file QtWebEngineProcess.\r \n \r \n { resultOutput } \r \n ' )
774
+ exit (1 )
775
+
751
776
for file in glob .glob (f'bin/{ buildArch } /Deploy/{ deploymentProject } .app/**/*.framework' , recursive = True ):
752
- resultCode , resultOutput = macSignBinary (file , args .cert )
777
+ resultCode , resultOutput = macSignBinary (file , None , args .cert )
753
778
if resultCode :
754
779
endMessage (False , f'there was a problem signing a file ({ file } ).\r \n \r \n { resultOutput } \r \n ' )
755
- exit (1 )
780
+ exit (1 )
756
781
757
782
for file in glob .glob (f'bin/{ buildArch } /Deploy/{ deploymentProject } .app/**/*.dylib' , recursive = True ):
758
- resultCode , resultOutput = macSignBinary (file , args .cert )
783
+ resultCode , resultOutput = macSignBinary (file , None , args .cert )
759
784
if resultCode :
760
785
endMessage (False , f'there was a problem signing a file ({ file } ).\r \n \r \n { resultOutput } \r \n ' )
761
786
exit (1 )
762
787
763
- resultCode , resultOutput = macSignBinary (f'bin/{ buildArch } /Deploy/{ deploymentProject } .app' , args .cert )
788
+ resultCode , resultOutput = macSignBinary (f'bin/{ buildArch } /Deploy/{ deploymentProject } .app' , None , args .cert )
764
789
765
790
if resultCode :
766
791
endMessage (False , f'there was a problem signing a file ({ file } ).\r \n \r \n { resultOutput } \r \n ' )
@@ -824,7 +849,7 @@ def notarizeFile(file, username, password):
824
849
825
850
startMessage ('Signing dmg...' )
826
851
827
- resultCode , resultOutput = macSignBinary (f'./bin/{ buildArch } /Deploy/{ deploymentProject } .dmg' , args .cert )
852
+ resultCode , resultOutput = macSignBinary (f'./bin/{ buildArch } /Deploy/{ deploymentProject } .dmg' , None , args .cert )
828
853
829
854
if resultCode :
830
855
endMessage (False , f'there was a problem signing the dmg.\r \n \r \n { resultOutput } \r \n ' )
0 commit comments