############################################################################# # build a wsltty installer package: # configure ver=... and minttyver= in this makefile # make targets: # make [all] build a distributable installer (default) # make pkg build an installer, bypassing the system checks # make wsltty build the software, using the local copy of mintty # wsltty release ver=3.0.5 # wsltty appx release - must have 4 parts! verx=3.0.5.0 # Windows SDK version for appx WINSDKKEY=/HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/Microsoft/.NET Framework Platform/Setup/Multi-Targeting Pack WINSDKVER=`regtool list '$(WINSDKKEY)' | sed -e '$$ q' -e d` ############################## # mintty release version minttyver=3.0.5 # or mintty branch or commit version #minttyver=master ############################## # wslbridge binary package; may be overridden below wslbridgever=0.3 # or wslbridge branch or commit to build from source; wslbridge=wslbridge-frontend wslbridge-backend ############################################################################# # default target all: all-$(notdir $(CURDIR)) all-wsltty: check pkg all-wsltty.appx: appx ############################################################################# # target checking and some defs 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 wget=curl -R -L --connect-timeout 55 -O wgeto=curl -R -L --connect-timeout 55 ############################################################################# # system check: # - ensure the path name drag-and-drop adaptation works (-> Cygwin, not MSYS) # - 64 Bit (x86_64) for more stable invocation (avoid fork issues) check: # checking suitable host environment; run `make pkg` to bypass # check cygwin (vs msys) for proper drag-and-drop paths: uname | grep CYGWIN # check 32 bit to ensure 32-Bit Windows support, just in case: #uname -m | grep i686 # check 64 bit to provide 64-Bit stability support: uname -m | grep x86_64 ############################################################################# # patch version information for appx package configuration fix-verx: echo patching $(WINSDKVER) into Launcher config cd Launcher; sed -i~ -e "// s,v[.0-9]*,$(WINSDKVER)," Launcher.csproj echo patched Launcher.csproj echo patching $(verx) into app config sed -i~ -e '/ rel/wsltty.SED cp bin/cygwin1.dll rel/ cp bin/cygwin-console-helper.exe rel/ cp bin/dash.exe rel/ cp bin/regtool.exe rel/ cp bin/mintty.exe rel/ cp bin/zoo.exe rel/ cp lang.zoo rel/ cp themes.zoo rel/ cp sounds.zoo rel/ cp charnames.txt rel/ cp bin/wslbridge2.exe rel/ cp bin/wslbridge2-backend rel/ cp bin/hvpty.exe rel/ cp bin/hvpty-backend rel/ cp mkshortcut.vbs rel/ #cp bin/mkshortcut.exe rel/ #cp bin/cygpopt-0.dll rel/ #cp bin/cygiconv-2.dll rel/ #cp bin/cygintl-8.dll rel/ cp LICENSE.* rel/ cp VERSION rel/ cp *.lnk rel/ cp *.ico rel/ cp *.url rel/ cp *.bat rel/ cp *.sh rel/ cp *.vbs rel/ cab: cop cd rel; iexpress /n wsltty.SED install: cop installbat installbat: cd rel; cmd /C install ver: echo $(ver) > VERSION mintty: mintty-get mintty-build mintty-usr: mintty-get mintty-appx # local wsltty build target: wsltty: wslbridge cygwin mintty-build mintty-pkg # standalone wsltty package build target: pkg: wslbridge cygwin mintty-get mintty-build mintty-pkg cab # appx package contents target: wsltty-appx: wslbridge appx-bin mintty-get mintty-build-appx mintty-appx # appx package target: appx: wsltty-appx fix-verx sh ./build.sh ############################################################################# # end