Mercurial > repos > blastem
annotate build_release @ 1526:9bea1a199f15 nuklear_ui
Filled in About view
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 07 Feb 2018 19:21:44 -0800 |
parents | e1a6e8ee656f |
children | 05c34078e1ac |
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 |
1239
cd9c1acb0053
Remove clean step from SDL and glew dependencies in release_build script. Should not be needed now that each build type will have it's own environment
Michael Pavone <pavone@retrodev.com>
parents:
1238
diff
changeset
|
12 make all |
806
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 |
1239
cd9c1acb0053
Remove clean step from SDL and glew dependencies in release_build script. Should not be needed now that each build type will have it's own environment
Michael Pavone <pavone@retrodev.com>
parents:
1238
diff
changeset
|
24 make all |
811
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 |
1360
e1a6e8ee656f
Print PATH in build_release script to help debug future build failures
Michael Pavone <pavone@retrodev.com>
parents:
1355
diff
changeset
|
27 echo "Path is: $PATH" |
1238
8c34d195df01
Back out -j4 on blastem make as it appears to be calling problems too
Michael Pavone <pavone@retrodev.com>
parents:
1237
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" |
1249
83b3b7ba910e
Eliminate usage of wine in build_release
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
32 verstr=`sed -E -n 's/^[^B]+BLASTEM_VERSION "([^"]+)"/blastem \1/p' blastem.c` |
806
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 |
1249
83b3b7ba910e
Eliminate usage of wine in build_release
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
41 verstr=`./blastem -v` |
806
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" |
1249
83b3b7ba910e
Eliminate usage of wine in build_release
Michael Pavone <pavone@retrodev.com>
parents:
1240
diff
changeset
|
45 ver=`echo $verstr | awk '/blastem/ { gsub(/\r/, "", $2); print $2 }'` |
806
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" |
1355
03cb4dd2499f
Load extra controller mappings from gamecontrollerdb.txt
Michael Pavone <pavone@retrodev.com>
parents:
1249
diff
changeset
|
57 cp -r $binaries shaders default.cfg rom.db gamecontrollerdb.txt "$dir" |
806
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" |
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
1239
diff
changeset
|
71 echo "${dir}.zip" |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
72 else |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
73 rm -f "${dir}.tar.gz" |
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
74 tar -cvzf "${dir}.tar.gz" "$dir" |
1240
c63516b6824a
Fun untested changes for uploading nightly builds
Michael Pavone <pavone@retrodev.com>
parents:
1239
diff
changeset
|
75 echo "${dir}.tar.gz" |
806
2dfcd20a00b6
Added script for building and packaging releases
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
76 fi |