Mercurial > repos > blastem
annotate build_release @ 1124:e4deab85f9ac
The function of the HVC Latch enable bit in mode register 1 is different when not in mode 5
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 27 Dec 2016 13:38:58 -0800 |
parents | 4cbc349a82a9 |
children | 22b4297a5913 |
rev | line source |
---|---|
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #!/bin/sh |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 set -e |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 if [ -z "$OS" ]; then |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 OS=`uname -s` |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 fi |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 if [ $OS = "Linux" ]; then |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 cd sdl |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 ./configure |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 make clean all |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 cd .. |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 rm -rf lib |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 mkdir lib |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 cp sdl/build/.libs/libSDL2-*.so.*.*.* lib |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 sdl=`ls lib` |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 link=`echo $sdl | sed -E 's/(so\.[0-9]*).*/\1/'` |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 cd lib |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 ln -s "$sdl" "$link" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 ln -s "$sdl" libSDL2.so |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 cd .. |
811
b1a09ef90755
Do a clean build of glew from release script
Michael Pavone <pavone@retrodev.com>
parents:
806
diff
changeset
|
23 cd glew |
b1a09ef90755
Do a clean build of glew from release script
Michael Pavone <pavone@retrodev.com>
parents:
806
diff
changeset
|
24 make clean all |
b1a09ef90755
Do a clean build of glew from release script
Michael Pavone <pavone@retrodev.com>
parents:
806
diff
changeset
|
25 cd .. |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 fi |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 make PORTABLE=1 clean all |
977
4cbc349a82a9
Inclue menu.bin in release directories. Added a Windows RC file and icon
Michael Pavone <pavone@retrodev.com>
parents:
812
diff
changeset
|
29 make menu.bin |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
30 if [ $OS = "Windows" ]; then |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
31 binaries="dis.exe zdis.exe stateview.exe vgmplay.exe blastem.exe SDL2.dll" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
32 cmd="wine blastem.exe" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
33 txt=".txt" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
34 else |
977
4cbc349a82a9
Inclue menu.bin in release directories. Added a Windows RC file and icon
Michael Pavone <pavone@retrodev.com>
parents:
812
diff
changeset
|
35 binaries="dis zdis stateview vgmplay blastem termhelper" |
812
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
36 if [ $OS = "Darwin" ]; then |
977
4cbc349a82a9
Inclue menu.bin in release directories. Added a Windows RC file and icon
Michael Pavone <pavone@retrodev.com>
parents:
812
diff
changeset
|
37 binaries="$binaries Frameworks" |
812
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
38 else |
977
4cbc349a82a9
Inclue menu.bin in release directories. Added a Windows RC file and icon
Michael Pavone <pavone@retrodev.com>
parents:
812
diff
changeset
|
39 binaries="$binaries lib" |
812
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
40 fi |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
41 cmd="./blastem" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
42 txt="" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
43 fi |
977
4cbc349a82a9
Inclue menu.bin in release directories. Added a Windows RC file and icon
Michael Pavone <pavone@retrodev.com>
parents:
812
diff
changeset
|
44 binaries="$binaries menu.bin" |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
45 ver=`$cmd -v | awk '/blastem/ { gsub(/\r/, "", $2); print $2 }'` |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
46 if [ $OS = "Windows" ]; then |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
47 suffix='-win32' |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
48 elif [ $OS = "Darwin" ]; then |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
49 suffix='-osx' |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
50 else |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
51 suffix=`file ./blastem | sed -E 's/^[^:]*: [^ ]* ([0-9]*)-bit .*/\1/'` |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
52 fi |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
53 dir="blastem${suffix}-${ver}" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
54 echo $dir |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
55 rm -rf "$dir" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
56 mkdir "$dir" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
57 cp -r $binaries shaders default.cfg rom.db "$dir" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
58 for file in README COPYING CHANGELOG; do |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
59 cp "$file" "$dir"/"$file$txt" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
60 done |
812
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
61 if [ $OS = "Darwin" ]; then |
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
62 cp SDL-LICENSE "$dir" |
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
63 else |
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
64 cp sdl/COPYING.txt "$dir"/SDL-LICENSE$txt |
574495372d1c
Finish OS X support in build_release script. Fix a name conflict in vgmplay on OS X. Call set_exe_str in vgmplay and stateview
Michael Pavone <pavone@retrodev.com>
parents:
811
diff
changeset
|
65 fi |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
66 cp glew/LICENSE.txt "$dir"/GLEW-LICENSE$txt |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
67 |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
68 if [ $OS = "Windows" ]; then |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
69 rm -f "${dir}.zip" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
70 zip -r "${dir}.zip" "$dir" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
71 else |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
72 rm -f "${dir}.tar.gz" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
73 tar -cvzf "${dir}.tar.gz" "$dir" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
74 fi |