... | ... |
@@ -146,22 +146,25 @@ https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-winpthreads-git-12.0.0.r |
146 | 146 |
https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-cmake-3.30.5-1-any.pkg.tar.zst |
147 | 147 |
https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ninja-1.12.1-1-any.pkg.tar.zst |
148 | 148 |
https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-pkg-config-0.29.2-6-any.pkg.tar.zst |
149 |
-https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-raylib-5.5-2-any.pkg.tar.zst |
|
149 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-raylib-5.5-1-any.pkg.tar.zst |
|
150 | 150 |
https://mirror.msys2.org/msys/x86_64/msys2-w32api-headers-10.0.0.r16.g49a56d453-1-x86_64.pkg.tar.zst |
151 | 151 |
https://mirror.msys2.org/msys/x86_64/msys2-w32api-runtime-10.0.0.r16.g49a56d453-1-x86_64.pkg.tar.zst |
152 | 152 |
https://mirror.msys2.org/msys/x86_64/perl-5.38.2-2-x86_64.pkg.tar.zst |
153 | 153 |
EOF |
154 |
-for i in $(cat deps.txt) ; do |
|
155 |
- if [ ! -e ../toolchain-zig-dl/$(basename $i) ] ; then |
|
156 |
- (cd ../toolchain-zig-dl && wget $i ) |
|
154 |
+for dep in $(cat deps.txt) ; do |
|
155 |
+ i=$(basename $dep) |
|
156 |
+ if [ ! -e ../toolchain-zig-dl/$i ] ; then |
|
157 |
+ (cd ../toolchain-zig-dl && wget $dep) |
|
157 | 158 |
fi |
158 |
-done |
|
159 |
-for i in $(cd ../toolchain-zig-dl && find . -maxdepth 1 -name "*.zst") ; do |
|
159 |
+ if echo "$i" | grep "\.zst\$" >/dev/null && [ -e ../toolchain-zig-dl/$i ] ; then |
|
160 | 160 |
( mkdir -p t ; cd t ; cat ../../toolchain-zig-dl/$i | zstd -dc | tar -xvf - ; find . -maxdepth 1 -type d -print | grep -v "^\.\$" | while read l ; do |
161 |
- (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t ; done |
|
162 |
-for i in $(cd ../toolchain-zig-dl && find . -maxdepth 1 -name "*.xz") ; do |
|
161 |
+ (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t |
|
162 |
+ fi |
|
163 |
+ if echo "$i" | grep "\.xz\$" >/dev/null && [ -e ../toolchain-zig-dl/$i ] ; then |
|
163 | 164 |
( mkdir -p t ; cd t ; cat ../../toolchain-zig-dl/$i | xz -dc | tar -xvf - ; find . -maxdepth 1 -type d -print | grep -v "^\.\$" | while read l ; do |
164 |
- (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t ; done |
|
165 |
+ (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t |
|
166 |
+ fi |
|
167 |
+done |
|
165 | 168 |
cat > add-zst.sh <<'EOF' |
166 | 169 |
#!/bin/bash |
167 | 170 |
if [ "m$1" == "m" ] || [ "m$1" == "m--help" ] || [ ! -f "$1" ] ; then |
... | ... |
@@ -146,7 +146,7 @@ https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-winpthreads-git-12.0.0.r |
146 | 146 |
https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-cmake-3.30.5-1-any.pkg.tar.zst |
147 | 147 |
https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ninja-1.12.1-1-any.pkg.tar.zst |
148 | 148 |
https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-pkg-config-0.29.2-6-any.pkg.tar.zst |
149 |
-https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-raylib-5.0-1-any.pkg.tar.zst |
|
149 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-raylib-5.5-2-any.pkg.tar.zst |
|
150 | 150 |
https://mirror.msys2.org/msys/x86_64/msys2-w32api-headers-10.0.0.r16.g49a56d453-1-x86_64.pkg.tar.zst |
151 | 151 |
https://mirror.msys2.org/msys/x86_64/msys2-w32api-runtime-10.0.0.r16.g49a56d453-1-x86_64.pkg.tar.zst |
152 | 152 |
https://mirror.msys2.org/msys/x86_64/perl-5.38.2-2-x86_64.pkg.tar.zst |
1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,200 @@ |
1 |
+#!/bin/bash |
|
2 |
+zigbuild=zig-linux-x86_64-0.11.0-dev.514+4be1bb4aa.tar.xz |
|
3 |
+zigversion=$(echo $zigbuild | cut -d '-' -f 4) |
|
4 |
+if [ -e toolchain-zig ] ; then |
|
5 |
+ echo "ERROR: A toolchain-zig directory already exists, aborting install" |
|
6 |
+ exit 1 |
|
7 |
+fi |
|
8 |
+parentdir=$(pwd) |
|
9 |
+mkdir -p toolchain-zig toolchain-zig-dl |
|
10 |
+cd toolchain-zig |
|
11 |
+ |
|
12 |
+# Zig install |
|
13 |
+if [ ! -e ../toolchain-zig-dl/$zigbuild ] ; then |
|
14 |
+ (cd ../toolchain-zig-dl && wget https://ziglang.org/builds/$zigbuild) |
|
15 |
+fi |
|
16 |
+xz -dc <../toolchain-zig-dl/$zigbuild | tar -xvf - |
|
17 |
+ln -s ${zigbuild/.tar.xz/} zig-$zigversion |
|
18 |
+cat > env.sh <<'EOF' |
|
19 |
+#!/bin/bash |
|
20 |
+echo "Reminder: this script has to be used with source (.) instead of exec" |
|
21 |
+EOF |
|
22 |
+echo "export PATH=\$PATH:$parentdir/toolchain-zig/zig-$zigversion" >> env.sh |
|
23 |
+chmod 755 env.sh |
|
24 |
+# Convenience scripts |
|
25 |
+cat > compile.sh <<EOF |
|
26 |
+#!/bin/bash |
|
27 |
+if [ "m\$2" = "m--help" ] ; then |
|
28 |
+ echo "Syntax: \$0 source.c -c -o result.o [flags]" |
|
29 |
+ exit 1 |
|
30 |
+fi |
|
31 |
+. "$parentdir/toolchain-zig/env.sh" >/dev/null |
|
32 |
+exec zig cc "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/" "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/w32api/" "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/SDL2" "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/SDL" "\$@" -target x86_64-windows-gnu |
|
33 |
+EOF |
|
34 |
+chmod 755 compile.sh |
|
35 |
+cat > compile-cpp.sh <<EOF |
|
36 |
+#!/bin/bash |
|
37 |
+if [ "m$2" = "m--help" ] ; then |
|
38 |
+ echo "Syntax: $0 source.cpp -c -o result.o [flags]" |
|
39 |
+ exit 1 |
|
40 |
+fi |
|
41 |
+. "$parentdir/toolchain-zig/env.sh" >/dev/null |
|
42 |
+exec zig c++ "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/" "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/w32api/" "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/SDL2" "-I$parentdir/toolchain-zig/windows-msys2-mingw/include/SDL" "\$@" -target x86_64-windows-gnu |
|
43 |
+EOF |
|
44 |
+chmod 755 compile-cpp.sh |
|
45 |
+ |
|
46 |
+cat > link.sh <<EOF |
|
47 |
+#!/bin/bash |
|
48 |
+tmpicon=0 |
|
49 |
+if [ "m\$1" = "m-icon" ] ; then |
|
50 |
+ shift |
|
51 |
+ icon="\$1" |
|
52 |
+ shift |
|
53 |
+else |
|
54 |
+ tmpicon=1 |
|
55 |
+ icon=\$(mktemp -p . --suffix=.png) |
|
56 |
+ convert -size 256x256 xc:white \$icon |
|
57 |
+fi |
|
58 |
+if [ "\${icon/.png/}" = "\$icon" ] || [ "\${1/.exe/}" = "\$1" ] || [ ! -e "\$2" ] ; then |
|
59 |
+ echo "Syntax: \$0 [-icon myicon.png] result.exe source1.o [source2.o [...]" |
|
60 |
+ if [ \$tmpicon -eq 1 ] ; then rm "\$icon" ; fi |
|
61 |
+ exit 1 |
|
62 |
+fi |
|
63 |
+. "$parentdir/toolchain-zig/env.sh" >/dev/null |
|
64 |
+name="\${1/.exe/}" |
|
65 |
+shift |
|
66 |
+convert "\$icon" "\${icon/.png/-buildiconobject.ico}" && \ |
|
67 |
+ echo "1 ICON \"\${icon/.png/-buildiconobject.ico}\"" > "\${icon/.png/-buildiconobject.rc}" && \ |
|
68 |
+ x86_64-w64-mingw32-windres --preprocessor /usr/bin/cpp "\${icon/.png/-buildiconobject.rc}" "\${icon/.png/-buildiconobject.o}" && \ |
|
69 |
+ zig build-exe --subsystem windows "\$@" \${icon/.png/-buildiconobject.o} -L$parentdir/toolchain-zig/windows-msys2-mingw/lib/ -L$parentdir/toolchain-zig/windows-msys2-mingw/lib/w32api -lgdi32 -lwinmm -lsetupapi -lmincore -lwindowsapp -limm32 -lversion -lgraphite2 -lpng -lbrotlidec -lbrotlicommon -lharfbuzz -lstdc++ -lbz2 -lz --name \$name -target x86_64-windows-gnu && if [ -e "\${name}.lib" ] ; then rm "\${name}.lib" ; fi ; rm "\${name}.pdb" |
|
70 |
+res=\$? |
|
71 |
+rm "\${icon/.png/-buildiconobject.ico}" "\${icon/.png/-buildiconobject.rc}" "\${icon/.png/-buildiconobject.o}" |
|
72 |
+if [ \$tmpicon -eq 1 ] ; then rm "\$icon" ; fi |
|
73 |
+exit \$res |
|
74 |
+EOF |
|
75 |
+chmod 755 link.sh |
|
76 |
+# msys2 install |
|
77 |
+mkdir -p windows-msys2-mingw |
|
78 |
+cat > deps.txt <<'EOF' |
|
79 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-aom-3.5.0-1-any.pkg.tar.zst |
|
80 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-brotli-1.0.9-5-any.pkg.tar.zst |
|
81 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-bzip2-1.0.8-2-any.pkg.tar.zst |
|
82 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ca-certificates-20211016-3-any.pkg.tar.zst |
|
83 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-dav1d-1.0.0-1-any.pkg.tar.zst |
|
84 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-expat-2.5.0-1-any.pkg.tar.zst |
|
85 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-flac-1.4.2-1-any.pkg.tar.zst |
|
86 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-fluidsynth-2.3.0-1-any.pkg.tar.zst |
|
87 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-libs-12.2.0-6-any.pkg.tar.zst |
|
88 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-gettext-0.21-3-any.pkg.tar.zst |
|
89 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-giflib-5.2.1-3-any.pkg.tar.zst |
|
90 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-glib2-2.74.3-1-any.pkg.tar.zst |
|
91 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-gmp-6.2.1-3-any.pkg.tar.zst |
|
92 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-graphite2-1.3.14-2-any.pkg.tar.zst |
|
93 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-harfbuzz-5.3.1-2-any.pkg.tar.zst |
|
94 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-highway-1.0.2-1-any.pkg.tar.zst |
|
95 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-imath-3.1.6-1-any.pkg.tar.zst |
|
96 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-jbigkit-2.1-4-any.pkg.tar.xz |
|
97 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-lcms2-2.14-1-any.pkg.tar.zst |
|
98 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-lerc-4.0.0-1-any.pkg.tar.zst |
|
99 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libavif-0.11.1-3-any.pkg.tar.zst |
|
100 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libdeflate-1.15-1-any.pkg.tar.zst |
|
101 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libffi-3.4.4-1-any.pkg.tar.zst |
|
102 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libiconv-1.17-1-any.pkg.tar.zst |
|
103 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libjpeg-turbo-2.1.4-1-any.pkg.tar.zst |
|
104 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libjxl-0.7.0-2-any.pkg.tar.zst |
|
105 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libmodplug-0.8.9.0-4-any.pkg.tar.zst |
|
106 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libogg-1.3.5-1-any.pkg.tar.zst |
|
107 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libpng-1.6.39-1-any.pkg.tar.zst |
|
108 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libsndfile-1.1.0-3-any.pkg.tar.zst |
|
109 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libsystre-1.0.1-4-any.pkg.tar.xz |
|
110 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libtasn1-4.19.0-1-any.pkg.tar.zst |
|
111 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libtiff-4.4.0-6-any.pkg.tar.zst |
|
112 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libtre-git-r128.6fb7206-2-any.pkg.tar.xz |
|
113 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libvorbis-1.3.7-1-any.pkg.tar.zst |
|
114 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libwebp-1.2.4-2-any.pkg.tar.zst |
|
115 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libwinpthread-git-10.0.0.r157.gd295924f0-1-any.pkg.tar.zst |
|
116 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libyuv-1844.r2374.f9fda6e7-1-any.pkg.tar.zst |
|
117 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-mpc-1.2.1-1-any.pkg.tar.zst |
|
118 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-mpdecimal-2.5.1-1-any.pkg.tar.zst |
|
119 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-mpfr-4.1.0.p13-1-any.pkg.tar.zst |
|
120 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-mpg123-1.31.1-1-any.pkg.tar.zst |
|
121 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ncurses-6.3-6-any.pkg.tar.zst |
|
122 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-openexr-3.1.5-2-any.pkg.tar.zst |
|
123 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-openssl-1.1.1.s-1-any.pkg.tar.zst |
|
124 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-opus-1.3.1-5-any.pkg.tar.zst |
|
125 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-opusfile-0.12-2-any.pkg.tar.zst |
|
126 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-p11-kit-0.24.1-3-any.pkg.tar.zst |
|
127 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-pcre2-10.40-1-any.pkg.tar.zst |
|
128 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-portaudio-1~19.7.0-4-any.pkg.tar.zst |
|
129 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-3.10.8-2-any.pkg.tar.zst |
|
130 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-rav1e-0.6.1-1-any.pkg.tar.zst |
|
131 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2-2.26.0-1-any.pkg.tar.zst |
|
132 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2_image-2.6.2-3-any.pkg.tar.zst |
|
133 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2_mixer-2.6.2-1-any.pkg.tar.zst |
|
134 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-SDL2_ttf-2.20.1-1-any.pkg.tar.zst |
|
135 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-sqlite3-3.40.0-1-any.pkg.tar.zst |
|
136 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-svt-av1-1.3.0-1-any.pkg.tar.zst |
|
137 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-tcl-8.6.12-1-any.pkg.tar.zst |
|
138 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-tzdata-2022g-1-any.pkg.tar.zst |
|
139 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-vulkan-headers-1.3.236-1-any.pkg.tar.zst |
|
140 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-vulkan-loader-1.3.236-1-any.pkg.tar.zst |
|
141 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-wineditline-2.205-3-any.pkg.tar.xz |
|
142 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-xz-5.2.9-1-any.pkg.tar.zst |
|
143 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-zlib-1.2.13-2-any.pkg.tar.zst |
|
144 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-zstd-1.5.2-2-any.pkg.tar.zst |
|
145 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-winpthreads-git-12.0.0.r351.gcdf6b16b8-1-any.pkg.tar.zst |
|
146 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-cmake-3.30.5-1-any.pkg.tar.zst |
|
147 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ninja-1.12.1-1-any.pkg.tar.zst |
|
148 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-pkg-config-0.29.2-6-any.pkg.tar.zst |
|
149 |
+https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-raylib-5.0-1-any.pkg.tar.zst |
|
150 |
+https://mirror.msys2.org/msys/x86_64/msys2-w32api-headers-10.0.0.r16.g49a56d453-1-x86_64.pkg.tar.zst |
|
151 |
+https://mirror.msys2.org/msys/x86_64/msys2-w32api-runtime-10.0.0.r16.g49a56d453-1-x86_64.pkg.tar.zst |
|
152 |
+https://mirror.msys2.org/msys/x86_64/perl-5.38.2-2-x86_64.pkg.tar.zst |
|
153 |
+EOF |
|
154 |
+for i in $(cat deps.txt) ; do |
|
155 |
+ if [ ! -e ../toolchain-zig-dl/$(basename $i) ] ; then |
|
156 |
+ (cd ../toolchain-zig-dl && wget $i ) |
|
157 |
+ fi |
|
158 |
+done |
|
159 |
+for i in $(cd ../toolchain-zig-dl && find . -maxdepth 1 -name "*.zst") ; do |
|
160 |
+ ( mkdir -p t ; cd t ; cat ../../toolchain-zig-dl/$i | zstd -dc | tar -xvf - ; find . -maxdepth 1 -type d -print | grep -v "^\.\$" | while read l ; do |
|
161 |
+ (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t ; done |
|
162 |
+for i in $(cd ../toolchain-zig-dl && find . -maxdepth 1 -name "*.xz") ; do |
|
163 |
+ ( mkdir -p t ; cd t ; cat ../../toolchain-zig-dl/$i | xz -dc | tar -xvf - ; find . -maxdepth 1 -type d -print | grep -v "^\.\$" | while read l ; do |
|
164 |
+ (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t ; done |
|
165 |
+cat > add-zst.sh <<'EOF' |
|
166 |
+#!/bin/bash |
|
167 |
+if [ "m$1" == "m" ] || [ "m$1" == "m--help" ] || [ ! -f "$1" ] ; then |
|
168 |
+ echo "Syntax: $0 filename.pkg.tar.zst" |
|
169 |
+ exit 0 |
|
170 |
+fi |
|
171 |
+i="$1" |
|
172 |
+( mkdir -p t ; cd t ; cat ../$i | zstd -dc | tar -xvf - ; find . -maxdepth 1 -type d -print | grep -v "^\.\$" | while read l ; do |
|
173 |
+EOF |
|
174 |
+echo " (cd \$l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t " >> add-zst.sh |
|
175 |
+cat > add-xz.sh <<'EOF' |
|
176 |
+#!/bin/bash |
|
177 |
+if [ "m$1" == "m" ] || [ "m$1" == "m--help" ] || [ ! -f "$1" ] ; then |
|
178 |
+ echo "Syntax: $0 filename.pkg.tar.xz" |
|
179 |
+ exit 0 |
|
180 |
+fi |
|
181 |
+i="$1" |
|
182 |
+( mkdir -p t ; cd t ; cat ../$i | xz -dc | tar -xvf - ; find . -maxdepth 1 -type d -print | grep -v "^\.\$" | while read l ; do |
|
183 |
+EOF |
|
184 |
+echo " (cd $l && tar -cf - . | (cd $parentdir/toolchain-zig/windows-msys2-mingw && tar -xvf - ) ) ; done ) ; rm -rf t " >> add-xz.sh |
|
185 |
+chmod a+x add-xz.sh add-zst.sh |
|
186 |
+cd .. |
|
187 |
+# Check for windres |
|
188 |
+if ! which x86_64-w64-mingw32-windres >/dev/null 2>/dev/null; then |
|
189 |
+ echo "Please, install windres manually using your distribution, i.e.:" >> tooldchain-zig/error.log |
|
190 |
+ echo "sudo apt-get install binutils-mingw-w64-x86-64" >> tooldchain-zig/error.log |
|
191 |
+fi |
|
192 |
+if ! which convert >/dev/null 2>/dev/null; then |
|
193 |
+ echo "Please, install imagemagick manually using your distribution, i.e.:" >> tooldchain-zig/error.log |
|
194 |
+ echo "sudo apt-get install imagemagick" >> tooldchain-zig/error.log |
|
195 |
+fi |
|
196 |
+# Success message |
|
197 |
+echo "" |
|
198 |
+echo "Installation complete." |
|
199 |
+echo "To use the zig toolchain, first include env.sh with \". toolchain-zig/env.sh\"" |
|
200 |
+echo "( alternative: use toolchain-zig/compile.sh and toolchain-zig/link.sh )" |