windows_installer.mk
author etisserant <edouard.tisserant@gmail.com>
Fri, 03 Mar 2023 19:26:38 +0100
changeset 119 6be785b8cc85
parent 116 dc462ee1c0f5
child 120 02e37d9e96a9
permissions -rw-r--r--
Beremiz revision bump
112
b78f14613a6c Fix computation of BVERSION leading to error message if beremiz source tree is missing when make is invoked
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 111
diff changeset
     1
b78f14613a6c Fix computation of BVERSION leading to error message if beremiz source tree is missing when make is invoked
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 111
diff changeset
     2
VERSIONPY=sources/beremiz/version.py
b78f14613a6c Fix computation of BVERSION leading to error message if beremiz source tree is missing when make is invoked
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 111
diff changeset
     3
BVERSION?=$(if $(file <$(VERSIONPY)), $(shell python2 $(VERSIONPY)), $(shell date '+%x_%R' | tr '/: ' '---'))
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     5
CROSS_COMPILE=i686-w64-mingw32
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
CROSS_COMPILE_LIBS_DIR=$(shell dirname $(shell $(CROSS_COMPILE)-gcc -print-libgcc-file-name))
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     7
CC=$(CROSS_COMPILE)-gcc
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
CXX=$(CROSS_COMPILE)-g++
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     9
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
installer:
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    11
	mkdir -p installer
