Skip to content

Commit 05ad5ab

Browse files
twadleighTracy Wadleigh
authored and
Tracy Wadleigh
committed
Add cygwin mintty to windows binary distribution.
1 parent e3d2cb7 commit 05ad5ab

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,16 @@ endif
419419

420420
ifeq ($(OS), WINNT)
421421
[ ! -d dist-extras ] || ( cd dist-extras && \
422-
cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(bindir) && \
422+
cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(bindir) && \
423423
mkdir $(DESTDIR)$(prefix)/Git && \
424424
7z x PortableGit.7z -o"$(DESTDIR)$(prefix)/Git" && \
425425
echo "[core] eol = lf" >> "$(DESTDIR)$(prefix)/Git/etc/gitconfig" && \
426426
sed -i "s/\bautocrlf = true$$/autocrlf = input/" "$(DESTDIR)$(prefix)/Git/etc/gitconfig" && \
427427
cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/echo.exe && \
428-
cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/printf.exe )
428+
cp busybox.exe $(DESTDIR)$(prefix)/Git/bin/printf.exe && \
429+
mkdir -p $(DESTDIR)$(prefix)/mintty/usr/bin && \
430+
cd cygwin/usr/bin && \
431+
cp mintty.exe stty.exe env.exe cygwin-console-helper.exe cygwin1.dll cygintl-8.dll cygiconv-2.dll cyggcc_s-1.dll $(DESTDIR)$(prefix)/mintty/usr/bin/ )
429432
cd $(DESTDIR)$(bindir) && rm -f llvm* llc.exe lli.exe opt.exe LTO.dll bugpoint.exe macho-dump.exe
430433

431434
# create file listing for uninstall. note: must have Windows path separators and line endings.
@@ -569,3 +572,6 @@ endif
569572
chmod a+x ./nsis/makensis.exe && \
570573
chmod a+x busybox.exe && \
571574
$(JLDOWNLOAD) PortableGit.7z https://github.com/msysgit/msysgit/releases/download/Git-1.9.5-preview20141217/PortableGit-1.9.5-preview20141217.7z
575+
cd dist-extras && \
576+
../contrib/windows/cygwin.sh
577+

contrib/windows/build-installer.nsi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ FunctionEnd
2929
Function createDesktopLink
3030
${NSD_GetState} $Checkbox $0
3131
${If} $0 <> 0
32-
CreateShortCut "$DESKTOP\julia.lnk" "$INSTDIR\bin\julia.exe"
32+
CreateShortcut "$DESKTOP\julia.lnk" "$INSTDIR\mintty\usr\bin\env.exe" "HOME=%HOMEDRIVE%%HOMEPATH% $INSTDIR\mintty\usr\bin\mintty.exe -h always -i $INSTDIR\bin\julia.exe $INSTDIR\bin\julia.exe" "$INSTDIR\bin\julia.exe" 0 SW_SHOWNORMAL CTRL|ALT|J "The Julia REPL"
3333
${EndIf}
3434
FunctionEnd
3535

@@ -69,7 +69,7 @@ Section "Dummy Section" SecDummy
6969
SetOutPath $INSTDIR
7070
File /a /r "julia-${Commit}\*"
7171
WriteUninstaller "$INSTDIR\Uninstall.exe"
72-
CreateShortcut "$INSTDIR\julia.lnk" "$INSTDIR\bin\julia.exe"
72+
CreateShortcut "$INSTDIR\julia.lnk" "$INSTDIR\mintty\usr\bin\env.exe" "HOME=%HOMEDRIVE%%HOMEPATH% $INSTDIR\mintty\usr\bin\mintty.exe -h always -i $INSTDIR\bin\julia.exe $INSTDIR\bin\julia.exe" "$INSTDIR\bin\julia.exe" 0 SW_SHOWNORMAL CTRL|ALT|J "The Julia REPL"
7373

7474
# ARP entries
7575
WriteRegStr HKCU "${ARP}" \
@@ -148,7 +148,7 @@ SectionEnd
148148
# Helper function to create Start Menu folder and shortcuts
149149
Function AddToStartMenu
150150
CreateDirectory "$SMPROGRAMS\${JuliaStartMenuFolder}"
151-
CreateShortcut "$SMPROGRAMS\${JuliaStartMenuFolder}\julia.lnk" "$INSTDIR\julia.lnk" "" "" "" "" "" "The Julia Language"
151+
CreateShortcut "$SMPROGRAMS\${JuliaStartMenuFolder}\julia.lnk" "$INSTDIR\mintty\usr\bin\env.exe" "HOME=%HOMEDRIVE%%HOMEPATH% $INSTDIR\mintty\usr\bin\mintty.exe -h always -i $INSTDIR\bin\julia.exe $INSTDIR\bin\julia.exe" "$INSTDIR\bin\julia.exe" 0 SW_SHOWNORMAL CTRL|ALT|J "The Julia REPL"
152152
CreateShortcut "$SMPROGRAMS\${JuliaStartMenuFolder}\Uninstall.lnk" "$instdir\Uninstall.exe"
153153
FunctionEnd
154154

contrib/windows/cygwin.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
# This file is a part of Julia. License is MIT: http://julialang.org/license
3+
4+
set -e
5+
mirror=http://mirrors.mit.edu/cygwin
6+
platform=x86
7+
packages="mintty cygwin coreutils libintl8 libiconv2 libgcc1"
8+
local_path=./cygwin
9+
10+
# make place to put downloads
11+
mkdir -p $local_path
12+
13+
# get setup.ini
14+
curl $mirror/$platform/setup.bz2 -o $local_path/setup.ini.bz2
15+
bunzip2 -f $local_path/setup.ini.bz2
16+
17+
# get and unpack packages
18+
for package in $packages
19+
do
20+
# determine the relative URL
21+
url=$(awk "BEGIN {RS = \"@ \"} ; \$1 == \"$package\" { print \$0 }" \
22+
$local_path/setup.ini | awk '$1 == "install:" { print $2 }' - | \
23+
head -1)
24+
25+
# determine the local filename
26+
filename=${url##*/}
27+
28+
# download the file
29+
curl $mirror/$url -o $local_path/$filename
30+
31+
# unpack it
32+
tar xf $local_path/$filename --directory $local_path
33+
done

0 commit comments

Comments
 (0)