File tree 1 file changed +25
-7
lines changed
1 file changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -73,16 +73,34 @@ mkdir -p "$DISTSRC"
73
73
74
74
case " $HOST " in
75
75
* mingw* )
76
- find " $PWD " -name " *-unsigned.exe" | while read -r infile; do
77
- infile_base=" $( basename " $infile " ) "
78
-
79
- # Codesigned *-unsigned.exe and output to OUTDIR
76
+ # Apply detached codesignatures
77
+ WORKDIR=" .tmp"
78
+ mkdir -p ${WORKDIR}
79
+ cp -r --target-directory=" ${WORKDIR} " " unsigned/${DISTNAME} "
80
+ find " ${WORKDIR} /${DISTNAME} " -name " *.exe" -type f -exec rm {} \;
81
+ find unsigned/ -name " *.exe" -type f | while read -r bin
82
+ do
83
+ bin_base=" $( realpath --relative-to=unsigned/ " ${bin} " ) "
84
+ mkdir -p " ${WORKDIR} /$( dirname " ${bin_base} " ) "
80
85
osslsigncode attach-signature \
81
- -in " $infile " \
82
- -out " ${OUTDIR } /${infile_base / -unsigned} " \
86
+ -in " ${bin} " \
87
+ -out " ${WORKDIR } /${bin_base / -unsigned} " \
83
88
-CAfile " $GUIX_ENVIRONMENT /etc/ssl/certs/ca-certificates.crt" \
84
- -sigin codesignatures/win/" $infile_base " .pem
89
+ -sigin codesignatures/win/" ${bin_base} " .pem
85
90
done
91
+
92
+ # Move installer to outdir
93
+ cd " ${WORKDIR} "
94
+ find . -name " *setup.exe" -print0 \
95
+ | xargs -0r mv --target-directory=" ${OUTDIR} "
96
+
97
+ # Make .zip from binaries
98
+ find " ${DISTNAME} " -print0 \
99
+ | xargs -0r touch --no-dereference --date=" @${SOURCE_DATE_EPOCH} "
100
+ find " ${DISTNAME} " \
101
+ | sort \
102
+ | zip -X@ " ${OUTDIR} /${DISTNAME} -${HOST// x86_64-w64-mingw32/ win64} .zip" \
103
+ || ( rm -f " ${OUTDIR} /${DISTNAME} -${HOST// x86_64-w64-mingw32/ win64} .zip" && exit 1 )
86
104
;;
87
105
* darwin* )
88
106
case " $HOST " in
You can’t perform that action at this time.
0 commit comments