paulxstretch/release/distwin.sh

75 lines
2.2 KiB
Bash
Raw Permalink Normal View History

2022-04-14 20:31:54 +00:00
#!/bin/bash
if [ -z "$1" ] ; then
echo "Usage: $0 <version> <certpassword>"
exit 1
fi
VERSION=$1
CERTPASS=$2
BASENAME="PaulXStretch"
if [ -z "$CERTFILE" ] ; then
echo You need to define CERTFILE env variable to sign anything
exit 2
fi
2022-04-19 21:45:56 +00:00
BUILDDIR="../build/${BASENAME}_artefacts/Release"
AAXBUILDDIR="../build/${BASENAME}AAX_artefacts/Release"
2022-04-19 21:45:56 +00:00
BUILDDIR32="../build32/${BASENAME}_artefacts/Release"
#BUILDDIR='../Builds/VisualStudio2019/x64/Release'
#BUILDDIR32='../Builds/VisualStudio2019/Win32/Release32'
2022-04-14 20:31:54 +00:00
2022-04-24 22:13:07 +00:00
rm -rf ${BASENAME}
2022-04-22 14:29:22 +00:00
mkdir -p ${BASENAME}/Plugins/VST3
2022-06-15 18:57:04 +00:00
mkdir -p ${BASENAME}/Plugins/CLAP
2022-04-22 14:29:22 +00:00
mkdir -p ${BASENAME}/Plugins/AAX
2022-04-14 20:31:54 +00:00
#cp -v ../doc/README_WINDOWS.txt SonoBus/README.txt
2022-04-24 22:13:07 +00:00
cp -v ${BUILDDIR}/Standalone/${BASENAME}.exe ${BASENAME}/
2022-04-22 14:29:22 +00:00
cp -pHLRv ${BUILDDIR}/VST3/${BASENAME}.vst3 ${BASENAME}/Plugins/VST3/
2022-06-15 18:57:04 +00:00
cp -pHLRv ${BUILDDIR}/CLAP/${BASENAME}.clap ${BASENAME}/Plugins/CLAP/
2022-04-14 20:31:54 +00:00
#cp -v ${BUILDDIR}/VST/SonoBus.dll ${BASENAME}/Plugins/
cp -pHLRv ${AAXBUILDDIR}/AAX/${BASENAME}.aaxplugin ${BASENAME}/Plugins/AAX/
2022-04-14 20:31:54 +00:00
#mkdir -p SonoBus/Plugins32
#cp -v ${BUILDDIR32}/Standalone\ Plugin/SonoBus.exe SonoBus/SonoBus32.exe
#cp -v ${BUILDDIR32}/VST3/SonoBus.vst3 SonoBus/Plugins32/
#cp -v ${BUILDDIR32}/VST/SonoBus.dll SonoBus/Plugins32/
##cp -pHLRv ${BUILDDIR}/AAX/SonoBus.aaxplugin SonoBus/Plugins32/
# sign AAX
2022-04-19 21:45:56 +00:00
if [ -n "${AAXSIGNCMD}" ]; then
echo "Signing AAX plugin"
2022-04-22 14:29:22 +00:00
${AAXSIGNCMD} --keypassword "${CERTPASS}" --in ${BASENAME}'\Plugins\AAX\'${BASENAME}.aaxplugin --out ${BASENAME}'\Plugins\AAX\'${BASENAME}.aaxplugin
2022-04-19 21:45:56 +00:00
fi
2022-04-14 20:31:54 +00:00
# sign executable
#signtool.exe sign /v /t "http://timestamp.digicert.com" /f "$CERTFILE" /p "$CERTPASS" SonoBus/SonoBus.exe
mkdir -p instoutput
rm -f instoutput/*
iscc /O"instoutput" "/Ssigntool=signtool.exe sign /t http://timestamp.digicert.com /f ${CERTFILE} /p ${CERTPASS} \$f" /DSBVERSION="${VERSION}" wininstaller.iss
#signtool.exe sign /v /t "http://timestamp.digicert.com" /f SonosaurusCodeSigningSectigoCert.p12 /p "$CERTPASS" instoutput/
#ZIPFILE=sonobus-${VERSION}-win.zip
#cp -v ../doc/README_WINDOWS.txt instoutput/README.txt
#rm -f ${ZIPFILE}
#(cd instoutput; zip ../${ZIPFILE} SonoBus\ Installer.exe README.txt )
EXEFILE=paulxstretch-${VERSION}-win.exe
rm -f ${EXEFILE}
cp instoutput/${BASENAME}-${VERSION}-Installer.exe ${EXEFILE}