4bbb0ec718f69ea6b6694b65fe625b92ae18eea3
[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                 dpname=darkplaces${basename#xonotic}
211                 rev=`( cd "$d0/darkplaces" && git rev-parse HEAD )`
212                 verbose wget -O "$binary" "http://beta.xonotic.org/autobuild-bin/$rev/$dpname"
213                 [ -s "$binary" ] || rm -f "$binary"
214                 [ -f "$binary" ]
215                 case "$binary" in
216                         Xonotic/*osx*|Xonotic/*linux*)
217                                 chmod +x "$binary"
218                                 ;;
219                 esac
220                 ;;
221         release-engine-win32)
222                 release_common
223                 good=true
224                 verbose "$SELF" release-getbinary Xonotic/xonotic-x86.exe || good=false
225                 verbose "$SELF" release-getbinary Xonotic/xonotic-x86-wgl.exe || good=false
226                 verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false
227                 $good
228                 ;;
229         release-engine-win64)
230                 release_common
231                 good=true
232                 verbose "$SELF" release-getbinary Xonotic/xonotic.exe || good=false
233                 verbose "$SELF" release-getbinary Xonotic/xonotic-wgl.exe || good=false
234                 verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false
235                 $good
236                 ;;
237         release-engine-osx)
238                 release_common
239                 good=true
240                 verbose "$SELF" release-getbinary Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin || good=false
241                 verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || good=false
242                 $good
243                 ;;
244         release-engine-linux32)
245                 release_common
246                 good=true
247                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-sdl || good=false
248                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-glx || good=false
249                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-dedicated || good=false
250                 $good
251                 ;;
252         release-engine-linux64)
253                 release_common
254                 good=true
255                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-sdl || good=false
256                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-glx || good=false
257                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false
258                 $good
259                 ;;
260         release-engine)
261                 release_common
262                 # TODO report failures here.
263                 good=false
264                 verbose "$SELF" release-engine-linux32 && good=true
265                 verbose "$SELF" release-engine-linux64 && good=true
266                 verbose "$SELF" release-engine-win32 && good=true
267                 verbose "$SELF" release-engine-win64 && good=true
268                 verbose "$SELF" release-engine-osx && good=true
269                 $good
270                 ;;
271         release-maps)
272                 release_common
273                 verbose "$SELF" update-maps
274                 ;;
275         release-qc)
276                 release_common
277                 verbose make -C "$d0/gmqcc" all
278                 verbose env GIT_DIR="$d0/data/xonotic-data.pk3dir/.git" make -C Xonotic/source QCC="$d0/gmqcc/gmqcc" XON_BUILDSYSTEM=1 clean all
279                 ;;
280         release-buildpk3-transform-raw)
281                 release_common
282                 dir=$1
283                 ;;
284         release-buildpk3-transform-normal)
285                 release_common
286                 dir=$1
287                 verbose cd "$dir"
288                 # texture: convert to jpeg and dds
289                 verbose export do_jpeg=true
290                 verbose export jpeg_qual_rgb=97
291                 verbose export jpeg_qual_a=99
292                 verbose export do_dds=false
293                 verbose export do_ogg=true
294                 verbose export ogg_ogg=false
295                 verbose export del_src=true
296                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
297                 ;;
298         release-buildpk3-transform-normaldds)
299                 release_common
300                 dir=$1
301                 verbose cd "$dir"
302                 # texture: convert to jpeg and dds
303                 # music: reduce bitrate
304                 verbose export do_jpeg=false
305                 verbose export do_jpeg_if_not_dds=true
306                 verbose export jpeg_qual_rgb=95
307                 verbose export jpeg_qual_a=99
308                 verbose export do_dds=true
309                 verbose export dds_flags=
310                 verbose export do_ogg=true
311                 verbose export ogg_ogg=false
312                 verbose export del_src=true
313                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
314                 ;;
315         release-buildpk3-transform-low)
316                 release_common
317                 dir=$1
318                 verbose cd "$dir"
319                 # texture: convert to jpeg and dds
320                 # music: reduce bitrate
321                 verbose export do_jpeg=true
322                 verbose export jpeg_qual_rgb=80
323                 verbose export jpeg_qual_a=97
324                 verbose export do_dds=false
325                 verbose export do_ogg=true
326                 verbose export ogg_qual=1
327                 verbose export del_src=true
328                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
329                 ;;
330         release-buildpk3-transform-webp)
331                 release_common
332                 dir=$1
333                 verbose cd "$dir"
334                 # texture: convert to jpeg and dds
335                 verbose export do_jpeg=false
336                 verbose export do_webp=true
337                 verbose export do_dds=false
338                 verbose export do_ogg=false
339                 verbose export ogg_ogg=false
340                 verbose export del_src=true
341                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
342                 ;;
343         release-buildpk3-transform-lowdds)
344                 release_common
345                 dir=$1
346                 verbose cd "$dir"
347                 # texture: convert to jpeg and dds
348                 # music: reduce bitrate
349                 verbose export do_jpeg=false
350                 verbose export do_jpeg_if_not_dds=true
351                 verbose export jpeg_qual_rgb=80
352                 verbose export jpeg_qual_a=99
353                 verbose export do_dds=true
354                 verbose export dds_flags=
355                 verbose export do_ogg=true
356                 verbose export ogg_qual=1
357                 verbose export del_src=true
358                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
359                 ;;
360         release-buildpk3-transform-mapping)
361                 release_common
362                 dir=$1
363                 verbose cd "$dir"
364                 # remove stuff radiant has no use for
365                 verbose find . -name \*_norm.\* -exec rm -f {} \;
366                 verbose find . -name \*_bump.\* -exec rm -f {} \;
367                 verbose find . -name \*_glow.\* -exec rm -f {} \;
368                 verbose find . -name \*_gloss.\* -exec rm -f {} \;
369                 verbose find . -name \*_pants.\* -exec rm -f {} \;
370                 verbose find . -name \*_shirt.\* -exec rm -f {} \;
371                 verbose find . -name \*_reflect.\* -exec rm -f {} \;
372                 verbose find . -not \( -name \*.tga -o -name \*.png -o -name \*.jpg \) -exec rm -f {} \;
373                 # texture: convert to jpeg and dds
374                 # music: reduce bitrate
375                 verbose export do_jpeg=true
376                 verbose export jpeg_qual_rgb=80
377                 verbose export jpeg_qual_a=97
378                 verbose export do_dds=false
379                 verbose export do_ogg=true
380                 verbose export ogg_qual=1
381                 verbose export del_src=true
382                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
383                 ;;
384         release-buildpk3)
385                 release_common
386                 src=$1
387                 dst=$2
388                 transform=$3
389                 case "$dst" in
390                         /*)
391                                 ;;
392                         */)
393                                 dst="$PWD/$dst"
394                                 ;;
395                 esac
396                 release_timereport
397                 verbose rm -rf Xonotic/temp
398                 release_timereport "deleted temp directory"
399                 verbose mkdir -p Xonotic/temp
400                 release_git_extract_dir "$src" "Xonotic/temp" .
401                 release_timereport "extracted data"
402                 verbose cd Xonotic/temp
403                 if [ x"$src" = x"data/xonotic-data.pk3dir" ]; then
404                         verbose cp ../source/progs.dat .
405                         verbose cp ../source/csprogs.dat .
406                         verbose cp ../source/menu.dat .
407                         verbose rm -rf qcsrc
408                         getversion .
409                         case "$RELEASETYPE" in
410                                 release)
411                                         ;;
412                                 *)
413                                         versionstr="$versionstr$RELEASETYPE"
414                                         ;;
415                         esac
416                         if [ $gv -lt 9900 ]; then
417                                 # pre-1.0: compatible with any other pre-1.0
418                                 verbose sed "
419                                         s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
420                                         s/^gameversion_min [0-9]*/gameversion_min     0/;
421                                         s/^gameversion_max [0-9]*/gameversion_max  9999/;
422                                 " < defaultXonotic.cfg > defaultXonotic.cfg.new
423                         else
424                                 # >= 1.0
425                                 verbose sed "
426                                         s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
427                                         s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/;
428                                         s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/;
429                                 " < defaultXonotic.cfg > defaultXonotic.cfg.new
430                         fi
431                         mv defaultXonotic.cfg.new defaultXonotic.cfg
432                         case "$RELEASETYPE" in
433                                 release)
434                                         echo "" >> defaultXonotic.cfg
435                                         echo "// nicer menu" >> defaultXonotic.cfg
436                                         echo "set menu_watermark \"\"" >> defaultXonotic.cfg
437                                         ;;
438                         esac
439                         (
440                                 verbose cd gfx/menu/luminos
441                                 verbose rm -f background_l2.tga background_ingame_l2.tga
442                                 verbose cp "$d0"/mediasource/gfx/menu/luminos_versionbuilder/background_l2.svg .
443                                 verbose "$d0"/mediasource/gfx/menu/luminos_versionbuilder/versionbuilder "$versionstr"
444                                 verbose rm background_l2.svg
445                         )
446                         verbose "$d0"/mediasource/gfx/luma/render-version.sh "$d0/mediasource/gfx/luma" "$PWD" "$versionstr"
447                 fi
448                 if [ x"$src" = x"data/xonotic-maps.pk3dir" ]; then
449                         for X in ../../data/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
450                                 if [ -f "$X" ]; then
451                                         verbose unzip "$X"
452                                         verbose rm -f maps/*.log maps/*.irc maps/*.lin
453                                 fi
454                         done
455                 fi
456                 verbose export git_src_repo="$d0/$src" # skip hash-object
457                 release_timereport "processed data"
458                 verbose "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
459                 release_timereport "transformed data"
460                 find . -type f -size +4k | verbose "$d0"/misc/tools/symlink-deduplicate.sh
461                 release_timereport "deduplicated data"
462                 verbose mkzipr "../../$dst" *
463                 release_timereport "zipped data"
464                 verbose cd ../..
465                 verbose rm -rf Xonotic/temp
466                 release_timereport "deleted temp directory again"
467                 ;;
468         release-buildpk3s)
469                 release_common
470                 pk3stamp=`cat Xonotic/pk3stamp.txt`
471                 src=$1
472                 shift
473                 dst=${src%.pk3dir}
474                 case "$dst" in
475                         data/xonotic-*)
476                                 dst="data/xonotic-$pk3stamp-${dst#data/xonotic-}"
477                                 ;;
478                         *)
479                                 dst="$dst-$pk3stamp"
480                                 ;;
481                 esac
482                 while [ "$#" -gt 1 ]; do
483                         verbose "$SELF" release-buildpk3 "$src" "Xonotic/$dst$2.pk3" "$1"
484                         shift
485                         shift
486                 done
487                 ;;
488         release-pack)
489                 release_common
490                 verbose "$SELF" release-buildpk3s data/font-unifont.pk3dir      raw ''
491                 verbose "$SELF" release-buildpk3s data/font-xolonium.pk3dir     raw ''
492                 verbose "$SELF" release-buildpk3s data/xonotic-data.pk3dir             low '-low' normaldds ''                    normal '-high'
493                 verbose "$SELF" release-buildpk3s data/xonotic-maps.pk3dir             low '-low' normaldds '' mapping '-mapping' normal '-high'
494                 verbose "$SELF" release-buildpk3s data/xonotic-music.pk3dir     raw '' low '-low'
495                 verbose "$SELF" release-buildpk3s data/xonotic-nexcompat.pk3dir                   normaldds ''
496                 ;;
497         release-pack-needsx11)
498                 release_common
499                 case "$DISPLAY" in
500                         '')
501                                 verbose startx "$SELF" release-pack -- /usr/bin/Xvfb :7
502                                 ;;
503                         *)
504                                 verbose "$SELF" release-pack
505                                 ;;
506                 esac
507                 ;;
508         release-zip)
509                 release_common
510                 stamp=`cat Xonotic/stamp.txt`
511                 pk3stamp=`cat Xonotic/pk3stamp.txt`
512                 # exe and dll files do not need +x, so this makes them eligible for 7zip compression too
513                 chmod a-x Xonotic/*.exe Xonotic/*.dll || true
514                 for suffix in '' '-noaes'; do
515                         # build the archives
516                         verbose mkzip Xonotic-$stamp-enginesource$suffix.zip \
517                                 Xonotic/Makefile \
518                                 Xonotic/source/darkplaces/ \
519                                 Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3
520                         verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-engine$suffix.zip
521                         verbose mkzip Xonotic-$stamp-engine$suffix.zip \
522                                 Xonotic/*.dll \
523                                 Xonotic/bin32/*.dll \
524                                 Xonotic/bin64/*.dll \
525                                 Xonotic/*.app \
526                                 Xonotic/xonotic-* \
527                                 Xonotic/xonotic.exe
528                         verbose cp Xonotic-$stamp-engine$suffix.zip Xonotic-$stamp-common$suffix.zip
529                         verbose mkzip Xonotic-$stamp-common$suffix.zip \
530                                 Xonotic/source/d0_blind_id/ \
531                                 Xonotic/source/gmqcc/ \
532                                 Xonotic/source/qcsrc/ \
533                                 Xonotic/Docs \
534                                 Xonotic/misc \
535                                 Xonotic/gmqcc \
536                                 Xonotic/server \
537                                 Xonotic/key_0.d0pk \
538                                 Xonotic/data/font-unifont-$pk3stamp.pk3 \
539                                 Xonotic/data/font-xolonium-$pk3stamp.pk3
540                         verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-source$suffix.zip
541                         verbose mkzip Xonotic-$stamp-source$suffix.zip \
542                                 Xonotic/source/d0_blind_id/ \
543                                 Xonotic/source/gmqcc/ \
544                                 Xonotic/source/qcsrc/ \
545                                 Xonotic/misc/logos
546                         verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp$suffix.zip
547                         verbose mkzip0 Xonotic-$stamp$suffix.zip \
548                                 Xonotic/data/xonotic-$pk3stamp-data.pk3 \
549                                 Xonotic/data/xonotic-$pk3stamp-maps.pk3 \
550                                 Xonotic/data/xonotic-$pk3stamp-music.pk3 \
551                                 Xonotic/data/xonotic-$pk3stamp-nexcompat.pk3
552                         verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-low$suffix.zip
553                         verbose mkzip0 Xonotic-$stamp-low$suffix.zip \
554                                 Xonotic/data/xonotic-$pk3stamp-data-low.pk3 \
555                                 Xonotic/data/xonotic-$pk3stamp-maps-low.pk3 \
556                                 Xonotic/data/xonotic-$pk3stamp-music-low.pk3
557                         verbose mv Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-high$suffix.zip
558                         verbose mkzip0 Xonotic-$stamp-high$suffix.zip \
559                                 Xonotic/data/xonotic-$pk3stamp-data-high.pk3 \
560                                 Xonotic/data/xonotic-$pk3stamp-maps-high.pk3 \
561                                 Xonotic/data/xonotic-$pk3stamp-music.pk3
562                         # let's pass crypto import laws of some nasty countries
563                         find Xonotic -name \*d0_rijndael\*.so -o -name \*d0_rijndael\*.dylib -o -name \*d0_rijndael\*.dll -o -name \*d0_rijndael\*.c -delete
564                 done
565                 verbose mkzip Xonotic-$stamp-mappingsupport.zip \
566                         Xonotic/mapping
567                 verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \
568                         Xonotic/data/xonotic-$pk3stamp-maps-mapping.pk3
569                 verbose mkzip gmqcc-$stamp.zip \
570                         Xonotic/gmqcc \
571                         Xonotic/source/gmqcc
572                 ;;
573         release)
574                 release_common
575                 verbose "$SELF" release-prepare
576                 verbose "$SELF" release-maps
577                 verbose "$SELF" release-engine
578                 verbose "$SELF" release-qc
579                 verbose "$SELF" release-pack-needsx11
580                 verbose "$SELF" release-zip
581                 ;;
582         *)
583                 handled=false
584                 ;;
585 esac