-
Notifications
You must be signed in to change notification settings - Fork 52
/
build_signed_windows_release.sh
executable file
·43 lines (33 loc) · 1.27 KB
/
build_signed_windows_release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Builds signed Windows installers for all supported platforms
# (Intel and ARM 32/64 bit).
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ $# -ne 3 ]; then
cat <<EOF
Usage: ${0##*/} [certificate URL file] [key URL file] [intermediate certs]
Note that the certificate and key URL files required above should contain only the PKCS11
URLs to the requested keys and certificates. Please see CODE_SIGNING.md for more information.
EOF
exit -1
fi
CERT_URL_FILE=$1
KEY_URL_FILE=$2
INTERMEDIATE_CERT_FILE=$3
CUR_DIR=$PWD
WIN_BUILD_DIR=$SCRIPT_DIR/build_windows
mkdir $WIN_BUILD_DIR
cd $WIN_BUILD_DIR
for arch in x86_64 i686 aarch64; do
BUILD_ARCH_DIR="$WIN_BUILD_DIR/build_win_$arch"
# Clear existing build
rm -rf $BUILD_ARCH_DIR
mkdir $BUILD_ARCH_DIR
cd $BUILD_ARCH_DIR
# Kick off new build with the given architecture
cmake -DBOOTSTRAP_LPCNET=1 -DSIGN_WINDOWS_BINARIES=1 -DPKCS11_CERTIFICATE_FILE=$CERT_URL_FILE -DPKCS11_KEY_FILE=$KEY_URL_FILE -DINTERMEDIATE_CERT_FILE=$INTERMEDIATE_CERT_FILE -DCMAKE_TOOLCHAIN_FILE=$SCRIPT_DIR/cross-compile/freedv-mingw-llvm-$arch.cmake $SCRIPT_DIR
make -j6 package
cp FreeDV-*.exe $WIN_BUILD_DIR
cd $WIN_BUILD_DIR
done
cd $CUR_DIR
echo "All Windows builds complete."