116
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    12
	cp $(src)/winpaths.py installer
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
CURDIR:=$(shell pwd)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
PACMANPFX=$(CURDIR)/pacman
38
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    17
msysdir=msys32
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
MSYS_ROOT=$(CURDIR)/$(msysdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
94
6d390b2623f5 re-starting xvfb-run too fast makes problems. Trying with -a
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 79
diff changeset
    20
XVFBRUN ?= xvfb-run -a
79
a8b434605895 Add Snap Package.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 40
diff changeset
    21
116
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    22
msysfinaldir=installer/msys2
38
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    23
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    24
pacman/.stamp:
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
	rm -rf pacman pacman-6.0.0
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
	$(call get_src_http,https://sources.archlinux.org/other/pacman,pacman-6.0.0.tar.xz)\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
	tar -xJf $$dld
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28
	cd pacman-6.0.0 ;\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    29
	patch -p1 < $(src)/pacman-6.0.0-nogpg-relative_conf.patch ;\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    30
	meson -Droot-dir=$(MSYS_ROOT) -Dsysconfdir=$(MSYS_ROOT)/etc -Dlocalstatedir=$(MSYS_ROOT)/var build ;\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    31
	DESTDIR=$(PACMANPFX) ninja -C build install
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    32
	touch $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    33
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
define pacman_install
38
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    35
LD_LIBRARY_PATH=$(PACMANPFX)/usr/lib/x86_64-linux-gnu/ fakeroot pacman/usr/bin/pacman -S $(1) --arch i686 --noconfirm --cachedir $(distfiles)
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    36
endef
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    37
38
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    38
$(msysdir)/.stamp: pacman/.stamp 
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    39
	rm -rf $(msysdir)
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    40
	$(call get_src_http,http://repo.msys2.org/distrib/i686,msys2-base-i686-20210705.tar.xz)\
38
3991f82369cb Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    41
	tar -xJf $$dld
116
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    42
	$(call pacman_install, mingw-w64-i686-gcc)
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    43
	$(call pacman_install, make)
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    44
	touch $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    45
116
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    46
$(msysfinaldir): $(msysdir)/.stamp | installer
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    47
	rm -rf $(msysfinaldir)
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
    48
	cp -a $(msysdir) $(msysfinaldir)
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    49
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    50
msiexec = WINEPREFIX=$(tmp) $(XVFBRUN) msiexec
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    51
wine = WINEPREFIX=$(tmp) $(XVFBRUN) wine
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    52
pydir = installer/python
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    53
pysite = $(pydir)/Lib/site-packages
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    54
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    55
python: $(pydir)/.stamp
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    56
$(pydir)/.stamp: | installer
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    57
	rm -rf $(pydir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    58
	mkdir -p $(pydir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    59
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    60
	# Python
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    61
	$(call get_src_http,http://www.python.org/ftp/python/2.7.13,python-2.7.13.msi)\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    62
	$(msiexec) /qn /i $$dld TARGETDIR=.\\$(pydir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    63
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    64
	# # wxPython fails if VC9.0 redistribuable is not fully here.
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    65
	# $(call get_src_http,http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140,vcredist_x86.exe)\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    66
	# cp $$dld $(tmp)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    67
	# $(wine) $(tmp)/vcredist_x86.exe /qn /i
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    68
	# cp -fu $(tmp)/drive_c/windows/winsxs/x86_microsoft.vc90*/* $(pydir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    69
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    70
	$(wine) $(pydir)/python.exe -m pip install --only-binary :all: --cache-dir $(distfiles) \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    71
        wxPython            \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    72
        future              \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    73
        matplotlib          \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    74
        pywin32             \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    75
        twisted             \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    76
        pyOpenSSL           \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    77
        Nevow               \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    78
        autobahn            \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    79
        msgpack_python      \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    80
        u-msgpack-python    \
40
87e6588ad4c8 Use pypi's zeroconf-py2compat instead of zeroconf2. Latest available release is more recent.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 38
diff changeset
    81
        zeroconf-py2compat  \
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    82
        lxml                \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    83
        sslpsk              \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    84
        pycountry           \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    85
        fonttools           \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    86
        Brotli
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    87
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    88
	$(wine) $(pydir)/python.exe -m pip install --cache-dir $(distfiles) \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    89
        Pyro                \
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    90
        gnosis              
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    91
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    92
	# # FIXME : this uses 'some' binaries of openssl that forces us to stick to python 2.7.13
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    93
	# # FIXME : (from here : https://www.npcglib.org/~stathis/blog/precompiled-openssl/)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    94
	# # FIXME : build it, and use openssl binaries from https://github.com/python/cpython-bin-deps/tree/openssl-bin-1.0.2k
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    95
	# WxGlade
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    96
	$(call get_src_http,https://github.com/wxGlade/wxGlade/archive,v0.8.3.zip)\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    97
	unzip -d $(tmp) $$dld
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    98
	mv $(tmp)/wxGlade-0.8.3 $(pysite)/wxglade
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    99
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   100
	touch $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   101
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   102
matiecdir = installer/matiec
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   103
matiec: $(matiecdir)/.stamp
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   104
$(matiecdir)/.stamp: sources/matiec_src | installer
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   105
	cp -a sources/matiec $(tmp);\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   106
	cd $(tmp)/matiec;\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   107
	autoreconf;\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   108
	automake --add-missing;\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   109
	./configure --host=$(CROSS_COMPILE);\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   110
	make -j$(CPUS);
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   111
	rm -rf $(matiecdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   112
	mkdir -p $(matiecdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   113
	mv $(tmp)/matiec/*.exe $(matiecdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   114
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   115
	# install necessary shared libraries from local cross-compiler
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   116
	cp $(CROSS_COMPILE_LIBS_DIR)/libgcc_s_sjlj-1.dll $(matiecdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   117
	cp $(CROSS_COMPILE_LIBS_DIR)/libstdc++-6.dll $(matiecdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   118
	
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   119
	mv $(tmp)/matiec/lib $(matiecdir)
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   120
	touch $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   121
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   122
beremizdir = installer/beremiz
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   123
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   124
beremiz: $(beremizdir)/.stamp
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   125
$(beremizdir)/.stamp:  sources/beremiz_src | installer
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   126
	rm -rf $(beremizdir);\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   127
	cp -a sources/beremiz $(beremizdir);\
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   128
	touch $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   129
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   130
ide_revisions = installer/revisions.txt
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   131
$(ide_revisions): revisions.txt
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   132
	cp $< $@ 
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   133
101
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   134
Beremiz-build: Beremiz-$(BVERSION)_build
116
dc462ee1c0f5 Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 112
diff changeset
   135
Beremiz-$(BVERSION)_build: $(msysfinaldir) $(pydir)/.stamp $(matiecdir)/.stamp $(beremizdir)/.stamp ide_targets_from_dist $(ide_revisions)
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   136
	touch $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   137
101
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   138
Beremiz-archive: Beremiz-$(BVERSION).zip
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   139
101
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   140
Beremiz-installer: Beremiz-$(BVERSION).exe
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   141
101
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   142
Beremiz-$(BVERSION).zip: Beremiz-$(BVERSION)_build
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   143
	rm -f $@
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   144
	cd installer; zip -r -q ../$@ .
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   145
101
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   146
Beremiz-$(BVERSION).exe: Beremiz-$(BVERSION)_build $(src)/license.txt $(src)/install.nsi 
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   147
	sed -e 's/\$$BVERSION/$(BVERSION)/g' $(src)/license.txt > installer/license.txt
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   148
	sed -e 's/\$$BVERSION/$(BVERSION)/g' $(src)/install.nsi |\
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   149
	makensis -
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   150
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   151
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   152