-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild-tm.sh
125 lines (110 loc) · 3.4 KB
/
build-tm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/sh
# builds and packs texmacs for windows on Msys2/Mingw32
ARCH="$(uname -m)"
case "$ARCH" in
i686)
BITNESS=32
;;
x86_64)
BITNESS=64
;;
*)
die "Unhandled architecture: $ARCH"
;;
esac
if test ! -d /build ; then
mkdir -p /build
fi
# guile 1.8 is not in the MSys2 repos, get it from my Githubs.
cd /build
if test ! -d mingw-w64-guile1.8 ; then
if true ;
then
# donwload already-built
mkdir mingw-w64-guile1.8/
cd mingw-w64-guile1.8/
wget https://github.com/slowphil/mingw-w64-guile1.8/releases/download/v1.8.8-mingw-w64-i686-1/mingw-w64-i686-guile1.8-1.8.8-1-any.pkg.tar.xz
pacman --noconfirm -U mingw-w64-i686-guile1.8-1.8.8-1-any.pkg.tar.xz
else
# build from sources
git clone https://github.com/slowphil/mingw-w64-guile1.8.git
cd mingw-w64-guile1.8/
MINGW_INSTALLS=mingw32 makepkg-mingw -sLi --noconfirm
fi
fi
# get inno setup
if test ! -d "/build/inno" ; then
mkdir /build/inno
cd /build/inno
#first a utility to unpack inno setup itself without running it
if test ! -z "/build/inno/innounp.exe" ; then
wget https://downloads.sourceforge.net/project/innounp/innounp/innounp%200.49/innounp049.rar ;
unrar e innounp049.rar ;
rm *.rar
fi
# then inno setup
if test ! -z "/build/inno/inno_setup/ISCC.exe" ; then
wget http://files.jrsoftware.org/is/6/innosetup-6.0.3.exe ;
./innounp.exe -dinno_setup -c{app} -v -x innosetup-6.0.3.exe ;
rm innosetup-6.0.3.exe
fi
fi
# get winsparkle
if test ! -d "/build/winsparkle" ; then
mkdir /build/winsparkle
cd /build/winsparkle
wget https://github.com/vslavik/winsparkle/releases/download/v0.6.0/WinSparkle-0.6.0.zip
7z x WinSparkle-0.6.0.zip
rm *.zip
cd WinSparkle-*
cp include/* ..
cp Release/* ..
fi
# get SumatraPDF
if test ! -d "/build/SumatraPDF" ; then
mkdir /build/SumatraPDf
cd /build/SumatraPDF
wget https://kjkpub.nyc3.digitaloceanspaces.com/software/sumatrapdf/rel/SumatraPDF-3.1.2.zip
7z x SumatraPDF-3.1.2.zip
rm *.zip
fi
# get Imagemagick portable
# if test ! -d "/build/Imagemagick" ; then
# mkdir /build/Imagemagick
# cd /build/Imagemagick
# wget https://imagemagick.org/archive/binaries/ImageMagick-7.1.0-portable-Q8-x86.zip
# 7z x ImageMagick-7.1.0-portable-Q8-x86.zip
# rm *.zip
# fi
# now, finally download and build texmacs
cd /build
if test ! -d mingw-w64-texmacs ; then
git clone https://github.com/slowphil/mingw-w64-texmacs.git
fi
cd mingw-w64-texmacs/
MINGW_ARCH=mingw32 makepkg-mingw -sL --noconfirm
#end
#reset
#clear package cache to free disk space
cd /var/cache/pacman/pkg
rm *.pkg.tar.xz
echo
echo
if test -f /texmacs_installer.exe ; then
echo "**********************************************************"
echo "* *"
echo "* TeXmacs was successfully built ! *"
echo "* *"
echo "**********************************************************"
echo "You can find it here :"
echo "$(cygpath -aw /texmacs-installer.exe)"
else
echo "**********************************************************"
echo "* *"
echo "* The TeXmacs installer was not created... *"
echo "* *"
echo "* something went wrong :( *"
echo "**********************************************************"
fi
echo
read -p "Press Enter to close this window..."