diff options
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/speedo.mk | 69 | ||||
-rw-r--r-- | build-aux/speedo/w32/inst.nsi | 16 | ||||
-rw-r--r-- | build-aux/speedo/w32/wixlib.wxs | 5 |
3 files changed, 60 insertions, 30 deletions
diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk index e61f8f40d..1c5e268a1 100644 --- a/build-aux/speedo.mk +++ b/build-aux/speedo.mk @@ -41,7 +41,7 @@ # # Lists packages and versions. # -# The information reyured to sign the tarballs and binaries +# The information required to sign the tarballs and binaries # are expected in the developer specific file ~/.gnupg-autogen.rc". # Here is an example: #--8<---------------cut here---------------start------------->8--- @@ -110,6 +110,28 @@ help: @echo 'Use CUSTOM_SWDB=1 for an already downloaded swdb.lst.' @echo 'Use WIXPREFIX to provide the WIX binaries for the MSI package.' @echo ' Using WIX also requires wine with installed wine mono.' + @echo ' See help-wixlib for more information' + +help-wixlib: + @echo 'The buildsystem can create a wixlib to build MSI packages.' + @echo '' + @echo 'On debian install the packages "wine"' + @echo ' apt-get install wine' + @echo '' + @echo 'Download the wine-mono msi:' + @echo ' https://dl.winehq.org/wine/wine-mono/' + @echo '' + @echo 'Install it:' + @echo ' wine msiexec /i ~/Downloads/wine-mono-4.9.4.msi' + @echo '' + @echo 'Download the wix toolset binary zip from:' + @echo ' https://github.com/wixtoolset/wix3/releases' + @echo 'The default folder searches for ~/w32root/wixtools' + @echo 'Alternative locations can be passed by WIXPREFIX variable' + @echo ' unzip -d ~/w32root/wixtools ~/Downloads/wix311-binaries.zip' + @echo '' + @echo 'Afterwards w32-msi-release will also build a wixlib.' + SPEEDOMAKE := $(MAKE) -f $(SPEEDO_MK) UPD_SWDB=1 @@ -164,6 +186,10 @@ w32-release: check-tools $(SPEEDOMAKE) TARGETOS=w32 WHAT=release WITH_GUI=0 SELFCHECK=0 \ installer-from-source +w32-msi-release: check-tools + $(SPEEDOMAKE) TARGETOS=w32 WHAT=release WITH_GUI=0 SELFCHECK=0 \ + WITH_WIXLIB=1 installer-from-source + w32-sign-installer: check-tools $(SPEEDOMAKE) TARGETOS=w32 WHAT=release WITH_GUI=0 SELFCHECK=0 \ sign-installer @@ -211,7 +237,7 @@ INST_NAME=gnupg-w32 INSTALL_PREFIX=none # Set this to the location of wixtools -WIXPREFIX= +WIXPREFIX=$(shell readlink -f ~/w32root/wixtools) # Read signing information from ~/.gnupg-autogen.rc define READ_AUTOGEN_template @@ -588,8 +614,7 @@ speedo_pkg_ntbtls_configure = --disable-shared ifeq ($(TARGETOS),w32) speedo_pkg_gnupg_configure = \ - --disable-g13 --enable-ntbtls \ - --enable-build-timestamp + --disable-g13 --enable-ntbtls else speedo_pkg_gnupg_configure = --disable-g13 --enable-wks-tools endif @@ -1259,7 +1284,7 @@ dist-source: installer --transform='s,^,$(INST_NAME)-$(INST_VERSION)/,' \ PLAY/stamps/stamp-*-00-unpack PLAY/src swdb.lst swdb.lst.sig ;\ [ -f "$$tarname".xz ] && rm "$$tarname".xz;\ - xz "$$tarname" ;\ + xz -T0 "$$tarname" ;\ ) @@ -1317,9 +1342,8 @@ installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt done; \ fi \ ) - (nsis3_args=$$(makensis -version | grep -q "^v3" && \ - echo "-INPUTCHARSET CP1252"); \ - $(MAKENSIS) -V2 $$nsis3_args \ + $(MAKENSIS) -V2 $$($(MAKENSIS) -version \ + | grep -q ^v3 && echo "-INPUTCHARSET CP1252 ") \ -DINST_DIR=$(idir) \ -DINST6_DIR=$(idir6) \ -DBUILD_DIR=$(bdir) \ @@ -1330,17 +1354,19 @@ installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt -DNAME=$(INST_NAME) \ -DVERSION=$(INST_VERSION) \ -DPROD_VERSION=$(INST_PROD_VERSION) \ - $(extra_installer_options) $(w32src)/inst.nsi) + $(extra_installer_options) $(w32src)/inst.nsi @echo "Ready: $(idir)/$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).exe" # We use the installer target to ensure everything is done and signed wixlib: installer $(bdir)/README.txt $(w32src)/wixlib.wxs if [ -z "$$(which $(WINE))" ]; then \ echo "ERROR: For the w32-wixlib wine needs to be installed."; \ + echo "ERROR: see 'help-w32-wixlib'"; \ exit 1; \ fi; - if [ -z "$(WIXPREFIX)" ]; then \ + if [ ! -d "$(WIXPREFIX)" ]; then \ echo "ERROR: You must set WIXPREFIX to an installation of wixtools."; \ + echo "ERROR: see 'help-w32-wixlib'"; \ exit 1; \ fi; (if [ -z "$$WINEPREFIX" ]; then \ @@ -1388,7 +1414,7 @@ wixlib: installer $(bdir)/README.txt $(w32src)/wixlib.wxs ) define MKSWDB_commands - ( pref="#+macro: gnupg24_w32_" ;\ + ( pref="#+macro: gnupg24_w32_$(3)" ;\ echo "$${pref}ver $(INST_VERSION)_$(BUILD_DATESTR)" ;\ echo "$${pref}date $(2)" ;\ echo "$${pref}size $$(wc -c <$(1)|awk '{print int($$1/1024)}')k";\ @@ -1409,13 +1435,15 @@ define AUTHENTICODE_sign /fd sha256 /du https://gnupg.org a.exe ;\ scp "$(AUTHENTICODE_SIGNHOST):a.exe" $(2);\ echo "speedo: signed file is '$(2)'" ;\ - else \ + elif [ -e "$(AUTHENTICODE_KEY)" ]; then \ echo "speedo: Signing using key $(AUTHENTICODE_KEY)";\ osslsigncode sign -certs $(AUTHENTICODE_CERTS) \ -pkcs12 $(AUTHENTICODE_KEY) -askpass \ -ts "http://timestamp.globalsign.com/scripts/timstamp.dll" \ -h sha256 -n GnuPG -i https://gnupg.org \ -in $(1) -out $(2) ;\ + else \ + echo "speedo: WARNING: Binaries are not signed"; \ fi endef @@ -1428,9 +1456,8 @@ installer-from-source: dist-source cd PLAY-release; \ tar xJf "../$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).tar.xz";\ cd $(INST_NAME)-$(INST_VERSION); \ - $(MAKE) -f build-aux/speedo.mk this-w32-installer SELFCHECK=0;\ - if [ -n "$(WIXPREFIX)" ]; then \ - cd $(INST_NAME)-$(INST_VERSION); \ + $(MAKE) -f build-aux/speedo.mk this-w32-installer SELFCHECK=0;\ + if [ -d "$(WIXPREFIX)" -a x"$(WITH_WIXLIB)" = x1 ]; then \ $(MAKE) -f build-aux/speedo.mk this-w32-wixlib SELFCHECK=0;\ fi; \ reldate="$$(date -u +%Y-%m-%d)" ;\ @@ -1439,10 +1466,10 @@ installer-from-source: dist-source exefile="../../$$exefile" ;\ $(call MKSWDB_commands,$${exefile},$${reldate}); \ msifile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).wixlib"; \ - if [ -e "$${msifile}" ]; then \ + if [ -e "PLAY/inst/$${msifile}" ]; then \ cp "PLAY/inst/$$msifile" ../..; \ msifile="../../$$msifile" ; \ - $(call MKSWDB_commands,$${msifile},$${reldate}); \ + $(call MKSWDB_commands,$${msifile},$${reldate},"wixlib_"); \ fi \ ) @@ -1455,7 +1482,7 @@ sign-installer: cd $(INST_NAME)-$(INST_VERSION); \ reldate="$$(date -u +%Y-%m-%d)" ;\ exefile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).exe" ;\ - msifile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).wixlib ;\ + msifile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).wixlib" ;\ echo "speedo: /*" ;\ echo "speedo: * Signing installer" ;\ echo "speedo: */" ;\ @@ -1463,8 +1490,8 @@ sign-installer: exefile="../../$$exefile" ;\ msifile="../../$$msifile" ;\ $(call MKSWDB_commands,$${exefile},$${reldate}); \ - if [ -e "$${msifile}" ]; then \ - $(call MKSWDB_commands,$${msifile},$${reldate}); \ + if [ -f "$${msifile}" ]; then \ + $(call MKSWDB_commands,$${msifile},$${reldate},"wixlib_"); \ fi; \ echo "speedo: /*" ;\ echo "speedo: * Verification result" ;\ @@ -1479,7 +1506,7 @@ endif # -# Check availability of standard tools +# Check availibility of standard tools # check-tools: diff --git a/build-aux/speedo/w32/inst.nsi b/build-aux/speedo/w32/inst.nsi index 9ccc0e188..2c6c9be78 100644 --- a/build-aux/speedo/w32/inst.nsi +++ b/build-aux/speedo/w32/inst.nsi @@ -659,10 +659,10 @@ Section "GnuPG" SEC_gnupg File "share/gnupg/distsigkey.gpg" File "share/gnupg/sks-keyservers.netCA.pem" - SetOutPath "$INSTDIR\share\gnupg\examples" - File "share/gnupg/examples/VS-NfD.prf" - File "share/gnupg/examples/Automatic.prf" - File "share/gnupg/examples/pwpattern.txt" + SetOutPath "$INSTDIR\share\doc\gnupg\examples" + File "share/doc/gnupg/examples/VS-NfD.prf" + File "share/doc/gnupg/examples/Automatic.prf" + File "share/doc/gnupg/examples/pwpattern.list" SetOutPath "$INSTDIR\share\locale\ca\LC_MESSAGES" File share/locale/ca/LC_MESSAGES/gnupg2.mo @@ -1326,10 +1326,10 @@ Section "-un.gnupg" Delete "$INSTDIR\bin\gpg-check-pattern.exe" Delete "$INSTDIR\bin\gpg-wks-client.exe" - Delete "$INSTDIR\share\gnupg\examples\VS-NfD.prf" - Delete "$INSTDIR\share\gnupg\examples\Automatic.prf" - Delete "$INSTDIR\share\gnupg\examples\pwpattern.txt" - RMDir "$INSTDIR\share\gnupg\examples" + Delete "$INSTDIR\share\doc\gnupg\examples\VS-NfD.prf" + Delete "$INSTDIR\share\doc\gnupg\examples\Automatic.prf" + Delete "$INSTDIR\share\doc\gnupg\examples\pwpattern.list" + RMDir "$INSTDIR\share\doc\gnupg\examples" Delete "$INSTDIR\share\gnupg\sks-keyservers.netCA.pem" Delete "$INSTDIR\share\gnupg\dirmngr-conf.skel" diff --git a/build-aux/speedo/w32/wixlib.wxs b/build-aux/speedo/w32/wixlib.wxs index b751c4306..f851e96b9 100644 --- a/build-aux/speedo/w32/wixlib.wxs +++ b/build-aux/speedo/w32/wixlib.wxs @@ -61,6 +61,9 @@ and then manually edited: <Component Id="cmp74961776CCC7B203F500FE261DC12F92" Directory="dirAA72FFDDFA224FB221D53750596B0142" Guid="FBA2569C-554D-4C06-88FC-0FD6541B5B4B"> <File Id="filB82A767EB9971018C006215A9FDE77EF" KeyPath="yes" Source="$(var.SourceDir)\bin\gpg-connect-agent.exe"/> </Component> + <Component Id="cmp74961776CCC7B203F500FE261DC12F94" Directory="dirAA72FFDDFA224FB221D53750596B0144" Guid="FBA2569C-554D-4C06-88FC-0FD6541B5B4C"> + <File Id="filB82A767EB9971018C006215A9FDE77F1" KeyPath="yes" Source="$(var.SourceDir)\bin\gpg-card.exe"/> + </Component> <Component Id="cmp6C1FB70721B208E33DB24296B93AB93F" Directory="dirAA72FFDDFA224FB221D53750596B0142" Guid="FE29D2AA-3151-4421-B8C0-355F69F267A1"> <File Id="fil563D2C0464DCE7ECADE6E15C0FC65821" KeyPath="yes" Source="$(var.SourceDir)\libexec\gpg-preset-passphrase.exe"/> </Component> @@ -164,7 +167,7 @@ and then manually edited: <File Id="fil322067E40CE41C36574A7CC520D75877" KeyPath="yes" Source="$(var.SourceDir)\share\doc\gnupg\examples\Automatic.prf" Name="Automatic.prf"/> </Component> <Component Id="cmp909B0412FDFCFD5092D93932AF982A74" Directory="dirC2E6BF1CC65903EA3A1AD83349586122" Guid="D30E7138-0D1C-48F4-8F53-E1EC6333F612"> - <File Id="fil322067E40CE41C36574A7CC520D75878" KeyPath="yes" Source="$(var.SourceDir)\share\doc\gnupg\examples\pwpatter.txt" Name="pwpattern.txt"/> + <File Id="fil322067E40CE41C36574A7CC520D75878" KeyPath="yes" Source="$(var.SourceDir)\share\doc\gnupg\examples\pwpattern.list" Name="pwpattern.list"/> </Component> <Component Id="cmp59D652F2B6BBFD90563BF58D6CE6BE7B" Directory="dirF4B1502A83344E3C92AB58989653B465" Guid="1C51D4AF-B308-40A3-B8D8-CEDA5AB2A383"> <File Id="filCB1BD20C87EE88A17D7502E26268DA65" KeyPath="yes" Source="$(var.SourceDir)\share\gnupg\distsigkey.gpg"/> |