windows_installer.mk
changeset 38 3991f82369cb
parent 37 fd09116d3537
child 40 87e6588ad4c8
equal deleted inserted replaced
37:fd09116d3537 38:3991f82369cb
     9 	mkdir -p installer
     9 	mkdir -p installer
    10 
    10 
    11 
    11 
    12 CURDIR:=$(shell pwd)
    12 CURDIR:=$(shell pwd)
    13 PACMANPFX=$(CURDIR)/pacman
    13 PACMANPFX=$(CURDIR)/pacman
    14 msysdir=installer/msys32
    14 msysdir=msys32
    15 MSYS_ROOT=$(CURDIR)/$(msysdir)
    15 MSYS_ROOT=$(CURDIR)/$(msysdir)
    16 
    16 
    17 pacman/.stamp: | installer
    17 mingw32dir=$(msysdir)/mingw32
       
    18 mingw32finaldir=installer/mingw32
       
    19 
       
    20 pacman/.stamp:
    18 	rm -rf pacman pacman-6.0.0
    21 	rm -rf pacman pacman-6.0.0
    19 	$(call get_src_http,https://sources.archlinux.org/other/pacman,pacman-6.0.0.tar.xz)\
    22 	$(call get_src_http,https://sources.archlinux.org/other/pacman,pacman-6.0.0.tar.xz)\
    20 	tar -xJf $$dld
    23 	tar -xJf $$dld
    21 	cd pacman-6.0.0 ;\
    24 	cd pacman-6.0.0 ;\
    22 	patch -p1 < $(src)/pacman-6.0.0-nogpg-relative_conf.patch ;\
    25 	patch -p1 < $(src)/pacman-6.0.0-nogpg-relative_conf.patch ;\
    23 	meson -Droot-dir=$(MSYS_ROOT) -Dsysconfdir=$(MSYS_ROOT)/etc -Dlocalstatedir=$(MSYS_ROOT)/var build ;\
    26 	meson -Droot-dir=$(MSYS_ROOT) -Dsysconfdir=$(MSYS_ROOT)/etc -Dlocalstatedir=$(MSYS_ROOT)/var build ;\
    24 	DESTDIR=$(PACMANPFX) ninja -C build install
    27 	DESTDIR=$(PACMANPFX) ninja -C build install
    25 	touch $@
    28 	touch $@
    26 
    29 
    27 define pacman_install
    30 define pacman_install
    28 LD_LIBRARY_PATH=$(PACMANPFX)/usr/lib/x86_64-linux-gnu/ fakeroot pacman/usr/bin/pacman -S $(1) --arch i686 --noconfirm -cachedir $(distfiles)
    31 LD_LIBRARY_PATH=$(PACMANPFX)/usr/lib/x86_64-linux-gnu/ fakeroot pacman/usr/bin/pacman -S $(1) --arch i686 --noconfirm --cachedir $(distfiles)
    29 endef
    32 endef
    30 
    33 
    31 $(msysdir)/.stamp: pacman/.stamp | installer
    34 $(msysdir)/.stamp: pacman/.stamp 
    32 	rm -rf installer/msys32
    35 	rm -rf $(msysdir)
    33 	$(call get_src_http,http://repo.msys2.org/distrib/i686,msys2-base-i686-20210705.tar.xz)\
    36 	$(call get_src_http,http://repo.msys2.org/distrib/i686,msys2-base-i686-20210705.tar.xz)\
    34 	tar -C installer -xJf $$dld
    37 	tar -xJf $$dld
    35 	$(call pacman_install, mingw-w64-i686-gcc)
       
    36 	$(call pacman_install, make)
       
    37 	touch $@
    38 	touch $@
    38 
    39 
       
    40 $(mingw32dir)/.stamp: $(msysdir)/.stamp 
       
    41 	$(call pacman_install, mingw-w64-i686-gcc)
       
    42 	touch $@
       
    43 
       
    44 # this takes just a fraction of msys2, but for now only this is needed
       
    45 $(mingw32finaldir): $(mingw32dir)/.stamp | installer
       
    46 	rm -rf $(mingw32finaldir)
       
    47 	cp -a $(mingw32dir) $(mingw32finaldir)
    39 
    48 
    40 msiexec = WINEPREFIX=$(tmp) $(XVFBRUN) msiexec
    49 msiexec = WINEPREFIX=$(tmp) $(XVFBRUN) msiexec
    41 wine = WINEPREFIX=$(tmp) $(XVFBRUN) wine
    50 wine = WINEPREFIX=$(tmp) $(XVFBRUN) wine
    42 pydir = installer/python
    51 pydir = installer/python
    43 pysite = $(pydir)/Lib/site-packages
    52 pysite = $(pydir)/Lib/site-packages
    66         pyOpenSSL           \
    75         pyOpenSSL           \
    67         Nevow               \
    76         Nevow               \
    68         autobahn            \
    77         autobahn            \
    69         msgpack_python      \
    78         msgpack_python      \
    70         u-msgpack-python    \
    79         u-msgpack-python    \
    71         zeroconf=0.20.0     \
    80         zeroconf2           \
    72         lxml                \
    81         lxml                \
    73         sslpsk              \
    82         sslpsk              \
    74         pycountry           \
    83         pycountry           \
    75         fonttools           \
    84         fonttools           \
    76         Brotli
    85         Brotli
    77 	
    86 	
    78 	$(wine) $(pydir)/python.exe -m pip install --cache-dir $(distfiles) \
    87 	$(wine) $(pydir)/python.exe -m pip install --cache-dir $(distfiles) \
    79         Pyro                \
    88         Pyro                \
    80         gnosis              
    89         gnosis              
    81 	
    90 	
    82 	# # service identity (twisted prereq) ?
       
    83 	# # python sslpsk (to have PYROPSK)
       
    84 	# # FIXME : this uses 'some' binaries of openssl that forces us to stick to python 2.7.13
    91 	# # FIXME : this uses 'some' binaries of openssl that forces us to stick to python 2.7.13
    85 	# # FIXME : (from here : https://www.npcglib.org/~stathis/blog/precompiled-openssl/)
    92 	# # FIXME : (from here : https://www.npcglib.org/~stathis/blog/precompiled-openssl/)
    86 	# # FIXME : build it, and use openssl binaries from https://github.com/python/cpython-bin-deps/tree/openssl-bin-1.0.2k
    93 	# # FIXME : build it, and use openssl binaries from https://github.com/python/cpython-bin-deps/tree/openssl-bin-1.0.2k
    87 	# WxGlade
    94 	# WxGlade
    88 	$(call get_src_http,https://github.com/wxGlade/wxGlade/archive,v0.8.3.zip)\
    95 	$(call get_src_http,https://github.com/wxGlade/wxGlade/archive,v0.8.3.zip)\
   122 ide_revisions = installer/revisions.txt
   129 ide_revisions = installer/revisions.txt
   123 $(ide_revisions): revisions.txt
   130 $(ide_revisions): revisions.txt
   124 	cp $< $@ 
   131 	cp $< $@ 
   125 
   132 
   126 Beremiz-build: Beremiz-$(TIMESTAMP)_build
   133 Beremiz-build: Beremiz-$(TIMESTAMP)_build
   127 Beremiz-$(TIMESTAMP)_build: $(msysdir)/.stamp $(pydir)/.stamp $(matiecdir)/.stamp $(beremizdir)/.stamp ide_targets_from_dist $(ide_revisions)
   134 Beremiz-$(TIMESTAMP)_build: $(mingw32finaldir) $(pydir)/.stamp $(matiecdir)/.stamp $(beremizdir)/.stamp ide_targets_from_dist $(ide_revisions)
   128 	touch $@
   135 	touch $@
   129 
   136 
   130 Beremiz-archive: Beremiz-$(TIMESTAMP).zip
   137 Beremiz-archive: Beremiz-$(TIMESTAMP).zip
   131 
   138 
   132 Beremiz-installer: Beremiz-$(TIMESTAMP).exe
   139 Beremiz-installer: Beremiz-$(TIMESTAMP).exe