2016-09-11 14:20:39 +02:00
|
|
|
|
#############################################################################
|
2017-01-30 16:31:17 +01:00
|
|
|
|
# build a wsltty installer package:
|
|
|
|
|
# configure ver=... and minttyver= in this makefile
|
|
|
|
|
# make targets:
|
|
|
|
|
# make [all] to build a distributable installer (default)
|
|
|
|
|
# make pkg to build an installer, bypassing the system checks
|
|
|
|
|
# make wsltty to build an installer using the local copy of mintty
|
|
|
|
|
|
2016-11-14 16:42:27 +01:00
|
|
|
|
all: check pkg
|
2016-09-11 14:20:39 +02:00
|
|
|
|
|
2016-11-14 16:42:27 +01:00
|
|
|
|
# wsltty release
|
2017-07-01 16:44:15 +02:00
|
|
|
|
ver=0.7.8.3
|
2016-11-14 16:42:27 +01:00
|
|
|
|
|
|
|
|
|
# mintty release version
|
2017-07-01 16:44:15 +02:00
|
|
|
|
#minttyver=2.7.8
|
|
|
|
|
minttyver=master
|
2016-11-14 16:42:27 +01:00
|
|
|
|
|
|
|
|
|
# wslbridge backend version
|
2017-07-01 16:44:15 +02:00
|
|
|
|
wslbridgever=0.2.3
|
2017-06-24 01:32:20 +02:00
|
|
|
|
|
2016-11-14 16:42:27 +01:00
|
|
|
|
# wslbridge frontend version
|
|
|
|
|
# release 0.2.0 does not have cygwin_internal(CW_SYNC_WINENV) yet;
|
|
|
|
|
# therefore using "master" below
|
2016-11-15 12:41:19 +01:00
|
|
|
|
#wslbridge-frontend=wslbridge-frontend
|
|
|
|
|
# release 0.2.1 is updated and complete, no separate frontend build needed:
|
2017-06-26 13:25:08 +02:00
|
|
|
|
wslbridge-frontend=
|
2016-11-14 16:42:27 +01:00
|
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
# target checking and some defs
|
2016-09-11 14:20:39 +02:00
|
|
|
|
|
|
|
|
|
TARGET := $(shell $(CC) -dumpmachine)
|
|
|
|
|
|
|
|
|
|
ifeq ($(TARGET), i686-pc-cygwin)
|
|
|
|
|
sys := cygwin32
|
|
|
|
|
else ifeq ($(TARGET), x86_64-pc-cygwin)
|
|
|
|
|
sys := cygwin64
|
|
|
|
|
else ifeq ($(TARGET), i686-pc-msys)
|
|
|
|
|
sys := msys32
|
|
|
|
|
else ifeq ($(TARGET), x86_64-pc-msys)
|
|
|
|
|
sys := msys64
|
|
|
|
|
else
|
|
|
|
|
$(error Target '$(TARGET)' not supported)
|
|
|
|
|
endif
|
|
|
|
|
|
2016-11-14 16:42:27 +01:00
|
|
|
|
wget=curl -R -L --connect-timeout 55 -O
|
|
|
|
|
wgeto=curl -R -L --connect-timeout 55
|
2016-09-14 15:37:55 +02:00
|
|
|
|
|
2016-10-11 18:04:15 +02:00
|
|
|
|
#############################################################################
|
|
|
|
|
# system check;
|
|
|
|
|
# for now, let's enforce Cygwin 32-Bit as the container for wsltty
|
2016-11-14 16:42:27 +01:00
|
|
|
|
# just in case there is a 32-Bit WSL released (-> 32 bit), and to ensure
|
|
|
|
|
# the path name drag-and-drop adaptation works (-> cygwin, not msys)
|
2016-10-11 18:04:15 +02:00
|
|
|
|
|
|
|
|
|
check:
|
2016-11-14 16:42:27 +01:00
|
|
|
|
# checking suitable host environment; run `make pkg` to bypass
|
2016-11-15 12:41:19 +01:00
|
|
|
|
# check cygwin (vs msys) for proper drag-and-drop paths:
|
|
|
|
|
uname | grep CYGWIN
|
|
|
|
|
# check 32 bit (vs 64 bit) to ensure 32-Bit Windows support, just in case:
|
2017-04-14 01:08:20 +02:00
|
|
|
|
#uname -m | grep i686
|
|
|
|
|
# check 64 bit (vs 32 bit) to provide 64-Bit stability support:
|
|
|
|
|
uname -m | grep x86_64
|
2016-10-11 18:04:15 +02:00
|
|
|
|
|
2016-09-11 14:20:39 +02:00
|
|
|
|
#############################################################################
|
|
|
|
|
# generation
|
|
|
|
|
|
2016-11-15 12:41:19 +01:00
|
|
|
|
wslbridge: wslbridge-backend $(wslbridge-frontend)
|
2016-11-14 16:42:27 +01:00
|
|
|
|
|
|
|
|
|
wslbridge-backend:
|
2016-09-14 15:37:55 +02:00
|
|
|
|
$(wget) https://github.com/rprichard/wslbridge/releases/download/$(wslbridgever)/wslbridge-$(wslbridgever)-$(sys).tar.gz
|
2016-09-11 14:20:39 +02:00
|
|
|
|
tar xvzf wslbridge-$(wslbridgever)-$(sys).tar.gz
|
|
|
|
|
mkdir -p bin
|
2016-11-15 12:41:19 +01:00
|
|
|
|
cp wslbridge-$(wslbridgever)-$(sys)/wslbridge* bin/
|
2016-09-11 14:20:39 +02:00
|
|
|
|
cp wslbridge-$(wslbridgever)-$(sys)/LICENSE.txt LICENSE.wslbridge
|
|
|
|
|
|
2016-11-14 16:42:27 +01:00
|
|
|
|
wslbridge-frontend:
|
|
|
|
|
$(wgeto) https://github.com/rprichard/wslbridge/archive/master.zip -o wslbridge-master.zip
|
|
|
|
|
unzip -o wslbridge-master.zip
|
|
|
|
|
cd wslbridge-master/frontend; make
|
|
|
|
|
strip wslbridge-master/out/wslbridge.exe
|
|
|
|
|
mkdir -p bin
|
|
|
|
|
cp wslbridge-master/out/wslbridge.exe bin/
|
|
|
|
|
cp wslbridge-master/LICENSE.txt LICENSE.wslbridge
|
|
|
|
|
|
2017-01-27 14:49:06 +01:00
|
|
|
|
mintty: mintty-get mintty-build
|
|
|
|
|
|
|
|
|
|
mintty-get:
|
|
|
|
|
$(wgeto) https://github.com/mintty/mintty/archive/$(minttyver).zip -o mintty-$(minttyver).zip
|
|
|
|
|
unzip -o mintty-$(minttyver).zip
|
|
|
|
|
|
|
|
|
|
mintty-build:
|
2017-06-29 17:41:41 +02:00
|
|
|
|
cd mintty-$(minttyver)/src; make LDFLAGS="-static -static-libgcc -s" VERSION_SUFFIX="– wsltty $(ver)"
|
2016-09-11 14:20:39 +02:00
|
|
|
|
mkdir -p bin
|
2017-01-27 14:49:06 +01:00
|
|
|
|
cp mintty-$(minttyver)/bin/mintty.exe bin/
|
|
|
|
|
cp mintty-$(minttyver)/LICENSE LICENSE.mintty
|
|
|
|
|
cd mintty-$(minttyver)/lang; zoo a po *.po; mv po.zoo ../../
|
2016-09-11 14:20:39 +02:00
|
|
|
|
|
|
|
|
|
cygwin:
|
|
|
|
|
mkdir -p bin
|
|
|
|
|
cp /bin/cygwin1.dll bin/
|
|
|
|
|
cp /bin/cygwin-console-helper.exe bin/
|
2016-09-29 14:53:34 +02:00
|
|
|
|
#cp /bin/dash.exe bin/
|
2017-01-06 16:47:13 +01:00
|
|
|
|
cp /bin/zoo.exe bin/
|
2016-09-11 14:20:39 +02:00
|
|
|
|
|
2017-05-19 22:20:23 +02:00
|
|
|
|
cop: ver
|
2016-09-11 14:20:39 +02:00
|
|
|
|
mkdir -p rel
|
2017-01-06 16:47:13 +01:00
|
|
|
|
rm -fr rel/wsltty-$(ver)-install.exe
|
2016-09-11 14:20:39 +02:00
|
|
|
|
sed -e "s,%version%,$(ver)," makewinx.cfg > rel/wsltty.SED
|
|
|
|
|
cp bin/cygwin1.dll rel/
|
|
|
|
|
cp bin/cygwin-console-helper.exe rel/
|
2016-09-29 14:53:34 +02:00
|
|
|
|
#cp bin/dash.exe rel/
|
2016-09-11 14:20:39 +02:00
|
|
|
|
cp bin/mintty.exe rel/
|
2017-01-06 16:47:13 +01:00
|
|
|
|
cp bin/zoo.exe rel/
|
|
|
|
|
cp po.zoo rel/
|
2016-09-11 14:20:39 +02:00
|
|
|
|
cp bin/wslbridge.exe rel/
|
|
|
|
|
cp bin/wslbridge-backend rel/
|
2016-11-16 16:46:50 +01:00
|
|
|
|
cp LICENSE.* rel/
|
|
|
|
|
cp *.lnk rel/
|
|
|
|
|
cp *.url rel/
|
|
|
|
|
cp *.bat rel/
|
2017-05-19 22:20:23 +02:00
|
|
|
|
cp *.vbs rel/
|
|
|
|
|
|
|
|
|
|
cab: cop
|
2016-09-11 14:20:39 +02:00
|
|
|
|
cd rel; iexpress /n wsltty.SED
|
|
|
|
|
|
2017-05-19 22:20:23 +02:00
|
|
|
|
install: cop installbat
|
|
|
|
|
|
|
|
|
|
installbat:
|
|
|
|
|
cd rel; cmd /C install
|
|
|
|
|
|
|
|
|
|
ver:
|
|
|
|
|
echo $(ver) > VERSION
|
|
|
|
|
|
2017-01-27 14:49:06 +01:00
|
|
|
|
pkg: wslbridge cygwin mintty cab
|
|
|
|
|
|
|
|
|
|
wsltty: wslbridge cygwin mintty-build cab
|
2017-01-06 16:47:13 +01:00
|
|
|
|
|
2016-09-11 14:20:39 +02:00
|
|
|
|
#############################################################################
|
|
|
|
|
# end
|