fd9e4f01385422e1a05ef505eb137788626f4697
[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/xonotic-common.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-linux64 (with gcc on x86_64)
134                                 #   - xonotic-build-win32 (with i586-mingw32msvc-g++)
135                                 #   - xonotic-build-win64 (with amd64-mingw32msvc-g++
136                                 #     and amd64-mingw32msvc-g++)
137                                 #   - xonotic-build-osx (with Xcode and SDL.framework)
138                                 # - AMD Compressonator installed in WINE
139                                 # - ResEdit installed in WINE
140                                 # - a lot of other requirements you will figure out
141                                 #   while reading the error messages
142                                 # - environment variable RELEASETYPE set
143                                 # - optionally, environment variable RELEASEDATE set
144                                 #   (YYYYMMDD)
145                                 exit 1
146                                 ;;
147                         release)
148                                 msg "Building a FINISHED RELEASE"
149                                 getversion data/xonotic-data.pk3dir
150                                 verbose "$SELF" each -k git tag -m "TEMP TAG" -f "xonotic-v$versionstr"
151                                 ;;
152                         *)
153                                 msg "Building a $RELEASETYPE"
154                                 ;;
155                 esac
156                 verbose rm -rf Xonotic Xonotic*.zip
157                 verbose mkdir -p Xonotic
158                 if [ -n "$RELEASEDATE" ]; then
159                         verbose $ECHO "$RELEASEDATE" > Xonotic/stamp.txt
160                         case "$RELEASETYPE" in
161                                 release)
162                                         verbose $ECHO "${RELEASEDATE%_*}" > Xonotic/pk3stamp.txt
163                                         ;;
164                                 *)
165                                         verbose $ECHO "$RELEASEDATE" > Xonotic/pk3stamp.txt
166                                         ;;
167                         esac
168                 else
169                         verbose date +%Y%m%d > Xonotic/stamp.txt
170                         verbose date +%Y%m%d > Xonotic/pk3stamp.txt
171                 fi
172                 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
173                 (
174                         verbose cd Xonotic
175                         verbose mkdir data gmqcc source source/darkplaces source/gmqcc source/d0_blind_id mapping
176                         verbose rm -rf misc/builddeps
177                         verbose mv misc/buildfiles/win32 bin32 || true
178                         verbose mv bin32/SDL.dll . || true
179                         verbose mv misc/buildfiles/win64 bin64 || true
180                         verbose mv misc/buildfiles/osx/* . || true
181                         verbose rm -rf misc/buildfiles
182                         verbose rm -rf misc/pki
183                 )
184                 release_git_extract_dir "darkplaces" "Xonotic/source/darkplaces" .
185                 release_git_extract_dir "gmqcc" "Xonotic/source/gmqcc" .
186                 release_git_extract_dir "data/xonotic-data.pk3dir" "Xonotic/source" qcsrc Makefile
187                 release_git_extract_dir "d0_blind_id" "Xonotic/source/d0_blind_id" .
188                 (
189                         verbose cd Xonotic/source/d0_blind_id
190                         verbose sh autogen.sh
191                 )
192                 rm -f Xonotic/key_15.d0pk
193                 (
194                         verbose cd Xonotic/mapping
195                         verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301.tar.bz2
196                         verbose wget http://www.icculus.org/netradiant/files/netradiant-1.5.0-20120301-win32-7z.exe
197                         for X in *-7z.exe; do
198                                 7za x "$X"
199                                 rm -f "$X"
200                         done
201                         # TODO possibly include other tools?
202                 )
203                 ./all each git rev-parse HEAD > Xonotic/misc/git-revisions.txt
204                 ;;
205         release-getbinary)
206                 release_common
207                 binary=$1
208                 basename=${binary##*/}
209                 dpname=darkplaces${basename#xonotic}
210                 rev=`( cd "$d0/darkplaces" && git rev-parse HEAD )`
211                 verbose wget -O "$binary" "http://beta.xonotic.org/autobuild-bin/$rev/$dpname"
212                 [ -s "$binary" ] || rm -f "$binary"
213                 [ -f "$binary" ]
214                 case "$binary" in
215                         Xonotic/*osx*|Xonotic/*linux*)
216                                 chmod +x "$binary"
217                                 ;;
218                 esac
219                 ;;
220         release-engine-win32)
221                 release_common
222                 good=true
223                 verbose "$SELF" release-getbinary Xonotic/xonotic-x86.exe || good=false
224                 verbose "$SELF" release-getbinary Xonotic/xonotic-x86-dedicated.exe || good=false
225                 $good
226                 ;;
227         release-engine-win64)
228                 release_common
229                 good=true
230                 verbose "$SELF" release-getbinary Xonotic/xonotic.exe || good=false
231                 verbose "$SELF" release-getbinary Xonotic/xonotic-dedicated.exe || good=false
232                 $good
233                 ;;
234         release-engine-osx)
235                 release_common
236                 good=true
237                 verbose "$SELF" release-getbinary Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin || good=false
238                 verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || good=false
239                 $good
240                 ;;
241         release-engine-linux64)
242                 release_common
243                 good=true
244                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-sdl || good=false
245                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-glx || good=false
246                 verbose "$SELF" release-getbinary Xonotic/xonotic-linux64-dedicated || good=false
247                 $good
248                 ;;
249         release-engine)
250                 release_common
251                 # TODO report failures here.
252                 good=false
253                 verbose "$SELF" release-engine-linux64 && good=true
254                 verbose "$SELF" release-engine-win32 && good=true
255                 verbose "$SELF" release-engine-win64 && good=true
256                 verbose "$SELF" release-engine-osx && good=true
257                 $good
258                 ;;
259         release-maps)
260                 release_common
261                 verbose "$SELF" update-maps
262                 ;;
263         release-qc)
264                 release_common
265                 verbose make -C "$d0/gmqcc" gmqcc
266                 verbose env GIT_DIR="$d0/data/xonotic-data.pk3dir/.git" make -C Xonotic/source QCC="$d0/gmqcc/gmqcc" XON_BUILDSYSTEM=1 clean all
267                 ;;
268         release-buildpk3-transform-raw)
269                 release_common
270                 dir=$1
271                 ;;
272         release-buildpk3-transform-normal)
273                 release_common
274                 dir=$1
275                 verbose cd "$dir"
276                 # texture: convert to jpeg and dds
277                 verbose export do_jpeg=true
278                 verbose export jpeg_qual_rgb=97
279                 verbose export jpeg_qual_a=99
280                 verbose export do_dds=false
281                 verbose export do_ogg=true
282                 verbose export ogg_ogg=false
283                 verbose export del_src=true
284                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
285                 ;;
286         release-buildpk3-transform-normaldds)
287                 release_common
288                 dir=$1
289                 verbose cd "$dir"
290                 # texture: convert to jpeg and dds
291                 # music: reduce bitrate
292                 verbose export do_jpeg=false
293                 verbose export do_jpeg_if_not_dds=true
294                 verbose export jpeg_qual_rgb=95
295                 verbose export jpeg_qual_a=99
296                 verbose export do_dds=true
297                 verbose export dds_flags=
298                 verbose export do_ogg=true
299                 verbose export ogg_ogg=false
300                 verbose export del_src=true
301                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
302                 ;;
303         release-buildpk3-transform-low)
304                 release_common
305                 dir=$1
306                 verbose cd "$dir"
307                 # texture: convert to jpeg and dds
308                 # music: reduce bitrate
309                 verbose export do_jpeg=true
310                 verbose export jpeg_qual_rgb=80
311                 verbose export jpeg_qual_a=97
312                 verbose export do_dds=false
313                 verbose export do_ogg=true
314                 verbose export ogg_qual=1
315                 verbose export del_src=true
316                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
317                 ;;
318         release-buildpk3-transform-webp)
319                 release_common
320                 dir=$1
321                 verbose cd "$dir"
322                 # texture: convert to jpeg and dds
323                 verbose export do_jpeg=false
324                 verbose export do_webp=true
325                 verbose export do_dds=false
326                 verbose export do_ogg=false
327                 verbose export ogg_ogg=false
328                 verbose export del_src=true
329                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
330                 ;;
331         release-buildpk3-transform-lowdds)
332                 release_common
333                 dir=$1
334                 verbose cd "$dir"
335                 # texture: convert to jpeg and dds
336                 # music: reduce bitrate
337                 verbose export do_jpeg=false
338                 verbose export do_jpeg_if_not_dds=true
339                 verbose export jpeg_qual_rgb=80
340                 verbose export jpeg_qual_a=99
341                 verbose export do_dds=true
342                 verbose export dds_flags=
343                 verbose export do_ogg=true
344                 verbose export ogg_qual=1
345                 verbose export del_src=true
346                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
347                 ;;
348         release-buildpk3-transform-mapping)
349                 release_common
350                 dir=$1
351                 verbose cd "$dir"
352                 # remove stuff radiant has no use for
353                 verbose find . -name \*_norm.\* -exec rm -f {} \;
354                 verbose find . -name \*_bump.\* -exec rm -f {} \;
355                 verbose find . -name \*_glow.\* -exec rm -f {} \;
356                 verbose find . -name \*_gloss.\* -exec rm -f {} \;
357                 verbose find . -name \*_pants.\* -exec rm -f {} \;
358                 verbose find . -name \*_shirt.\* -exec rm -f {} \;
359                 verbose find . -name \*_reflect.\* -exec rm -f {} \;
360                 verbose find . -not \( -name \*.tga -o -name \*.png -o -name \*.jpg \) -exec rm -f {} \;
361                 # texture: convert to jpeg and dds
362                 # music: reduce bitrate
363                 verbose export do_jpeg=true
364                 verbose export jpeg_qual_rgb=80
365                 verbose export jpeg_qual_a=97
366                 verbose export do_dds=false
367                 verbose export do_ogg=true
368                 verbose export ogg_qual=1
369                 verbose export del_src=true
370                 find . -type f -print0 | verbose xargs -0 "$d0"/misc/tools/cached-converter.sh
371                 ;;
372         release-buildpk3)
373                 release_common
374                 src=$1
375                 dst=$2
376                 transform=$3
377                 case "$dst" in
378                         /*)
379                                 ;;
380                         */)
381                                 dst="$PWD/$dst"
382                                 ;;
383                 esac
384                 release_timereport
385                 verbose rm -rf Xonotic/temp
386                 release_timereport "deleted temp directory"
387                 verbose mkdir -p Xonotic/temp
388                 release_git_extract_dir "$src" "Xonotic/temp" .
389                 release_timereport "extracted data"
390                 verbose cd Xonotic/temp
391                 if [ x"$src" = x"data/xonotic-data.pk3dir" ]; then
392                         verbose cp ../source/progs.dat .
393                         verbose cp ../source/csprogs.dat .
394                         verbose cp ../source/menu.dat .
395                         # Include line numbers in qc errors
396                         verbose cp ../source/progs.lno .
397                         verbose cp ../source/csprogs.lno .
398                         verbose cp ../source/menu.lno .
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                                 " < xonotic-common.cfg > xonotic-common.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                                 " < xonotic-common.cfg > xonotic-common.cfg.new
422                         fi
423                         mv xonotic-common.cfg.new xonotic-common.cfg
424                         case "$RELEASETYPE" in
425                                 release)
426                                         echo "" >> xonotic-common.cfg
427                                         echo "// nicer menu" >> xonotic-common.cfg
428                                         echo "set menu_watermark \"\"" >> xonotic-common.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                         verbose "$d0"/mediasource/gfx/luma/render-version.sh "$d0/mediasource/gfx/luma" "$PWD" "$versionstr"
439                 fi
440                 if [ x"$src" = x"data/xonotic-maps.pk3dir" ]; then
441                         for X in ../../data/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
442                                 if [ -f "$X" ]; then
443                                         verbose unzip "$X"
444                                         verbose rm -f maps/*.log maps/*.irc maps/*.lin
445                                 fi
446                         done
447                 fi
448                 verbose export git_src_repo="$d0/$src" # skip hash-object
449                 release_timereport "processed data"
450                 verbose "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
451                 release_timereport "transformed data"
452                 find . -type f -size +4k | verbose "$d0"/misc/tools/symlink-deduplicate.sh
453                 release_timereport "deduplicated data"
454                 verbose mkzipr "../../$dst" *
455                 release_timereport "zipped data"
456                 verbose cd ../..
457                 verbose rm -rf Xonotic/temp
458                 release_timereport "deleted temp directory again"
459                 ;;
460         release-buildpk3s)
461                 release_common
462                 pk3stamp=`cat Xonotic/pk3stamp.txt`
463                 src=$1
464                 shift
465                 dst=${src%.pk3dir}
466                 case "$dst" in
467                         data/xonotic-*)
468                                 dst="data/xonotic-$pk3stamp-${dst#data/xonotic-}"
469                                 ;;
470                         *)
471                                 dst="$dst-$pk3stamp"
472                                 ;;
473                 esac
474                 while [ "$#" -gt 1 ]; do
475                         verbose "$SELF" release-buildpk3 "$src" "Xonotic/$dst$2.pk3" "$1"
476                         shift
477                         shift
478                 done
479                 ;;
480         release-pack)
481                 release_common
482                 verbose "$SELF" release-buildpk3s data/font-unifont.pk3dir      raw ''
483                 verbose "$SELF" release-buildpk3s data/font-xolonium.pk3dir     raw ''
484                 verbose "$SELF" release-buildpk3s data/xonotic-data.pk3dir             low '-low' normaldds ''                    normal '-high'
485                 verbose "$SELF" release-buildpk3s data/xonotic-maps.pk3dir             low '-low' normaldds '' mapping '-mapping' normal '-high'
486                 verbose "$SELF" release-buildpk3s data/xonotic-music.pk3dir     raw '' low '-low'
487                 verbose "$SELF" release-buildpk3s data/xonotic-nexcompat.pk3dir        low '-low' normaldds ''                    normal '-high'
488                 ;;
489         release-pack-needsx11)
490                 release_common
491                 case "$DISPLAY" in
492                         '')
493                                 verbose startx "$SELF" release-pack -- /usr/bin/Xvfb :7
494                                 ;;
495                         *)
496                                 verbose "$SELF" release-pack
497                                 ;;
498                 esac
499                 ;;
500         release-zip)
501                 release_common
502                 stamp=`cat Xonotic/stamp.txt`
503                 pk3stamp=`cat Xonotic/pk3stamp.txt`
504                 # exe and dll files do not need +x, so this makes them eligible for 7zip compression too
505                 chmod a-x Xonotic/*.exe Xonotic/*.dll || true
506                 for suffix in '' '-noaes'; do
507                         # build the archives
508                         verbose mkzip Xonotic-$stamp-enginesource$suffix.zip \
509                                 Xonotic/Makefile \
510                                 Xonotic/source/darkplaces/ \
511                                 Xonotic/COPYING Xonotic/GPL-2 Xonotic/GPL-3
512                         verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-engine$suffix.zip
513                         verbose mkzip Xonotic-$stamp-engine$suffix.zip \
514                                 Xonotic/*.dll \
515                                 Xonotic/bin32/*.dll \
516                                 Xonotic/bin64/*.dll \
517                                 Xonotic/*.app \
518                                 Xonotic/xonotic-* \
519                                 Xonotic/xonotic.exe
520                         verbose cp Xonotic-$stamp-engine$suffix.zip Xonotic-$stamp-common$suffix.zip
521                         verbose mkzip Xonotic-$stamp-common$suffix.zip \
522                                 Xonotic/source/d0_blind_id/ \
523                                 Xonotic/source/gmqcc/ \
524                                 Xonotic/source/qcsrc/ \
525                                 Xonotic/Docs \
526                                 Xonotic/misc \
527                                 Xonotic/gmqcc \
528                                 Xonotic/server \
529                                 Xonotic/key_0.d0pk \
530                                 Xonotic/data/font-unifont-$pk3stamp.pk3 \
531                                 Xonotic/data/font-xolonium-$pk3stamp.pk3
532                         verbose cp Xonotic-$stamp-enginesource$suffix.zip Xonotic-$stamp-source$suffix.zip
533                         verbose mkzip Xonotic-$stamp-source$suffix.zip \
534                                 Xonotic/source/d0_blind_id/ \
535                                 Xonotic/source/gmqcc/ \
536                                 Xonotic/source/qcsrc/ \
537                                 Xonotic/misc/logos
538                         verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp$suffix.zip
539                         verbose mkzip0 Xonotic-$stamp$suffix.zip \
540                                 Xonotic/data/xonotic-$pk3stamp-data.pk3 \
541                                 Xonotic/data/xonotic-$pk3stamp-maps.pk3 \
542                                 Xonotic/data/xonotic-$pk3stamp-music.pk3 \
543                                 Xonotic/data/xonotic-$pk3stamp-nexcompat.pk3
544                         verbose cp Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-low$suffix.zip
545                         verbose mkzip0 Xonotic-$stamp-low$suffix.zip \
546                                 Xonotic/data/xonotic-$pk3stamp-data-low.pk3 \
547                                 Xonotic/data/xonotic-$pk3stamp-maps-low.pk3 \
548                                 Xonotic/data/xonotic-$pk3stamp-music-low.pk3 \
549                                 Xonotic/data/xonotic-$pk3stamp-nexcompat-low.pk3
550                         verbose mv Xonotic-$stamp-common$suffix.zip Xonotic-$stamp-high$suffix.zip
551                         verbose mkzip0 Xonotic-$stamp-high$suffix.zip \
552                                 Xonotic/data/xonotic-$pk3stamp-data-high.pk3 \
553                                 Xonotic/data/xonotic-$pk3stamp-maps-high.pk3 \
554                                 Xonotic/data/xonotic-$pk3stamp-music.pk3 \
555                                 Xonotic/data/xonotic-$pk3stamp-nexcompat-high.pk3
556                         # let's pass crypto import laws of some nasty countries
557                         find Xonotic -name \*d0_rijndael\*.so -o -name \*d0_rijndael\*.dylib -o -name \*d0_rijndael\*.dll -o -name \*d0_rijndael\*.c -delete
558                 done
559                 verbose mkzip Xonotic-$stamp-mappingsupport.zip \
560                         Xonotic/mapping
561                 verbose mkzip0 Xonotic-$stamp-mappingsupport.zip \
562                         Xonotic/data/xonotic-$pk3stamp-maps-mapping.pk3
563                 verbose mkzip gmqcc-$stamp.zip \
564                         Xonotic/gmqcc \
565                         Xonotic/source/gmqcc
566                 ;;
567         release)
568                 release_common
569                 verbose "$SELF" release-prepare
570                 verbose "$SELF" release-maps
571                 verbose "$SELF" release-engine
572                 verbose "$SELF" release-qc
573                 verbose "$SELF" release-pack-needsx11
574                 verbose "$SELF" release-zip
575                 ;;
576         *)
577                 handled=false
578                 ;;
579 esac