Bail out if no single OS has all required binaries.
[xonotic/xonotic.git] / misc / tools / all / release.subr
1 release_common()
2 {
3         export LC_ALL=C
4
5         release_args="$cmd $*"
6         msg "*** $release_args: start"
7         release_starttime=`date +%s`
8         release_end()
9         {
10                 release_endtime=`date +%s`
11                 release_deltatime=$(($release_endtime - $release_starttime))
12                 msg "*** $release_args: $release_deltatime seconds"
13         }
14         trap release_end EXIT
15         release_tempstarttime=$release_starttime
16         release_timereport()
17         {
18                 release_endtime=`date +%s` # RELEASE NOW!!!
19                 if [ -n "$*" ]; then
20                         release_deltatime=$(($release_endtime - $release_tempstarttime))
21                         msg "**** $release_args: $*: $release_deltatime seconds"
22                 fi
23                 release_tempstarttime=$release_endtime
24         }
25         release_git_extract_dir()
26         {
27                 release_src=$1; shift
28                 release_dst=$1; shift
29                 # try to create a hardlink
30                 if ln -f "$release_src/.git/HEAD" "$release_dst/.hardlink-test"; then
31                         rm -f "$release_dst/.hardlink-test"
32                         {
33                                 verbose cd "$release_src"
34                                 git ls-files HEAD -- "$@"
35                         } | {
36                                 while IFS= read -r F; do
37                                         case "$F" in */*) mkdir -p "$release_dst/${F%/*}" ;; esac
38                                         verbose ln -f "$release_src/$F" "$release_dst/$F"
39                                 done
40                         }
41                 else
42                         {
43                                 verbose cd "$release_src"
44                                 verbose git archive --format=tar HEAD -- "$@"
45                         } | {
46                                 verbose cd "$release_dst"
47                                 verbose tar xvf -
48                         }
49                 fi
50         }
51
52         mkzipr()
53         {
54                 archive=$1; shift
55
56                 # get rid of this hack once we have done large enough changes
57                 # to be no longer rsync compatible (and then enable the below
58                 # code)
59                 sevenzipflags=-mx=9
60                 zipflags=-9
61                 find "$@" -exec touch -d "2001-01-01 01:01:01 +0000" {} \+ # ugly hack to make the pk3 files rsync-friendly
62                 ziplist=`mktemp`
63                 find "$@" -xtype f \( -executable -or -type l \) -print | sed 's,\([./][^./]*$\),\1 \1,' | sort -k2 | cut -d\  -f1 > "$ziplist"
64                 7za a -tzip $sevenzipflags -x@"$ziplist" "$archive" "$@" || true
65                 zip         $zipflags -y   -@<"$ziplist" "$archive"      || true
66                 rm -f "$ziplist"
67
68                 #zipflags=-1r
69                 #find "$@" -exec touch -d "2001-01-01 01:01:01 +0000" {} \+ # ugly hack to make the pk3 files rsync-friendly
70                 #zip $zipflags -y "$archive" "$@" || true
71                 #advzip -4 "$archive"
72         }
73
74         mkzip()
75         {
76                 archive=$1; shift
77                 zipflags=-1ry
78                 zip $zipflags "$archive" "$@" || true
79                 advzip -z -4 "$archive"
80         }
81
82         mkzip0()
83         {
84                 archive=$1; shift
85                 zipflags=-0ry
86                 zip $zipflags "$archive" "$@" || true
87         }
88
89         getversion()
90         {
91                 gv=`grep "^gameversion " "$1/defaultXonotic.cfg" | awk '{ print $2 }'`
92                 major=$(($gv / 10000))
93                 minor=$((($gv / 100) - ($major * 100)))
94                 patch=$(($gv - ($major * 10000) - ($minor * 100)))
95                 versionstr="$major.$minor.$patch"
96         }
97 }
98
99 handled=true
100 case "$cmd" in
101         # release building goes here
102         release-prepare)
103                 release_common
104                 #"$SELF" each git clean -fxd
105                 case "$RELEASETYPE" in
106                         '')
107                                 $ECHO >&2 -n "$ESC[2J$ESC[H"
108                                 msg ""
109                                 msg ""
110                                 msg ""
111                                 msg ""
112                                 msg ""
113                                 msg ""
114                                 msg "        +---------------------------------------------------------.---+"
115                                 msg "        | NOTE                                                    | X |"
116                                 msg "        +---------------------------------------------------------^---+"
117                                 msg "        |   ____                                                      |"
118                                 msg "        |  /    \  This is the official release build system.         |"
119                                 msg "        | |      | If you are not a member of the Xonotic Core Team,  |"
120                                 msg "        | | STOP | you are not supposed to use this script and should |"
121                                 msg "        | |      | instead use ./all compile to compile the engine    |"
122                                 msg "        |  \____/  and game code.                                     |"
123                                 msg "        |                                                             |"
124                                 msg "        |                      [ I understand ]                       |"
125                                 msg "        +-------------------------------------------------------------+"
126                                 sleep 10
127                                 # A LOT of build infrastructure is required:
128                                 # - vorbis-tools
129                                 # - ImageMagick
130                                 # - .ssh/config must be configured so the following
131                                 #   host names are reachable and have a compile
132                                 #   infrastructure set up:
133                                 #   - xonotic-build-linux32 (with gcc on x86)
134                                 #   - xonotic-build-linux64 (with gcc on x86_64)
135                                 #   - xonotic-build-win32 (with i586-mingw32msvc-g++)
136                                 #   - xonotic-build-win64 (with amd64-mingw32msvc-g++
137                                 #     and amd64-mingw32msvc-g++)
138                                 #   - xonotic-build-osx (with Xcode and SDL.framework)
139                                 # - AMD Compressonator installed in WINE
140                                 # - ResEdit installed in WINE
141                                 # - a lot of other requirements you will figure out
142                                 #   while reading the error messages
143                                 # - environment variable RELEASETYPE set
144                                 # - optionally, environment variable RELEASEDATE set
145                                 #   (YYYYMMDD)
146                                 exit 1
147                                 ;;
148                         release)
149                                 msg "Building a FINISHED RELEASE"
150                                 getversion data/xonotic-data.pk3dir
151                                 verbose "$SELF" each -k git tag -m "TEMP TAG" -f "xonotic-v$versionstr"
152                                 ;;
153                         *)
154                                 msg "Building a $RELEASETYPE"
155                                 ;;
156                 esac
157                 verbose rm -rf Xonotic Xonotic*.zip
158                 verbose mkdir -p Xonotic
159                 if [ -n "$RELEASEDATE" ]; then
160                         verbose $ECHO "$RELEASEDATE" > Xonotic/stamp.txt
161                         case "$RELEASETYPE" in
162                                 release)
163                                         verbose $ECHO "${RELEASEDATE%_*}" > Xonotic/pk3stamp.txt
164                                         ;;
165                                 *)
166                                         verbose $ECHO "$RELEASEDATE" > Xonotic/pk3stamp.txt
167                                         ;;
168                         esac
169                 else
170                         verbose date +%Y%m%d > Xonotic/stamp.txt
171                         verbose date +%Y%m%d > Xonotic/pk3stamp.txt
172                 fi
173                 release_git_extract_dir "." "Xonotic" Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh xonotic-linux-dedicated.sh Makefile misc/buildfiles key_0.d0pk COPYING GPL-2 GPL-3
174                 (
175                         verbose cd Xonotic
176                         verbose mkdir data gmqcc source source/darkplaces source/gmqcc source/d0_blind_id mapping
177                         verbose rm -rf misc/builddeps
178                         verbose mv misc/buildfiles/win32 bin32 || true
179                         verbose mv bin32/SDL.dll . || true
180                         verbose mv misc/buildfiles/win64 bin64 || true
181                         verbose mv misc/buildfiles/osx/* . || true
182                         verbose rm -rf misc/buildfiles
183                         verbose rm -rf misc/pki
184                 )
185                 release_git_extract_dir "darkplaces" "Xonotic/source/darkplaces" .
186                 release_git_extract_dir "gmqcc" "Xonotic/source/gmqcc" .
187                 release_git_extract_dir "data/xonotic-data.pk3dir" "Xonotic/source" qcsrc Makefile
188                 release_git_extract_dir "d0_blind_id" "Xonotic/source/d0_blind_id" .
189                 (
190                         verbose cd Xonotic/source/d0_blind_id
191                         verbose sh autogen.sh
192                 )
193                 rm -f Xonotic/key_15.d0pk
194                 (
195                         verbose cd Xonotic/mapping
196                         verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301.tar.bz2
197                         verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301-win32-7z.exe
198                         for X in *-7z.exe; do
199                                 7za x "$X"
200                                 rm -f "$X"
201                         done
202                         # TODO possibly include other tools?
203                 )
204                 ./all each git rev-parse HEAD > Xonotic/misc/git-revisions.txt
205                 ;;
206         release-getbinary)
207                 release_common
208                 binary=$1
209                 basename=${binary##*/}
210                 rev=`( cd "$d0/darkplaces" && git rev-parse HEAD )`
211                 verbose wget -O "$binary" "http://beta.xonotic.org/autobuild-bin/$rev/$basename"
212                 [ -s "$binary" ]
213                 # TODO eventually do the rebranding on travis too.
214                 case "$binary" in
215                         Xonotic/xonotic*.exe)
216                                 verbose "$d0/misc/tools/change-icon-of-exe.sh" "$d0/misc/logos/icons_ico/xonotic.ico" "$binary"
217                                 ;;
218                         Xonotic/*osx*|Xonotic/*linux*)
219                                 chmod +x "$binary"
220                                 ;;
221                 esac
222                 ;;
223         release-engine-win32)
224                 release_common
225                 verbose "$SELF" release-getbinary Xonotic/xonotic.exe || true
226                 verbose "$SELF" release-getbinary Xonotic/xonotic-sdl.exe || true
227                 verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || true
228                 ;;
229         release-engine-win64)
230                 release_common
231                 verbose "$SELF" release-getbinary Xonotic/xonotic-x64.exe || true
232                 verbose "$SELF" release-getbinary Xonotic/xonotic-x64-sdl.exe || true
233                 verbose "$SELF" release-getbinary Xonotic/xonotic-x64-dedicated.exe || true
234                 ;;
235         release-engine-osx)
236                 release_common
237                 verbose "$SELF" release-getbinary Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin || true
238                 verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || true
239                 ;;
240         release-engine-linux32)
241                 release_common
242                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-glx || true
243                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-sdl || true
244                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-dedicated || true
245                 ;;
246         release-engine-linux64)
247                 release_common
248                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-glx || true
249                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-sdl || true
250                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || true
251                 ;;
252         release-engine)
253                 release_common
254                 # TODO report failures here.
255                 good=false
256                 verbose "$SELF" release-engine-linux32 && good=true
257                 verbose "$SELF" release-engine-linux64 && good=true
258                 verbose "$SELF" release-engine-win32 && good=true
259                 verbose "$SELF" release-engine-win64 && good=true
260                 verbose "$SELF" release-engine-osx && good=true
261                 $good
262                 ;;
263         release-maps)
264                 release_common
265                 verbose "$SELF" update-maps
266                 ;;
267         release-qc)
268                 release_common
269                 verbose make -C "$d0/gmqcc" all
270                 verbose env GIT_DIR="$d0/data/xonotic-data.pk3dir/.git" make -C Xonotic/source QCC="$d0/gmqcc/gmqcc" XON_BUILDSYSTEM=1 clean all
271                 ;;
272         release-buildpk3-transform-raw)
273                 release_common
274                 dir=$1
275                 ;;
276         release-buildpk3-transform-normal)
277                 release_common
278                 dir=$1
279                 verbose cd "$dir"
280                 # texture: convert to jpeg and dds
281                 verbose export do_jpeg=true
282                 verbose export jpeg_qual_rgb=97
283                 verbose export jpeg_qual_a=99
284                 verbose export do_dds=false
285                 verbose export do_ogg=true
286                 verbose export ogg_ogg=false
287                 verbose export del_src=true
288                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
289                 ;;
290         release-buildpk3-transform-normaldds)
291                 release_common
292                 dir=$1
293                 verbose cd "$dir"
294                 # texture: convert to jpeg and dds
295                 # music: reduce bitrate
296                 verbose export do_jpeg=false
297                 verbose export do_jpeg_if_not_dds=true
298                 verbose export jpeg_qual_rgb=95
299                 verbose export jpeg_qual_a=99
300                 verbose export do_dds=true
301                 verbose export dds_flags=
302                 verbose export do_ogg=true
303                 verbose export ogg_ogg=false
304                 verbose export del_src=true
305                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
306                 ;;
307         release-buildpk3-transform-low)
308                 release_common
309                 dir=$1
310                 verbose cd "$dir"
311                 # texture: convert to jpeg and dds
312                 # music: reduce bitrate
313                 verbose export do_jpeg=true
314                 verbose export jpeg_qual_rgb=80
315                 verbose export jpeg_qual_a=97
316                 verbose export do_dds=false
317                 verbose export do_ogg=true
318                 verbose export ogg_qual=1
319                 verbose export del_src=true
320                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
321                 ;;
322         release-buildpk3-transform-webp)
323                 release_common
324                 dir=$1
325                 verbose cd "$dir"
326                 # texture: convert to jpeg and dds
327                 verbose export do_jpeg=false
328                 verbose export do_webp=true
329                 verbose export do_dds=false
330                 verbose export do_ogg=false
331                 verbose export ogg_ogg=false
332                 verbose export del_src=true
333                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
334                 ;;
335         release-buildpk3-transform-lowdds)
336                 release_common
337                 dir=$1
338                 verbose cd "$dir"
339                 # texture: convert to jpeg and dds
340                 # music: reduce bitrate
341                 verbose export do_jpeg=false
342                 verbose export do_jpeg_if_not_dds=true
343                 verbose export jpeg_qual_rgb=80
344                 verbose export jpeg_qual_a=99
345                 verbose export do_dds=true
346                 verbose export dds_flags=
347                 verbose export do_ogg=true
348                 verbose export ogg_qual=1
349                 verbose export del_src=true
350                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
351                 ;;
352         release-buildpk3-transform-mapping)
353                 release_common
354                 dir=$1
355                 verbose cd "$dir"
356                 # remove stuff radiant has no use for
357                 verbose find . -name \*_norm.\* -exec rm -f {} \;
358                 verbose find . -name \*_bump.\* -exec rm -f {} \;
359                 verbose find . -name \*_glow.\* -exec rm -f {} \;
360                 verbose find . -name \*_gloss.\* -exec rm -f {} \;
361                 verbose find . -name \*_pants.\* -exec rm -f {} \;
362                 verbose find . -name \*_shirt.\* -exec rm -f {} \;
363                 verbose find . -name \*_reflect.\* -exec rm -f {} \;
364                 verbose find . -not \( -name \*.tga -o -name \*.png -o -name \*.jpg \) -exec rm -f {} \;
365                 # texture: convert to jpeg and dds
366                 # music: reduce bitrate
367                 verbose export do_jpeg=true
368                 verbose export jpeg_qual_rgb=80
369                 verbose export jpeg_qual_a=97
370                 verbose export do_dds=false
371                 verbose export do_ogg=true
372                 verbose export ogg_qual=1
373                 verbose export del_src=true
374                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
375                 ;;
376         release-buildpk3)
377                 release_common
378                 src=$1
379                 dst=$2
380                 transform=$3
381                 case "$dst" in
382                         /*)
383                                 ;;
384                         */)
385                                 dst="$PWD/$dst"
386                                 ;;
387                 esac
388                 release_timereport
389                 verbose rm -rf Xonotic/temp
390                 release_timereport "deleted temp directory"
391                 verbose mkdir -p Xonotic/temp
392                 release_git_extract_dir "$src" "Xonotic/temp" .
393                 release_timereport "extracted data"
394                 verbose cd Xonotic/temp
395                 if [ x"$src" = x"data/xonotic-data.pk3dir" ]; then
396                         verbose cp ../source/progs.dat .
397                         verbose cp ../source/csprogs.dat .
398                         verbose cp ../source/menu.dat .
399                         verbose rm -rf qcsrc
400                         getversion .
401                         case "$RELEASETYPE" in
402                                 release)
403                                         ;;
404                                 *)
405                                         versionstr="$versionstr$RELEASETYPE"
406                                         ;;
407                         esac
408                         if [ $gv -lt 9900 ]; then
409                                 # pre-1.0: compatible with any other pre-1.0
410                                 verbose sed "
411                                         s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
412                                         s/^gameversion_min [0-9]*/gameversion_min     0/;
413                                         s/^gameversion_max [0-9]*/gameversion_max  9999/;
414                                 " < defaultXonotic.cfg > defaultXonotic.cfg.new
415                         else
416                                 # >= 1.0
417                                 verbose sed "
418                                         s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
419                                         s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/;
420                                         s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/;
421                                 " < defaultXonotic.cfg > defaultXonotic.cfg.new
422                         fi
423                         mv defaultXonotic.cfg.new defaultXonotic.cfg
424                         case "$RELEASETYPE" in
425                                 release)
426                                         echo "" >> defaultXonotic.cfg
427                                         echo "// nicer menu" >> defaultXonotic.cfg
428                                         echo "set menu_watermark \"\"" >> defaultXonotic.cfg
429                                         ;;
430                         esac
431                         (
432                                 verbose cd gfx/menu/luminos
433                                 verbose rm -f background_l2.tga background_ingame_l2.tga
434                                 verbose cp "$d0"/mediasource/gfx/menu/luminos_versionbuilder/background_l2.svg .
435                                 verbose "$d0"/mediasource/gfx/menu/luminos_versionbuilder/versionbuilder "$versionstr"
436                                 verbose rm background_l2.svg
437                         )
438                 fi
439                 if [ x"$src" = x"data/xonotic-maps.pk3dir" ]; then
440                         for X in ../../data/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
441                                 if [ -f "$X" ]; then
442                                         verbose unzip "$X"
443                                         verbose rm -f maps/*.log maps/*.irc maps/*.lin
444                                 fi
445                         done
446                 fi
447                 verbose export git_src_repo="$d0/$src" # skip hash-object
448                 release_timereport "processed data"
449                 verbose "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
450                 release_timereport "transformed data"
451                 find . -type f -size +4k | verbose "$d0"/misc/tools/symlink-deduplicate.sh
452                 release_timereport "deduplicated data"
453                 verbose mkzipr "../../$dst" *
454                 release_timereport "zipped data"
455                 verbose cd ../..
456                 verbose rm -rf Xonotic/temp
457                 release_timereport "deleted temp directory again"
458                 ;;
459         release-buildpk3s)
460                 release_common
461                 pk3stamp=`cat Xonotic/pk3stamp.txt`
462                 src=$1
463                 shift
464                 dst=${src%.pk3dir}
465                 case "$dst" in
466                         data/xonotic-*)
467                                 dst="data/xonotic-$pk3stamp-${dst#data/xonotic-}"
468                                 ;;
469                         *)
470                                 dst="$dst-$pk3stamp"
471                                 ;;
472                 esac
473                 while [ "$#" -gt 1 ]; do
474                         verbose "$SELF" release-buildpk3 "$src" "Xonotic/$dst$2.pk3" "$1"
475                         shift
476                         shift
477                 done
478                 ;;
479         release-pack)
480                 release_common
481                 verbose "$SELF" release-buildpk3s data/font-xolonium.pk3dir     raw ''
482                 verbose "$SELF" release-buildpk3s data/xonotic-data.pk3dir             low '-low' normaldds ''                    normal '-high'
483                 verbose "$SELF" release-buildpk3s data/xonotic-maps.pk3dir             low '-low' normaldds '' mapping '-mapping' normal '-high'
484                 verbose "$SELF" release-buildpk3s data/xonotic-music.pk3dir     raw '' low '-low'
485                 verbose "$SELF" release-buildpk3s data/xonotic-nexcompat.pk3dir                   normaldds ''
486                 ;;
487         release-pack-needsx11)
488                 release_common
489                 case "$DISPLAY" in
490                         '')
491                                 verbose startx "$SELF" release-pack -- /usr/bin/Xvfb :7
492                                 ;;
493                         *)
494                                 verbose "$SELF" release-pack
495                                 ;;
496                 esac
497                 ;;
498         release-zip)
499                 release_common
500                 stamp=`cat Xonotic/stamp.txt`
501                 pk3stamp=`cat Xonotic/pk3stamp.txt`
502                 # exe and dll files do not need +x, so this makes them eligible for 7zip compression too
503                 chmod a-x Xonotic/*.exe Xonotic/*.dll || true
504                 for suffix in '' '-noaes'; do
505                         # build the archives
506                         verbose mkzip Xonotic-$stamp-enginesource$suffix.zip \
507                                 Xonotic/Makefile \
508                                 Xonotic/source/darkplaces/ \
509                                 Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3
510                         verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-engine$suffix.zip
511                         verbose mkzip Xonotic-$stamp-engine$suffix.zip \
512                                 Xonotic/*.dll \
513                                 Xonotic/bin32/*.dll \
514                                 Xonotic/bin64/*.dll \
515                                 Xonotic/*.app \
516                                 Xonotic/xonotic-* \
517                                 Xonotic/xonotic.exe
518                         verbose cp Xonotic-$stamp-engine$suffix.zip Xonotic-$stamp-common$suffix.zip
519                         verbose mkzip Xonotic-$stamp-common$suffix.zip \
520                                 Xonotic/source/d0_blind_id/ \
521                                 Xonotic/source/gmqcc/ \
522                                 Xonotic/source/qcsrc/ \
523                                 Xonotic/Docs \
524                                 Xonotic/misc \
525                                 Xonotic/gmqcc \
526                                 Xonotic/server \
527                                 Xonotic/key_0.d0pk \
528                                 Xonotic/data/font-xolonium-$pk3stamp.pk3
529                         verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-source$suffix.zip
530                         verbose mkzip Xonotic-$stamp-source$suffix.zip \
531                                 Xonotic/source/d0_blind_id/ \
532                                 Xonotic/source/gmqcc/ \
533                                 Xonotic/source/qcsrc/ \
534                                 Xonotic/misc/logos
535                         verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp$suffix.zip
536                         verbose mkzip0 Xonotic-$stamp$suffix.zip \
537                                 Xonotic/data/xonotic-$pk3stamp-data.pk3 \
538                                 Xonotic/data/xonotic-$pk3stamp-maps.pk3 \
539                                 Xonotic/data/xonotic-$pk3stamp-music.pk3 \
540                                 Xonotic/data/xonotic-$pk3stamp-nexcompat.pk3
541                         verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-low$suffix.zip
542                         verbose mkzip0 Xonotic-$stamp-low$suffix.zip \
543                                 Xonotic/data/xonotic-$pk3stamp-data-low.pk3 \
544                                 Xonotic/data/xonotic-$pk3stamp-maps-low.pk3 \
545                                 Xonotic/data/xonotic-$pk3stamp-music-low.pk3
546                         verbose mv Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-high$suffix.zip
547                         verbose mkzip0 Xonotic-$stamp-high$suffix.zip \
548                                 Xonotic/data/xonotic-$pk3stamp-data-high.pk3 \
549                                 Xonotic/data/xonotic-$pk3stamp-maps-high.pk3 \
550                                 Xonotic/data/xonotic-$pk3stamp-music.pk3
551                         # let's pass crypto import laws of some nasty countries
552                         find Xonotic -name \*d0_rijndael\*.so -o -name \*d0_rijndael\*.dylib -o -name \*d0_rijndael\*.dll -o -name \*d0_rijndael\*.c -delete
553                 done
554                 verbose mkzip Xonotic-$stamp-mappingsupport.zip \
555                         Xonotic/mapping
556                 verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \
557                         Xonotic/data/xonotic-$pk3stamp-maps-mapping.pk3
558                 verbose mkzip gmqcc-$stamp.zip \
559                         Xonotic/gmqcc \
560                         Xonotic/source/gmqcc
561                 ;;
562         release)
563                 release_common
564                 verbose "$SELF" release-prepare
565                 verbose "$SELF" release-maps
566                 verbose "$SELF" release-engine
567                 verbose "$SELF" release-qc
568                 verbose "$SELF" release-pack-needsx11
569                 verbose "$SELF" release-zip
570                 ;;
571         *)
572                 handled=false
573                 ;;
574 esac