windows_installer.mk
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 21 Aug 2022 19:32:38 +0200
changeset 104 70d77ca75af2
parent 101 5799370243c0
child 111 e31e95e05a3c
permissions -rw-r--r--
Beremiz revision bump.
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
     1
BVERSION=$(shell python2 sources/beremiz/version.py)
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
     2
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
     3
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
     4
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
     5
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
     6
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
     7
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
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
     9
	mkdir -p 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
    10
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
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
    12
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
    13
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
    14
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
    15
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
    16
94
6d390b2623f5 re-starting xvfb-run too fast makes problems. Trying with -a
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 79
diff changeset
    17
XVFBRUN ?= xvfb-run -a
79
a8b434605895 Add Snap Package.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 40
diff changeset
    18
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
    19
mingw32dir=$(msysdir)/mingw32
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
    20
mingw32finaldir=installer/mingw32
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
    21
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
    22
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
    23
	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
    24
	$(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
    25
	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
    26
	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
    27
	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
    28
	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
    29
	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
    30
	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
    31
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
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
    33
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
    34
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
    35
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
    36
$(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
    37
	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
    38
	$(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
    39
	tar -xJf $$dld
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
	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
    41
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
    42
$(mingw32dir)/.stamp: $(msysdir)/.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
    43
	$(call pacman_install, mingw-w64-i686-gcc)
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
    44
	touch $@
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
    45
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
    46
# this takes just a fraction of msys2, but for now only this is needed
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
    47
$(mingw32finaldir): $(mingw32dir)/.stamp | installer
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
    48
	rm -rf $(mingw32finaldir)
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
    49
	cp -a $(mingw32dir) $(mingw32finaldir)
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
    50
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
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
    52
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
    53
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
    54
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
    55
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
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
    57
$(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
    58
	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
    59
	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
    60
	
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
	# 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
    62
	$(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
    63
	$(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
    64
	
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
	# # 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
    66
	# $(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
    67
	# 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
    68
	# $(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
    69
	# 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
    70
	
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
	$(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
    72
        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
    73
        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
    74
        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
    75
        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
    76
        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
    77
        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
    78
        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
    79
        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
    80
        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
    81
        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
    82
        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
    83
        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
    84
        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
    85
        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
    86
        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
    87
        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
    88
	
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
	$(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
    90
        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
    91
        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
    92
	
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 : 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
    94
	# # 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
    95
	# # 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
    96
	# 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
    97
	$(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
    98
	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
    99
	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
   100
	
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
	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
   102
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
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
   104
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
   105
$(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
   106
	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
   107
	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
   108
	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
   109
	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
   110
	./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
   111
	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
   112
	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
   113
	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
   114
	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
   115
	
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
	# 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
   117
	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
   118
	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
   119
	
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
	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
   121
	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
   122
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
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
   124
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
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
   126
$(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
   127
	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
   128
	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
   129
	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
   130
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 = 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
   132
$(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
   133
	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
   134
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
   135
Beremiz-build: Beremiz-$(BVERSION)_build
5799370243c0 Version "name" of installer and snap is now deduced from beremiz' version.py
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 94
diff changeset
   136
Beremiz-$(BVERSION)_build: $(mingw32finaldir) $(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
   137
	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
   138
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
   139
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
   140
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
   141
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
   142
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
   143
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
   144
	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
   145
	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
   146
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
   147
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
   148
	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
   149
	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
   150
	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
   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
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
   153