##// END OF EJS Templates
packaging: support building WiX installers with PyOxidizer...
packaging: support building WiX installers with PyOxidizer We initially implemented PyOxidizer support for Inno installers. That did most of the heavy work of integrating PyOxidizer into the packaging system. Implementing WiX installer support was pretty straightforward. Aspects of this patch look very similar to Inno's. The main difference is the handling of the Visual C++ Redistributable Runtime files. The WiX installer was formerly using merge modules to install the VC++ 9.0 runtime because this feature is supported by the WiX installer (it isn't easily available to Inno installers). Our strategy for the runtime files is to install the vcruntime140.dll file next to hg.exe just like any other file. While we could leverage WiX's functionality for invoking a VCRedist installer, I don't want to deal with the complexity at this juncture. So, we let run_pyoxidizer() copy vcruntime140.dll into the staging directory (like it does for Inno) and our dynamic WiX XML generator picks it up as a regular file and installs it. We did, however, have to teach mercurial.wxs how to conditionally use the merge modules. But this was rather straightforward. Comparing the file layout of the WiX installers before and after: * Various lib/*.{pyd, dll} files no longer exist * python27.dll was replaced by python37.dll * vcruntime140.dll was added All these changes are expected due to the transition to Python 3 and to PyOxidizer, which embeded the .pyd and .dll files in hg.exe. Differential Revision: https://phab.mercurial-scm.org/D8477

File last commit:

r43723:7c9d42c1 stable
r45260:c9517d9d default
Show More
Makefile
136 lines | 3.8 KiB | text/x-makefile | MakefileLexer
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 $(eval HGROOT := $(shell cd ../..; pwd))
Gregory Szorc
packaging: dynamically define make targets...
r38478 DEBIAN_CODENAMES := \
stretch \
av6
packaging: add Bullseye, remove Jessie...
r43077 buster \
bullseye
Gregory Szorc
packaging: dynamically define make targets...
r38478
UBUNTU_CODENAMES := \
xenial \
bionic \
av6
packaging: add Cosmic and Disco, remove Trusty and Artful...
r43076 cosmic \
disco
Gregory Szorc
packaging: dynamically define make targets...
r38478
Mads Kiilerich
packaging: update built-in Fedora support to Fedora 31...
r43678 FEDORA_RELEASE := 31
Gregory Szorc
packaging: dynamically define make targets...
r38478
CENTOS_RELEASES := \
5 \
6 \
Mathias De Mare
packaging: add support for CentOS 8...
r43723 7 \
8
Gregory Szorc
packaging: dynamically define make targets...
r38478
# Build a Python for these CentOS releases.
CENTOS_WITH_PYTHON_RELEASES := 5 6
Mathias De Mare
packaging: allow choosing python version depending on centos version...
r43722 CENTOS_WITH_NONVERSIONED_PYTHON := 5 6 7
Gregory Szorc
packaging: dynamically define make targets...
r38478
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 help:
@echo 'Packaging Make Targets'
@echo ''
Augie Fackler
packaging: make help output correct for fedora and centos targets...
r38577 @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 @echo ' Build an RPM for a specific CentOS version using Docker.'
@echo ''
Gregory Szorc
packaging: dynamically define make targets...
r38478 @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 @echo ' Build Debian packages specific to a Debian distro using Docker.'
@echo ''
Mads Kiilerich
packaging: refactor "fedora29" target to a single more generic "fedora" target...
r43677 @echo 'docker-fedora'
@echo ' Build an RPM for a Fedora $(FEDORA_RELEASE) using Docker.'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 @echo ''
Gregory Szorc
packaging: dynamically define make targets...
r38478 @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 @echo ' Build Debian package specific to an Ubuntu distro using Docker.'
@echo ''
Gregory Szorc
packaging: dynamically define make targets...
r38478 @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 @echo ' Build a source-only Debian package specific to an Ubuntu distro'
@echo ' using Docker.'
@echo ''
@echo 'linux-wheels'
@echo ' Build Linux manylinux wheels using Docker.'
@echo ''
@echo 'linux-wheels-{x86_64, i686}'
@echo ' Build Linux manylinux wheels for a specific architecture using Docker'
@echo ''
@echo 'deb'
@echo ' Build a Debian package locally targeting the current system'
@echo ''
@echo 'ppa'
@echo ' Build a Debian source package locally targeting the current system'
@echo ''
Augie Fackler
packaging: make help output correct for fedora and centos targets...
r38577 @echo 'centos{$(strip $(CENTOS_RELEASES))}'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 @echo ' Build an RPM for a specific CentOS version locally'
@echo ''
Mads Kiilerich
packaging: refactor "fedora29" target to a single more generic "fedora" target...
r43677 @echo 'fedora'
@echo ' Build an RPM for Fedora $(FEDORA_RELEASE) locally'
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
.PHONY: help
.PHONY: deb
deb:
./builddeb
.PHONY: ppa
ppa:
./builddeb --source-only
Gregory Szorc
packaging: dynamically define make targets...
r38478 # Debian targets.
define debian_targets =
.PHONY: docker-debian-$(1)
docker-debian-$(1):
./dockerdeb debian $(1)
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 endef
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 $(foreach codename,$(DEBIAN_CODENAMES),$(eval $(call debian_targets,$(codename))))
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 # Ubuntu targets.
define ubuntu_targets =
.PHONY: docker-ubuntu-$(1)
docker-ubuntu-$(1):
./dockerdeb ubuntu $(1)
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 .PHONY: docker-ubuntu-$(1)-ppa
docker-ubuntu-$(1)-ppa:
./dockerdeb ubuntu $(1) --source-only
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 endef
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename))))
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 # Fedora targets.
Mads Kiilerich
packaging: refactor "fedora29" target to a single more generic "fedora" target...
r43677 .PHONY: fedora
fedora:
mkdir -p $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 ./buildrpm
Mads Kiilerich
packaging: refactor "fedora29" target to a single more generic "fedora" target...
r43677 cp $(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
cp $(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034 rm -rf $(HGROOT)/rpmbuild
Mads Kiilerich
packaging: refactor "fedora29" target to a single more generic "fedora" target...
r43677 .PHONY: docker-fedora
docker-fedora:
./dockerrpm fedora$(FEDORA_RELEASE)
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 # CentOS targets.
define centos_targets
.PHONY: centos$(1)
centos$(1):
mkdir -p $$(HGROOT)/packages/centos$(1)
Mathias De Mare
packaging: allow choosing python version depending on centos version...
r43722 ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
muxator
packaging: fix "make centos{5,6,7}"...
r40185 cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1)
cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1)
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 .PHONY: docker-centos$(1)
docker-centos$(1):
Mathias De Mare
packaging: allow choosing python version depending on centos version...
r43722 ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 endef
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
Gregory Szorc
packaging: dynamically define make targets...
r38478 $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release))))
Gregory Szorc
packaging: move most packaging targets to own Makefile...
r38034
.PHONY: linux-wheels
linux-wheels: linux-wheels-x86_64 linux-wheels-i686
.PHONY: linux-wheels-x86_64
linux-wheels-x86_64:
docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/packaging/build-linux-wheels.sh
.PHONY: linux-wheels-i686
linux-wheels-i686:
docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/packaging/build-linux-wheels.sh